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=-0.7 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,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 543DBC43331 for ; Thu, 26 Mar 2020 13:30:51 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 3522320737 for ; Thu, 26 Mar 2020 13:30:51 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726318AbgCZNau (ORCPT ); Thu, 26 Mar 2020 09:30:50 -0400 Received: from youngberry.canonical.com ([91.189.89.112]:39779 "EHLO youngberry.canonical.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726175AbgCZNau (ORCPT ); Thu, 26 Mar 2020 09:30:50 -0400 Received: from ip5f5bf7ec.dynamic.kabel-deutschland.de ([95.91.247.236] helo=wittgenstein) by youngberry.canonical.com with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1jHSao-0003tR-O0; Thu, 26 Mar 2020 13:30:42 +0000 Date: Thu, 26 Mar 2020 14:30:41 +0100 From: Christian Brauner To: Michal Hocko Cc: "Eric W. Biederman" , Vlastimil Babka , Luis Chamberlain , Kees Cook , Iurii Zaikin , linux-kernel@vger.kernel.org, linux-api@vger.kernel.org, linux-mm@kvack.org, Ivan Teterevkov , David Rientjes , Matthew Wilcox , "Guilherme G . Piccoli" Subject: Re: [RFC v2 1/2] kernel/sysctl: support setting sysctl parameters from kernel command line Message-ID: <20200326133041.a3zit3gzdqmphane@wittgenstein> References: <20200325120345.12946-1-vbabka@suse.cz> <874kuc5b5z.fsf@x220.int.ebiederm.org> <20200326065829.GC27965@dhcp22.suse.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20200326065829.GC27965@dhcp22.suse.cz> Sender: linux-api-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-api@vger.kernel.org On Thu, Mar 26, 2020 at 07:58:29AM +0100, Michal Hocko wrote: > On Wed 25-03-20 17:20:40, Eric W. Biederman wrote: > > Vlastimil Babka writes: > [...] > > > + if (strncmp(param, "sysctl.", sizeof("sysctl.") - 1)) > > > + return 0; > > > > Is there any way we can use a slash separated path. I know > > in practice there are not any sysctl names that don't have > > a '.' in them but why should we artifically limit ourselves? > > Because this is the normal userspace interface? Why should it be any > different from calling sysctl? > [...] Imho, we should use ".". Kernel developers aren't the ones setting these options, admins are and if I think back to the times doing that as a job at uni I'd be very confused if I learned that I get to set sysctl options through the kernel command but need to use yet another format than what I usually do to set those from the shell. Consistency is most of the times to be preferred imho. Also, the kernel docs illustrate that the "." syntax is used for other keys as well (e.g. acpi.