linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@infradead.org>
To: Dave Jones <davej@codemonkey.org.uk>,
	Christoph Hellwig <hch@infradead.org>,
	Kees Cook <keescook@chromium.org>,
	Linux Kernel <linux-kernel@vger.kernel.org>
Subject: Re: sg_io HARDENED_USERCOPY_PAGESPAN trace
Date: Fri, 30 Dec 2016 07:10:49 -0800	[thread overview]
Message-ID: <20161230151049.GA20387@infradead.org> (raw)
In-Reply-To: <20161230150139.ulljsnnqntzku7tq@codemonkey.org.uk>

On Fri, Dec 30, 2016 at 10:01:39AM -0500, Dave Jones wrote:
> I threw this debug printk into the pagespan code to see what exactly
> it was complaining about..
> 
> ptr:ffff88042614cff8 end:ffff88042614d003 n:c
> 
> so it was copying 12 bytes that spanned two pages.
> >From my reading of the config option help text, this thing is
> complaining that wasn't allocated with __GFP_COMP maybe ?

If this is on a devie using blk-mq the block core will use high
order allocations (as high as possible) to allocate the requests
for each queue, so struct request could very well span multiple
pages.  But I don't see what __GFP_COMP would have to do with
user copy annoations.  As all requests for a queue are freed
togeth again there is no point in setting __GFP_COMP for the
request allocations.

  reply	other threads:[~2016-12-30 15:10 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-12-28 21:40 sg_io HARDENED_USERCOPY_PAGESPAN trace Dave Jones
2016-12-29  7:56 ` Christoph Hellwig
2016-12-29 15:43   ` Dave Jones
2016-12-30 13:37     ` Christoph Hellwig
2016-12-30 15:01       ` Dave Jones
2016-12-30 15:10         ` Christoph Hellwig [this message]
2017-01-03 21:48           ` Kees Cook
2017-01-08  9:44             ` Christoph Hellwig

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=20161230151049.GA20387@infradead.org \
    --to=hch@infradead.org \
    --cc=davej@codemonkey.org.uk \
    --cc=keescook@chromium.org \
    --cc=linux-kernel@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).