Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1570354

Re: [PATCH 01/50] x86/boot/e820: Introduce arch/x86/include/asm/e820/types.h

From Sam Ravnborg <sam@ravnborg.org>
Newsgroups linux.kernel
Subject Re: [PATCH 01/50] x86/boot/e820: Introduce arch/x86/include/asm/e820/types.h
Date 2017-01-31 06:50 +0100
Message-ID <t5zui-5gO-33@gated-at.bofh.it> (permalink)
References <t4JvH-7bG-7@gated-at.bofh.it> <t4JvI-7bG-33@gated-at.bofh.it> <t51iW-1oj-27@gated-at.bofh.it> <t5f2x-1hX-7@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Mon, Jan 30, 2017 at 08:58:33AM +0100, Ingo Molnar wrote:
> 
> * Sam Ravnborg <sam@ravnborg.org> wrote:
> 
> > On Sat, Jan 28, 2017 at 11:11:22PM +0100, Ingo Molnar wrote:
> > > 
> > > The plan is to keep the old UAPI header in place but the kernel won't
> > > use it anymore - and after some time we'll try to remove it. (User-space
> > > tools better have local copies of headers anyway, instead of relying
> > > on kernel headers.)
> > 
> > The idea with uapi is the the kernel provides a sane set of headers
> > to be used by user space.
> > So we avoid random copies that is maintained by random people in random
> > ways resulting in random bugs.
> 
> Your argument is simplistic which presents a false dichotomy: maintaining a copy 
> or fully sharing the header are not the only two options available to share the 
> information in the headers between the kernel and tooling: for example perf uses a 
> half-automated method where headers are copied from the kernel, but also checked 
> automatically against the upstream kernel, and a (non-fatal) warning is emitted 
> during the build if the upstream header has changed.

Obvious when there are two vastly different solutions there are some
middle ground solutions too.
And perf implements a tool based method to check that the manually
copied/created/maintained headers are in sync with the kernel.
which is just another way to maintain a set of copied headers.

But this does not at all address the point which is that it is
an unessesary burden to put on all the _users_ of the kernel uapi
headers to amintain their own copy of the kernel headers
(tool assisted or not).

The rationale behind requesting the users of the kernel uapi headers
seems to be that the kernel people would like to have the freedom
to fix wrong doings in the past without violatign the uapi.
So the benefit here is simpler headers on the kernel side compared
to all users of kernel uapi heders to manually (tool assisted or not)
maintaining their own copies of the uapi kernel headers.

Heck - if this is how it should be done then the the kernel
should provide the copy of the headers that describe the
uapi and the kernel should have the tool infrastructure to check
that the headers are OK.
Not all the users outside the kernelspace.

So just to repeat - it is an error prone design to let users
of the kernel uapi maintain their own copies of the kernel
uapi header. It is the job of the kernel.

	Sam

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH 01/50] x86/boot/e820: Introduce arch/x86/include/asm/e820/types.h Ingo Molnar <mingo@kernel.org> - 2017-01-28 23:20 +0100
  Re: [PATCH 01/50] x86/boot/e820: Introduce  arch/x86/include/asm/e820/types.h Sam Ravnborg <sam@ravnborg.org> - 2017-01-29 18:20 +0100
    Re: [PATCH 01/50] x86/boot/e820: Introduce  arch/x86/include/asm/e820/types.h Ingo Molnar <mingo@kernel.org> - 2017-01-30 09:00 +0100
      Re: [PATCH 01/50] x86/boot/e820: Introduce  arch/x86/include/asm/e820/types.h Sam Ravnborg <sam@ravnborg.org> - 2017-01-31 06:50 +0100
        Re: [PATCH 01/50] x86/boot/e820: Introduce  arch/x86/include/asm/e820/types.h Ingo Molnar <mingo@kernel.org> - 2017-01-31 17:50 +0100
          Re: [PATCH 01/50] x86/boot/e820: Introduce  arch/x86/include/asm/e820/types.h Sam Ravnborg <sam@ravnborg.org> - 2017-01-31 18:30 +0100
            Re: [PATCH 01/50] x86/boot/e820: Introduce  arch/x86/include/asm/e820/types.h Joe Perches <joe@perches.com> - 2017-01-31 19:10 +0100
            Re: [PATCH 01/50] x86/boot/e820: Introduce  arch/x86/include/asm/e820/types.h Ingo Molnar <mingo@kernel.org> - 2017-01-31 19:10 +0100
              Re: [PATCH 01/50] x86/boot/e820: Introduce  arch/x86/include/asm/e820/types.h Sam Ravnborg <sam@ravnborg.org> - 2017-01-31 20:30 +0100
                Re: [PATCH 01/50] x86/boot/e820: Introduce  arch/x86/include/asm/e820/types.h Ingo Molnar <mingo@kernel.org> - 2017-02-01 10:00 +0100

csiph-web