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=-2.2 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 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 61C4FC2BA19 for ; Wed, 15 Apr 2020 08:56:49 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 3DD8020737 for ; Wed, 15 Apr 2020 08:56:49 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2408210AbgDOI4r (ORCPT ); Wed, 15 Apr 2020 04:56:47 -0400 Received: from mx2.suse.de ([195.135.220.15]:50008 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2405268AbgDOI4j (ORCPT ); Wed, 15 Apr 2020 04:56:39 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id DD294AF92; Wed, 15 Apr 2020 08:56:35 +0000 (UTC) Subject: Re: [PATCH v2 0/3] support setting sysctl parameters from kernel command line To: Masami Hiramatsu Cc: Andrew Morton , Luis Chamberlain , Kees Cook , Iurii Zaikin , linux-kernel@vger.kernel.org, linux-api@vger.kernel.org, linux-mm@kvack.org, Ivan Teterevkov , Michal Hocko , David Rientjes , Matthew Wilcox , "Eric W . Biederman" , "Guilherme G . Piccoli" , Alexey Dobriyan , Thomas Gleixner , Greg Kroah-Hartman , Christian Brauner References: <20200414113222.16959-1-vbabka@suse.cz> <20200415122359.939364e2c54c389c6b3f6457@kernel.org> From: Vlastimil Babka Message-ID: <3fc1303a-cb57-b96e-ce77-7ff6407ab538@suse.cz> Date: Wed, 15 Apr 2020 10:56:35 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.6.0 MIME-Version: 1.0 In-Reply-To: <20200415122359.939364e2c54c389c6b3f6457@kernel.org> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 4/15/20 5:23 AM, Masami Hiramatsu wrote: > Hi Vlastimil, > > On Tue, 14 Apr 2020 13:32:19 +0200 > Vlastimil Babka wrote: > >> This series adds support for something that seems like many people always >> wanted but nobody added it yet, so here's the ability to set sysctl parameters >> via kernel command line options in the form of sysctl.vm.something=1 > > Sounds good. And would you consider to use the bootconfig instead of (or > in addition to) the kernel command line, because it is too short to describe > the sysctl options? "Instead of" - no, as that would defeat the scenario of "I just want to set this one sysctl in grub (possibly interactively) and not update initrd for that". If constructing bootconfig is of similar effort of loading sysctl.conf from initrd, then I see little benefit? "in addition to" - sure! but I hoped that's what already happens as it seemed to me that options from bootconfig are appended to the command line that's then parsed by everyone else, no? But I'll try it to be sure. > With the bootconfig, you can describe the sysctl parameters in an > independent file as same as /etc/sysctl.conf. It is easy to convert > form sysctl.conf to bootconfig because bootconfig format is simply > enhanced structured sysctl.conf :). What we just need is; > > (echo "sysctl {"; cat "/etc/sysctl.conf"; echo "}") >> sysctl.bconf > bootconfig -a sysctl.bconf /boot/initrd.img > > Even with only your patch, since bootconfig can pass the options which > start with "kernel." prefix to kernel command line, so; > > (echo "kernel.sysctl {"; cat "/etc/sysctl.conf"; echo "}") >> sysctl.bconf > bootconfig -a sysctl.bconf /boot/initrd.img Hmm I hope I figure out if the way virtme creates initrd on the fly supports hooking a bootconfig addition :) > should work. > > Thank you, > >