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: <2ee0f5df-9a9e-4625-ab09-b21596a0685f@linuxfoundation.org>
Date: Tue, 23 Jul 2024 09:55:15 -0600
From: Shuah Khan <skhan@...uxfoundation.org>
To: Dev Jain <dev.jain@....com>, Oleg Nesterov <oleg@...hat.com>
Cc: shuah@...nel.org, mingo@...nel.org, tglx@...utronix.de,
 mark.rutland@....com, ryan.roberts@....com, broonie@...nel.org,
 suzuki.poulose@....com, Anshuman.Khandual@....com,
 DeepakKumar.Mishra@....com, aneesh.kumar@...nel.org,
 linux-kselftest@...r.kernel.org, linux-kernel@...r.kernel.org,
 Shuah Khan <skhan@...uxfoundation.org>
Subject: Re: [PATCH v4 2/2] selftests: Add a test mangling with uc_sigmask

On 7/22/24 22:30, Dev Jain wrote:
> 
> On 7/22/24 20:28, Shuah Khan wrote:
>> On 7/15/24 05:49, Dev Jain wrote:
>>>
>>> On 6/30/24 20:48, Oleg Nesterov wrote:
>>>> I see nothing wrong, but perhaps this test can be simplified?
>>>> Feel free to ignore.
>>>>
>>>> Say,
>>>>
>>>> On 06/27, Dev Jain wrote:
>>>>> +void handler_usr(int signo, siginfo_t *info, void *uc)
>>>>> +{
>>>>> +    int ret;
>>>>> +
>>>>> +    /*
>>>>> +     * Break out of infinite recursion caused by raise(SIGUSR1) invoked
>>>>> +     * from inside the handler
>>>>> +     */
>>>>> +    ++cnt;
>>>>> +    if (cnt > 1)
>>>>> +        return;
>>>>> +
>>>>> +    ksft_print_msg("In handler_usr\n");
>>
>> This message isn't very useful. Why do you need this message?
> 
> 
> There isn't any specific use; I am just showing the progress
> 
> of the test. If you think this is just waste output....

Showing progress will not be useful unless it is also giving useful
information to the user. It doesn't look like it in this case.

You can drop this message.

> 
>>
>>>>> +
>>>>> +    /* SEGV blocked during handler execution, delivered on return */
>>>>> +    if (raise(SIGSEGV))
>>>>> +        ksft_exit_fail_perror("raise");>>> +
>>>>> +    ksft_print_msg("SEGV bypassed successfully\n");
>>>> You could simply do sigprocmask(SIG_SETMASK, NULL, &oldset) and check if
>>>> SIGSEGV is blocked in oldset. SIG_SETMASK has no effect if newset == NULL.
>>>>
>>>
>>> IMHO, isn't raising the signal, and the process not terminating, a stricter test? I have already included your described approach in
>>> the last testcase; so, the test includes both ways: raising the
>>> signal -> process not terminating, and checking blockage with sigprocmask().
>>

thanks,
-- Shuah


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ