Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp640914ybz; Wed, 15 Apr 2020 15:45:12 -0700 (PDT) X-Google-Smtp-Source: APiQypJmGpHN7D4rg2HOYw/s4TNjztKhuBDpXocsURvKx7aR/G5rIZzRS/bXp6MPa2BX1uoomfa3 X-Received: by 2002:aa7:c996:: with SMTP id c22mr25845531edt.308.1586990712808; Wed, 15 Apr 2020 15:45:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1586990712; cv=none; d=google.com; s=arc-20160816; b=DNaazDA9GGQLN9+PLHK8Snc7x0clCZf8K614HaSyJHYQPHhhXFdgvJbyyLk370zXqk afHRX6vOArTuYg4UKOs5dnWvPN9nJ5y57j2G40FpW0yRXqLqe7VzvpJhddTQoRx7YTg1 YzwzeG6pv/kXjOKSbLX0j97qxzPYKLss0Dz/kyoQbZroaXTVTk4gHWD1bgsOHm2CM4QT AAmooh63Kz7PWQkBWmGKJ5uX3fdA81maWYVaUNt6Mr9DFFErw684BYGg6H8RDUBMDyTa 0yNgmV+wAXgACtkQuHToZGcQ40mVn94PzwRSX+Y6IUZNrjp7U/GVcn/QsEGWY8UswCnC n3yw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject; bh=BSp+pChXQkC6nu9PnkwSViYNXDEVaisO4z62Fh4deMQ=; b=EEznsJif9wPt1Hlhsz5+EwCsZfPOlmILUJL6E+drfC3Vu59Z/zzrsvjf3U0EWuPI9U pkascFUP9FGBEYabnrvef2cCJeqOF6X/nTTgOVA23JM1ji/3d0gJkjIEbUin73q/JAUI l5R3SItmlSfvlRYOqR8ZosUFKIs6cBzRhbXY3ffTHTJaBs5/iuAjQcY8a/GTnNqapGi6 mB8CGDLJ57tDPT6lg3zVeGkLq7pRZcsBA/enOpzWsEJMCk/UBoN18mbbyGyktSGNoYZn Y5+/Mg59k3Pf6nT7pAhGVEv+yX7W/ieQTmU4Xfcvx4U8VwIaqaDDF3bvPVIXBviYPxZe hZqw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id c26si12262940eds.33.2020.04.15.15.44.49; Wed, 15 Apr 2020 15:45:12 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2408206AbgDOI4p (ORCPT + 99 others); Wed, 15 Apr 2020 04:56:45 -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, > >