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 X-Spam-Level: X-Spam-Status: No, score=-3.8 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 057D1C2BB85 for ; Fri, 17 Apr 2020 07:46:04 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id CB476214AF for ; Fri, 17 Apr 2020 07:46:03 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=kernel.org header.i=@kernel.org header.b="Xj4JSJa6" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org CB476214AF Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=linuxfoundation.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 52D4B8E0003; Fri, 17 Apr 2020 03:46:03 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 4DD838E0001; Fri, 17 Apr 2020 03:46:03 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 3CC828E0003; Fri, 17 Apr 2020 03:46:03 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0074.hostedemail.com [216.40.44.74]) by kanga.kvack.org (Postfix) with ESMTP id 1509F8E0001 for ; Fri, 17 Apr 2020 03:46:03 -0400 (EDT) Received: from smtpin24.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay05.hostedemail.com (Postfix) with ESMTP id CFB80181AEF3E for ; Fri, 17 Apr 2020 07:46:01 +0000 (UTC) X-FDA: 76716563322.24.mind03_51af2a24aca11 X-HE-Tag: mind03_51af2a24aca11 X-Filterd-Recvd-Size: 2339 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by imf21.hostedemail.com (Postfix) with ESMTP for ; Fri, 17 Apr 2020 07:46:01 +0000 (UTC) Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id EC1D6208E4; Fri, 17 Apr 2020 07:45:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1587109560; bh=6WizWOPGcj4Xsk+M2kiEmA/c8eB5Uh9oJTXzQ1TCN7w=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=Xj4JSJa6TyQgwsI+QhjTwYjgDkTFOAYDY2LEFtr+bPZqtb/4DkhBQ7bzfNN/wmD0i JpcgmxoAHQZS70LF/LwLOMtQBNRDJeKgtyadxtn48xiDqwffsyROHBLP6Aael3/hRu 5cq9jrDTaWqCzzfao/lJ/OZnkPHLcWueb11rWeXI= Date: Fri, 17 Apr 2020 09:45:58 +0200 From: Greg Kroah-Hartman To: Christoph Hellwig Cc: Kees Cook , Iurii Zaikin , Luis Chamberlain , "Rafael J. Wysocki" , Alexei Starovoitov , Daniel Borkmann , linux-kernel@vger.kernel.org, linux-mm@kvack.org, linux-fsdevel@vger.kernel.org, netdev@vger.kernel.org, bpf@vger.kernel.org Subject: Re: [PATCH 6/6] sysctl: pass kernel pointers to ->proc_handler Message-ID: <20200417074558.GC23015@kroah.com> References: <20200417064146.1086644-1-hch@lst.de> <20200417064146.1086644-7-hch@lst.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200417064146.1086644-7-hch@lst.de> 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 Fri, Apr 17, 2020 at 08:41:46AM +0200, Christoph Hellwig wrote: > Instead of having all the sysctl handlers deal with user pointers, which > is rather hairy in terms of the BPF interaction, copy the input to and > from userspace in common code. This also means that the strings are > always NUL-terminated by the common code, making the API a little bit > safer. > > As most handler just pass through the data to one of the common handlers > a lot of the changes are mechnical. > > Signed-off-by: Christoph Hellwig Ah, nice! Reviewed-by: Greg Kroah-Hartman