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]
Date:   Tue, 29 Aug 2023 18:48:00 -0700
From:   Guenter Roeck <linux@...ck-us.net>
To:     David Gow <davidgow@...gle.com>
Cc:     Rae Moar <rmoar@...gle.com>, shuah@...nel.org, dlatypov@...gle.com,
        brendan.higgins@...ux.dev, linux-kselftest@...r.kernel.org,
        kunit-dev@...glegroups.com, linux-kernel@...r.kernel.org,
        keescook@...omium.org, linux-hardening@...r.kernel.org,
        jstultz@...gle.com, tglx@...utronix.de, sboyd@...nel.org
Subject: Re: [PATCH v3 4/9] kunit: Add ability to filter attributes

On 8/29/23 17:24, David Gow wrote:
> On Wed, 30 Aug 2023 at 06:46, Guenter Roeck <linux@...ck-us.net> wrote:
>>
>> Hi,
>>
>> On Tue, Jul 25, 2023 at 09:25:15PM +0000, Rae Moar wrote:
>>> Add filtering of test attributes. Users can filter tests using the
>>> module_param called "filter".
>>>
>>> Filters are imputed in the format: <attribute_name><operation><value>
>>>
>>> Example: kunit.filter="speed>slow"
>>>
>>> Operations include: >, <, >=, <=, !=, and =. These operations will act the
>>> same for attributes of the same type but may not between types.
>>>
>>> Note multiple filters can be inputted by separating them with a comma.
>>> Example: kunit.filter="speed=slow, module!=example"
>>>
>>> Since both suites and test cases can have attributes, there may be
>>> conflicts. The process of filtering follows these rules:
>>> - Filtering always operates at a per-test level.
>>> - If a test has an attribute set, then the test's value is filtered on.
>>> - Otherwise, the value falls back to the suite's value.
>>> - If neither are set, the attribute has a global "default" value, which
>>>    is used.
>>>
>>> Filtered tests will not be run or show in output. The tests can instead be
>>> skipped using the configurable option "kunit.filter_action=skip".
>>>
>>> Note the default settings for running tests remains unfiltered.
>>>
>>> Finally, add "filter" methods for the speed and module attributes to parse
>>> and compare attribute values.
>>>
>>> Note this filtering functionality will be added to kunit.py in the next
>>> patch.
>>>
>>> Reviewed-by: David Gow <davidgow@...gle.com>
>>> Signed-off-by: Rae Moar <rmoar@...gle.com>
>>
>> This patch causes all my s390 boot tests to crash.
>>
> 
> Thanks: I can reproduce this here.
> 
> Looks like this is an issue with string constants in the tests not
> being writable. (I'd've thought my testing with KASAN would pick up on
> this, but I guess string literals are in a writable segment on
> x86_64?)
> 
> Regardless, using char[] for the filters seems to work here. I've sent
> out a patch to do so:
> https://lore.kernel.org/linux-kselftest/20230830002116.3768675-1-davidgow@google.com/
> 
> That fixes the issue with the stacktrack below, but if you bisected it
> to this patch, maybe there's another issue. The tests weren't
> introduced until 76066f93f1df ("kunit: add tests for filtering
> attributes"). I don't get any crashes with this patch applied, though,
> so let me know if something's still broken.
> 

Your patch works just fine. Maybe bisect acted up ? I don't recall seeing
this happen, but who knows.

Thanks a lot for the quick fix!

Guenter

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ