Re: [PATCH 01/10] selftests/x86: In syscall_nt, test NT|TF as well

2016-03-02 Thread Borislav Petkov
On Wed, Mar 02, 2016 at 11:03:44AM -0800, Andy Lutomirski wrote: > IIRC the C standard says otherwise. main is special. My C99 draft pdf says either "int main(void)" or "int main(int argc, char *argv[])". -- Regards/Gruss, Boris. ECO tip #101: Trim your mails when you reply.

Re: [PATCH 01/10] selftests/x86: In syscall_nt, test NT|TF as well

2016-03-02 Thread Andy Lutomirski
On Mar 2, 2016 6:29 AM, "Borislav Petkov" wrote: > > On Wed, Mar 02, 2016 at 02:01:15PM +, One Thousand Gnomes wrote: > > int main(void) is wrong as there are passed arguments > > Not in this particular case - test doesn't take args. IIRC the C standard says otherwise. main is special. Argua

Re: [PATCH 01/10] selftests/x86: In syscall_nt, test NT|TF as well

2016-03-02 Thread Borislav Petkov
On Wed, Mar 02, 2016 at 02:01:15PM +, One Thousand Gnomes wrote: > int main(void) is wrong as there are passed arguments Not in this particular case - test doesn't take args. > int main() is ok (in C89 at least) because it means "there are unknown > arguments" > > int main(int argc, char *ar

Re: [PATCH 01/10] selftests/x86: In syscall_nt, test NT|TF as well

2016-03-02 Thread One Thousand Gnomes
On Wed, 2 Mar 2016 13:59:52 +0100 Borislav Petkov wrote: > On Sun, Feb 28, 2016 at 09:28:46PM -0800, Andy Lutomirski wrote: > > Setting TF prevents fastpath returns in most cases, which causes the > > test to fail on 32-bit kernels because 32-bit kernels do not, in > > fact, handle NT correctly o

Re: [PATCH 01/10] selftests/x86: In syscall_nt, test NT|TF as well

2016-03-02 Thread Borislav Petkov
On Sun, Feb 28, 2016 at 09:28:46PM -0800, Andy Lutomirski wrote: > Setting TF prevents fastpath returns in most cases, which causes the > test to fail on 32-bit kernels because 32-bit kernels do not, in > fact, handle NT correctly on SYSENTER entries. > > The next patch will fix 32-bit kernels. >

[PATCH 01/10] selftests/x86: In syscall_nt, test NT|TF as well

2016-02-28 Thread Andy Lutomirski
Setting TF prevents fastpath returns in most cases, which causes the test to fail on 32-bit kernels because 32-bit kernels do not, in fact, handle NT correctly on SYSENTER entries. The next patch will fix 32-bit kernels. Signed-off-by: Andy Lutomirski --- tools/testing/selftests/x86/syscall_nt.