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] [thread-next>] [day] [month] [year] [list]
Date:   Fri, 28 Jul 2023 16:35:04 +0200
From:   David Hildenbrand <david@...hat.com>
To:     Ayush Jain <ayush.jain3@....com>, akpm@...ux-foundation.org,
        shuah@...nel.org, pasha.tatashin@...een.com,
        zhansayabagdaulet@...il.com, tyhicks@...ux.microsoft.com,
        raghavendra.kodsarathimmappa@....com
Cc:     linux-mm@...ck.org, linux-kselftest@...r.kernel.org,
        linux-kernel@...r.kernel.org, Narasimhan.V@....com,
        Santosh.Shukla@....com
Subject: Re: [PATCH 1/2] selftests: mm: ksm: Fix incorrect evaluation of
 parameter

On 28.07.23 08:01, Ayush Jain wrote:
> A missing break in kms_tests leads to kselftest hang when the
> parameter -s is used.
> In current code flow because of missing break in -s, -t parses
> args spilled from -s and as -t accepts only valid values as 0,1
> so any arg in -s >1 or <0, gets in ksm_test failure
> 
> This went undetected since, before the addition of option -t,
> the next case -M would immediately break out of the switch
> statement but that is no longer the case
> 
> Add the missing break statement.
> 
> ----Before----
> ./ksm_tests -H -s 100
> Invalid merge type
> 
> ----After----
> ./ksm_tests -H -s 100
> Number of normal pages:    0
> Number of huge pages:    50
> Total size:    100 MiB
> Total time:    0.401732682 s
> Average speed:  248.922 MiB/s
> 
> Fixes: 9e7cb94ca218 ("selftests: vm: add KSM merging time test")

I think this actually fixes 07115fcc15b4 ("selftests/mm: add new 
selftests for KSM") that added the "t" parsing.

Reviewed-by: David Hildenbrand <david@...hat.com>

-- 
Cheers,

David / dhildenb

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ