linux-block.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@infradead.org>
To: Jens Axboe <axboe@kernel.dk>
Cc: Christoph Hellwig <hch@infradead.org>, linux-block@vger.kernel.org
Subject: Re: [PATCH 3/6] blk-mq: embed blk_mq_ops directly in the request queue
Date: Wed, 14 Nov 2018 07:39:48 -0800	[thread overview]
Message-ID: <20181114153948.GA22811@infradead.org> (raw)
In-Reply-To: <130070cd-e0d1-e75e-4341-7c1b26d1531e@kernel.dk>

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.

  reply	other threads:[~2018-11-14 15:39 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-11-10 15:13 [PATCHSET 0/6] Various block optimizations Jens Axboe
2018-11-10 15:13 ` [PATCH 1/6] nvme: don't disable local ints for polled queue Jens Axboe
2018-11-14  8:43   ` Christoph Hellwig
2018-11-14 15:31     ` Jens Axboe
2018-11-14 15:37     ` Keith Busch
2018-11-14 10:18   ` Max Gurtovoy
2018-11-10 15:13 ` [PATCH 2/6] block: add queue_is_mq() helper Jens Axboe
2018-11-10 15:13 ` [PATCH 3/6] blk-mq: embed blk_mq_ops directly in the request queue Jens Axboe
2018-11-14 15:20   ` Christoph Hellwig
2018-11-14 15:33     ` Jens Axboe
2018-11-14 15:39       ` Christoph Hellwig [this message]
2018-11-14 15:47         ` Jens Axboe
2018-11-14 15:58           ` Christoph Hellwig
2018-11-10 15:13 ` [PATCH 4/6] block: avoid ordered task state change for polled IO Jens Axboe
2018-11-12  9:35   ` jianchao.wang
2018-11-12 16:26     ` Jens Axboe
2018-11-12 16:26       ` Jens Axboe
2018-11-13  2:02       ` jianchao.wang
2018-11-10 15:13 ` [PATCH 5/6] blk-rq-qos: inline check for q->rq_qos functions Jens Axboe
2018-11-14 15:21   ` Christoph Hellwig
2018-11-14 15:33     ` Jens Axboe
2018-11-14 15:40       ` Christoph Hellwig
2018-11-14 17:16         ` Jens Axboe
2018-11-10 15:13 ` [PATCH 6/6] block: add polled wakeup task helper Jens Axboe

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20181114153948.GA22811@infradead.org \
    --to=hch@infradead.org \
    --cc=axboe@kernel.dk \
    --cc=linux-block@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).