From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id BE255C433EF for ; Mon, 13 Dec 2021 20:28:11 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id BC0A26B0071; Mon, 13 Dec 2021 15:28:00 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id B49616B0073; Mon, 13 Dec 2021 15:28:00 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 9EA7D6B0074; Mon, 13 Dec 2021 15:28:00 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (relay039.a.hostedemail.com [64.99.140.39]) by kanga.kvack.org (Postfix) with ESMTP id 89B2A6B0071 for ; Mon, 13 Dec 2021 15:28:00 -0500 (EST) Received: from smtpin01.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay10.hostedemail.com (Postfix) with ESMTP id 2B8353B4 for ; Mon, 13 Dec 2021 20:27:50 +0000 (UTC) X-FDA: 78913907100.01.DCBB1E5 Received: from casper.infradead.org (casper.infradead.org [90.155.50.34]) by imf03.hostedemail.com (Postfix) with ESMTP id 288302000D for ; Mon, 13 Dec 2021 20:27:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=JC19I3YmCLDNiHEoNY94YjXvINc6vMnbscoJJqR8MbA=; b=OIJHFK/0ykYrEoU6/eIuJs6rCG l6vl5/kGpfVvWQBs1Zge1nsi5I370qhHwDiTptrXoSByHjQO3gzcO0x8Z3wSVVWSGY8fdYCPC3cKg V449PPqCZ7A1Evc4iDxD823eovBsZMLPVh9Jl0xSO2+qu68Mkg35rH+HSJTZzPTtYPGRBstoGXBU/ 2G9VVFlWP5jBYcSEJGhsUD4+o0SRnkM7AcxaVWRuQ2Qi0/jGE2rRWuIWwoKMJj4qm6psLgwjRo8Ja tCvXTd90e0CqPlVvRz/nNdGLdPkdcaab/aY1p0rmJ0sriXA+aBlsuMMO3JKKCZXz003uvUiEQLmB3 8Ki4zV7g==; Received: from willy by casper.infradead.org with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1mwrvC-00D8JT-Qf; Mon, 13 Dec 2021 20:27:42 +0000 Date: Mon, 13 Dec 2021 20:27:42 +0000 From: Matthew Wilcox To: William Kucharski Cc: Kees Cook , "linux-mm@kvack.org" , Thomas Gleixner , "linux-hardening@vger.kernel.org" Subject: Re: [PATCH v3 0/3] Assorted improvements to usercopy Message-ID: References: <20211213142703.3066590-1-willy@infradead.org> <196BFB9E-9A72-48B1-863E-021DE0B162A7@oracle.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <196BFB9E-9A72-48B1-863E-021DE0B162A7@oracle.com> X-Rspamd-Server: rspam09 X-Rspamd-Queue-Id: 288302000D X-Stat-Signature: 8hwmcz1iycox1egy7pb11t4jb53to1fk Authentication-Results: imf03.hostedemail.com; dkim=pass header.d=infradead.org header.s=casper.20170209 header.b="OIJHFK/0"; dmarc=none; spf=none (imf03.hostedemail.com: domain of willy@infradead.org has no SPF policy when checking 90.155.50.34) smtp.mailfrom=willy@infradead.org X-HE-Tag: 1639427268-111369 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On Mon, Dec 13, 2021 at 07:18:57PM +0000, William Kucharski wrote: > I like these, but a quick question: > > Since the usercopy_abort() calls are all because the offset exceeds the page > size, is there a reason why you don't specifically state that via the detail > parameter rather than just supply a NULL pointer? Hmm ... I'd defer to Kees on this, because I'm not familiar with usercopy_abort() usage, but the only places which use the detail parameter today are slab/slub, which use it to pass the name of the slab. I think the user is supposed to infer that we overran the end of the page based on the offset & length values. > Otherwise for the patch series: > > Reviewed-by: William Kucharski Thanks!