From: Palmer Dabbelt <palmer@dabbelt.com>
To: arnd@arndb.de
Cc: 3chas3@gmail.com
Cc: hpa@zytor.com
Cc: mingo@redhat.com
Cc: plagnioj@jcrosoft.com
Cc: jikos@kernel.org
Cc: linux-api@vger.kernel.org
Cc: linux-arch@vger.kernel.org
Cc: linux-atm-general@lists.sourceforge.net
Cc: linux-fbdev@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Cc: netdev@vger.kernel.org
Cc: tglx@linutronix.de
Cc: tomi.valkeinen@ti.com
Cc: x86@kernel.org
Cc: Palmer Dabbelt <palmer@dabbelt.com>
Subject: [PATCH 05/13] Hide some of "struct elf_prstatus" behind #ifdef __KERNEL__
Date: Wed, 9 Sep 2015 14:08:14 -0700 [thread overview]
Message-ID: <1441832902-28993-6-git-send-email-palmer@dabbelt.com> (raw)
In-Reply-To: <1441832902-28993-1-git-send-email-palmer@dabbelt.com>
This one scares me: while I can't find any system calls that directly
take this as an argument, a comment in <linux/ptrace.h>
"
Generic ptrace interface that exports the architecture specific
regsets using the corresponding NT_* types (which are also used in
the core dump). Please note that the NT_PRSTATUS note type in a
core dump contains a full 'struct elf_prstatus'. But the
user_regset for NT_PRSTATUS contains just the elf_gregset_t that is
the pr_reg field of 'struct elf_prstatus'. For all the other
user_regset flavors, the user_regset layout and the ELF core dump
note payload are exactly the same layout.
"
seems to indicate that it's possible to see this sometimes. Since
this would only be visible to userspace in a somewhat convoluted
manner, I'm going to try and keep it as it was.
Signed-off-by: Palmer Dabbelt <palmer@dabbelt.com>
Reviewed-by: Andrew Waterman <waterman@eecs.berkeley.edu>
Reviewed-by: Albert Ou <aou@eecs.berkeley.edu>
---
include/uapi/linux/elfcore.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/include/uapi/linux/elfcore.h b/include/uapi/linux/elfcore.h
index 569737cfb557..f9320b588937 100644
--- a/include/uapi/linux/elfcore.h
+++ b/include/uapi/linux/elfcore.h
@@ -60,7 +60,7 @@ struct elf_prstatus
long pr_instr; /* Current instruction */
#endif
elf_gregset_t pr_reg; /* GP registers */
-#ifdef CONFIG_BINFMT_ELF_FDPIC
+#if defined(__KERNEL__) && defined(CONFIG_BINFMT_ELF_FDPIC)
/* When using FDPIC, the loadmap addresses need to be communicated
* to GDB in order for GDB to do the necessary relocations. The
* fields (below) used to communicate this information are placed
--
2.4.6
next prev parent reply other threads:[~2015-09-09 21:08 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <2644177.lVCYzIBfPW@wuerfel>
2015-09-09 21:08 ` [PATCH] Remove #ifdef CONFIG_64BIT from all asm-generic/fcntl.h Palmer Dabbelt
2015-09-09 21:08 ` [PATCH 01/13] " Palmer Dabbelt
2015-09-09 21:08 ` [PATCH 03/13] Hide COMPAT_ATM_ADDPARTY behind #ifdef __KERNEL__ Palmer Dabbelt
2015-09-09 21:08 ` [PATCH 04/13] Always expose MAP_UNINITIALIZED to userspace Palmer Dabbelt
2015-09-09 21:08 ` Palmer Dabbelt [this message]
2015-09-09 21:08 ` [PATCH 06/13] Hide ep_take_care_of_epollwakeup() behind #ifdef __KERNEL__ Palmer Dabbelt
2015-09-09 21:08 ` [PATCH 07/13] Make FB_BACKLIGHT_{LEVELS,MAX} always visible Palmer Dabbelt
2015-09-09 21:08 ` [PATCH 08/13] Hide MAX_SHARED_LIBS behind #ifdef __KERNEL__ Palmer Dabbelt
2015-09-09 21:08 ` [PATCH 09/13] Hide bp_type_idx " Palmer Dabbelt
2015-09-10 11:11 ` David Howells
2015-09-09 21:08 ` [PATCH 10/13] Hide USE_WCACHING " Palmer Dabbelt
2015-09-10 11:12 ` David Howells
2015-09-09 21:08 ` [PATCH 11/13] Hide MAX_RAW_MINORS " Palmer Dabbelt
2015-09-10 11:13 ` David Howells
2015-09-09 21:08 ` [PATCH 12/13] Hide AT_VECTOR_SIZE_ARCH " Palmer Dabbelt
2015-09-10 11:14 ` David Howells
[not found] ` <1441832902-28993-1-git-send-email-palmer-96lFi9zoCfxBDgjK7y7TUQ@public.gmane.org>
2015-09-09 21:08 ` [PATCH 02/13] Always expose __SYSCALL(... fork ...) Palmer Dabbelt
2015-09-09 21:08 ` [PATCH 13/13] Re-enable and clean up "check_config()" in headers_check.pl Palmer Dabbelt
2015-09-10 11:15 ` [PATCH] Remove #ifdef CONFIG_64BIT from all asm-generic/fcntl.h David Howells
[not found] ` <18147.1441883729-S6HVgzuS8uM4Awkfq6JHfwNdhmdF6hFW@public.gmane.org>
2015-09-10 11:18 ` David Howells
2015-09-14 22:50 ` Palmer Dabbelt
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=1441832902-28993-6-git-send-email-palmer@dabbelt.com \
--to=palmer@dabbelt.com \
--cc=3chas3@gmail.com \
--cc=arnd@arndb.de \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox