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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <d6e92498-1784-48f5-904c-8bd37770c206@redhat.com>
Date:   Tue, 28 Nov 2023 19:40:49 +0100
From:   Marco Pagani <marpagan@...hat.com>
To:     Javier Martinez Canillas <javierm@...hat.com>,
        Brendan Higgins <brendan.higgins@...ux.dev>,
        David Gow <davidgow@...gle.com>, Rae Moar <rmoar@...gle.com>,
        Jinjie Ruan <ruanjinjie@...wei.com>,
        Shuah Khan <skhan@...uxfoundation.org>
Cc:     linux-kselftest@...r.kernel.org, kunit-dev@...glegroups.com,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2] kunit: run test suites only after module
 initialization completes



On 28/11/23 12:15, Javier Martinez Canillas wrote:
> Marco Pagani <marpagan@...hat.com> writes:
> 
> Hello Marco,
> 
> [...]
> 
>> @@ -737,12 +738,14 @@ static void kunit_module_exit(struct module *mod)
>>  	};
>>  	const char *action = kunit_action();
>>  
>> +	if (!suite_set.start || !virt_addr_valid(suite_set.start))
>> +		return;
>> +
> 
> I would add a comment here explaining why this condition is checked and
> what it means. Maybe something like the following ?
> 
> +       /*
> +        * Check if the kunit test suite start address is a virtual
> +        * address or a direct mapping address. This is used as an
> +        * indication of whether the kunit_filter_suites() was used
> +        * to filter the kunit test suite or not.
> +        *
> +        * If is not a virtual address, then this means that the
> +        * kunit_module_init() function was not called and the kunit
> +        * suite was not filtered. Let's just bail out in that case.
> +        */
> +       if (!suite_set.start || !virt_addr_valid(suite_set.start))
> +               return;

Good point. I'll add a comment in v3.

> 
> The patch makes sense to me though and agree that is a better approach.
> 
> Reviewed-by: Javier Martinez Canillas <javierm@...hat.com>
> 

Thanks,
Marco

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ