References: <20170214002526.GA124769@beast> From: Jens Axboe Message-ID: Date: Tue, 14 Feb 2017 08:30:25 -0700 MIME-Version: 1.0 In-Reply-To: <20170214002526.GA124769@beast> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Subject: [kernel-hardening] Re: [PATCH] cdrom: Make device operations read-only To: Kees Cook , linux-kernel@vger.kernel.org Cc: Jonathan Corbet , Tim Waugh , Borislav Petkov , "David S. Miller" , "James E.J. Bottomley" , "Martin K. Petersen" , linux-doc@vger.kernel.org, linux-ide@vger.kernel.org, linux-scsi@vger.kernel.org, kernel-hardening@lists.openwall.com List-ID: On 02/13/2017 05:25 PM, Kees Cook wrote: > Since function tables are a common target for attackers, it's best to keep > them in read-only memory. As such, this makes the CDROM device ops tables > const. This drops additionally n_minors, since it isn't used meaningfully, > and sets the only user of cdrom_dummy_generic_packet explicitly so the > variables can all be const. Agree, it's a good change. Applied for 4.11. -- Jens Axboe