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]
Message-ID: <7e85ea83-de5f-c789-2e3c-e468a50ed4bd@redhat.com>
Date:   Tue, 28 Apr 2020 14:35:20 +1000
From:   Gavin Shan <gshan@...hat.com>
To:     Steven Rostedt <rostedt@...dmis.org>
Cc:     Mark Rutland <mark.rutland@....com>, catalin.marinas@....com,
        linux-kernel@...r.kernel.org, shan.gavin@...il.com,
        will@...nel.org, linux-arm-kernel@...ts.infradead.org
Subject: Re: [PATCH] arm64/mm: Reject invalid NUMA option

Hi Steven and Mark,

On 4/28/20 1:09 PM, Steven Rostedt wrote:

[...]

> 
> Could this be a bug in the implementation of strncmp() in
> arch/arm64/lib/strncmp.S. As I don't know arm64 assembly, I have no idea
> what it is trying to do.
> 
> But strncmp("o","off",3) returning zero *is* a bug.
> 

I think it's false alarm. The patch has been in my local repo for a while.
I checked out 5.7.rc3 and tried passing "numa=o" to the kernel, @numa_off
is unchanged and its value is false. I also check the return value from
strncmp() as below, it's correct. Nothing is broken. I should have retested
before posting it. Sorry for the noise. Please ignore the crap patch :)

diff --git a/arch/arm64/mm/numa.c b/arch/arm64/mm/numa.c
index 4decf1659700..a8e5c6f7ba25 100644
--- a/arch/arm64/mm/numa.c
+++ b/arch/arm64/mm/numa.c
@@ -32,6 +32,13 @@ static __init int numa_parse_early_param(char *opt)
         if (str_has_prefix(opt, "off"))
                 numa_off = true;
  
+       pr_info("numa_off=%s\n", numa_off ? "true" : "false");
+       pr_info("opt=%s\n", opt);
+       pr_info("len=%d\n", (int)strlen("off"));
+       pr_info("\n");
+       pr_info("================================\n");
+       pr_info("strncmp(opt, 'off', 3)=%d\n", strncmp(opt, "off", 3));
+

[    0.000000] NUMA: numa_off=false
[    0.000000] NUMA: opt=o
[    0.000000] NUMA: len=3
[    0.000000] NUMA:
[    0.000000] NUMA: ================================
[    0.000000] NUMA: strncmp(opt, 'off', 3)=-102

Thanks,
Gavin



Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ