lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20120117195841.48fe8236@pyramind.ukuu.org.uk>
Date:	Tue, 17 Jan 2012 19:58:41 +0000
From:	Alan Cox <alan@...rguk.ukuu.org.uk>
To:	Michael D Labriola <mlabriol@...b.com>
Cc:	Ingo Molnar <mingo@...e.hu>, Matthew Garrett <mjg59@...f.ucam.org>,
	"H. Peter Anvin" <hpa@...or.com>,
	Kushal Koolwal <kushalkoolwal@...il.com>,
	linux-kernel@...r.kernel.org, michael.d.labriola@...il.com,
	support@...salogic.com, Thomas Gleixner <tglx@...utronix.de>,
	x86@...nel.org
Subject: Re: [PATCH] x86, reboot: skip DMI checks if reboot set by user

On Tue, 17 Jan 2012 10:16:03 -0500
Michael D Labriola <mlabriol@...b.com> wrote:

> This commit causes DMI checks for vendor specific reboot
> quirks to be skipped if the user passed in a reboot= arg
> on the command line.
> 
> Signed-off-by: Michael D Labriola <mlabriol@...b.com>
> ---
>  arch/x86/kernel/reboot.c |   16 ++++++++++++++--
>  1 files changed, 14 insertions(+), 2 deletions(-)
> 
> diff --git a/arch/x86/kernel/reboot.c b/arch/x86/kernel/reboot.c
> index 37a458b..4240d58 100644
> --- a/arch/x86/kernel/reboot.c
> +++ b/arch/x86/kernel/reboot.c
> @@ -38,6 +38,7 @@ static const struct desc_ptr no_idt = {};
>  static int reboot_mode;
>  enum reboot_type reboot_type = BOOT_ACPI;
>  int reboot_force;
> +int reboot_user;

static ...

>                 case 'f':
>                         reboot_force = 1;
> +                       reboot_user = 1;

Cleaner would be to add a 

BOOT_ACPI_FORCE perhaps so you can tell ACPI v ACPI specified by user

>                         break;
>                 }
>  
> @@ -316,7 +322,10 @@ static struct dmi_system_id __initdata 
> reboot_dmi_table[] = {
>  
>  static int __init reboot_init(void)
>  {
> -       dmi_check_system(reboot_dmi_table);
> +       /* Skip the DMI check if user set reboot= on the command line */
> +       if (!reboot_user) {

then do

	if (reboot_type == BOOT_ACPI)
> +               dmi_check_system(reboot_dmi_table);
> +       }
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ