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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0AB50C433EF for ; Wed, 1 Jun 2022 18:34:46 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234986AbiFASep (ORCPT ); Wed, 1 Jun 2022 14:34:45 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51516 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232362AbiFASel (ORCPT ); Wed, 1 Jun 2022 14:34:41 -0400 Received: from mail-ej1-x636.google.com (mail-ej1-x636.google.com [IPv6:2a00:1450:4864:20::636]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E6358AF1CD for ; Wed, 1 Jun 2022 11:34:39 -0700 (PDT) Received: by mail-ej1-x636.google.com with SMTP id rs12so5462659ejb.13 for ; Wed, 01 Jun 2022 11:34:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux-foundation.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=njosF9y/4mY7h7cHbBRt7eN+aSzBOOky31pVud25XUc=; b=NPllnz8RYVxm2SnTV64EXzDNNfLuN5S4zdx4+p5tMDUvBFc2HBR70PHsb0+FhzIYOe 5QBBj11OZ9MvXzN4JDhTfmL34kBXkF5cWwnTwj9QJCpAIQjmWFGOR+tY8hUC7FXp3TPu gpZSXodqw0bfpX1vHBHuU/zTaxExUhW5Sii8s= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=njosF9y/4mY7h7cHbBRt7eN+aSzBOOky31pVud25XUc=; b=STU2hJTeMumaAuhQZuGYcAmolvJUy3yD8aHbHcIBDALVwrR8hMyw5sQdDYsORGe4Gm EKiIApwHhX89M3OkTdA50OGRZ+b7hPxKOObKLg0Vy4jYg2gd7BstTlpnFE7cJR141Rr/ e0mL57GGRas9wLrxkQejltqfkXP6ow2On8bhobVnjhzaCcfKKG6T5miCwIp4INgPXZ5k qJVnKQ/qaj0nIfLhZRYtgaHSqbdx94i5Q1M4sKc3tLacwxQ7C8Uim5uVdbQX43GAGz+L b0P6MW1N4RttfbeOd1xzPEdkhW1h1k7RmaxX1QN3fcND12zhk/VBL5P1NZ8yO7OaLWwk ryDw== X-Gm-Message-State: AOAM530629sIWWwEB8G8JlDfrWtQj3tlSRFc4kymm95TdSZ8ptU1GdRw JiZUF4kjeL9niySzK6o/JNSNnW/p+V3BbbKm X-Google-Smtp-Source: ABdhPJyvFAo7/KgPuM2kl1bVULcRThQoC28P/AP98dwrKdplcegJqeRFWMwtnzxanj8vDaC4A0IPDA== X-Received: by 2002:a17:907:1c8f:b0:6e8:f898:63bb with SMTP id nb15-20020a1709071c8f00b006e8f89863bbmr789353ejc.721.1654108477858; Wed, 01 Jun 2022 11:34:37 -0700 (PDT) Received: from mail-wm1-f45.google.com (mail-wm1-f45.google.com. [209.85.128.45]) by smtp.gmail.com with ESMTPSA id l15-20020a17090615cf00b006f3ef214dd9sm980927ejd.63.2022.06.01.11.34.36 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 01 Jun 2022 11:34:36 -0700 (PDT) Received: by mail-wm1-f45.google.com with SMTP id d5-20020a05600c34c500b0039776acee62so2640259wmq.1 for ; Wed, 01 Jun 2022 11:34:36 -0700 (PDT) X-Received: by 2002:a1c:7207:0:b0:397:66ee:9d71 with SMTP id n7-20020a1c7207000000b0039766ee9d71mr692055wmc.8.1654108476150; Wed, 01 Jun 2022 11:34:36 -0700 (PDT) MIME-Version: 1.0 References: <857cb160a981b5719d8ed6a3e5e7c456915c64fa.1654086665.git.legion@kernel.org> In-Reply-To: From: Linus Torvalds Date: Wed, 1 Jun 2022 11:34:18 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [RFC PATCH 2/4] sysctl: ipc: Do not use dynamic memory To: Alexey Gladkov Cc: LKML , "Eric W . Biederman" , Andrew Morton , Christian Brauner , Iurii Zaikin , Kees Cook , Linux Containers , linux-fsdevel , Luis Chamberlain , Vasily Averin Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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. 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). Linus