Thread (23 messages) 23 messages, 5 authors, 2018-11-14

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

From: Jens Axboe <axboe@kernel.dk>
Date: 2018-11-14 15:48:02

On 11/14/18 8:39 AM, Christoph Hellwig wrote:
On Wed, Nov 14, 2018 at 08:33:06AM -0700, Jens Axboe wrote:
quoted
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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help