From: Gavin Shan <gshan@redhat.com>
To: Steven Rostedt <rostedt@goodmis.org>
Cc: Mark Rutland <mark.rutland@arm.com>,
catalin.marinas@arm.com, linux-kernel@vger.kernel.org,
shan.gavin@gmail.com, will@kernel.org,
linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH] arm64/mm: Reject invalid NUMA option
Date: Tue, 28 Apr 2020 14:35:20 +1000 [thread overview]
Message-ID: <7e85ea83-de5f-c789-2e3c-e468a50ed4bd@redhat.com> (raw)
In-Reply-To: <20200427230920.3d606a2e@gandalf.local.home>
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
next prev parent reply other threads:[~2020-04-28 4:35 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-04-24 4:53 [PATCH] arm64/mm: Reject invalid NUMA option Gavin Shan
2020-04-24 10:11 ` Mark Rutland
2020-04-28 0:59 ` Gavin Shan
2020-04-28 2:54 ` Steven Rostedt
2020-04-28 2:59 ` Steven Rostedt
2020-04-28 3:09 ` Steven Rostedt
2020-04-28 4:35 ` Gavin Shan [this message]
2020-04-28 7:25 ` Will Deacon
2020-04-28 8:56 ` Gavin Shan
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=7e85ea83-de5f-c789-2e3c-e468a50ed4bd@redhat.com \
--to=gshan@redhat.com \
--cc=catalin.marinas@arm.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=rostedt@goodmis.org \
--cc=shan.gavin@gmail.com \
--cc=will@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).