lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:	Tue, 25 Sep 2012 23:12:33 +0200
From:	Richard Weinberger <richard@....at>
To:	Geert Uytterhoeven <geert@...ux-m68k.org>
Cc:	Al Viro <viro@...iv.linux.org.uk>,
	Linus Torvalds <torvalds@...ux-foundation.org>,
	Joe Perches <joe@...ches.com>,
	user-mode-linux-devel@...ts.sourceforge.net,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH/resend/bypass] um: Preinclude
 include/linux/kern_levels.h

Am Tue, 25 Sep 2012 22:37:13 +0200
schrieb Geert Uytterhoeven <geert@...ux-m68k.org>:

> On Tue, Sep 25, 2012 at 9:43 PM, Al Viro <viro@...iv.linux.org.uk>
> wrote:
> > On Tue, Sep 25, 2012 at 12:20:55PM -0700, Linus Torvalds wrote:
> >> IOW, this part of the patch:
> >>
> >> -       c_flags = -Wp,-MD,$(depfile) $(USER_CFLAGS) -include user.h
> >> $(CFLAGS_$(basetarget).o)
> >> +       c_flags = -Wp,-MD,$(depfile) $(USER_CFLAGS) -include
> >> $(srctree)/include/linux/kern_levels.h -include user.h
> >> $(CFLAGS_$(basetarget).o)
> >>
> >> just makes me go want to puke. The user.h file already has other
> >> #include's in it, so I really don't see why you create this insane
> >> special case.
> >>
> >> And why does UM have those "UM_KERN_XYZ" defines in the first
> >> place? Why isn't it just using KERN_XYZ directly? Is it because
> >> kern_levels.h didn't use to exist, so it was some kind of "let's
> >> create our own that we can hide in our special headers".
> >
> > Because user.h is included *without* kernel headers in include path.
> 
> Indeed.
> 
> > It's for the stuff that is compiled with host libc headers.  Keep in
> > mind that UML talks to libc like normal architecture would talk to
> > hardware.  IOW, analogs of asm glue are in (host) userland C.  And
> > they need libc headers instead of the kernel ones.  That's what that
> > USER_OBJ thing is about.  Kernel-side constants, etc. are delivered
> > to that sucker using the same mechanism we normally use to give them
> > to assembler - asm-offsets.c.  And here, of course, slapping ifndef
> > __ASSEMBLER__ around the tricky bits will not work - the header
> > itself is just fine, but getting kernel headers in the search path
> > really isn't.
> >
> >         I agree that proposed solution is ugly.  What we can do is
> > copy the damn header into include/generated and #include
> > <generated/kern_levels.h> from user.h.  And kill UM_KERN_...
> > stuff.  Objections?
> 
> My first submission had "We may convert all UM_KERN_* users to KERN_*
> and drop the extra defines?" as a suggestion, but so far I haven't
> found time to implement that...
> 
> Still, no one came up with a better patch, and this is a regression.

Yeah, I'd like to take the "ugly" patch to get rid of the regresion.
Later we can get rid of UM_KERN_*, which is IMHO also very ugly.

Thanks,
//richard
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ