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 46E5CC43331 for ; Thu, 26 Mar 2020 13:30:53 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 1513A20774 for ; Thu, 26 Mar 2020 13:30:53 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 1513A20774 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=ubuntu.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id A9C7C6B0032; Thu, 26 Mar 2020 09:30:52 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id A4E4D6B006E; Thu, 26 Mar 2020 09:30:52 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 963646B0070; Thu, 26 Mar 2020 09:30:52 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0135.hostedemail.com [216.40.44.135]) by kanga.kvack.org (Postfix) with ESMTP id 7E8BB6B0032 for ; Thu, 26 Mar 2020 09:30:52 -0400 (EDT) Received: from smtpin18.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay04.hostedemail.com (Postfix) with ESMTP id 7E1A3582D for ; Thu, 26 Mar 2020 13:30:52 +0000 (UTC) X-FDA: 76637598744.18.step69_41ca3bda86114 X-HE-Tag: step69_41ca3bda86114 X-Filterd-Recvd-Size: 2839 Received: from youngberry.canonical.com (youngberry.canonical.com [91.189.89.112]) by imf22.hostedemail.com (Postfix) with ESMTP for ; Thu, 26 Mar 2020 13:30:51 +0000 (UTC) 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> 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 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.