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, 21 Aug 2018 19:04:23 +0800
From:   Pu Wen <puwen@...on.cn>
To:     Borislav Petkov <bp@...en8.de>
Cc:     tglx@...utronix.de, mingo@...hat.com, hpa@...or.com,
        x86@...nel.org, thomas.lendacky@....com, pbonzini@...hat.com,
        mchehab@...nel.org, mikhail.jin@...il.com,
        linux-kernel@...r.kernel.org, linux-arch@...r.kernel.org,
        linux-edac@...r.kernel.org
Subject: Re: [PATCH v4 15/16] driver/edac: enable Hygon support to AMD64 EDAC
 driver

On 2018-08-21 16:13, Borislav Petkov wrote:
>On Mon, Aug 20, 2018 at 12:14:58AM +0800, Pu Wen wrote:
...
>> diff --git a/drivers/edac/amd64_edac.c b/drivers/edac/amd64_edac.c
>> index 18aeabb..3cefb25 100644
>> --- a/drivers/edac/amd64_edac.c
>> +++ b/drivers/edac/amd64_edac.c
>> @@ -211,7 +211,8 @@ static int __set_scrub_rate(struct amd64_pvt 
*pvt, u32 new_bw, u32 min_rate)
>>
>>  scrubval = scrubrates[i].scrubval;
>>
>> -	if (pvt->fam == 0x17) {
>> +	if (pvt->fam == 0x17 ||
>> +	   (pvt->vendor == X86_VENDOR_HYGON && pvt->fam == 0x18)) {
>
>Didn't we say that AMD won't do family 0x18 so you don't need the 
vendor check?

Hi Boris:

Based on the feedback from Paolo Bonzini:
"if the x86 maintainers prefer to have a new X86_VENDOR_*
constant, I'd just ignore the fact that AMD will skip family 18h, and
introduce vendor checks along the lines below. This has the advantage
that it's not an issue if AMD ends up _not_ skipping family 18h."
http://lkml.iu.edu/hypermail/linux/kernel/1807.3/06042.html

and the suggestions from Michael Jin:
"The condition case for family 18h and vendor Hygon looks better
because it is more clear."
http://lkml.iu.edu/hypermail/linux/kernel/1808.1/03232.html

we reworked the patch.

Sure, JV will negotiate with AMD and make sure only JV use family 18h and
AMD won't use family 0x18h, which will make the patch tight and clear.

What's the best way to adapt for EDAC driver?
* To simplify the code based on AMD won't do family 0x18 and remove
   vendor checking.
* Or add vendor checking in codes?

Thanks,
Pu Wen

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ