mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Nikita Kiryushin <kiryushin@ancud.ru>
To: paulmck@kernel.org
Cc: Frederic Weisbecker <frederic@kernel.org>,
	Neeraj Upadhyay <quic_neeraju@quicinc.com>,
	Joel Fernandes <joel@joelfernandes.org>,
	Josh Triplett <josh@joshtriplett.org>,
	Boqun Feng <boqun.feng@gmail.com>,
	Steven Rostedt <rostedt@goodmis.org>,
	Mathieu Desnoyers <mathieu.desnoyers@efficios.com>,
	Lai Jiangshan <jiangshanlai@gmail.com>,
	Zqiang <qiang.zhang1211@gmail.com>,
	rcu@vger.kernel.org, linux-kernel@vger.kernel.org,
	lvc-project@linuxtesting.org
Subject: Re: [PATCH] rcu: Fix buffer overlow in print_cpu_stall_info()
Date: Fri, 29 Mar 2024 20:56:16 +0300	[thread overview]
Message-ID: <a6e236f3-60a4-48da-840f-c38d7ba02475@ancud.ru> (raw)
In-Reply-To: <e3d3a612-4751-48ac-82c1-8bf61e8f3cd1@paulmck-laptop>


Thank you for the feedback!
> would you like to resend keeping the buffer-overflow fix but leaving
> out the signed-to-unsigned conversion?
>
I will make a second version of the patch, without
conversion as it is intentional.
> However, the signed output is intentional.  The idea is that if the
> timekeeping code is confused enough to run the jiffies counter backwards,
> we see a small negative number rather than a huge positive number.
> For example, -132 is immediately obvious, while the 64-bit unsigned
> equivalent of 18446744073709551484 might not be.
I had suspicions that was the case, however, I did not find the pointers
in the code or in the commit message, that it was intentional, so I assumed
a mistake.
Maybe, it would be a good idea for me to add a comment with intent
clarification, to reduce possibility of the same confusion in the future,
while I am at it? If so, should I do it in the same patch, or make a separate one?

  reply	other threads:[~2024-03-29 18:07 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-28 18:19 Nikita Kiryushin
2024-03-29 17:43 ` Paul E. McKenney
2024-03-29 17:56   ` Nikita Kiryushin [this message]
2024-03-29 18:32     ` Steven Rostedt
2024-03-29 22:21       ` Paul E. McKenney
2024-04-01 18:54         ` [PATCH v2] " Nikita Kiryushin
2024-04-01 19:05           ` Steven Rostedt
2024-04-01 19:43             ` [PATCH v3] " Nikita Kiryushin
2024-04-01 20:03               ` Steven Rostedt
2024-04-01 20:54                 ` Paul E. McKenney

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=a6e236f3-60a4-48da-840f-c38d7ba02475@ancud.ru \
    --to=kiryushin@ancud.ru \
    --cc=boqun.feng@gmail.com \
    --cc=frederic@kernel.org \
    --cc=jiangshanlai@gmail.com \
    --cc=joel@joelfernandes.org \
    --cc=josh@joshtriplett.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lvc-project@linuxtesting.org \
    --cc=mathieu.desnoyers@efficios.com \
    --cc=paulmck@kernel.org \
    --cc=qiang.zhang1211@gmail.com \
    --cc=quic_neeraju@quicinc.com \
    --cc=rcu@vger.kernel.org \
    --cc=rostedt@goodmis.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

all inboxes | Powered by JetHome®