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]
Message-ID: <9bb7c8e9-95e7-4819-b295-3ee24c9e9b3b@email.android.com>
Date:	Wed, 15 Jan 2014 07:28:32 -0800
From:	"H. Peter Anvin" <hpa@...or.com>
To:	Maximilian Attems <max@...o.at>, Paul Bolle <pebolle@...cali.nl>
CC:	Eric Biederman <ebiederm@...ssion.com>,
	Andrew Morton <akpm@...ux-foundation.org>,
	Linus Torvalds <torvalds@...ux-foundation.org>,
	kexec@...ts.infradead.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] kexec.h: stop exporting kexec_load() to userspace

We shouldn't put prototypes of user-space functions in the kernel, at least not until we actually export all the signatures.  The prototype should instead be in a userspace <sys/kexec.h> header.

Maximilian Attems <max@...o.at> 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. 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.

-- 
Sent from my mobile phone.  Please pardon brevity and lack of formatting.
--
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