Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp2347060ybt; Fri, 3 Jul 2020 07:03:49 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwxF0U7Do2FL659ax9Yxav6Ivd5B2P4NLXOF0uxsxnCgv0QQKwJtBBiz1vT9Z04T52ScEwS X-Received: by 2002:a17:906:3bd5:: with SMTP id v21mr31187777ejf.329.1593785029368; Fri, 03 Jul 2020 07:03:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1593785029; cv=none; d=google.com; s=arc-20160816; b=cXrZ1ObXgy+eqNd9UdJDQHLOWL/K9Owt9ZPcb0kutVqL/MCd+xthRMH90oWr2sfVUZ bLxv7oEzkP1ggfme7DcRpeFKD3zDuqznjx9Te7/kZu5wXzBxXWZ5u9J0l5tRzjVPEzN5 YKzJs1POK+qnvQRLR6n+hc7vQ5SxB9JHCG9LnJjOUIJh7Hv5dD4Fz0ySfwqfyej/qxJI L4Kd7biUBiYyzsjEqzKFvTZsU1nsHN9U6Y7ueIbqfwjpUuxjaX2yB3bDThBe/rjXAxC7 Sm0LpxuDsNKO9VP440BuxPqkPl2foNVyLWLVSMVN17daaZHTjpTFtExXQgWrHvem40G8 oCOA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=x5F3VEjoP3FKUljXbLKCPFmED7t6N7RsImdk24VNfSc=; b=XR8Ln1S4+G0BOArOQsTIp/l+bv5Zi8qEDL/g7RcqpJVxKbJ6t16PkScH3PY46HEWQK htOvg3fKjkjbbwrwZVQjTRhcLaXlkrdyvs1ZoGcmuHbYZQS/z3lvsrk6OrLo5yblgCG8 eyImjwW42ZFLlq0YazbrZrkI+/ksde+KHNFOoPVaKnDwg28EUvNLBKPdku54LnbV9AQa vm27JmCxfjD+/b/ed4vgkjGPZ0z3boK7lDeq6Ll90qKO5M2vCH3M4+5TFVXkUi2RrbkZ BaJe1tyX2BpybE2wtwCjg1J/rHu1fLzroWumn/yMJ9D5baXQi+ZkubAlX46fcTUPoKFQ ojwQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=ilCOu9gY; 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; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id be11si5728098edb.482.2020.07.03.07.03.26; Fri, 03 Jul 2020 07:03:49 -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; dkim=pass header.i=@google.com header.s=20161025 header.b=ilCOu9gY; 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; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726111AbgGCOA0 (ORCPT + 99 others); Fri, 3 Jul 2020 10:00:26 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38588 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726035AbgGCOAZ (ORCPT ); Fri, 3 Jul 2020 10:00:25 -0400 Received: from mail-vk1-xa44.google.com (mail-vk1-xa44.google.com [IPv6:2607:f8b0:4864:20::a44]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 65244C08C5C1 for ; Fri, 3 Jul 2020 07:00:25 -0700 (PDT) Received: by mail-vk1-xa44.google.com with SMTP id h1so7045462vkn.12 for ; Fri, 03 Jul 2020 07:00:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=x5F3VEjoP3FKUljXbLKCPFmED7t6N7RsImdk24VNfSc=; b=ilCOu9gYBMdqPI/WloUGvxq/+wnGHnQ1ZAHN1ZxENszq7GPp9XNKx9zUBnE+fK9TgU kQxMN49VEXWiecCYQDAL/WKl0bVLcsUEfsmWRF1OqyDngNlhJxLHKL5br824jjZHpUjJ 7hdtRocMgi9/yp6SHT51EkOw9NH2gxFvrwG3GVZa6/L7YD+wxw1rIg9Gl4V8GOyMVAaE cpP+FflthlLgMOCHyBLj9hCGNiq5UWE+L7Cd0KnzVOHXaoX++5r96myY1zSsJ810tV+B fijJbiHJsmfDJ/u/k7Z4OHk1777RqOIaN0m4d2ZRnvaostA+caNpfnc2Ov0C5PnO46BU +LoQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=x5F3VEjoP3FKUljXbLKCPFmED7t6N7RsImdk24VNfSc=; b=HSPU4AemdqG0j1GCNvpVnN5qrC/ao5L2uCKWTwffviuZVPEU9pLtUXCi+ork/6BgJs ULFDs8YftiKWZcbMU3AjfSBeQ1sYZIeNMK2QFwAU46HQR2RviTBTF/s+PBKDK3DgMR7V 1utPfvNlUtV59CpsbBz2N0XIpQs6Z3Z0F4hCypd34RbY06/GtT+k2u55lDRK4RNd6d45 SBgRpG91yfk+F23IKcWInPWdSxdqa78HyItA5+ig4iAJfHdaBlp+hAGimCBxS+VIjVn6 DO+q0TAYIhc30rU/dtcQNczUbeA0K3nljeVTAXMs0LEsOgqRufAJv+s3+sqe0BI7g+Px xuGw== X-Gm-Message-State: AOAM531T8Uc+0acoPu3VMZTRdjp7HHnP3IlFXy/Pz/4ztGArJ8Ie+TV4 Kli6lFioNlaFSuk0Ceyq02Zstnz8DfAWGJjR2aqXIw== X-Received: by 2002:a1f:3f05:: with SMTP id m5mr1556534vka.92.1593784823956; Fri, 03 Jul 2020 07:00:23 -0700 (PDT) MIME-Version: 1.0 References: <20200702221237.2517080-1-abhishekbh@google.com> <20200703114037.GD2999146@linux.ibm.com> In-Reply-To: <20200703114037.GD2999146@linux.ibm.com> From: Doug Anderson Date: Fri, 3 Jul 2020 07:00:11 -0700 Message-ID: Subject: Re: [PATCH v3] x86/speculation/l1tf: Add KConfig for setting the L1D cache flush mode To: Mike Rapoport Cc: Abhishek Bhardwaj , Anthony Steinhauser , LKML , Waiman Long , Borislav Petkov , "H. Peter Anvin" , Ingo Molnar , Jim Mattson , Joerg Roedel , Josh Poimboeuf , Mark Gross , Paolo Bonzini , Pawan Gupta , Peter Zijlstra , Sean Christopherson , Thomas Gleixner , Tony Luck , Vitaly Kuznetsov , Wanpeng Li , kvm@vger.kernel.org, x86 Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, On Fri, Jul 3, 2020 at 4:40 AM Mike Rapoport wrote: > > On Thu, Jul 02, 2020 at 11:43:47PM -0700, Abhishek Bhardwaj wrote: > > We have tried to steer away from kernel command line args for a few reasons. > > > > I am paraphrasing my colleague Doug's argument here (CC'ed him as well) - > > > > - The command line args are getting unwieldy. Kernel command line > > parameters are not a scalable way to set kernel config. It's intended > > as a super limited way for the bootloader to pass info to the kernel > > and also as a way for end users who are not compiling the kernel > > themselves to tweak kernel behavior. > > Why cannot you simply add this option to CONFIG_CMDLINE at your kernel build > scripts? At least in the past I've seen that 'CONFIG_CMDLINE' interacts badly with the bootloader provided command line in some architectures. In days of yore I tried to post a patch to fix this, at least on ARM targets, but it never seemed to go anywhere upstream. I'm going to assume this is still a problem because I still see an ANDROID tagged patch in the Chrome OS 5.4 tree: In any case, as per my previous arguments, stuffing lots of config into the cmdline is a bit clunky and doesn't scale well. You end up with a really long run on command line and it's hard to tell where one config option ends and the next one starts and if the same concept is there more than one time it's hard to tell and something might cancel out a previous config option or maybe it won't and by the time you end up finishing this it's hard to tell where you started. :-) > > - Also, we know we want this setting from the start. This is a > > definite smell that it deserves to be a compile time thing rather than > > adding extra code + whatever miniscule time at runtime to pass an > > extra arg. > > This might be a compile time thing in your environment, but not > necessarily it must be the same in others. For instance, what option > should distro kernels select? Nothing prevents people from continuing to use the command line options if they want, right? This just allows a different default. So if a distro is security focused and decided that it wanted a slower / more secure default then it could ship that way but individual users could still override, right? > > I think this was what CONFIGS were intended for. I'm happy to add all > > this to the commit message once it's approved in spirit by the > > maintainers. > > > > On Thu, Jul 2, 2020 at 8:18 PM Anthony Steinhauser > > wrote: > > > > > > Yes, this probably requires an explanation why the change is necessary > > > or useful. Without that it is difficult to give some meaningful > > > feedback. > > > > > > > > -- > > Abhishek > > -- > Sincerely yours, > Mike.