-Original Message-
From: Thomas Gleixner [mailto:t...@linutronix.de]
Sent: Tuesday, September 27, 2016 3:01 AM
To: Liav Rehana
Cc: john.stu...@linaro.org; linux-kernel@vger.kernel.org; Elad Kanfi
; Noam Camus
Subject: Re: [PATCH] timekeeping: Change type of nsec variable to unsigned
From: Liav Rehana
During the calculation of the nsec variable in the inline function
timekeeping_delta_to_ns, it may undergo a sign extension if its msb
is set just before the shift. The sign extension may, in some cases,
gain it a value near the maximum value of the 64-bit range. This is
bad
From: Liav Rehana
During the calculation of the nsec variable in the inline function
timekeeping_delta_to_ns, it may undergo a sign extension if its msb
is set just before the shift. The sign extension may, in some cases,
gain it a value near the maximum value of the 64-bit range. This is
bad
PING
-Original Message-
From: Liav Rehana
Sent: Sunday, September 11, 2016 9:32 AM
To: 'John Stultz' ; Thomas Gleixner
Cc: lkml ; Noam Camus ; Elad
Kanfi
Subject: RE: [PATCH] Fix chance of sign extension to nsec after its msb is set
during calculation.
>> > >
ong enough
> >> > suspended time will cause the nsec variable to get a much higher
> >> > value after its shift because of sign extension, and thus the loop
> >> > that follows some instructions afterwards, implemented in the
> >> > inli
>> The root of the problem is that in case the multiplication of delta
>> and
>> tkr->mult in the line that I've changed is too big that the MSB of the
>> result is set, then the shift will cause an unwanted sign extension.
> I completely understand that, but as I said before:
> > > This typecas
how can we cope with the sign extension problems in this case ?
Thanks,
Liav.
-Original Message-
From: Thomas Gleixner [mailto:t...@linutronix.de]
Sent: Friday, September 02, 2016 9:31 PM
To: Liav Rehana
Cc: linux-kernel@vger.kernel.org; john.stu...@linaro.org; Noam Camus
; Elad Kanfi
From: Liav Rehana
During the calculation of the nsec variable, "delta * tkr->mult" may cause
overflow to the msb, if the suspended time is too long.
In that case, we need to guarantee that the variable will not go through a
sign extension during its shift, and thus it will res
From: Liav Rehana
User mode callee regs are explicitly collected before signal delivery
or breakpoint trap. r25 is special for kernel as it serves as task
pointer, so user mode value is clobbered very early. It is saved in
pt_regs where generally only scratch (caller saved) res are saved.
The
From: Liav Rehana
The instruction ld.as takes as operands a base address and an offset,
and doesn't access the sum of these two, but the sum of the base
address and a shifted version of the offset.
This isn't what we want in that case, since it causes a bug during
the push and pop of
10 matches
Mail list logo