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:	Fri, 18 Jan 2008 00:02:05 -0500
From:	"H. Peter Anvin" <hpa@...or.com>
To:	Kyle McMartin <kyle@...artin.ca>
CC:	linux-kernel@...r.kernel.org, tglx@...utronix.de, mingo@...hat.com
Subject: Re: [PATCH] x86: merge asm-x86/alternative.h

Kyle McMartin wrote:
> Straightforward merge. Kind of a pity that gas doesn't really have the
> concept of a "long" (long is 4-bytes for some reason.) Nor is it able to
> pad to a non-power of two boundary (for struct alignment) to get rid
> of the struct alt_instr padding.
> 
> Build tested on i386, i386 with lguest & xen paravirt enabled, and
> x86_64. Boot tested on x86_64.
> 
> 
> diff --git a/include/asm-x86/alternative.h b/include/asm-x86/alternative.h
> index 9eef6a3..7047a0f 100644
> --- a/include/asm-x86/alternative.h
> +++ b/include/asm-x86/alternative.h
> @@ -1,5 +1,168 @@
> -#ifdef CONFIG_X86_32
> -# include "alternative_32.h"
> +#ifndef _X86_ALTERNATIVE_H
> +#define _X86_ALTERNATIVE_H
> +
> +#ifdef __KERNEL__
> +
> +#include <linux/types.h>
> +#include <linux/stddef.h>
> +
> +#ifdef CONFIG_X86_64
> +# define ALT_ASMPTR	".quad"
> +# define ALT_ALIGN	"8"
> +# define ALT_INSTR_PAD	5
>  #else
> -# include "alternative_64.h"
> +# define ALT_ASMPTR	".long"
> +# define ALT_ALIGN	"4"
> +# define ALT_INSTR_PAD	1
>  #endif

Please use existing macros from <asm/asm.h> (in the x86 tree.)

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