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:	Fri, 24 Aug 2012 19:06:42 -0700
From:	Yinghai Lu <yinghai@...nel.org>
To:	Jacob Shin <jacob.shin@....com>, "H. Peter Anvin" <hpa@...or.com>,
	Ingo Molnar <mingo@...nel.org>
Cc:	X86-ML <x86@...nel.org>, LKML <linux-kernel@...r.kernel.org>,
	Tejun Heo <tj@...nel.org>, Dave Young <dyoung@...hat.com>,
	Chao Wang <chaowang@...hat.com>,
	Vivek Goyal <vgoyal@...hat.com>,
	Andreas Herrmann <andreas.herrmann3@....com>,
	Borislav Petkov <borislav.petkov@....com>
Subject: Re: [PATCH 1/5] x86: Move enabling of PSE and PGE out of init_memory_mapping

On Fri, Aug 24, 2012 at 6:49 PM, Yinghai Lu <yinghai@...nel.org> wrote:
> On Fri, Aug 24, 2012 at 6:25 PM, Yinghai Lu <yinghai@...nel.org> wrote:
>> On Fri, Aug 24, 2012 at 4:55 PM, Jacob Shin <jacob.shin@....com> wrote:
>>> Depending on the platform, init_memory_mapping() may be called multiple
>>> times. Move it out to setup_arch() to avoid writing to cr4 on every call.
>>>
>>> Signed-off-by: Jacob Shin <jacob.shin@....com>
>>> ---
>>>  arch/x86/kernel/setup.c |   10 ++++++++++
>>>  arch/x86/mm/init.c      |   10 ----------
>>>  2 files changed, 10 insertions(+), 10 deletions(-)
>>>
>>> diff --git a/arch/x86/kernel/setup.c b/arch/x86/kernel/setup.c
>>> index f4b9b80..751e020 100644
>>> --- a/arch/x86/kernel/setup.c
>>> +++ b/arch/x86/kernel/setup.c
>>> @@ -913,6 +913,16 @@ void __init setup_arch(char **cmdline_p)
>>>
>>>         init_gbpages();
>>>
>>> +       /* Enable PSE if available */
>>> +       if (cpu_has_pse)
>>> +               set_in_cr4(X86_CR4_PSE);
>>> +
>>> +       /* Enable PGE if available */
>>> +       if (cpu_has_pge) {
>>> +               set_in_cr4(X86_CR4_PGE);
>>> +               __supported_pte_mask |= _PAGE_GLOBAL;
>>> +       }
>>> +
>>
>> please don't put it directly in setup_arch().
>>
>> and another function.
>>
>
> Jacob, hpa
>
> can you use attached one to replace the first patch?

Please use attached two instead.

Thanks

Yinghai

Download attachment "get_page_size_mask_v3.patch" of type "application/octet-stream" (4889 bytes)

Download attachment "mr_cal.patch" of type "application/octet-stream" (2290 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ