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] [day] [month] [year] [list]
Message-ID: <alpine.DEB.2.21.1907082146110.1961@nanos.tec.linutronix.de>
Date:   Mon, 8 Jul 2019 21:48:55 +0200 (CEST)
From:   Thomas Gleixner <tglx@...utronix.de>
To:     Linus Torvalds <torvalds@...ux-foundation.org>
cc:     Linux List Kernel Mailing <linux-kernel@...r.kernel.org>,
        the arch/x86 maintainers <x86@...nel.org>
Subject: Re: [GIT pull] x86/pti for 5.3-rc1

On Mon, 8 Jul 2019, Linus Torvalds wrote:

> On Mon, Jul 8, 2019 at 2:22 AM Thomas Gleixner <tglx@...utronix.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:

Ooops. No idea how that slipped through. Sorry!

> @@@ -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.

Obviously correct.

Thanks for fixing it up.

       tglx


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ