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: <4B7BE561.3070403@redhat.com>
Date:	Wed, 17 Feb 2010 14:47:29 +0200
From:	Avi Kivity <avi@...hat.com>
To:	Luca Barbieri <luca@...a-barbieri.com>
CC:	mingo@...e.hu, hpa@...or.com, a.p.zijlstra@...llo.nl,
	akpm@...ux-foundation.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 01/10] x86: add support for multiple choice alternatives

On 02/17/2010 01:42 PM, Luca Barbieri wrote:
> This patch modifies the x86 alternative macros to allow more than one
> alternative code sequence.
>
> This is done by simply adding multiple alternative patches, which are
> applied in sequence, overwriting previous ones.
>
> +/* alternative assembly primitive: */
> +#define ALTERNATIVE(oldinstr, newinstr, feature)			\
> +      "661:\n\t" oldinstr "\n662:\n"					\
> +      ALTERNATIVE_PATCH("661b", "662b", newinstr, feature)
> +
> +#define ALTERNATIVE3(oldinstr, newinstr1, feature1, newinstr2, feature2)			\
> +      "661:\n\t" oldinstr "\n662:\n"					\
> +      ALTERNATIVE_PATCH("661b", "662b", newinstr1, feature1) "\n" \
> +      ALTERNATIVE_PATCH("661b", "662b", newinstr2, feature2)
> +
> +#define ALTERNATIVE4(oldinstr, newinstr1, feature1, newinstr2, feature2, newinstr3, feature3)			\
> +      "661:\n\t" oldinstr "\n662:\n"					\
> +      ALTERNATIVE_PATCH("661b", "662b", newinstr1, feature1) "\n" \
> +      ALTERNATIVE_PATCH("661b", "662b", newinstr2, feature2) "\n" \
> +      ALTERNATIVE_PATCH("661b", "662b", newinstr3, feature3)
> +
>    

Suggest documenting the precedence of alternatives: if both feature1 and 
feature2 are present, which newinstr is patched in?

-- 
error compiling committee.c: too many arguments to function

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