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] [thread-next>] [day] [month] [year] [list]
Date:	Tue, 14 Feb 2012 22:55:55 -0800
From:	"hpanvin@...il.com" <hpa@...or.com>
To:	Cyrill Gorcunov <gorcunov@...nvz.org>,
	Andrew Morton <akpm@...ux-foundation.org>
CC:	linux-kernel@...r.kernel.org,
	"Eric W. Biederman" <ebiederm@...ssion.com>,
	Pavel Emelyanov <xemul@...nvz.org>,
	KOSAKI Motohiro <kosaki.motohiro@...fujitsu.com>,
	Ingo Molnar <mingo@...e.hu>,
	Pavel Emelyanov <xemul@...allels.com>,
	Andrey Vagin <avagin@...nvz.org>,
	KOSAKI Motohiro <kosaki.motohiro@...il.com>,
	Thomas Gleixner <tglx@...utronix.de>,
	Glauber Costa <glommer@...allels.com>,
	Andi Kleen <andi@...stfloor.org>, Tejun Heo <tj@...nel.org>,
	Matt Helsley <matthltc@...ibm.com>,
	Pekka Enberg <penberg@...nel.org>,
	Eric Dumazet <eric.dumazet@...il.com>,
	Vasiliy Kulikov <segoon@...nwall.com>,
	Alexey Dobriyan <adobriyan@...il.com>, Valdis.Kletnieks@...edu,
	Michal Marek <mmarek@...e.cz>
Subject: Re: [patch 2/4] syscalls, x86: Add __NR_kcmp syscall v8

What?  <linux/unistd.h> should be used, and it should handle the.inclusions.

Cyrill Gorcunov <gorcunov@...nvz.org> wrote:

>On Tue, Feb 14, 2012 at 03:13:12PM -0800, Andrew Morton wrote:
>...
>> 
>> hm, what does all this stuff in the selftest makefile do?
>> 
>> The selftests code has undergone some changes since you last looked. 
>
>Hmm, thanks for pointing.
>
>> The rules are, roughly:
>> 
>> - In tools/testing/selftests, a "make" will compile but not run all
>>   selftest code.
>> 
>> - In tools/testing/selftests, a "make run_tests" will compile all
>>   selftest code (if needed) and will then run all the tests.
>> 
>>   If a test is not applicable (eg wrong architecture, kernel feature
>>   not enabled, etc) then it should try to avoid breaking the build
>and,
>>   when executed it should emit a diagnostic and then exit(0) (ie:
>>   success) so as to avoid breaking the overall test run.
>> 
>>   IOW, the test should only fail if the feature is present but isn't
>>   working correctly.
>> 
>> Also, I hate with a passion Makefiles which hide the command lines
>from
>> me!  So I nuked all that E and Q stuff.
>> 
>
>make V=1 will show the command line, I tried to make the output to look
>the same as in case of building kernel.
>
>> 
>> However that didn't work for me:
>> 
>> akpm:/usr/src/25/tools/testing/selftests/kcmp> make
>> gcc -DCONFIG_X86_64 -D__x86_64__
>-I../../../../arch/x86/include/generated/ ...
>> kcmp_test.c: In function 'sys_kcmp':
>> kcmp_test.c:22: error: '__NR_kcmp' undeclared (first use in this
>function)
>...
>> How are we supposed to be picking up __NR_kcmp?
>> 
>
>Initially I made it to look into arch/x86 directory and find __NR_kcmp
>definition there but then I realised (and someone pointed me as
>well) that headers should be taken from those which are generated
>by kernel, ie the result of 'make headers_install'. So if you run
>make headers_install then the test program should work. If this is
>wrong, I can fix it and make a patch on top.
>
>Ie instead of
>
>+#include <linux/unistd.h>
>
>there will be
>
>+#ifdef CONFIG_X86_64
>+#include <asm/unistd_64.h>
>+#else
>+#include <asm/unistd_32.h>
>+#endif
>
>	Cyrill

-- 
Sent from my Android phone with K-9 Mail. Please excuse my brevity.
--
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