Received: by 2002:a05:6602:18e:0:0:0:0 with SMTP id m14csp5868661ioo; Wed, 1 Jun 2022 14:30:59 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy8yj8YhNb0tT759RgHMlGrcRd7pJtRU4snlcimlL+YODy2b+u+c+kmAPN2skA/bMa5s4EG X-Received: by 2002:a05:6a00:850:b0:518:a9b2:1a19 with SMTP id q16-20020a056a00085000b00518a9b21a19mr48930557pfk.75.1654119059312; Wed, 01 Jun 2022 14:30:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1654119059; cv=none; d=google.com; s=arc-20160816; b=VgYO27Q5c3Z/VrWr5GY8BYG8hEguDpiiBPHFOEA5g4g3ViHXCCPqX7kTveGkIkowos 8sn9OAlkhk+1ntADP1/rmNllJVMdOsJ/KTO9rB4Vw4Y0gi4m+B8GfDGAcTYkiCj7evZD oKw3LcpVS3QnVCPdnSDdIpIBzt7njMvbTHegHsITo495F4LpCJ0w9AnGMD/dC+9C8pgY zYkisVOJs5ZAuCRQe8E+M+ICcyibC3sKQ5xYR3neD1KlqzaxuAKgVGrnL3fdHn9P/4jn uuiRTt6K8kwAvo3TjuJognd2zbptWN0LmP/dLadYWkqBDFR2KTSecl8le1S7XsSdDUrp ZB/A== 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=qlo1oFMgoFwkPllYWGhLX1zVEZq21u7bkNz33sM2hB0=; b=UqX1En11T5hlRs42d9dUyXjSi40/dBDRUMu68M+ffsQF+Ow5Aa7VFsb1EZKlN1oaRQ N4OXqzzCzOOyT7tgAOMozZu/kkEBsWCvYNtPJv7g/ea7wYEe2+UZ3b0YUlaENUxrajMM JJ0sho1riU6KK6fGxbINVJeTuorIWKTrg6aDV+mPqeaRkb9fWxC/H7cigGRBLD3F2Zmf 6vcEBfxSKXWEHGQfJYcEKJ0AHV4DM+SD/CO/Aw6maBIPpSJktt0N2CX4hZTJq49NOvX7 WLGTlqLcewfEch+aEKBjk+iWbEf3n2FPCy4dai4bf5xaW2G1QrlG2Vec1HFs7Lnq7ob3 mVJg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=DAHPkwQo; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id 75-20020a63024e000000b003fcae4bed03si3030434pgc.743.2022.06.01.14.30.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 01 Jun 2022 14:30:59 -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=@kernel.org header.s=k20201202 header.b=DAHPkwQo; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 915AE320C0E; Wed, 1 Jun 2022 13:22:12 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229498AbiFATaa (ORCPT + 99 others); Wed, 1 Jun 2022 15:30:30 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53800 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229453AbiFATa3 (ORCPT ); Wed, 1 Jun 2022 15:30:29 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CFE5717C680; Wed, 1 Jun 2022 12:28:35 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id B1F536142A; Wed, 1 Jun 2022 19:05:24 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 943E1C385A5; Wed, 1 Jun 2022 19:05:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1654110324; bh=1akgIpnS2NMCsmFJbLar27DOGlMkxA6OTpRa8L7NgqQ=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=DAHPkwQoedaM3ngPVtr3rQzGJm7crFgKZL7JKmcerqQITeveugqI65Pgy7SHkw5ry pyvIKGfOZfWDyGq8yy1ADRgaHkrScmQDQgRN/BxA7f9of5Ln/0XIKpQLo07V/r+JaF 1M7AX4fdB+1t6FIhvpzqgH2gchz6NgfXcVph7kEQE0kHBaMwaYMpuW3TiyMDFCFB7V 7bfuE9+4KuqYerzjijJOOuRbt082aqK+tnFo++iugwwVuLLADkQTn9kD/iVetN6PHa 5BN62FnYLWrkP8/zroJoWBOXsWCST3ZFEumpscWLgqLWndRYTxlgmyIHJT5qxMnfhN x0qmMUvT/WbBQ== Date: Wed, 1 Jun 2022 21:05:17 +0200 From: Alexey Gladkov To: Linus Torvalds Cc: LKML , "Eric W . Biederman" , Andrew Morton , Christian Brauner , Iurii Zaikin , Kees Cook , Linux Containers , linux-fsdevel , Luis Chamberlain , Vasily Averin Subject: Re: [RFC PATCH 2/4] sysctl: ipc: Do not use dynamic memory Message-ID: References: <857cb160a981b5719d8ed6a3e5e7c456915c64fa.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.9 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI, RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=unavailable 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 11:34:18AM -0700, Linus Torvalds wrote: > On Wed, Jun 1, 2022 at 11:25 AM Alexey Gladkov wrote: > > > > I'm not sure how to get rid of ctl_table since net sysctls are heavily > > dependent on it. > > I don't actually think it's worth getting rid of entirely, because > there's just a lot of simple cases where it "JustWorks(tm)" and having > just that table entry describe all the semantics is not wrong at all. > > The name may suck, but hey, it's not a big deal. Changing it now would > be more pain than it's worth. > > No, I was more thinking that things that already need more > infrastructure than that simple static ctl_table entry might be better > off trying to migrate to your new "proper read op" model, and having > more of that dynamic behavior in the read op. This was part of my plan. I wanted to step by step try migrating other sysctls to use open/read/write where it makes sense. To be honest, it was Eric Biederman who came up with the idea to separate open, read and write. I am very grateful to him. > The whole "create dynamic ctl_table entries on the fly" model works, > but it's kind of ugly. > > Anyway, I think all of this is "I think there is more room for cleanup > in this area", and maybe we'll never have enough motivation to > actually do that. > > Your patches seem to fix the extant issue with the ipc namespace, and > the truly disgusting parts (although maybe there are other truly > disgusting things hiding - I didn't go look for them). I also hope to try and fix the f_cred issue. -- Rgrds, legion