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]
Date:	Thu, 7 Mar 2013 21:57:29 -0800
From:	Tejun Heo <tj@...nel.org>
To:	Yinghai Lu <yinghai@...nel.org>
Cc:	Thomas Gleixner <tglx@...utronix.de>, Ingo Molnar <mingo@...e.hu>,
	"H. Peter Anvin" <hpa@...or.com>,
	Andrew Morton <akpm@...ux-foundation.org>,
	Thomas Renninger <trenn@...e.de>,
	Tang Chen <tangchen@...fujitsu.com>,
	linux-kernel@...r.kernel.org, Pekka Enberg <penberg@...nel.org>,
	Jacob Shin <jacob.shin@....com>,
	"Rafael J. Wysocki" <rjw@...k.pl>, linux-acpi@...r.kernel.org
Subject: Re: [PATCH 05/14] x86, ACPI: Find acpi tables in initrd early at
 head_32.S/head64.c

On Thu, Mar 07, 2013 at 08:58:31PM -0800, Yinghai Lu wrote:
> diff --git a/arch/x86/kernel/head_32.S b/arch/x86/kernel/head_32.S
> index 73afd11..ca08f0e 100644
> --- a/arch/x86/kernel/head_32.S
> +++ b/arch/x86/kernel/head_32.S
> @@ -149,6 +149,10 @@ ENTRY(startup_32)
>  	call load_ucode_bsp
>  #endif
>  
> +#ifdef CONFIG_ACPI_INITRD_TABLE_OVERRIDE
> +	call x86_acpi_override_find
> +#endif

The function is always defined.  We can probalby lose ifdef here?

Also, does it really have to be called from head_32.S?  No way this
can be done after entering C code?  It would be great if you can
explain overall design choices in the head message (and important
patches).

> diff --git a/arch/x86/kernel/setup.c b/arch/x86/kernel/setup.c
> index 668e658..d43545a 100644
> --- a/arch/x86/kernel/setup.c
> +++ b/arch/x86/kernel/setup.c
> @@ -424,6 +424,32 @@ static void __init reserve_initrd(void)
>  }
>  #endif /* CONFIG_BLK_DEV_INITRD */
>  
> +#ifdef CONFIG_ACPI_INITRD_TABLE_OVERRIDE
> +void __init x86_acpi_override_find(void)
> +{
> +	unsigned long ramdisk_image, ramdisk_size;
> +	unsigned char *p = NULL;
> +
> +#ifdef CONFIG_X86_32
> +	struct boot_params *boot_params_p;
> +
> +	boot_params_p = (struct boot_params *)__pa_symbol(&boot_params);
> +	ramdisk_image = boot_params_p->hdr.ramdisk_image;
> +	ramdisk_size  = boot_params_p->hdr.ramdisk_size;
> +	p = (unsigned char *)ramdisk_image;
> +	acpi_initrd_override_find(p, ramdisk_size, true);
> +#else
> +	ramdisk_image = get_ramdisk_image();
> +	ramdisk_size  = get_ramdisk_size();
> +	if (ramdisk_image)
> +		p = __va(ramdisk_image);
> +	acpi_initrd_override_find(p, ramdisk_size, false);
> +#endif
> +}
> +#else
> +void __init x86_acpi_override_find(void) { }

And add a comment here why we're not doing static inline for the dummy
function?

Thanks.

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