From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754384AbcL3PKv (ORCPT ); Fri, 30 Dec 2016 10:10:51 -0500 Received: from bombadil.infradead.org ([198.137.202.9]:42493 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754093AbcL3PKu (ORCPT ); Fri, 30 Dec 2016 10:10:50 -0500 Date: Fri, 30 Dec 2016 07:10:49 -0800 From: Christoph Hellwig To: Dave Jones , Christoph Hellwig , Kees Cook , Linux Kernel Subject: Re: sg_io HARDENED_USERCOPY_PAGESPAN trace Message-ID: <20161230151049.GA20387@infradead.org> References: <20161228214016.leperioiukslpho4@codemonkey.org.uk> <20161229075642.GA30837@infradead.org> <20161229154351.6zrxuagi62pga6mt@codemonkey.org.uk> <20161230133712.GA27511@infradead.org> <20161230150139.ulljsnnqntzku7tq@codemonkey.org.uk> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20161230150139.ulljsnnqntzku7tq@codemonkey.org.uk> User-Agent: Mutt/1.6.1 (2016-04-27) X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org. See http://www.infradead.org/rpr.html Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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.