Re: [PATCH 3/6] blk-mq: embed blk_mq_ops directly in the request queue

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 11/14/18 8:39 AM, Christoph Hellwig wrote:
> On Wed, Nov 14, 2018 at 08:33:06AM -0700, Jens Axboe wrote:
>> It's measurable. It doesn't defeat the const at all, the mq_ops
>> is still const and is never modified outside of when the queue
>> is allocated. The only difference is of course that it is no
>> longer residing in a read only mapped section, which is a shame.
> 
> And the separate section is very much the point of the const.
> 
> Without it attackers can easily overwrite the function pointer and
> use it for exploits, as the C const attribute by itself doesn't
> protect from that in any way.  But once it is in a read-only section
> it can't easily be modified.

Are we really worried about this as an attack surface? I get it
for other types of ops, but for mq_ops, I'd be more worried about
callers changing it inadvertently, and they still can't do that.

It's not a huge deal to me, I can drop this one for now and
revisit at a later time.

-- 
Jens Axboe




[Index of Archives]     [Linux RAID]     [Linux SCSI]     [Linux ATA RAID]     [IDE]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Device Mapper]

  Powered by Linux