public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Paul Bolle <pebolle@tiscali.nl>
To: Maximilian Attems <max@stro.at>
Cc: "H. Peter Anvin" <hpa@zytor.com>,
	Eric Biederman <ebiederm@xmission.com>,
	Andrew Morton <akpm@linux-foundation.org>,
	Linus Torvalds <torvalds@linux-foundation.org>,
	kexec@lists.infradead.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] kexec.h: stop exporting kexec_load() to userspace
Date: Wed, 15 Jan 2014 15:12:18 +0100	[thread overview]
Message-ID: <1389795138.17407.13.camel@x220> (raw)
In-Reply-To: <20140115133838.GD8101@stro.at>

On Wed, 2014-01-15 at 14:38 +0100, Maximilian Attems wrote:
> On Wed, Jan 15, 2014 at 02:17:04PM +0100, Paul Bolle wrote:
> > Since v3.5 kexec.h is exported to userspace. That includes its
> > declaration of kexec_load():
> >     extern int kexec_load(void *, size_t, struct kexec_segment *,
> >                    unsigned long int);
> > 
> > This declaration isn't very useful to userspace programs on itself. They
> > still have to define a matching function (which basically wraps the
> > kexec_load syscall). I'm not aware of programs or libraries that actually
> > do that.
> > 
> > It can be removed. The programs that actually use it, if there
> > are any, should then provide their own declaration to keep compiling.
> > Already compiled binaries will not be affected.
> 
> nack, klibc uses the header and there was some discussion that glibc
> could/should use it too.

The versions of klibc I stumbled on (via codesearch.debian.net) didn't
use a kexec_load() that match that declaration. Has that changed? In
which version?

>  I didn't follow kexec git, but there is/was
> a version that just uses the kexec_load() if the c library provides it.
> Until Santa Claus materialises in form of a direct kernel user-space API,
> see follow ups on http://lwn.net/Articles/534682/ and proposal by hpa
>  
> > This gets rid of the headers_check warning that can be seen ever since
> > this header was exported:
> >     [...]/usr/include/linux/kexec.h:49: userspace cannot reference function or variable defined in the kernel
> > 
> 
> this is the wrong  way of fix.


Paul Bolle


  reply	other threads:[~2014-01-15 14:12 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-01-15 13:17 [PATCH] kexec.h: stop exporting kexec_load() to userspace Paul Bolle
2014-01-15 13:38 ` Maximilian Attems
2014-01-15 14:12   ` Paul Bolle [this message]
2014-01-15 15:28   ` H. Peter Anvin

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=1389795138.17407.13.camel@x220 \
    --to=pebolle@tiscali.nl \
    --cc=akpm@linux-foundation.org \
    --cc=ebiederm@xmission.com \
    --cc=hpa@zytor.com \
    --cc=kexec@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=max@stro.at \
    --cc=torvalds@linux-foundation.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