On Tue, Dec 22, 2020, Paolo Bonzini wrote:
> On 22/12/20 19:31, David Laight wrote:
> > > /*
> > >* Use 2ULL to incorporate the necessary +1 in the shift; adding +1 in
> > >* the shift count will overflow SHL's max shift of 63 if s=0 and e=63.
> > >*/
> > A comment of the desired outp
On 22/12/20 19:31, David Laight wrote:
/*
* Use 2ULL to incorporate the necessary +1 in the shift; adding +1 in
* the shift count will overflow SHL's max shift of 63 if s=0 and e=63.
*/
A comment of the desired output value would be more use.
I think it is:
From: Sean Christopherson
> Sent: 22 December 2020 18:13
>
> On Tue, Dec 22, 2020, Paolo Bonzini wrote:
> > Since we know that e >= s, we can reassociate the left shift,
> > changing the shifted number from 1 to 2 in exchange for
> > decreasing the right hand side by 1.
>
> I assume the edge case
On Tue, Dec 22, 2020, Paolo Bonzini wrote:
> Since we know that e >= s, we can reassociate the left shift,
> changing the shifted number from 1 to 2 in exchange for
> decreasing the right hand side by 1.
I assume the edge case is that this ends up as `(1ULL << 64) - 1` and overflows
SHL's max shif
Since we know that e >= s, we can reassociate the left shift,
changing the shifted number from 1 to 2 in exchange for
decreasing the right hand side by 1.
Reported-by: syzbot+e87846c48bf72bc85...@syzkaller.appspotmail.com
Signed-off-by: Paolo Bonzini
---
arch/x86/kvm/mmu.h | 2 +-
1 file changed
5 matches
Mail list logo