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]
Message-ID: <4FC79558.4000403@zytor.com>
Date:	Thu, 31 May 2012 08:59:20 -0700
From:	"H. Peter Anvin" <hpa@...or.com>
To:	Jan Beulich <JBeulich@...e.com>
CC:	Konrad Rzeszutek Wilk <konrad.wilk@...cle.com>,
	Andre Przywara <andre.przywara@....com>,
	Jacob Shin <jacob.shin@....com>, mingo@...e.hu,
	jeremy@...p.org, tglx@...utronix.de, xen-devel@...ts.xensource.com,
	linux-kernel@...r.kernel.org
Subject: Re: [Xen-devel] [PATCH] x86/amd: fix crash as Xen Dom0 on AMD Trinity
 systems

On 05/31/2012 12:17 AM, Jan Beulich wrote:
>>>> On 30.05.12 at 19:17, Konrad Rzeszutek Wilk <konrad.wilk@...cle.com> wrote:
>> I am tempted to write a patch that checks all the pv-cpu-ops
>> to see if there are any that are NULL and throw a warning so
>> that this does not hit us in the future - to be at least more
>> proactive about this sort of thing.
> 
> Perhaps rather than using C99 initializers, using old-style ones
> would be an alternative (assuming that the signatures of the
> respective entries [or at least immediately neighboring ones]
> are different), with a sentinel that is required to remain last
> (i.e. adding at the very end would be prohibited)?
> 
> Or rather than doing a full structure assignment, assign
> individual members directly to pv_cpu_ops (thus leaving
> everything that's not explicitly overridden at its "native"
> default)? After all, this is being done on __init code, so the
> few extra code bytes shouldn't matter much? (All this of
> course in the context of hpa's valid request that there be
> no unused paravirt hooks in the first place.)
> 

Actually there is a really easy way to do this with C99 initializers:
create a macro with all the default assignments, and put that one first.
 This is because it is legal to have more than one C99 initializer for
the same member, the last one is the one that takes effect.

	-hpa


-- 
H. Peter Anvin, Intel Open Source Technology Center
I work for Intel.  I don't speak on their behalf.

--
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