Re: [PATCH 2/2] tools/testing/selftests/x86: fix error: conflicting types for 'pkey_get|pkey_set'

2018-05-14 Thread Ingo Molnar
* Dave Hansen wrote: > On 05/08/2018 02:14 AM, Li Zhijian wrote: > > -u32 pkey_get(int pkey, unsigned long flags) > > +u32 _pkey_get(int pkey, unsigned long flags) > > { > > u32 mask = (PKEY_DISABLE_ACCESS|PKEY_DISABLE_WRITE); > > u32 pkru = __rdpkru(); > > @@

Re: [PATCH 2/2] tools/testing/selftests/x86: fix error: conflicting types for 'pkey_get|pkey_set'

2018-05-14 Thread Ingo Molnar
* Dave Hansen wrote: > On 05/08/2018 02:14 AM, Li Zhijian wrote: > > -u32 pkey_get(int pkey, unsigned long flags) > > +u32 _pkey_get(int pkey, unsigned long flags) > > { > > u32 mask = (PKEY_DISABLE_ACCESS|PKEY_DISABLE_WRITE); > > u32 pkru = __rdpkru(); > > @@ -422,7 +426,7 @@ u32

Re: [PATCH 2/2] tools/testing/selftests/x86: fix error: conflicting types for 'pkey_get|pkey_set'

2018-05-08 Thread Shuah Khan
On 05/08/2018 10:30 AM, Dave Hansen wrote: > On 05/08/2018 02:14 AM, Li Zhijian wrote: >> -u32 pkey_get(int pkey, unsigned long flags) >> +u32 _pkey_get(int pkey, unsigned long flags) >> { >> u32 mask = (PKEY_DISABLE_ACCESS|PKEY_DISABLE_WRITE); >> u32 pkru = __rdpkru(); >> @@ -422,7

Re: [PATCH 2/2] tools/testing/selftests/x86: fix error: conflicting types for 'pkey_get|pkey_set'

2018-05-08 Thread Shuah Khan
On 05/08/2018 10:30 AM, Dave Hansen wrote: > On 05/08/2018 02:14 AM, Li Zhijian wrote: >> -u32 pkey_get(int pkey, unsigned long flags) >> +u32 _pkey_get(int pkey, unsigned long flags) >> { >> u32 mask = (PKEY_DISABLE_ACCESS|PKEY_DISABLE_WRITE); >> u32 pkru = __rdpkru(); >> @@ -422,7

Re: [PATCH 2/2] tools/testing/selftests/x86: fix error: conflicting types for 'pkey_get|pkey_set'

2018-05-08 Thread Dave Hansen
On 05/08/2018 02:14 AM, Li Zhijian wrote: > -u32 pkey_get(int pkey, unsigned long flags) > +u32 _pkey_get(int pkey, unsigned long flags) > { > u32 mask = (PKEY_DISABLE_ACCESS|PKEY_DISABLE_WRITE); > u32 pkru = __rdpkru(); > @@ -422,7 +426,7 @@ u32 pkey_get(int pkey, unsigned long

Re: [PATCH 2/2] tools/testing/selftests/x86: fix error: conflicting types for 'pkey_get|pkey_set'

2018-05-08 Thread Dave Hansen
On 05/08/2018 02:14 AM, Li Zhijian wrote: > -u32 pkey_get(int pkey, unsigned long flags) > +u32 _pkey_get(int pkey, unsigned long flags) > { > u32 mask = (PKEY_DISABLE_ACCESS|PKEY_DISABLE_WRITE); > u32 pkru = __rdpkru(); > @@ -422,7 +426,7 @@ u32 pkey_get(int pkey, unsigned long

[PATCH 2/2] tools/testing/selftests/x86: fix error: conflicting types for 'pkey_get|pkey_set'

2018-05-08 Thread Li Zhijian
pkey_get() and pkey_set() are implemented since glibc-2.27, here just rename pkey_get|pkey_set to _pkey_get|_pkey_set simply the compiling errors are like: protection_keys.c:399:5: error: conflicting types for 'pkey_get' u32 pkey_get(int pkey, unsigned long flags) ^ In file

[PATCH 2/2] tools/testing/selftests/x86: fix error: conflicting types for 'pkey_get|pkey_set'

2018-05-08 Thread Li Zhijian
pkey_get() and pkey_set() are implemented since glibc-2.27, here just rename pkey_get|pkey_set to _pkey_get|_pkey_set simply the compiling errors are like: protection_keys.c:399:5: error: conflicting types for 'pkey_get' u32 pkey_get(int pkey, unsigned long flags) ^ In file