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:	Mon, 8 Sep 2008 07:53:48 -0700
From:	"Yinghai Lu" <yhlu.kernel@...il.com>
To:	"Jan Beulich" <jbeulich@...ell.com>
Cc:	"Ingo Molnar" <mingo@...e.hu>, tglx@...utronix.de,
	linux-kernel@...r.kernel.org, hpa@...or.com
Subject: Re: [PATCH] x86: x86_{phys,virt}_bits field also for i386 (v2)

On Mon, Sep 8, 2008 at 3:50 AM, Jan Beulich <jbeulich@...ell.com> wrote:
>>>> Ingo Molnar <mingo@...e.hu> 05.09.08 17:00 >>>
>>
>>* Jan Beulich <jbeulich@...ell.com> wrote:
>>
>>> Make the x86_{phys,virt}_bits common for 32- and 64-bits, and use the
>>> former in ioremap's phys_addr_valid() check also on 32bit/PAE.
>>>
>>> Signed-off-by: Jan Beulich <jbeulich@...ell.com>
>>>
>>> ---
>>>  arch/x86/kernel/cpu/common.c |   17 +++++++++++++++++
>>>  arch/x86/mm/ioremap.c        |   15 ++++++---------
>>>  include/asm-x86/processor.h  |    4 ++--
>>>  3 files changed, 25 insertions(+), 11 deletions(-)
>>
>>hm, the cpu/common.c bits just got reworked massively in tip/master.
>>I've tried a blind merge (see the patch below) but at least the first
>>hunk looks wrong. Mind looking at how to merge this?
>
> This is my take at it:
>
> Make the x86_{phys,virt}_bits common for 32- and 64-bits, and use the
> former in ioremap's phys_addr_valid() check also on 32bit/PAE.
>
> Signed-off-by: Jan Beulich <jbeulich@...ell.com>
>
> ---
>  arch/x86/kernel/cpu/common.c |   22 +++++++++++++++++++++-
>  arch/x86/mm/ioremap.c        |   13 ++++++-------
>  include/asm-x86/processor.h  |    4 ++--
>  3 files changed, 29 insertions(+), 10 deletions(-)
>
> --- linux-x86.orig/arch/x86/kernel/cpu/common.c
> +++ linux-x86/arch/x86/kernel/cpu/common.c
> @@ -472,14 +472,20 @@ static void __cpuinit get_cpu_cap(struct
>                if (xlvl >= 0x80860001)
>                        c->x86_capability[2] = cpuid_edx(0x80860001);
>        }
> +#endif
>
>        if (c->extended_cpuid_level >= 0x80000008) {
>                u32 eax = cpuid_eax(0x80000008);
>
>                c->x86_virt_bits = (eax >> 8) & 0xff;
>                c->x86_phys_bits = eax & 0xff;
> +               /* CPUID workaround for Intel 0F33/0F34 CPU */
> +               if (c->x86_vendor == X86_VENDOR_INTEL
> +                   && c->x86 == 0xF && c->x86_model == 0x3
> +                   && (c->x86_mask == 0x3
> +                       || c->x86_mask == 0x4))
> +                       c->x86_phys_bits = 36;

these lines should be in early_init_intel/init_intel.
also need to be checked if it could be overwriten by others functions later..

BTW, did you address Peter's concern?

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