android_kernel_xiaomi_sm7250/arch
Chris Lalancette 2c75910f1a x86: Make sure get_user_desc() doesn't sign extend.
The current implementation of get_user_desc() sign extends the return
value because of integer promotion rules.  For the most part, this
doesn't matter, because the top bit of base2 is usually 0.  If, however,
that bit is 1, then the entire value will be 0xffff...  which is
probably not what the caller intended.

This patch casts the entire thing to unsigned before returning, which
generates almost the same assembly as the current code but replaces the
final "cltq" (sign extend) with a "mov %eax %eax" (zero-extend).  This
fixes booting certain guests under KVM.

Signed-off-by: Chris Lalancette <clalance@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-11-05 13:22:18 -08:00
..
alpha
arm at91: at91sam9g45 family: identify several chip versions 2009-11-03 18:42:31 +01:00
avr32 at91: at91sam9g45 family: identify several chip versions 2009-11-03 18:42:31 +01:00
blackfin
cris
frv frv: fix check on unsigned in do_signal() 2009-10-29 07:39:32 -07:00
h8300
ia64 Revert "[IA64] fix percpu warnings" 2009-11-02 09:23:08 -08:00
m32r m32r: Should index be positive? 2009-11-04 08:39:26 +09:00
m68k tty: Mark generic_serial users as BROKEN 2009-10-30 14:43:12 -07:00
m68knommu
microblaze
mips MIPS: O32: Fix ppoll 2009-11-02 12:00:08 +01:00
mn10300
parisc
powerpc
s390 [S390] smp: fix sigp sense handling 2009-10-29 15:05:13 +01:00
score
sh
sparc
um
x86 x86: Make sure get_user_desc() doesn't sign extend. 2009-11-05 13:22:18 -08:00
xtensa
.gitignore
Kconfig