[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20200219111228.44c2999b@gandalf.local.home>
Date: Wed, 19 Feb 2020 11:12:28 -0500
From: Steven Rostedt <rostedt@...dmis.org>
To: Peter Zijlstra <peterz@...radead.org>
Cc: linux-kernel@...r.kernel.org, linux-arch@...r.kernel.org,
mingo@...nel.org, joel@...lfernandes.org,
gregkh@...uxfoundation.org, gustavo@...eddedor.com,
tglx@...utronix.de, paulmck@...nel.org, josh@...htriplett.org,
mathieu.desnoyers@...icios.com, jiangshanlai@...il.com,
luto@...nel.org, tony.luck@...el.com, frederic@...nel.org,
dan.carpenter@...cle.com, mhiramat@...nel.org
Subject: Re: [PATCH v3 04/22] x86/doublefault: Make memmove()
notrace/NOKPROBE
On Wed, 19 Feb 2020 17:04:42 +0100
Peter Zijlstra <peterz@...radead.org> wrote:
> > - memmove(&gpregs->ip, (void *)regs->sp, 5*8);
> > + for (i = 0; i < count; i++) {
> > + int idx = (dst <= src) ? i : count - i;
>
> That's an off-by-one for going backward; 'count - 1 - i' should work
> better, or I should just stop typing for today ;-)
Or, we could just cut and paste the current memmove and make a notrace
version too. Then we don't need to worry bout bugs like this.
-- Steve
Powered by blists - more mailing lists