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:	Tue, 29 Jan 2013 18:18:38 -0800
From:	"H. Peter Anvin" <hpa@...or.com>
To:	Yinghai Lu <yinghai@...nel.org>, linux-tip-commits@...r.kernel.org
CC:	linux-kernel@...r.kernel.org, mingo@...nel.org, caushik1@...il.com,
	matt.fleming@...el.com, jmillenbach@...il.com, tglx@...utronix.de,
	josh@...htriplett.org, hpa@...ux.intel.com, rob@...dley.net
Subject: Re: [tip:x86/mm2] x86, boot: enable support load bzImage and ramdisk above 4G

Argh.  Too tired.

Yinghai Lu <yinghai@...nel.org> wrote:

>On Tue, Jan 29, 2013 at 5:45 PM, tip-bot for Yinghai Lu
><yinghai@...nel.org> wrote:
>> Commit-ID:  8cf52eb755e5c5046d2a5d5d3b64d839677ed8ae
>> Gitweb:    
>http://git.kernel.org/tip/8cf52eb755e5c5046d2a5d5d3b64d839677ed8ae
>> Author:     Yinghai Lu <yinghai@...nel.org>
>> AuthorDate: Mon, 28 Jan 2013 20:16:44 -0800
>> Committer:  H. Peter Anvin <hpa@...ux.intel.com>
>> CommitDate: Tue, 29 Jan 2013 15:30:22 -0800
>>
>> x86, boot: enable support load bzImage and ramdisk above 4G
>>
>> xloadflags bit 1 indicates that we can load the kernel and all data
>> structure above 4G; it is set if kernel is relocatable and 64bit.
>>
>> bootloader will check if xloadflags bit1 is set to decicde if
>> it could load ramdisk and kernel high above 4G.
>>
>> bootloader will fill value to ext_ramdisk_image/size for high 32bits
>> when it load ramdisk above 4G.
>> kernel use get_ramdisk_image/size to use ext_ramdisk_image/size to
>get
>> right positon for ramdisk.
>>
>> Signed-off-by: Yinghai Lu <yinghai@...nel.org>
>> Cc: Rob Landley <rob@...dley.net>
>> Cc: Matt Fleming <matt.fleming@...el.com>
>> Cc: Gokul Caushik <caushik1@...il.com>
>> Cc: Josh Triplett <josh@...htriplett.org>
>> Cc: Joe Millenbach <jmillenbach@...il.com>
>> Link:
>http://lkml.kernel.org/r/1359058816-7615-26-git-send-email-yinghai@kernel.org
>> Signed-off-by: H. Peter Anvin <hpa@...ux.intel.com>
>> ---
>>  arch/x86/boot/compressed/cmdline.c |  2 ++
>>  arch/x86/boot/compressed/misc.c    | 19 +++++++++++++++++++
>>  arch/x86/boot/header.S             | 10 +++++++++-
>>  arch/x86/kernel/head64.c           |  2 ++
>>  arch/x86/kernel/setup.c            |  4 ++++
>>  5 files changed, 36 insertions(+), 1 deletion(-)
>>
>> diff --git a/arch/x86/boot/compressed/cmdline.c
>b/arch/x86/boot/compressed/cmdline.c
>> index b4c913c..bffd73b 100644
>> --- a/arch/x86/boot/compressed/cmdline.c
>> +++ b/arch/x86/boot/compressed/cmdline.c
>> @@ -17,6 +17,8 @@ static unsigned long get_cmd_line_ptr(void)
>>  {
>>         unsigned long cmd_line_ptr = real_mode->hdr.cmd_line_ptr;
>>
>> +       cmd_line_ptr |= (u64)real_mode->ext_cmd_line_ptr << 32;
>> +
>>         return cmd_line_ptr;
>>  }
>>  int cmdline_find_option(const char *option, char *buffer, int
>bufsize)
>> diff --git a/arch/x86/boot/compressed/misc.c
>b/arch/x86/boot/compressed/misc.c
>> index 7cb56c6..5d8dc86 100644
>> --- a/arch/x86/boot/compressed/misc.c
>> +++ b/arch/x86/boot/compressed/misc.c
>> @@ -318,6 +318,23 @@ static void parse_elf(void *output)
>>         free(phdrs);
>>  }
>>
>> +static void sanitize_real_mode(struct boot_params *real_mode)
>> +{
>> +       if (real_mode->sentinel) {
>> +               /*fields in boot_params are not valid, clear them */
>> +               memset(&real_mode->olpc_ofw_header, 0,
>> +                      (char *)&real_mode->alt_mem_k -
>> +                       (char *)&real_mode->olpc_ofw_header);
>> +               memset(&real_mode->_pad7[0], 0,
>> +                      (char *)&real_mode->edd_mbr_sig_buffer[0] -
>> +                       (char *)&real_mode->_pad7[0]);
>> +               memset(&real_mode->_pad8[0], 0,
>> +                      (char *)&real_mode->eddbuf[0] -
>> +                       (char *)&real_mode->_pad8[0]);
>> +               memset(&real_mode->_pad9[0], 0,
>sizeof(real_mode->_pad9));
>> +       }
>> +}
>> +
>>  asmlinkage void decompress_kernel(void *rmode, memptr heap,
>>                                   unsigned char *input_data,
>>                                   unsigned long input_len,
>> @@ -327,6 +344,8 @@ asmlinkage void decompress_kernel(void *rmode,
>memptr heap,
>>
>>         sanitize_boot_params(real_mode);
>>
>> +       sanitize_real_mode(real_mode);
>> +
>
>Hi, Peter,
>
>sanitize_real_mode() need to be dropped from this patch.
>
>You already have complete patch sanitize_boot_params() applied before.
>
>Thanks
>
>Yinghai

-- 
Sent from my mobile phone. Please excuse brevity and lack of formatting.
--
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