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: <56C77A8B.7080800@zytor.com>
Date:	Fri, 19 Feb 2016 12:26:51 -0800
From:	"H. Peter Anvin" <hpa@...or.com>
To:	"Luis R. Rodriguez" <mcgrof@...nel.org>, tglx@...utronix.de,
	mingo@...hat.com, bp@...en8.de
Cc:	x86@...nel.org, linux-kernel@...r.kernel.org, luto@...capital.net,
	boris.ostrovsky@...cle.com, rusty@...tcorp.com.au,
	david.vrabel@...rix.com, konrad.wilk@...cle.com, mcb30@...e.org,
	jgross@...e.com, ming.lei@...onical.com,
	gregkh@...uxfoundation.org, arnd@...db.de,
	linux-arch@...r.kernel.org, linux@....linux.org.uk,
	benh@...nel.crashing.org, jbaron@...mai.com, ananth@...ibm.com,
	anil.s.keshavamurthy@...el.com, davem@...emloft.net,
	masami.hiramatsu.pt@...achi.com, andriy.shevchenko@...ux.intel.com,
	dwmw2@...radead.org, xen-devel@...ts.xensource.com
Subject: Re: [RFC v2 4/7] asm/sections: add a generic push_section_tbl()

On 02/19/2016 05:45 AM, Luis R. Rodriguez wrote:
> With a generic linker tables solution in place we
> need a general asm solution for declaring entries
> with asm. The first easy target is to cover the C
> asm declarations, guard the header file for now
> and define a first generic entry push_section_tbl()
> to be used later for custom linker table annotations.
> 
> Signed-off-by: Luis R. Rodriguez <mcgrof@...nel.org>
> ---
>  include/asm-generic/sections.h | 10 ++++++++++
>  1 file changed, 10 insertions(+)
> 
> diff --git a/include/asm-generic/sections.h b/include/asm-generic/sections.h
> index af0254c09424..f5ea98bd85d2 100644
> --- a/include/asm-generic/sections.h
> +++ b/include/asm-generic/sections.h
> @@ -3,8 +3,10 @@
>  
>  /* References to section boundaries */
>  
> +#ifndef __ASSEMBLY__
>  #include <linux/compiler.h>
>  #include <linux/types.h>
> +#include <linux/sections.h>
>  
>  /*
>   * Usage guidelines:
> @@ -128,4 +130,12 @@ static inline bool init_section_intersects(void *virt, size_t size)
>  	return memory_intersects(__init_begin, __init_end, virt, size);
>  }
>  
> +/*
> + * Some architectures do not like the "\t" at the end (s39), we should be
> + * able to generalize this further, but so far this covers most architectures.
> + */
> +#define push_section_tbl(section, name, level, flags)			\
> +	".pushsection " SECTION_TBL(section,name,level) ",  \"" #flags "\"\n\t"
> +#endif
> +

I think the \n\t is unnecessary.

	-hpa


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ