public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* ELF: what should be part of the userspace headers?
@ 2006-08-05 11:05 Adrian Bunk
  2006-08-05 11:08 ` David Woodhouse
  0 siblings, 1 reply; 4+ messages in thread
From: Adrian Bunk @ 2006-08-05 11:05 UTC (permalink / raw)
  To: linux-kernel; +Cc: dhowells, David Woodhouse, linux-audit

I'm currently a bit lost trying to understand what from the following 
headers is part of the kernel <-> userspace ABI:
include/asm/elf.h
include/linux/elfcore.h
include/linux/elf-em.h
include/linux/elf-fdpic.h
include/linux/elf.h

include/linux/elf-em.h is used by include/linux/audit.h, but this usage 
doesn't seem to be part of the kernel <-> userspace interface?

And which part of the ELF headers is part of the kernel <-> userspace 
interface?

TIA
Adrian

-- 

    Gentoo kernels are 42 times more popular than SUSE kernels among
    KLive users  (a service by SUSE contractor Andrea Arcangeli that
    gathers data about kernels from many users worldwide).

       There are three kinds of lies: Lies, Damn Lies, and Statistics.
                                                    Benjamin Disraeli


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: ELF: what should be part of the userspace headers?
  2006-08-05 11:05 ELF: what should be part of the userspace headers? Adrian Bunk
@ 2006-08-05 11:08 ` David Woodhouse
  2006-08-05 11:21   ` Jakub Jelinek
  0 siblings, 1 reply; 4+ messages in thread
From: David Woodhouse @ 2006-08-05 11:08 UTC (permalink / raw)
  To: Adrian Bunk; +Cc: linux-kernel, dhowells, linux-audit

On Sat, 2006-08-05 at 13:05 +0200, Adrian Bunk wrote:
> include/linux/elf-em.h is used by include/linux/audit.h, but this usage 
> doesn't seem to be part of the kernel <-> userspace interface?

The machine types _are_ part of the audit kernel<->userspace interface,
I think. Exporting elf-em.h should be fairly harmless.

> And which part of the ELF headers is part of the kernel <-> userspace 
> interface?

Almost none of them, I'd suggest. Nothing but auxvec.h

-- 
dwmw2


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: ELF: what should be part of the userspace headers?
  2006-08-05 11:08 ` David Woodhouse
@ 2006-08-05 11:21   ` Jakub Jelinek
  2006-08-13 20:00     ` Adrian Bunk
  0 siblings, 1 reply; 4+ messages in thread
From: Jakub Jelinek @ 2006-08-05 11:21 UTC (permalink / raw)
  To: David Woodhouse; +Cc: Adrian Bunk, linux-kernel, dhowells, linux-audit

On Sat, Aug 05, 2006 at 07:08:43PM +0800, David Woodhouse wrote:
> On Sat, 2006-08-05 at 13:05 +0200, Adrian Bunk wrote:
> > include/linux/elf-em.h is used by include/linux/audit.h, but this usage 
> > doesn't seem to be part of the kernel <-> userspace interface?
> 
> The machine types _are_ part of the audit kernel<->userspace interface,
> I think. Exporting elf-em.h should be fairly harmless.
> 
> > And which part of the ELF headers is part of the kernel <-> userspace 
> > interface?
> 
> Almost none of them, I'd suggest. Nothing but auxvec.h

Well, sys/procfs.h on several arches includes <asm/elf.h>:

find -type f -a -name \*.h | xargs grep '<\(asm\|linux\).*elf'
./sysdeps/unix/sysv/linux/alpha/sys/procfs.h:#include <asm/elf.h>
./sysdeps/unix/sysv/linux/sh/sys/procfs.h:#include <asm/elf.h>
./sysdeps/unix/sysv/linux/sys/procfs.h:#include <asm/elf.h>

while most other arches don't need it:
for i in `find . -name procfs.h`; do grep -q '<\(asm\|linux\).*elf' $i || echo $i; done
./sysdeps/unix/sysv/linux/s390/sys/procfs.h
./sysdeps/unix/sysv/linux/powerpc/sys/procfs.h
./sysdeps/unix/sysv/linux/sparc/sys/procfs.h
./sysdeps/unix/sysv/linux/i386/sys/procfs.h
./sysdeps/unix/sysv/linux/ia64/sys/procfs.h
./sysdeps/unix/sysv/linux/x86_64/sys/procfs.h

Guess it shouldn't be hard to convert even alpha and sh (not sure then
if there are any arches that actually use the linux/sys/procfs.h header).

	Jakub

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: ELF: what should be part of the userspace headers?
  2006-08-05 11:21   ` Jakub Jelinek
@ 2006-08-13 20:00     ` Adrian Bunk
  0 siblings, 0 replies; 4+ messages in thread
From: Adrian Bunk @ 2006-08-13 20:00 UTC (permalink / raw)
  To: Jakub Jelinek; +Cc: David Woodhouse, linux-kernel, dhowells, linux-audit

On Sat, Aug 05, 2006 at 07:21:48AM -0400, Jakub Jelinek wrote:
> On Sat, Aug 05, 2006 at 07:08:43PM +0800, David Woodhouse wrote:
> > On Sat, 2006-08-05 at 13:05 +0200, Adrian Bunk wrote:
> > > include/linux/elf-em.h is used by include/linux/audit.h, but this usage 
> > > doesn't seem to be part of the kernel <-> userspace interface?
> > 
> > The machine types _are_ part of the audit kernel<->userspace interface,
> > I think. Exporting elf-em.h should be fairly harmless.
> > 
> > > And which part of the ELF headers is part of the kernel <-> userspace 
> > > interface?
> > 
> > Almost none of them, I'd suggest. Nothing but auxvec.h
> 
> Well, sys/procfs.h on several arches includes <asm/elf.h>:
> 
> find -type f -a -name \*.h | xargs grep '<\(asm\|linux\).*elf'
> ./sysdeps/unix/sysv/linux/alpha/sys/procfs.h:#include <asm/elf.h>
> ./sysdeps/unix/sysv/linux/sh/sys/procfs.h:#include <asm/elf.h>
> ./sysdeps/unix/sysv/linux/sys/procfs.h:#include <asm/elf.h>
> 
> while most other arches don't need it:
> for i in `find . -name procfs.h`; do grep -q '<\(asm\|linux\).*elf' $i || echo $i; done
> ./sysdeps/unix/sysv/linux/s390/sys/procfs.h
> ./sysdeps/unix/sysv/linux/powerpc/sys/procfs.h
> ./sysdeps/unix/sysv/linux/sparc/sys/procfs.h
> ./sysdeps/unix/sysv/linux/i386/sys/procfs.h
> ./sysdeps/unix/sysv/linux/ia64/sys/procfs.h
> ./sysdeps/unix/sysv/linux/x86_64/sys/procfs.h
> 
> Guess it shouldn't be hard to convert even alpha and sh (not sure then
> if there are any arches that actually use the linux/sys/procfs.h header).

Thanks for this, I grepped only on i386.

Let me try to put it into two questions:
- What should be exported to userspace as part of the
  kernel<->userspace interface?
- What has to be exported (at least for some time) for not breaking
  existing userspace code?

Your answer was for the second question.

But even more important is the first question.

> 	Jakub

cu
Adrian

-- 

    Gentoo kernels are 42 times more popular than SUSE kernels among
    KLive users  (a service by SUSE contractor Andrea Arcangeli that
    gathers data about kernels from many users worldwide).

       There are three kinds of lies: Lies, Damn Lies, and Statistics.
                                                    Benjamin Disraeli


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2006-08-13 20:00 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-08-05 11:05 ELF: what should be part of the userspace headers? Adrian Bunk
2006-08-05 11:08 ` David Woodhouse
2006-08-05 11:21   ` Jakub Jelinek
2006-08-13 20:00     ` Adrian Bunk

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox