Received: by 2002:a05:6a10:16a7:0:0:0:0 with SMTP id gp39csp1418555pxb; Fri, 13 Nov 2020 12:08:44 -0800 (PST) X-Google-Smtp-Source: ABdhPJxxqx0O06Fvt+gIVaOY89lfdB6fkT0NKbXvu/A4taZ/Ewt4L9Ex7FR2XeluZ86DPqzSf0aL X-Received: by 2002:aa7:d407:: with SMTP id z7mr4414685edq.234.1605298124373; Fri, 13 Nov 2020 12:08:44 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1605298124; cv=none; d=google.com; s=arc-20160816; b=SYSGgKnVFMDjmM6rXiTbLgxoaaFx+EUIbPS9GGSYzvF2Go/NPesnW+l41dCo0hYJzx S6w5LcATFy339khcTvRzB0utrrTevkMEnQ/nBJo7/FJOzsP8EIazX1KLHcCw+OsuiQYP RSaFtSvKPZiiNCsJCFqYW1nCw/jstPoRGpAw2IEznlvQ0k0GzoBd1MAnbPPAra3FcAqi xPXmNG2wN84DS3XuE3IQWdBtZ6myVLa6iUHsXY/fHvJpupTbUZhlqRlSeKp+VMzEFNgB 30Ohr5pKpdi8SacCmCqoG2Dd87MDp9fWlVGupQ+xamcK5WLKFmVxzXnMVE5l+Hd1sW7b UYrg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=oQwnOHsy/0jBPQajX/pBzBhWuSfClhYpeZwlUl+SZ70=; b=xg2P36U9DzEy65p/OVwoxV8RxPAaRTKXOU6owY6CDybcfLLK9hy3Amen4elvTQl7Tc h0BNukhqCkqO/W+JAGisS1fQ0KLLn3r2Usnvtu9VDWqIbNb8LEPJxXF1/FQ3XpFshMRz 0Hq0+NvWGhTG5nHDM5UnUTV/N1+C6Yt/vk1cOYZ179gG6KJrXAWbgw865IRCrlx28wi7 dcMpo8D8nbWrrnT+Ph1Axnd7hVqfgX4kMPM/CU/6a9JWe6Hw2gfNp6IFXqfmJUv8jd3F ezszWD0zzXsyC/uL142P3/HvFcyZWm5nXp/FZcgvwSTDMmOt6I7rC+aknHcAnNK/KCGE hxwQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.com header.s=susede1 header.b=rgV12Nx8; 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=QUARANTINE sp=NONE dis=NONE) header.from=suse.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id e14si7519188edl.270.2020.11.13.12.08.21; Fri, 13 Nov 2020 12:08:44 -0800 (PST) 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=@suse.com header.s=susede1 header.b=rgV12Nx8; 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=QUARANTINE sp=NONE dis=NONE) header.from=suse.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726451AbgKMUGb (ORCPT + 99 others); Fri, 13 Nov 2020 15:06:31 -0500 Received: from mx2.suse.de ([195.135.220.15]:48552 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726181AbgKMUGa (ORCPT ); Fri, 13 Nov 2020 15:06:30 -0500 X-Virus-Scanned: by amavisd-new at test-mx.suse.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1605297989; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=oQwnOHsy/0jBPQajX/pBzBhWuSfClhYpeZwlUl+SZ70=; b=rgV12Nx8hK6b4BRekLkhkiwL6CFsCKz3yEXJ/KxTa0JCiRSrO6njFoa6x9fTTSUPySzEoo 6QkOeWIT9+q9hOkpI/r5lLNQIO56x6noHI4EqsLAiuW9T7Js+4A0kFT3yRVeJ+eH9uzqqG yqMy0JQ/wuLXPBuiUVKQIoRA1QXeJ4o= Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id 166FCABD6; Fri, 13 Nov 2020 20:06:29 +0000 (UTC) Date: Fri, 13 Nov 2020 21:06:28 +0100 From: Petr Mladek To: Matteo Croce Cc: Andrew Morton , Nathan Chancellor , Arnd Bergmann , Kees Cook , linux-kernel@vger.kernel.org, Guenter Roeck , Pavel Tatashin , Mike Rapoport , Tyler Hicks , Nick Desaulniers , clang-built-linux@googlegroups.com Subject: Re: [PATCH] reboot: Fix variable assignments in type_store Message-ID: <20201113162043.GO1602@alley> References: <20201110202746.9690-1-mcroce@linux.microsoft.com> <20201112035023.974748-1-natechancellor@gmail.com> <20201112151320.e0153ace2f2eb5b59eabbdcb@linux-foundation.org> <20201112171826.0fa3c6158f3c2780f90faafe@linux-foundation.org> <20201112184637.de44afedf0ce0dcab36dd0ad@linux-foundation.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri 2020-11-13 03:58:49, Matteo Croce wrote: > On Fri, Nov 13, 2020 at 3:46 AM Andrew Morton wrote: > > > > On Fri, 13 Nov 2020 02:38:18 +0100 Matteo Croce wrote: > > > > > At this point, since 'pci' enables BOOT_CF9_FORCE type and > > > BOOT_CF9_SAFE is not user selectable, should I simply leave only > > > 'pci'? > > > > > > This way, we'll have the same set of options for both sysfs and kernel cmdline. > > > > Well, you're the reboot expert ;) > > > > So honored! :) > > > But my $0.02 is yes, let's keep the command-line and sysfs interfaces > > in sync and cover it all in documentation. It would of course be > > problematic to change the existing reboot= interface. > > > > I assume that means doing this? > > > > - #define BOOT_CF9_FORCE_STR "cf9_force" > > + #define BOOT_CF9_FORCE_STR "pci" > > - #define BOOT_CF9_SAFE_STR "cf9_safe" > > Either BOOT_PCI_STR or BOOT_CF9_FORCE_STR, I have no strong preference. > > The syntax is 'pci' while the enum BOOT_CF9_FORCE, so we can't please both. The question is whether we should modify/allow to set these values at all. Anyway, we must prevent them on non-x86 architectures because the reboot behavior would be undefined there. They could probably make a mess even on many x86-architectures. I have to admit it has become much more complicated than I thought. It brings back Andrew's original question whether this interface is really needed. Are you going to use in the real life? The interface might do more harm then good when it allows to set reboot_type that is not normally accessible or disable it when it is strictly needed. Anyway, we should get input from some x86-experts about the BOOT_CF9 values. Best Regards, Petr