From: Linus Torvalds <torvalds@linux-foundation.org>
To: Thomas Gleixner <tglx@linutronix.de>
Cc: Linux List Kernel Mailing <linux-kernel@vger.kernel.org>,
"the arch/x86 maintainers" <x86@kernel.org>
Subject: Re: [GIT pull] x86/pti for 5.3-rc1
Date: Mon, 8 Jul 2019 12:24:18 -0700 [thread overview]
Message-ID: <CAHk-=whhq5RQYNKzHOLqC+gzSjmcEGNJjbC=Psc_vQaCx4TCKg@mail.gmail.com> (raw)
In-Reply-To: <156257673796.14831.2572103765106531133.tglx@nanos.tec.linutronix.de>
On Mon, Jul 8, 2019 at 2:22 AM Thomas Gleixner <tglx@linutronix.de> wrote:
>
> @@ -643,9 +644,11 @@ static unsigned long ptrace_get_debugreg(struct task_struct *tsk, int n)
> {
> struct thread_struct *thread = &tsk->thread;
> unsigned long val = 0;
> + int index = n;
>
> if (n < HBP_NUM) {
> - struct perf_event *bp = thread->ptrace_bps[n];
> + index = array_index_nospec(index, HBP_NUM);
> + struct perf_event *bp = thread->ptrace_bps[index];
This causes a new warning:
warning: ISO C90 forbids mixed declarations and code
and I'm fixing it up in the merge as follows:
@@@ -633,9 -644,11 +634,10 @@@ static unsigned long ptrace_get_debugre
{
struct thread_struct *thread = &tsk->thread;
unsigned long val = 0;
- int index = n;
if (n < HBP_NUM) {
- struct perf_event *bp = thread->ptrace_bps[n];
- index = array_index_nospec(index, HBP_NUM);
++ int index = array_index_nospec(n, HBP_NUM);
+ struct perf_event *bp = thread->ptrace_bps[index];
if (bp)
val = bp->hw.info.address;
Holler if I did something stupid.
Linus
next prev parent reply other threads:[~2019-07-08 19:24 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-07-08 9:05 [GIT pull] core/debugobjects for 5.3-rc1 Thomas Gleixner
2019-07-08 9:05 ` [GIT pull] x86/cpu " Thomas Gleixner
2019-07-08 19:30 ` pr-tracker-bot
2019-07-08 9:05 ` [GIT pull] irq/core " Thomas Gleixner
2019-07-08 19:30 ` pr-tracker-bot
2019-07-08 9:05 ` [GIT pull] x86/entry " Thomas Gleixner
2019-07-08 19:30 ` pr-tracker-bot
2019-07-08 9:05 ` [GIT pull] x86/timers " Thomas Gleixner
2019-07-08 19:30 ` pr-tracker-bot
2019-07-08 9:05 ` [GIT pull] core/rslib " Thomas Gleixner
2019-07-08 19:30 ` pr-tracker-bot
2019-07-08 9:05 ` [GIT pull] x86/apic " Thomas Gleixner
2019-07-08 19:30 ` pr-tracker-bot
2019-07-08 9:05 ` [GIT pull] timers/core " Thomas Gleixner
2019-07-08 19:30 ` pr-tracker-bot
2019-07-08 9:05 ` [GIT pull] x86/pti " Thomas Gleixner
2019-07-08 19:24 ` Linus Torvalds [this message]
2019-07-08 19:48 ` Thomas Gleixner
2019-07-08 19:30 ` pr-tracker-bot
2019-07-08 9:05 ` [GIT pull] x86/fpu " Thomas Gleixner
2019-07-08 19:30 ` pr-tracker-bot
2019-07-08 9:05 ` [GIT pull] smp/hotplug " Thomas Gleixner
2019-07-08 19:30 ` pr-tracker-bot
2019-07-08 19:30 ` [GIT pull] core/debugobjects " pr-tracker-bot
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='CAHk-=whhq5RQYNKzHOLqC+gzSjmcEGNJjbC=Psc_vQaCx4TCKg@mail.gmail.com' \
--to=torvalds@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=tglx@linutronix.de \
--cc=x86@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).