Hi Ram,
On Mon, Nov 06, 2017 at 12:57:36AM -0800, Ram Pai wrote:
> @@ -206,12 +209,14 @@ void signal_handler(int signum, siginfo_t *si, void *vucontext)
>
> trapno = uctxt->uc_mcontext.gregs[REG_TRAPNO];
> ip = uctxt->uc_mcontext.gregs[REG_IP_IDX];
> - fpregset = uctxt->uc_mcontext.fpregs;
> - fpregs = (void *)fpregset;
Since you removed all references for fpregset now, you probably want to
remove the declaration of the variable above.
> @@ -219,20 +224,21 @@ void signal_handler(int signum, siginfo_t *si, void *vucontext)
> * state. We just assume that it is here.
> */
> fpregs += 0x70;
> -#endif
> - pkey_reg_offset = pkey_reg_xstate_offset();
With this code, you removed all the reference for variable
pkey_reg_offset, thus, its declaration could be removed also.
> - *(u64 *)pkey_reg_ptr = 0x00000000;
> + dprintf1("si_pkey from siginfo: %lx\n", si_pkey);
> +#if defined(__i386__) || defined(__x86_64__) /* arch */
> + dprintf1("signal pkey_reg from xsave: %016lx\n", *pkey_reg_ptr);
> + *(u64 *)pkey_reg_ptr &= reset_bits(si_pkey, PKEY_DISABLE_ACCESS);
> +#elif __powerpc64__
Since the variable pkey_reg_ptr is only used for Intel code (inside
#ifdefs), you probably want to #ifdef the variable declaration also,
avoid triggering "unused variable" warning on non-Intel machines.
--
To unsubscribe from this list: send the line "unsubscribe linux-kselftest" in
the body of a message to majordomo(a)vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
On Mon, Nov 06, 2017 at 05:22:18PM -0800, Ram Pai wrote:
> On Mon, Nov 06, 2017 at 10:28:41PM +0100, Florian Weimer wrote:
> > * Ram Pai:
> >
> > > Testing:
> > > -------
> > > This patch series has passed all the protection key
> > > tests available in the selftest directory.The
> > > tests are updated to work on both x86 and powerpc.
> > > The selftests have passed on x86 and powerpc hardware.
> >
....snip....
> > What about siglongjmp from a signal handler?
>
> On powerpc there is some relief. the permissions on a key can be
> modified from anywhere, including from the signal handler, and the
> effect will be immediate. You dont have to wait till the
> signal handler returns for the key permissions to be restore.
>
> also after return from the sigsetjmp();
> possibly caused by siglongjmp(), the program can restore the permission
> on any key.
>
> Atleast that is my theory. Can you give me a testcase; if you have one
> handy.
>
> >
> > <https://sourceware.org/bugzilla/show_bug.cgi?id=22396>
> >
reading through the bug report, you mention that the following
"The application may not be able to save and restore the protection bits
for all keys because the kernel API does not actually specify that the
set of keys is a small, fixed set."
What exact kernel API do you need? This patch set exposes the total
number of keys and max keys, through sysfs.
https://marc.info/?l=linux-kernel&m=150995950219669&w=2
Is this sufficient? or do you need something else?
RP
--
To unsubscribe from this list: send the line "unsubscribe linux-kselftest" in
the body of a message to majordomo(a)vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
On 11/05/2017 03:56 AM, Lei Yang wrote:
> Replace '%d' by '%zu' to fix the following compilation warning.
>
> memfd_test.c:517:3: warning: format ‘%d’ expects argument of
> type ‘int’,but argument 2 has type ‘size_t’ [-Wformat=]
> printf("malloc(%d) failed: %m\n", mfd_def_size * 8);
> ^
> memfd_test.c: In function ‘mfd_fail_grow_write’:
> memfd_test.c:537:3: warning: format ‘%d’ expects argument
> of type ‘int’,but argument 2 has type ‘size_t’ [-Wformat=]
> printf("malloc(%d) failed: %m\n", mfd_def_size * 8);
>
> Signed-off-by: Lei Yang <Lei.Yang(a)windriver.com>
Thanks for the patch. Applied to linux-kselftest next for 4.15-rc1
-- Shuah
--
To unsubscribe from this list: send the line "unsubscribe linux-kselftest" in
the body of a message to majordomo(a)vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Hi,
At Linaro we run mainline/linux-next selftests on LTS releases and
run into few test failures due to kernel mismatch or missing upstream
functionality in older kernels. Discussed at length here:
https://lkml.org/lkml/2017/6/15/652
This patch series is an attempt to modify selftest firmware test scripts.
The proposed changes skip/ignore testing the upstream functionality
missing in the older kernel releases.
v2:
Changed the display message to make it consistent across all
the firmware test scripts. Added Fixes tag.
Regards,
Amit Pundir
Amit Pundir (2):
selftests: firmware: skip unsupported async loading tests
selftests: firmware: skip unsupported custom firmware fallback tests
tools/testing/selftests/firmware/fw_fallback.sh | 38 ++++++++++++++++-------
tools/testing/selftests/firmware/fw_filesystem.sh | 34 ++++++++++++--------
2 files changed, 47 insertions(+), 25 deletions(-)
--
2.7.4
--
To unsubscribe from this list: send the line "unsubscribe linux-kselftest" in
the body of a message to majordomo(a)vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Hi,
At Linaro we run mainline/linux-next selftests on LTS releases and
run into few test failures due to kernel mismatch or missing upstream
functionality in older kernels. Discussed at length here:
https://lkml.org/lkml/2017/6/15/652
This patch series is an attempt to modify selftest firmware test scripts.
The proposed changes skip/ignore testing the upstream functionality
missing in the older kernel releases.
Regards,
Amit Pundir
Amit Pundir (2):
selftests: firmware: skip unsupported async loading tests
selftests: firmware: skip unsupported custom firmware fallback tests
tools/testing/selftests/firmware/fw_fallback.sh | 38 ++++++++++++++++-------
tools/testing/selftests/firmware/fw_filesystem.sh | 34 ++++++++++++--------
2 files changed, 47 insertions(+), 25 deletions(-)
--
2.7.4
--
To unsubscribe from this list: send the line "unsubscribe linux-kselftest" in
the body of a message to majordomo(a)vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
On 11/06/2017 06:18 PM, lei yang wrote:
>
>
> On 2017年11月07日 07:48, Shuah Khan wrote:
>> On 11/06/2017 04:45 PM, Shuah Khan wrote:
>>> On 11/05/2017 09:03 PM, Lei Yang wrote:
>>>> I run into below error when building futext
>>>> /bin/sh: -c: line 5: syntax error: unexpected end of file
>>>>
>>>> the closing ";" and "\" are necessary.
>>>> My OS is "Ubuntu 14.04.5 LTS"
>>>>
>>>> Signed-off-by: Lei Yang <Lei.Yang(a)windriver.com>
>>>> ---
>>>> tools/testing/selftests/futex/Makefile | 6 +++---
>>>> 1 file changed, 3 insertions(+), 3 deletions(-)
>>>>
>>>> diff --git a/tools/testing/selftests/futex/Makefile b/tools/testing/selftests/futex/Makefile
>>>> index f0c0369..943f3a2 100644
>>>> --- a/tools/testing/selftests/futex/Makefile
>>>> +++ b/tools/testing/selftests/futex/Makefile
>>>> @@ -11,9 +11,9 @@ all:
>>>> BUILD_TARGET=$(OUTPUT)/$$DIR; \
>>>> mkdir $$BUILD_TARGET -p; \
>>>> make OUTPUT=$$BUILD_TARGET -C $$DIR $@;\
>>>> - if [ -e $$DIR/$(TEST_PROGS) ]; then
>>>> - rsync -a $$DIR/$(TEST_PROGS) $$BUILD_TARGET/;
>>>> - fi
>>>> + if [ -e $$DIR/$(TEST_PROGS) ]; then \
>>>> + rsync -a $$DIR/$(TEST_PROGS) $$BUILD_TARGET/; \
>>>> + fi \
>>>> done
>>>> override define RUN_TESTS
>>>>
>>> Hmm. I don't see this error on linux_4.14-rc8?
>>>
>>> Can you give more details on the gcc version you are using?
>>
>> I meant gnumake version? I am not seeing the failure with what I am
>> using
>
> $ make -v
> GNU Make 3.81
> Copyright (C) 2006 Free Software Foundation, Inc.
> This is free software; see the source for copying conditions.
> There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
> PARTICULAR PURPOSE.
>
> This program built for x86_64-pc-linux-gnu
>
>
> Lei
>
I can't take patches that aren't tested on the latest kernel release.
3.16 is very old. I am not going reply to other patches you sent.
Please make sure the patches are based on the latest release and tested
on it as well.
thanks,
-- Shuah
--
To unsubscribe from this list: send the line "unsubscribe linux-kselftest" in
the body of a message to majordomo(a)vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
In next branch, Various build failed with:
In file included from membarrier_test.c:8:0:
../kselftest.h: In function ‘ksft_print_header’:
../kselftest.h:61:3: error: expected ‘)’ before ‘printf’
printf("TAP version 13\n");
^
../kselftest.h:62:1: error: expected expression before ‘}’ token
}
^
Signed-off-by: Lei Yang <Lei.Yang(a)windriver.com>
---
tools/testing/selftests/kselftest.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/testing/selftests/kselftest.h b/tools/testing/selftests/kselftest.h
index d6732ba312ef..acc98a5c3d73 100644
--- a/tools/testing/selftests/kselftest.h
+++ b/tools/testing/selftests/kselftest.h
@@ -57,7 +57,7 @@ static inline int ksft_get_error_cnt(void) { return ksft_cnt.ksft_error; }
static inline void ksft_print_header(void)
{
- if (!(getenv("KSFT_TAP_LEVEL"))
+ if (!(getenv("KSFT_TAP_LEVEL")))
printf("TAP version 13\n");
}
--
2.11.0
--
To unsubscribe from this list: send the line "unsubscribe linux-kselftest" in
the body of a message to majordomo(a)vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html