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: <C2D7FE5348E1B147BCA15975FBA23075013A592551@us01wembx1.internal.synopsys.com>
Date:   Fri, 9 Nov 2018 23:42:41 +0000
From:   Vineet Gupta <vineet.gupta1@...opsys.com>
To:     "Dmitry V. Levin" <ldv@...linux.org>,
        Andy Lutomirski <luto@...nel.org>
CC:     Elvira Khabirova <lineprinter@...linux.org>,
        Alexey Brodkin <alexey.brodkin@...opsys.com>,
        "linux-snps-arc@...ts.infradead.org" 
        <linux-snps-arc@...ts.infradead.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 02/13 v2] Move EM_ARCOMPACT and EM_ARCV2 to
 uapi/linux/elf-em.h

On 11/9/18 3:33 PM, Dmitry V. Levin wrote:
> These should never have been defined in the arch tree to begin with, and
> now uapi/linux/audit.h header is going to use EM_ARCOMPACT and EM_ARCV2 in
> order to define AUDIT_ARCH_ARCOMPACT and AUDIT_ARCH_ARCV2 which are needed
> to implement syscall_get_arch() which in turn is required to extend the
> generic ptrace API with PTRACE_GET_SYSCALL_INFO request.
>
> Signed-off-by: Dmitry V. Levin <ldv@...linux.org>
> ---
> v2: do not add EM_ARC, move EM_ARCOMPACT and EM_ARCV2 instead.
>
>  arch/arc/include/asm/elf.h  | 6 +-----
>  include/uapi/linux/elf-em.h | 2 ++
>  2 files changed, 3 insertions(+), 5 deletions(-)
>
> diff --git a/arch/arc/include/asm/elf.h b/arch/arc/include/asm/elf.h
> index aa2d6da9d187..2b80c184c9c8 100644
> --- a/arch/arc/include/asm/elf.h
> +++ b/arch/arc/include/asm/elf.h
> @@ -10,13 +10,9 @@
>  #define __ASM_ARC_ELF_H
>  
>  #include <linux/types.h>
> +#include <linux/elf-em.h>
>  #include <uapi/asm/elf.h>
>  
> -/* These ELF defines belong to uapi but libc elf.h already defines them */
> -#define EM_ARCOMPACT		93
> -
> -#define EM_ARCV2		195	/* ARCv2 Cores */
> -
>  #define EM_ARC_INUSE		(IS_ENABLED(CONFIG_ISA_ARCOMPACT) ? \
>  					EM_ARCOMPACT : EM_ARCV2)
>  
> diff --git a/include/uapi/linux/elf-em.h b/include/uapi/linux/elf-em.h
> index ba3696e3d694..91b33833630b 100644
> --- a/include/uapi/linux/elf-em.h
> +++ b/include/uapi/linux/elf-em.h
> @@ -34,6 +34,7 @@
>  #define EM_M32R		88	/* Renesas M32R */
>  #define EM_MN10300	89	/* Panasonic/MEI MN10300, AM33 */
>  #define EM_OPENRISC     92     /* OpenRISC 32-bit embedded processor */
> +#define EM_ARCOMPACT	93	/* ARCompact processor */
>  #define EM_BLACKFIN     106     /* ADI Blackfin Processor */
>  #define EM_ALTERA_NIOS2	113	/* Altera Nios II soft-core processor */
>  #define EM_TI_C6000	140	/* TI C6X DSPs */
> @@ -42,6 +43,7 @@
>  #define EM_TILEPRO	188	/* Tilera TILEPro */
>  #define EM_MICROBLAZE	189	/* Xilinx MicroBlaze */
>  #define EM_TILEGX	191	/* Tilera TILE-Gx */
> +#define EM_ARCV2	195	/* ARCv2 Cores */
>  #define EM_RISCV	243	/* RISC-V */
>  #define EM_BPF		247	/* Linux BPF - in-kernel virtual machine */
>  #define EM_FRV		0x5441	/* Fujitsu FR-V */

Seems OK in theory - but now we are exporting these to uapi and per my original
comment there were redef errors with libc elf.h atleast. Perhaps this being a
different header might be OK !

Acked-by: Vineet Gupta <vgupta@...opsys.com>



Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ