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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Mon, 19 May 2008 13:08:07 -0700
From:	"Yinghai Lu" <yhlu.kernel@...il.com>
To:	"Alexey Starikovskiy" <astarikovskiy@...e.de>
Cc:	mingo@...e.hu, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 5/5] x86: allow MPPARSE to be deselected in SMP configs

On Mon, May 19, 2008 at 8:47 AM, Alexey Starikovskiy
<astarikovskiy@...e.de> wrote:
> Signed-off-by: Alexey Starikovskiy <astarikovskiy@...e.de>
> ---
>
>  arch/x86/Kconfig.debug     |    2 +-
>  arch/x86/kernel/setup.c    |    2 +-
>  arch/x86/kernel/setup_32.c |    2 +-
>  arch/x86/kernel/setup_64.c |    4 ++++
>  4 files changed, 7 insertions(+), 3 deletions(-)
>
>
> diff --git a/arch/x86/Kconfig.debug b/arch/x86/Kconfig.debug
> index 5eb480e..f27de28 100644
> --- a/arch/x86/Kconfig.debug
> +++ b/arch/x86/Kconfig.debug
> @@ -128,7 +128,7 @@ config 4KSTACKS
>
>  config X86_FIND_SMP_CONFIG
>        def_bool y
> -       depends on X86_LOCAL_APIC || X86_VOYAGER
> +       depends on X86_MPPARSE || X86_VOYAGER || X86_VISWS
>        depends on X86_32
>
>  config X86_MPPARSE
> diff --git a/arch/x86/kernel/setup.c b/arch/x86/kernel/setup.c
> index 089ddfa..c86bda7 100644
> --- a/arch/x86/kernel/setup.c
> +++ b/arch/x86/kernel/setup.c
> @@ -12,7 +12,7 @@
>  #include <asm/mpspec.h>
>  #include <asm/apicdef.h>
>
> -#ifdef CONFIG_X86_MPPARSE
> +#ifdef CONFIG_X86_LOCAL_APIC
>  unsigned int num_processors;
>  unsigned disabled_cpus __cpuinitdata;
>
> diff --git a/arch/x86/kernel/setup_32.c b/arch/x86/kernel/setup_32.c
> index 12a31de..9af0d5f 100644
> --- a/arch/x86/kernel/setup_32.c
> +++ b/arch/x86/kernel/setup_32.c
> @@ -846,7 +846,7 @@ void __init setup_arch(char **cmdline_p)
>                        "CONFIG_X86_GENERICARCH or CONFIG_X86_BIGSMP.\n");
>  #endif
>  #endif
> -#ifdef CONFIG_X86_LOCAL_APIC
> +#if defined(CONFIG_X86_MPPARSE) || defined(CONFIG_X86_VISWS)
>        if (smp_found_config)
>                get_smp_config();
>  #endif
> diff --git a/arch/x86/kernel/setup_64.c b/arch/x86/kernel/setup_64.c
> index 9234675..8047db9 100644
> --- a/arch/x86/kernel/setup_64.c
> +++ b/arch/x86/kernel/setup_64.c
> @@ -439,7 +439,9 @@ void __init setup_arch(char **cmdline_p)
>        /*
>        * Find and reserve possible boot-time SMP configuration:
>        */
> +#ifdef CONFIG_X86_MPPARSE
>        find_smp_config();
> +#endif

put the ifdef before the comments?

also if the mptable is not reserved in e820 table (buggy bios), we may
still need to call find_smp_config to reserved the mptable.
otherwise kexec to kernel without acpi support or acpi=off could fail,
because mptable could be damaged already.

>  #ifdef CONFIG_BLK_DEV_INITRD
>        if (boot_params.hdr.type_of_loader && boot_params.hdr.ramdisk_image) {
>                unsigned long ramdisk_image = boot_params.hdr.ramdisk_image;
> @@ -485,8 +487,10 @@ void __init setup_arch(char **cmdline_p)
>        /*
>         * get boot-time SMP configuration:
>         */
> +#ifdef CONFIG_X86_MPPARSE
>        if (smp_found_config)
>                get_smp_config();
> +#endif

put the ifdef before coments please.

>        init_apic_mappings();
>        ioapic_init_mappings();

YH
--
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