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:   Thu, 4 May 2023 10:02:40 +0200
From:   Juergen Gross <jgross@...e.com>
To:     Borislav Petkov <bp@...en8.de>
Cc:     linux-kernel@...r.kernel.org, x86@...nel.org,
        mikelley@...rosoft.com, Thomas Gleixner <tglx@...utronix.de>,
        Ingo Molnar <mingo@...hat.com>,
        Dave Hansen <dave.hansen@...ux.intel.com>,
        "H. Peter Anvin" <hpa@...or.com>
Subject: Re: [PATCH v6 01/16] x86/mtrr: remove physical address size
 calculation

On 04.05.23 09:47, Borislav Petkov wrote:
> On Tue, May 02, 2023 at 02:09:16PM +0200, Juergen Gross wrote:
>> diff --git a/arch/x86/kernel/cpu/mtrr/generic.c b/arch/x86/kernel/cpu/mtrr/generic.c
>> index ee09d359e08f..3922552340b1 100644
>> --- a/arch/x86/kernel/cpu/mtrr/generic.c
>> +++ b/arch/x86/kernel/cpu/mtrr/generic.c
>> @@ -38,6 +38,16 @@ u64 mtrr_tom2;
>>   struct mtrr_state_type mtrr_state;
>>   EXPORT_SYMBOL_GPL(mtrr_state);
>>   
>> +static u64 size_or_mask, size_and_mask;
>> +
>> +void __init mtrr_set_mask(void)
>> +{
>> +	unsigned int phys_addr = boot_cpu_data.x86_phys_bits;
>> +
>> +	size_or_mask = ~GENMASK_ULL(phys_addr - PAGE_SHIFT - 1, 0);
>> +	size_and_mask = ~size_or_mask & GENMASK_ULL(39, 20);
> 
> What happened to getting rid of those:
> 
> https://lore.kernel.org/r/20230405202633.GFZC3ZeVWtmjkODYW7@fat_crate.local
> 
> and using the reserved bitfield masks as they're defined for the MSRs?
> 

See patch 2.


Juergen

Download attachment "OpenPGP_0xB0DE9DD628BF132F.asc" of type "application/pgp-keys" (3099 bytes)

Download attachment "OpenPGP_signature" of type "application/pgp-signature" (496 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ