Received: by 2002:a05:6602:18e:0:0:0:0 with SMTP id m14csp5871310ioo; Wed, 1 Jun 2022 14:34:44 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx+d0BCtv7ujWnqEjZf7LnPZXg2eNIsy0z5rszB/SC1RORX8MY5emJk7VFbzeO3HpdaH/VW X-Received: by 2002:a63:144c:0:b0:3fc:918a:40d2 with SMTP id 12-20020a63144c000000b003fc918a40d2mr1207135pgu.381.1654119284545; Wed, 01 Jun 2022 14:34:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1654119284; cv=none; d=google.com; s=arc-20160816; b=w4DOoQ3yJ0e5d6EKO7sCf68jP/8SwOslY8iKwdwRtKQHCmYFdjoAPv2dEeecckuBkd AnCkZaFDGYdDirVM3SzAdvPvS+0oe0TyEwv/6Ka/fdBrqLfRAdFq+SdBnpn9ME9lNCbK jjxzH7I+10o+eNlC1XAB9ZEbRbkxoGt9wwk0ndDvzB7v3QsLQgd4GWUy69p5y9M4ndhL xfQZKHdswN1AJNMBZZ+HX5xrepTHuTFmXVZwxyPXiP2xDc+QPabbVIg+u9d615Lzs141 8XvqmpiUUqcT9MbFyFSNcRsMiRsC5ei7bw7HaiYkseJYe0miMAs44RXxIbEPWoYME95A O+NA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=4Ozc3WmHm81wghcNONugG5hk9vFuG2z5HhSD0Snaras=; b=Yzu5adQARq4BNhRcRtsrOtskZ3XHzCxFQU84cy4a89xHGMYSV2TjI92aTy1GcDujyE p0BceHWla31LdA1OXOqx6VnjAXybD54N0w7+JE5AS4PefGdSjl/KTg455l2i/DQA86dz gfV7ZD8hO60KmANGUkOYaWoqSETDNUwNqZX6BrUJhZzSmeJG2JbVxVBwKnvMUXQwMglz GTt/71RPi7mi3424ZBimQ2e5Ymvf1q9s9bvQ+DMLWUjmeDv0XUQiyZVOlPxpiLbnLDZ8 zufkMxqkJYwsGzpMggvL53n7HeW3gMJCsb/chd6eseV2q4ILJs8595RngX5kdxpDo3Oe 44Gg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=i+++ReQn; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id v202-20020a6361d3000000b003fcd3b269c5si601150pgb.507.2022.06.01.14.34.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 01 Jun 2022 14:34:44 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=i+++ReQn; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 13DDB25DFB7; Wed, 1 Jun 2022 13:23:14 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229923AbiFATsY (ORCPT + 99 others); Wed, 1 Jun 2022 15:48:24 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53774 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229537AbiFATsQ (ORCPT ); Wed, 1 Jun 2022 15:48:16 -0400 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9E05F11CA17; Wed, 1 Jun 2022 12:43:00 -0700 (PDT) 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=4Ozc3WmHm81wghcNONugG5hk9vFuG2z5HhSD0Snaras=; b=i+++ReQnDqzP0P6p8kS4NN2U7O ojdpFSmBOMPcjzwyy2Q3sniEbBJQOupIthIpOhs4EWUAdBdzhgj5kwCbSnp8dZUuO+NDQDrSaDLIK AeGjtgP+9RXIl5ERC7FiHris096j7auGtitS7vSZxp1EQIiJmHYdPyQ0gBla8DcHt2Yh2XHJvvkRV EfawBfVZV6nhbOgvVPRevzk596tgaHebq9zlysJ1jzSqwp6MBJFcqU+giDMT8J4XZJaH7Tr9QzW7U 6O/yH44QGbNDIFLpEjDSu8o89ELFU7Eb8ffiTx6/9erZq8ZNmjVfa4ymjf2niy3dFZnfJYS911QPN HWIyFqwg==; Received: from willy by casper.infradead.org with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1nwTy4-006Y6S-Te; Wed, 01 Jun 2022 19:25:20 +0000 Date: Wed, 1 Jun 2022 20:25:20 +0100 From: Matthew Wilcox To: Linus Torvalds Cc: Alexey Gladkov , LKML , "Eric W . Biederman" , Andrew Morton , Christian Brauner , Iurii Zaikin , Kees Cook , Linux Containers , linux-fsdevel , Luis Chamberlain , Vasily Averin Subject: Re: [RFC PATCH 1/4] sysctl: API extension for handling sysctl Message-ID: References: <5ec6759ab3b617f9c12449a9606b6f0b5a7582d0.1654086665.git.legion@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Jun 01, 2022 at 12:23:06PM -0700, Linus Torvalds wrote: > On Wed, Jun 1, 2022 at 12:19 PM Matthew Wilcox wrote: > > > > Why not pass the iocb in ->read and ->write? We're still regretting not > > doing that with file_operations. > > No, all the actual "io" is done by the caller. > > There is no way in hell I want the sysctl callbacks to actually > possibly do user space accesses etc. > > They get a kernel buffer that has already been set up. There is no > iocb or iovec left for them. I wasn't suggesting the iovec. Just the iocb, instead of passing in the ki_filp and the ki_pos. > (That also means that they can take whatever locks they need, > including spinlocks, because there's not going to be any random user > accesses or complex pipe buffer lookups or whatever). > > Linus