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: <1466485631-3532-26-git-send-email-ynorov@caviumnetworks.com>
Date:	Tue, 21 Jun 2016 08:07:08 +0300
From:	Yury Norov <ynorov@...iumnetworks.com>
To:	<libc-alpha@...rceware.org>, <linux-kernel@...r.kernel.org>
CC:	<arnd@...db.de>, <catalin.marinas@....com>,
	<marcus.shawcroft@....com>, <philb@....org>, <davem@...emloft.net>,
	<szabolcs.nagy@....com>, <maxim.kuvyrkov@...aro.org>,
	<joseph@...esourcery.com>, <pinskia@...il.com>,
	Andrew Pinski <apinski@...ium.com>,
	Yury Norov <ynorov@...iumnetworks.com>
Subject: [PATCH 24/27] Add support for AT_ARM64_MIDR.

From: Andrew Pinski <apinski@...ium.com>

Signed-off-by: Yury Norov <ynorov@...iumnetworks.com>
---
 elf/dl-sysdep.c                             |  1 +
 elf/elf.h                                   |  3 +++
 sysdeps/unix/sysv/linux/aarch64/dl-auxv.h   | 25 +++++++++++++++++++++++++
 sysdeps/unix/sysv/linux/aarch64/dl-sysdep.c |  5 +++++
 4 files changed, 34 insertions(+)
 create mode 100644 sysdeps/unix/sysv/linux/aarch64/dl-auxv.h
 create mode 100644 sysdeps/unix/sysv/linux/aarch64/dl-sysdep.c

diff --git a/elf/dl-sysdep.c b/elf/dl-sysdep.c
index eaa7155..88b7dd7 100644
--- a/elf/dl-sysdep.c
+++ b/elf/dl-sysdep.c
@@ -307,6 +307,7 @@ _dl_show_auxv (void)
 	  [AT_SYSINFO_EHDR - 2] =	{ "SYSINFO_EHDR: 0x", hex },
 	  [AT_RANDOM - 2] =		{ "RANDOM:       0x", hex },
 	  [AT_HWCAP2 - 2] =		{ "HWCAP2:       0x", hex },
+	  [AT_ARM64_MIDR - 2] =		{ "MIDR:         0x", hex },
 	};
       unsigned int idx = (unsigned int) (av->a_type - 2);
 
diff --git a/elf/elf.h b/elf/elf.h
index 15f5a75..c05bc23 100644
--- a/elf/elf.h
+++ b/elf/elf.h
@@ -1058,6 +1058,9 @@ typedef struct
 #define AT_L2_CACHESHAPE	36
 #define AT_L3_CACHESHAPE	37
 
+/* AARCH64 MIDR system register. */
+#define AT_ARM64_MIDR		38
+
 /* Note section contents.  Each entry in the note section begins with
    a header of a fixed form.  */
 
diff --git a/sysdeps/unix/sysv/linux/aarch64/dl-auxv.h b/sysdeps/unix/sysv/linux/aarch64/dl-auxv.h
new file mode 100644
index 0000000..290753d
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/aarch64/dl-auxv.h
@@ -0,0 +1,25 @@
+/* Auxiliary vector processing for Linux/AARCH64.
+   Copyright (C) 2015 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library.  If not, see
+   <http://www.gnu.org/licenses/>.  */
+
+
+extern int __libc_arm64_midr;
+
+#define DL_PLATFORM_AUXV				\
+      case AT_ARM64_MIDR:				\
+	__libc_arm64_midr = av->a_un.a_val;		\
+	break;
diff --git a/sysdeps/unix/sysv/linux/aarch64/dl-sysdep.c b/sysdeps/unix/sysv/linux/aarch64/dl-sysdep.c
new file mode 100644
index 0000000..ca3ec28
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/aarch64/dl-sysdep.c
@@ -0,0 +1,5 @@
+#include "dl-auxv.h"
+
+int __libc_arm64_midr = -1;
+
+#include <sysdeps/unix/sysv/linux/dl-sysdep.c>
-- 
2.7.4

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ