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, 2 Feb 2016 11:58:46 -0500
From:	Boris Ostrovsky <boris.ostrovsky@...cle.com>
To:	David Vrabel <david.vrabel@...rix.com>, konrad.wilk@...cle.com
Cc:	xen-devel@...ts.xenproject.org, mcgrof@...e.com,
	linux-kernel@...r.kernel.org, roger.pau@...rix.com
Subject: Re: [Xen-devel] [PATCH v2 07/11] xen/hvmlite: Initialize context for
 secondary VCPUs

On 02/02/2016 11:21 AM, David Vrabel wrote:
> This needs some more description in the commit message.
>
>> --- a/arch/x86/xen/smp.c
>> +++ b/arch/x86/xen/smp.c
> [...]
>> +		hctxt->cpu_regs.x86_32.cs_base = 0;
>> +		hctxt->cpu_regs.x86_32.cs_limit = ~0u;
>> +		hctxt->cpu_regs.x86_32.cs_ar = 0xc9b;
>> +		hctxt->cpu_regs.x86_32.ds_base = 0;
>> +		hctxt->cpu_regs.x86_32.ds_limit = ~0u;
>> +		hctxt->cpu_regs.x86_32.ds_ar = 0xc93;
>> +		hctxt->cpu_regs.x86_32.es_base = 0;
>> +		hctxt->cpu_regs.x86_32.es_limit = ~0u;
>> +		hctxt->cpu_regs.x86_32.es_ar = 0xc93;
>> +		hctxt->cpu_regs.x86_32.ss_base = 0;
>> +		hctxt->cpu_regs.x86_32.ss_limit = ~0u;
>> +		hctxt->cpu_regs.x86_32.ss_ar = 0xc93;
>> +		hctxt->cpu_regs.x86_32.tr_base = 0;
>> +		hctxt->cpu_regs.x86_32.tr_limit = 0xff;
>> +		hctxt->cpu_regs.x86_32.tr_ar = 0x8b;
> Lots of hard-coded values here.  Should this be #defined somewhere?

We also don't need to set bases to zero since hctxt is kzalloc'd. I'll 
remove that and add a comment.

As for macros --- I couldn't find the bits defined symbolically anywhere 
and since this is the only place this is used the macros would be local 
here.

-boris

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ