From: Ingo Molnar <mingo@kernel.org>
To: Arnd Bergmann <arnd@arndb.de>
Cc: linux-arch@vger.kernel.org, linux-api@vger.kernel.org,
"Joseph Myers " <joseph@codesourcery.com>,
"David Howells" <dhowells@redhat.com>,
libc-alpha@sourceware.org, "Thomas Gleixner" <tglx@linutronix.de>,
"Ingo Molnar" <mingo@redhat.com>,
"H. Peter Anvin" <hpa@zytor.com>,
x86@kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] [RFC] making uapi/linux/elfcore.h useful again
Date: Fri, 14 Sep 2018 19:45:28 +0200 [thread overview]
Message-ID: <20180914174528.GA35000@gmail.com> (raw)
In-Reply-To: <20180914113929.953895-1-arnd@arndb.de>
* Arnd Bergmann <arnd@arndb.de> wrote:
> After finding a bug in glibc the question came up how linux/elfcore.h
> is supposed to be used from user space. As far as I can tell, it's
> not possible, as it references data types that are simply unavailable
> there.
>
> The #ifndef __KERNEL__ section in that header dates back to when the
> file was introduced in linux-1.3.5, and presumably was meant to
> provide the structures for the libc sys/procfs.h implementation.
> However, this was never portable to architectures other than x86-32,
> and has been broken on that architecture at a later point.
>
> These are the steps that I needed to make it possible to include the
> header file, e.g. for libc self-testing in order to make sure the
> structures are compatible with its own:
>
> - drop the #ifndef __KERNEL__ section that are obviously useless
> and get in the way
>
> - change the pid_t references to __kernel_pid_t
>
> - Move required data from the private x86 asm/elf.h file into
> a new uapi/asm/elf.h. Some other architectures already do that,
> but most of them do not. Before applying the patch, we have
> to do this for all architectures
>
> - Change ELF_NGREG to an integer literal constant instead of
> a sizeof operation based on a private type.
>
> Cc: Joseph Myers <joseph@codesourcery.com>
> Cc: David Howells <dhowells@redhat.com>
> Cc: libc-alpha@sourceware.org
> Link: https://patchwork.ozlabs.org/patch/969540/
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> ---
> arch/x86/include/asm/elf.h | 24 +-----------------------
> arch/x86/include/uapi/asm/elf.h | 30 ++++++++++++++++++++++++++++++
> arch/x86/include/uapi/asm/signal.h | 2 +-
> include/uapi/linux/elf.h | 1 +
> include/uapi/linux/elfcore.h | 26 +++++---------------------
> 5 files changed, 38 insertions(+), 45 deletions(-)
> create mode 100644 arch/x86/include/uapi/asm/elf.h
Acked-by: Ingo Molnar <mingo@kernel.org>
I suspect this wants to go through -mm, or do you want to carry it?
Thanks,
Ingo
next prev parent reply other threads:[~2018-09-14 17:45 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-09-14 11:38 [PATCH] [RFC] making uapi/linux/elfcore.h useful again Arnd Bergmann
2018-09-14 17:45 ` Ingo Molnar [this message]
2018-09-14 19:55 ` Arnd Bergmann
2018-09-15 11:37 ` Ingo Molnar
2018-09-17 12:05 ` Joseph Myers
2018-09-18 14:21 ` Arnd Bergmann
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=20180914174528.GA35000@gmail.com \
--to=mingo@kernel.org \
--cc=arnd@arndb.de \
--cc=dhowells@redhat.com \
--cc=hpa@zytor.com \
--cc=joseph@codesourcery.com \
--cc=libc-alpha@sourceware.org \
--cc=linux-api@vger.kernel.org \
--cc=linux-arch@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=tglx@linutronix.de \
--cc=x86@kernel.org \
/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;
as well as URLs for NNTP newsgroup(s).