All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mark Rutland <mark.rutland@arm.com>
To: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Cc: linux-arm-kernel@lists.infradead.org,
	kernel-hardening@lists.openwall.com, will.deacon@arm.com,
	catalin.marinas@arm.com, leif.lindholm@linaro.org,
	keescook@chromium.org, linux-kernel@vger.kernel.org,
	stuart.yoder@freescale.com, bhupesh.sharma@freescale.com,
	arnd@arndb.de, marc.zyngier@arm.com, christoffer.dall@linaro.org,
	labbott@fedoraproject.org, matt@codeblueprint.co.uk
Subject: [kernel-hardening] Re: [PATCH v4 14/22] arm64: make asm/elf.h available to asm files
Date: Tue, 26 Jan 2016 17:42:18 +0000	[thread overview]
Message-ID: <20160126174217.GH29086@leverpostej> (raw)
In-Reply-To: <1453828249-14467-15-git-send-email-ard.biesheuvel@linaro.org>

On Tue, Jan 26, 2016 at 06:10:41PM +0100, Ard Biesheuvel wrote:
> This reshuffles some code in asm/elf.h and puts a #ifndef __ASSEMBLY__
> around its C definitions so that the CPP defines can be used in asm
> source files as well.
> 
> Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>

Acked-by: Mark Rutland <mark.rutland@arm.com>

Mark.

> ---
>  arch/arm64/include/asm/elf.h | 22 ++++++++++++--------
>  1 file changed, 13 insertions(+), 9 deletions(-)
> 
> diff --git a/arch/arm64/include/asm/elf.h b/arch/arm64/include/asm/elf.h
> index faad6df49e5b..435f55952e1f 100644
> --- a/arch/arm64/include/asm/elf.h
> +++ b/arch/arm64/include/asm/elf.h
> @@ -24,15 +24,6 @@
>  #include <asm/ptrace.h>
>  #include <asm/user.h>
>  
> -typedef unsigned long elf_greg_t;
> -
> -#define ELF_NGREG (sizeof(struct user_pt_regs) / sizeof(elf_greg_t))
> -#define ELF_CORE_COPY_REGS(dest, regs)	\
> -	*(struct user_pt_regs *)&(dest) = (regs)->user_regs;
> -
> -typedef elf_greg_t elf_gregset_t[ELF_NGREG];
> -typedef struct user_fpsimd_state elf_fpregset_t;
> -
>  /*
>   * AArch64 static relocation types.
>   */
> @@ -127,6 +118,17 @@ typedef struct user_fpsimd_state elf_fpregset_t;
>   */
>  #define ELF_ET_DYN_BASE	(2 * TASK_SIZE_64 / 3)
>  
> +#ifndef __ASSEMBLY__
> +
> +typedef unsigned long elf_greg_t;
> +
> +#define ELF_NGREG (sizeof(struct user_pt_regs) / sizeof(elf_greg_t))
> +#define ELF_CORE_COPY_REGS(dest, regs)	\
> +	*(struct user_pt_regs *)&(dest) = (regs)->user_regs;
> +
> +typedef elf_greg_t elf_gregset_t[ELF_NGREG];
> +typedef struct user_fpsimd_state elf_fpregset_t;
> +
>  /*
>   * When the program starts, a1 contains a pointer to a function to be
>   * registered with atexit, as per the SVR4 ABI.  A value of 0 means we have no
> @@ -186,4 +188,6 @@ extern int aarch32_setup_vectors_page(struct linux_binprm *bprm,
>  
>  #endif /* CONFIG_COMPAT */
>  
> +#endif /* !__ASSEMBLY__ */
> +
>  #endif
> -- 
> 2.5.0
> 

WARNING: multiple messages have this Message-ID (diff)
From: mark.rutland@arm.com (Mark Rutland)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v4 14/22] arm64: make asm/elf.h available to asm files
Date: Tue, 26 Jan 2016 17:42:18 +0000	[thread overview]
Message-ID: <20160126174217.GH29086@leverpostej> (raw)
In-Reply-To: <1453828249-14467-15-git-send-email-ard.biesheuvel@linaro.org>

On Tue, Jan 26, 2016 at 06:10:41PM +0100, Ard Biesheuvel wrote:
> This reshuffles some code in asm/elf.h and puts a #ifndef __ASSEMBLY__
> around its C definitions so that the CPP defines can be used in asm
> source files as well.
> 
> Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>

Acked-by: Mark Rutland <mark.rutland@arm.com>

Mark.

> ---
>  arch/arm64/include/asm/elf.h | 22 ++++++++++++--------
>  1 file changed, 13 insertions(+), 9 deletions(-)
> 
> diff --git a/arch/arm64/include/asm/elf.h b/arch/arm64/include/asm/elf.h
> index faad6df49e5b..435f55952e1f 100644
> --- a/arch/arm64/include/asm/elf.h
> +++ b/arch/arm64/include/asm/elf.h
> @@ -24,15 +24,6 @@
>  #include <asm/ptrace.h>
>  #include <asm/user.h>
>  
> -typedef unsigned long elf_greg_t;
> -
> -#define ELF_NGREG (sizeof(struct user_pt_regs) / sizeof(elf_greg_t))
> -#define ELF_CORE_COPY_REGS(dest, regs)	\
> -	*(struct user_pt_regs *)&(dest) = (regs)->user_regs;
> -
> -typedef elf_greg_t elf_gregset_t[ELF_NGREG];
> -typedef struct user_fpsimd_state elf_fpregset_t;
> -
>  /*
>   * AArch64 static relocation types.
>   */
> @@ -127,6 +118,17 @@ typedef struct user_fpsimd_state elf_fpregset_t;
>   */
>  #define ELF_ET_DYN_BASE	(2 * TASK_SIZE_64 / 3)
>  
> +#ifndef __ASSEMBLY__
> +
> +typedef unsigned long elf_greg_t;
> +
> +#define ELF_NGREG (sizeof(struct user_pt_regs) / sizeof(elf_greg_t))
> +#define ELF_CORE_COPY_REGS(dest, regs)	\
> +	*(struct user_pt_regs *)&(dest) = (regs)->user_regs;
> +
> +typedef elf_greg_t elf_gregset_t[ELF_NGREG];
> +typedef struct user_fpsimd_state elf_fpregset_t;
> +
>  /*
>   * When the program starts, a1 contains a pointer to a function to be
>   * registered with atexit, as per the SVR4 ABI.  A value of 0 means we have no
> @@ -186,4 +188,6 @@ extern int aarch32_setup_vectors_page(struct linux_binprm *bprm,
>  
>  #endif /* CONFIG_COMPAT */
>  
> +#endif /* !__ASSEMBLY__ */
> +
>  #endif
> -- 
> 2.5.0
> 

WARNING: multiple messages have this Message-ID (diff)
From: Mark Rutland <mark.rutland@arm.com>
To: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Cc: linux-arm-kernel@lists.infradead.org,
	kernel-hardening@lists.openwall.com, will.deacon@arm.com,
	catalin.marinas@arm.com, leif.lindholm@linaro.org,
	keescook@chromium.org, linux-kernel@vger.kernel.org,
	stuart.yoder@freescale.com, bhupesh.sharma@freescale.com,
	arnd@arndb.de, marc.zyngier@arm.com, christoffer.dall@linaro.org,
	labbott@fedoraproject.org, matt@codeblueprint.co.uk
Subject: Re: [PATCH v4 14/22] arm64: make asm/elf.h available to asm files
Date: Tue, 26 Jan 2016 17:42:18 +0000	[thread overview]
Message-ID: <20160126174217.GH29086@leverpostej> (raw)
In-Reply-To: <1453828249-14467-15-git-send-email-ard.biesheuvel@linaro.org>

On Tue, Jan 26, 2016 at 06:10:41PM +0100, Ard Biesheuvel wrote:
> This reshuffles some code in asm/elf.h and puts a #ifndef __ASSEMBLY__
> around its C definitions so that the CPP defines can be used in asm
> source files as well.
> 
> Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>

Acked-by: Mark Rutland <mark.rutland@arm.com>

Mark.

> ---
>  arch/arm64/include/asm/elf.h | 22 ++++++++++++--------
>  1 file changed, 13 insertions(+), 9 deletions(-)
> 
> diff --git a/arch/arm64/include/asm/elf.h b/arch/arm64/include/asm/elf.h
> index faad6df49e5b..435f55952e1f 100644
> --- a/arch/arm64/include/asm/elf.h
> +++ b/arch/arm64/include/asm/elf.h
> @@ -24,15 +24,6 @@
>  #include <asm/ptrace.h>
>  #include <asm/user.h>
>  
> -typedef unsigned long elf_greg_t;
> -
> -#define ELF_NGREG (sizeof(struct user_pt_regs) / sizeof(elf_greg_t))
> -#define ELF_CORE_COPY_REGS(dest, regs)	\
> -	*(struct user_pt_regs *)&(dest) = (regs)->user_regs;
> -
> -typedef elf_greg_t elf_gregset_t[ELF_NGREG];
> -typedef struct user_fpsimd_state elf_fpregset_t;
> -
>  /*
>   * AArch64 static relocation types.
>   */
> @@ -127,6 +118,17 @@ typedef struct user_fpsimd_state elf_fpregset_t;
>   */
>  #define ELF_ET_DYN_BASE	(2 * TASK_SIZE_64 / 3)
>  
> +#ifndef __ASSEMBLY__
> +
> +typedef unsigned long elf_greg_t;
> +
> +#define ELF_NGREG (sizeof(struct user_pt_regs) / sizeof(elf_greg_t))
> +#define ELF_CORE_COPY_REGS(dest, regs)	\
> +	*(struct user_pt_regs *)&(dest) = (regs)->user_regs;
> +
> +typedef elf_greg_t elf_gregset_t[ELF_NGREG];
> +typedef struct user_fpsimd_state elf_fpregset_t;
> +
>  /*
>   * When the program starts, a1 contains a pointer to a function to be
>   * registered with atexit, as per the SVR4 ABI.  A value of 0 means we have no
> @@ -186,4 +188,6 @@ extern int aarch32_setup_vectors_page(struct linux_binprm *bprm,
>  
>  #endif /* CONFIG_COMPAT */
>  
> +#endif /* !__ASSEMBLY__ */
> +
>  #endif
> -- 
> 2.5.0
> 

  reply	other threads:[~2016-01-26 17:42 UTC|newest]

Thread overview: 93+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-26 17:10 [kernel-hardening] [PATCH v4 00/22] arm64: implement support for KASLR Ard Biesheuvel
2016-01-26 17:10 ` Ard Biesheuvel
2016-01-26 17:10 ` Ard Biesheuvel
2016-01-26 17:10 ` [kernel-hardening] [PATCH v4 01/22] of/fdt: make memblock minimum physical address arch configurable Ard Biesheuvel
2016-01-26 17:10   ` Ard Biesheuvel
2016-01-26 17:10   ` Ard Biesheuvel
2016-01-26 17:10 ` [kernel-hardening] [PATCH v4 02/22] arm64: introduce KIMAGE_VADDR as the virtual base of the kernel region Ard Biesheuvel
2016-01-26 17:10   ` Ard Biesheuvel
2016-01-26 17:10   ` Ard Biesheuvel
2016-01-26 17:10 ` [kernel-hardening] [PATCH v4 03/22] arm64: pgtable: implement static [pte|pmd|pud]_offset variants Ard Biesheuvel
2016-01-26 17:10   ` Ard Biesheuvel
2016-01-26 17:10   ` Ard Biesheuvel
2016-01-26 17:10 ` [kernel-hardening] [PATCH v4 04/22] arm64: decouple early fixmap init from linear mapping Ard Biesheuvel
2016-01-26 17:10   ` Ard Biesheuvel
2016-01-26 17:10   ` Ard Biesheuvel
2016-01-26 17:10 ` [kernel-hardening] [PATCH v4 05/22] arm64: kvm: deal with kernel symbols outside of " Ard Biesheuvel
2016-01-26 17:10   ` Ard Biesheuvel
2016-01-26 17:10   ` Ard Biesheuvel
2016-01-26 17:45   ` [kernel-hardening] " Marc Zyngier
2016-01-26 17:45     ` Marc Zyngier
2016-01-26 17:45     ` Marc Zyngier
2016-01-26 17:10 ` [kernel-hardening] [PATCH v4 06/22] arm64: add support for ioremap() block mappings Ard Biesheuvel
2016-01-26 17:10   ` Ard Biesheuvel
2016-01-26 17:10   ` Ard Biesheuvel
2016-01-26 17:10 ` [kernel-hardening] [PATCH v4 07/22] arm64: move kernel image to base of vmalloc area Ard Biesheuvel
2016-01-26 17:10   ` Ard Biesheuvel
2016-01-26 17:10   ` Ard Biesheuvel
2016-01-26 17:10 ` [kernel-hardening] [PATCH v4 08/22] arm64: add support for module PLTs Ard Biesheuvel
2016-01-26 17:10   ` Ard Biesheuvel
2016-01-26 17:10   ` Ard Biesheuvel
2016-01-26 17:10 ` [kernel-hardening] [PATCH v4 09/22] extable: add support for relative extables to search and sort routines Ard Biesheuvel
2016-01-26 17:10   ` Ard Biesheuvel
2016-01-26 17:10   ` Ard Biesheuvel
2016-01-26 17:10 ` [kernel-hardening] [PATCH v4 10/22] arm64: switch to relative exception tables Ard Biesheuvel
2016-01-26 17:10   ` Ard Biesheuvel
2016-01-26 17:10   ` Ard Biesheuvel
2016-01-26 17:10 ` [kernel-hardening] [PATCH v4 11/22] arm64: avoid R_AARCH64_ABS64 relocations for Image header fields Ard Biesheuvel
2016-01-26 17:10   ` Ard Biesheuvel
2016-01-26 17:10   ` Ard Biesheuvel
2016-01-26 17:10 ` [kernel-hardening] [PATCH v4 12/22] arm64: avoid dynamic relocations in early boot code Ard Biesheuvel
2016-01-26 17:10   ` Ard Biesheuvel
2016-01-26 17:10   ` Ard Biesheuvel
2016-01-26 17:10 ` [kernel-hardening] [PATCH v4 13/22] arm64: allow kernel Image to be loaded anywhere in physical memory Ard Biesheuvel
2016-01-26 17:10   ` Ard Biesheuvel
2016-01-26 17:10   ` Ard Biesheuvel
2016-01-26 17:10 ` [kernel-hardening] [PATCH v4 14/22] arm64: make asm/elf.h available to asm files Ard Biesheuvel
2016-01-26 17:10   ` Ard Biesheuvel
2016-01-26 17:10   ` Ard Biesheuvel
2016-01-26 17:42   ` Mark Rutland [this message]
2016-01-26 17:42     ` Mark Rutland
2016-01-26 17:42     ` Mark Rutland
2016-01-26 17:10 ` [kernel-hardening] [PATCH v4 15/22] scripts/sortextable: add support for ET_DYN binaries Ard Biesheuvel
2016-01-26 17:10   ` Ard Biesheuvel
2016-01-26 17:10   ` Ard Biesheuvel
2016-01-26 23:25   ` [kernel-hardening] " Kees Cook
2016-01-26 23:25     ` Kees Cook
2016-01-26 23:25     ` Kees Cook
2016-01-26 17:10 ` [kernel-hardening] [PATCH v4 16/22] kallsyms: add support for relative offsets in kallsyms address table Ard Biesheuvel
2016-01-26 17:10   ` Ard Biesheuvel
2016-01-26 17:10   ` Ard Biesheuvel
2016-01-26 17:10 ` [kernel-hardening] [PATCH v4 17/22] arm64: add support for building the kernel as a relocate PIE binary Ard Biesheuvel
2016-01-26 17:10   ` Ard Biesheuvel
2016-01-26 17:10   ` Ard Biesheuvel
2016-01-26 17:10 ` [kernel-hardening] [PATCH v4 18/22] arm64: add support for kernel ASLR Ard Biesheuvel
2016-01-26 17:10   ` Ard Biesheuvel
2016-01-26 17:10   ` Ard Biesheuvel
2016-01-26 17:10 ` [kernel-hardening] [PATCH v4 19/22] efi: stub: implement efi_get_random_bytes() based on EFI_RNG_PROTOCOL Ard Biesheuvel
2016-01-26 17:10   ` Ard Biesheuvel
2016-01-26 17:10   ` Ard Biesheuvel
2016-01-26 17:10 ` [kernel-hardening] [PATCH v4 20/22] efi: stub: add implementation of efi_random_alloc() Ard Biesheuvel
2016-01-26 17:10   ` Ard Biesheuvel
2016-01-26 17:10   ` Ard Biesheuvel
2016-01-26 23:52   ` [kernel-hardening] " Kees Cook
2016-01-26 23:52     ` Kees Cook
2016-01-26 23:52     ` Kees Cook
2016-01-29 15:39   ` [kernel-hardening] " Matt Fleming
2016-01-29 15:39     ` Matt Fleming
2016-01-29 15:39     ` Matt Fleming
2016-01-26 17:10 ` [kernel-hardening] [PATCH v4 21/22] efi: stub: use high allocation for converted command line Ard Biesheuvel
2016-01-26 17:10   ` Ard Biesheuvel
2016-01-26 17:10   ` Ard Biesheuvel
2016-01-26 17:10 ` [kernel-hardening] [PATCH v4 22/22] arm64: efi: invoke EFI_RNG_PROTOCOL to supply KASLR randomness Ard Biesheuvel
2016-01-26 17:10   ` Ard Biesheuvel
2016-01-26 17:10   ` Ard Biesheuvel
2016-01-29 15:57   ` [kernel-hardening] " Matt Fleming
2016-01-29 15:57     ` Matt Fleming
2016-01-29 15:57     ` Matt Fleming
2016-01-29 18:26 ` [kernel-hardening] Re: [PATCH v4 00/22] arm64: implement support for KASLR Catalin Marinas
2016-01-29 18:26   ` Catalin Marinas
2016-01-29 18:26   ` Catalin Marinas
2016-01-29 18:49   ` [kernel-hardening] " Ard Biesheuvel
2016-01-29 18:49     ` Ard Biesheuvel
2016-01-29 18:49     ` Ard Biesheuvel

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20160126174217.GH29086@leverpostej \
    --to=mark.rutland@arm.com \
    --cc=ard.biesheuvel@linaro.org \
    --cc=arnd@arndb.de \
    --cc=bhupesh.sharma@freescale.com \
    --cc=catalin.marinas@arm.com \
    --cc=christoffer.dall@linaro.org \
    --cc=keescook@chromium.org \
    --cc=kernel-hardening@lists.openwall.com \
    --cc=labbott@fedoraproject.org \
    --cc=leif.lindholm@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=marc.zyngier@arm.com \
    --cc=matt@codeblueprint.co.uk \
    --cc=stuart.yoder@freescale.com \
    --cc=will.deacon@arm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.