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: <4a72bea1-da58-438f-b03e-e79bd4011f64@gmail.com>
Date: Sat, 16 Nov 2024 20:55:32 +0530
From: Amit <av2082000@...il.com>
To: Shuah Khan <skhan@...uxfoundation.org>,
 Casey Schaufler <casey@...aufler-ca.com>, paul@...l-moore.com,
 jmorris@...ei.org, serge@...lyn.com, shuah@...nel.org
Cc: ricardo@...liere.net, linux-kernel-mentees@...ts.linux.dev,
 linux-security-module@...r.kernel.org, linux-kselftest@...r.kernel.org,
 linux-kernel@...r.kernel.org
Subject: Re: [PATCH] selftests: lsm: Refactor
 `flags_overset_lsm_set_self_attr` test

On 14/11/24 10:38 pm, Shuah Khan wrote:
> On 11/14/24 09:55, Casey Schaufler wrote:
>>
>> On 11/14/2024 8:25 AM, Shuah Khan wrote:
>>> On 11/12/24 11:28, Amit Vadhavana wrote:
>>>> - Remove unnecessary `tctx` variable, use `ctx` directly.
>>>> - Simplified code with no functional changes.
>>>>
>>>
>>> I would rephrase the short to simply say Remove unused variable,
>>> as refactor implies more extensive changes than what this patch
>>> is actually doing.
>>>
>>> Please write complete sentences instead of bullet points in the
>>> change log.
V2: https://lore.kernel.org/all/20241116152136.10635-1-av2082000@gmail.com/
>>> >>> How did you find this problem? Do include the details on how
>>> in the change log.
While exploring the kselftest framework. I found the this problem.
>>>
>>>> Signed-off-by: Amit Vadhavana <av2082000@...il.com>
>>>> ---
>>>>    tools/testing/selftests/lsm/lsm_set_self_attr_test.c | 7 +++----
>>>>    1 file changed, 3 insertions(+), 4 deletions(-)
>>>>
>>>> diff --git a/tools/testing/selftests/lsm/lsm_set_self_attr_test.c
>>>> b/tools/testing/selftests/lsm/lsm_set_self_attr_test.c
>>>> index 66dec47e3ca3..732e89fe99c0 100644
>>>> --- a/tools/testing/selftests/lsm/lsm_set_self_attr_test.c
>>>> +++ b/tools/testing/selftests/lsm/lsm_set_self_attr_test.c
>>>> @@ -56,16 +56,15 @@ TEST(flags_zero_lsm_set_self_attr)
>>>>    TEST(flags_overset_lsm_set_self_attr)
>>>>    {
>>>>        const long page_size = sysconf(_SC_PAGESIZE);
>>>> -    char *ctx = calloc(page_size, 1);
>>>> +    struct lsm_ctx *ctx = calloc(page_size, 1);
>>>
>>> Why not name this tctx and avoid changes to the ASSERT_EQs
>>> below?
>>
>> In the realm of linux security modules ctx is short for "context".
>> I used tctx here because I was lazy. It would be much better to
>> drop tctx, even if it means a tiny bit more change.
>>
> 
> Makes sense.
> 
> Amit, you can ignore this comment about tctx and ctx. Please do fix
> others about the change log and short log.
> 
> thanks,
> -- Shuah
> 

-- 
Thanks,
Amit V.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ