# git rev-parse -q --verify cc0bb290a0dabcdbc422fd4721e000ea115a5beb^{commit} cc0bb290a0dabcdbc422fd4721e000ea115a5beb already have revision, skipping fetch # git checkout -q -f -B kisskb cc0bb290a0dabcdbc422fd4721e000ea115a5beb # git clean -qxdf # < git log -1 # commit cc0bb290a0dabcdbc422fd4721e000ea115a5beb # Author: Christophe Leroy # Date: Sun Nov 25 11:48:22 2018 +0000 # # powerpc/book3s32: Implement Kernel Userspace Access Protection # # This patch implements Kernel Userspace Access Protection for # book3s/32. # # Due to limitations of the processor page protection capabilities, # the protection is only against writing. read protection cannot be # achieved using page protection. # # The previous patch modifies the page protection so that RW user # pages are RW for Key 0 and RO for Key 1, and it sets Key 0 for # both user and kernel. # # This patch changes userspace segment registers are set to Ku 0 # and Ks 1. When kernel needs to write to RW pages, the associated # segment register is then changed to Ks 0 in order to allow write # access to the kernel. # # In order to avoid having the read all segment registers when # locking/unlocking the access, some data is kept in the thread_struct # and saved on stack on exceptions. The field identifies both the # first unlocked segment and the first segment following the last # unlocked one. When no segment is unlocked, it contains value 0. # # Signed-off-by: Christophe Leroy # < /opt/cross/kisskb/gcc-4.6.3-nolibc/powerpc-linux/bin/powerpc-linux-gcc --version # < /opt/cross/kisskb/gcc-4.6.3-nolibc/powerpc-linux/bin/powerpc-linux-ld --version # < git log --format=%s --max-count=1 cc0bb290a0dabcdbc422fd4721e000ea115a5beb # < make -s -j 10 ARCH=powerpc O=/kisskb/build/chleroy_pasemi_defconfig_powerpc-gcc4.6 CROSS_COMPILE=/opt/cross/kisskb/gcc-4.6.3-nolibc/powerpc-linux/bin/powerpc-linux- pasemi_defconfig # make -s -j 10 ARCH=powerpc O=/kisskb/build/chleroy_pasemi_defconfig_powerpc-gcc4.6 CROSS_COMPILE=/opt/cross/kisskb/gcc-4.6.3-nolibc/powerpc-linux/bin/powerpc-linux- /kisskb/src/kernel/printk/printk.c: In function 'devkmsg_sysctl_set_loglvl': /kisskb/src/kernel/printk/printk.c:186:16: warning: 'old' may be used uninitialized in this function [-Wuninitialized] /kisskb/src/kernel/rcu/srcutree.c: In function 'init_srcu_struct_fields': /kisskb/src/kernel/rcu/srcutree.c:152:32: warning: 'levelspread[]' may be used uninitialized in this function [-Wuninitialized] /kisskb/src/kernel/rcu/srcutree.c:100:6: note: 'levelspread[]' was declared here /kisskb/src/drivers/base/regmap/regmap.c: In function 'regmap_raw_read': /kisskb/src/drivers/base/regmap/regmap.c:2594:6: warning: 'ret' may be used uninitialized in this function [-Wuninitialized] /kisskb/src/drivers/base/regmap/regmap.c: In function '_regmap_raw_write': /kisskb/src/drivers/base/regmap/regmap.c:1855:6: warning: 'ret' may be used uninitialized in this function [-Wuninitialized] /kisskb/src/arch/powerpc/kernel/exceptions-64s.S: Assembler messages: /kisskb/src/arch/powerpc/kernel/exceptions-64s.S:183: Error: missing ')' /kisskb/src/arch/powerpc/kernel/exceptions-64s.S:183: Error: operand out of range (0xc000000000000000 is not between 0xffffffffffff8000 and 0x0000000000007fff) /kisskb/src/arch/powerpc/kernel/exceptions-64s.S:183: Error: syntax error; found `U', expected `,' /kisskb/src/arch/powerpc/kernel/exceptions-64s.S:183: Error: junk at end of line: `UL)@highest' /kisskb/src/arch/powerpc/kernel/exceptions-64s.S:313: Error: missing ')' /kisskb/src/arch/powerpc/kernel/exceptions-64s.S:313: Error: operand out of range (0xc000000000000000 is not between 0xffffffffffff8000 and 0x0000000000007fff) /kisskb/src/arch/powerpc/kernel/exceptions-64s.S:313: Error: syntax error; found `U', expected `,' /kisskb/src/arch/powerpc/kernel/exceptions-64s.S:313: Error: junk at end of line: `UL)@highest' /kisskb/src/arch/powerpc/kernel/exceptions-64s.S:367: Error: missing ')' /kisskb/src/arch/powerpc/kernel/exceptions-64s.S:367: Error: operand out of range (0xc000000000000000 is not between 0xffffffffffff8000 and 0x0000000000007fff) /kisskb/src/arch/powerpc/kernel/exceptions-64s.S:367: Error: syntax error; found `U', expected `,' /kisskb/src/arch/powerpc/kernel/exceptions-64s.S:367: Error: junk at end of line: `UL)@highest' /kisskb/src/arch/powerpc/kernel/exceptions-64s.S:618: Error: missing ')' /kisskb/src/arch/powerpc/kernel/exceptions-64s.S:618: Error: operand out of range (0xc000000000000000 is not between 0xffffffffffff8000 and 0x0000000000007fff) /kisskb/src/arch/powerpc/kernel/exceptions-64s.S:618: Error: syntax error; found `U', expected `,' /kisskb/src/arch/powerpc/kernel/exceptions-64s.S:618: Error: junk at end of line: `UL)@highest' /kisskb/src/arch/powerpc/kernel/exceptions-64s.S:657: Error: missing ')' /kisskb/src/arch/powerpc/kernel/exceptions-64s.S:657: Error: operand out of range (0xc000000000000000 is not between 0xffffffffffff8000 and 0x0000000000007fff) /kisskb/src/arch/powerpc/kernel/exceptions-64s.S:657: Error: syntax error; found `U', expected `,' /kisskb/src/arch/powerpc/kernel/exceptions-64s.S:657: Error: junk at end of line: `UL)@highest' /kisskb/src/arch/powerpc/kernel/exceptions-64s.S:681: Error: missing ')' /kisskb/src/arch/powerpc/kernel/exceptions-64s.S:681: Error: operand out of range (0xc000000000000000 is not between 0xffffffffffff8000 and 0x0000000000007fff) /kisskb/src/arch/powerpc/kernel/exceptions-64s.S:681: Error: syntax error; found `U', expected `,' /kisskb/src/arch/powerpc/kernel/exceptions-64s.S:681: Error: junk at end of line: `UL)@highest' /kisskb/src/arch/powerpc/kernel/exceptions-64s.S:707: Error: missing ')' /kisskb/src/arch/powerpc/kernel/exceptions-64s.S:707: Error: operand out of range (0xc000000000000000 is not between 0xffffffffffff8000 and 0x0000000000007fff) /kisskb/src/arch/powerpc/kernel/exceptions-64s.S:707: Error: syntax error; found `U', expected `,' /kisskb/src/arch/powerpc/kernel/exceptions-64s.S:707: Error: junk at end of line: `UL)@highest' /kisskb/src/arch/powerpc/kernel/exceptions-64s.S:749: Error: missing ')' /kisskb/src/arch/powerpc/kernel/exceptions-64s.S:749: Error: operand out of range (0xc000000000000000 is not between 0xffffffffffff8000 and 0x0000000000007fff) /kisskb/src/arch/powerpc/kernel/exceptions-64s.S:749: Error: syntax error; found `U', expected `,' /kisskb/src/arch/powerpc/kernel/exceptions-64s.S:749: Error: junk at end of line: `UL)@highest' /kisskb/src/arch/powerpc/kernel/exceptions-64s.S:776: Error: missing ')' /kisskb/src/arch/powerpc/kernel/exceptions-64s.S:776: Error: operand out of range (0xc000000000000000 is not between 0xffffffffffff8000 and 0x0000000000007fff) /kisskb/src/arch/powerpc/kernel/exceptions-64s.S:776: Error: syntax error; found `U', expected `,' /kisskb/src/arch/powerpc/kernel/exceptions-64s.S:776: Error: junk at end of line: `UL)@highest' /kisskb/src/arch/powerpc/kernel/exceptions-64s.S:814: Error: missing ')' /kisskb/src/arch/powerpc/kernel/exceptions-64s.S:814: Error: operand out of range (0xc000000000000000 is not between 0xffffffffffff8000 and 0x0000000000007fff) /kisskb/src/arch/powerpc/kernel/exceptions-64s.S:814: Error: syntax error; found `U', expected `,' /kisskb/src/arch/powerpc/kernel/exceptions-64s.S:814: Error: junk at end of line: `UL)@highest' /kisskb/src/arch/powerpc/kernel/exceptions-64s.S:826: Error: missing ')' /kisskb/src/arch/powerpc/kernel/exceptions-64s.S:826: Error: operand out of range (0xc000000000000000 is not between 0xffffffffffff8000 and 0x0000000000007fff) /kisskb/src/arch/powerpc/kernel/exceptions-64s.S:826: Error: syntax error; found `U', expected `,' /kisskb/src/arch/powerpc/kernel/exceptions-64s.S:826: Error: junk at end of line: `UL)@highest' /kisskb/src/arch/powerpc/kernel/exceptions-64s.S:858: Error: missing ')' /kisskb/src/arch/powerpc/kernel/exceptions-64s.S:858: Error: operand out of range (0xc000000000000000 is not between 0xffffffffffff8000 and 0x0000000000007fff) /kisskb/src/arch/powerpc/kernel/exceptions-64s.S:858: Error: syntax error; found `U', expected `,' /kisskb/src/arch/powerpc/kernel/exceptions-64s.S:858: Error: junk at end of line: `UL)@highest' /kisskb/src/arch/powerpc/kernel/exceptions-64s.S:864: Error: missing ')' /kisskb/src/arch/powerpc/kernel/exceptions-64s.S:864: Error: operand out of range (0xc000000000000000 is not between 0xffffffffffff8000 and 0x0000000000007fff) /kisskb/src/arch/powerpc/kernel/exceptions-64s.S:864: Error: syntax error; found `U', expected `,' /kisskb/src/arch/powerpc/kernel/exceptions-64s.S:864: Error: junk at end of line: `UL)@highest' /kisskb/src/arch/powerpc/kernel/exceptions-64s.S:873: Error: missing ')' /kisskb/src/arch/powerpc/kernel/exceptions-64s.S:873: Error: operand out of range (0xc000000000000000 is not between 0xffffffffffff8000 and 0x0000000000007fff) /kisskb/src/arch/powerpc/kernel/exceptions-64s.S:873: Error: syntax error; found `U', expected `,' /kisskb/src/arch/powerpc/kernel/exceptions-64s.S:873: Error: junk at end of line: `UL)@highest' /kisskb/src/arch/powerpc/kernel/exceptions-64s.S:880: Error: missing ')' /kisskb/src/arch/powerpc/kernel/exceptions-64s.S:880: Error: operand out of range (0xc000000000000000 is not between 0xffffffffffff8000 and 0x0000000000007fff) /kisskb/src/arch/powerpc/kernel/exceptions-64s.S:880: Error: syntax error; found `U', expected `,' /kisskb/src/arch/powerpc/kernel/exceptions-64s.S:880: Error: junk at end of line: `UL)@highest' /kisskb/src/arch/powerpc/kernel/exceptions-64s.S:1046: Error: missing ')' /kisskb/src/arch/powerpc/kernel/exceptions-64s.S:1046: Error: operand out of range (0xc000000000000000 is not between 0xffffffffffff8000 and 0x0000000000007fff) /kisskb/src/arch/powerpc/kernel/exceptions-64s.S:1046: Error: syntax error; found `U', expected `,' /kisskb/src/arch/powerpc/kernel/exceptions-64s.S:1046: Error: junk at end of line: `UL)@highest' /kisskb/src/arch/powerpc/kernel/exceptions-64s.S:1056: Error: missing ')' /kisskb/src/arch/powerpc/kernel/exceptions-64s.S:1056: Error: operand out of range (0xc000000000000000 is not between 0xffffffffffff8000 and 0x0000000000007fff) /kisskb/src/arch/powerpc/kernel/exceptions-64s.S:1056: Error: syntax error; found `U', expected `,' /kisskb/src/arch/powerpc/kernel/exceptions-64s.S:1056: Error: junk at end of line: `UL)@highest' /kisskb/src/arch/powerpc/kernel/exceptions-64s.S:1076: Error: missing ')' /kisskb/src/arch/powerpc/kernel/exceptions-64s.S:1076: Error: operand out of range (0xc000000000000000 is not between 0xffffffffffff8000 and 0x0000000000007fff) /kisskb/src/arch/powerpc/kernel/exceptions-64s.S:1076: Error: syntax error; found `U', expected `,' /kisskb/src/arch/powerpc/kernel/exceptions-64s.S:1076: Error: junk at end of line: `UL)@highest' /kisskb/src/arch/powerpc/kernel/exceptions-64s.S:1082: Error: missing ')' /kisskb/src/arch/powerpc/kernel/exceptions-64s.S:1082: Error: operand out of range (0xc000000000000000 is not between 0xffffffffffff8000 and 0x0000000000007fff) /kisskb/src/arch/powerpc/kernel/exceptions-64s.S:1082: Error: syntax error; found `U', expected `,' /kisskb/src/arch/powerpc/kernel/exceptions-64s.S:1082: Error: junk at end of line: `UL)@highest' /kisskb/src/arch/powerpc/kernel/exceptions-64s.S:1102: Error: missing ')' /kisskb/src/arch/powerpc/kernel/exceptions-64s.S:1102: Error: operand out of range (0xc000000000000000 is not between 0xffffffffffff8000 and 0x0000000000007fff) /kisskb/src/arch/powerpc/kernel/exceptions-64s.S:1102: Error: syntax error; found `U', expected `,' /kisskb/src/arch/powerpc/kernel/exceptions-64s.S:1102: Error: junk at end of line: `UL)@highest' /kisskb/src/arch/powerpc/kernel/exceptions-64s.S:1147: Error: missing ')' /kisskb/src/arch/powerpc/kernel/exceptions-64s.S:1147: Error: operand out of range (0xc000000000000000 is not between 0xffffffffffff8000 and 0x0000000000007fff) /kisskb/src/arch/powerpc/kernel/exceptions-64s.S:1147: Error: syntax error; found `U', expected `,' /kisskb/src/arch/powerpc/kernel/exceptions-64s.S:1147: Error: junk at end of line: `UL)@highest' /kisskb/src/arch/powerpc/kernel/exceptions-64s.S:1156: Error: missing ')' /kisskb/src/arch/powerpc/kernel/exceptions-64s.S:1156: Error: operand out of range (0xc000000000000000 is not between 0xffffffffffff8000 and 0x0000000000007fff) /kisskb/src/arch/powerpc/kernel/exceptions-64s.S:1156: Error: syntax error; found `U', expected `,' /kisskb/src/arch/powerpc/kernel/exceptions-64s.S:1156: Error: junk at end of line: `UL)@highest' /kisskb/src/arch/powerpc/kernel/exceptions-64s.S:1163: Error: missing ')' /kisskb/src/arch/powerpc/kernel/exceptions-64s.S:1163: Error: operand out of range (0xc000000000000000 is not between 0xffffffffffff8000 and 0x0000000000007fff) /kisskb/src/arch/powerpc/kernel/exceptions-64s.S:1163: Error: syntax error; found `U', expected `,' /kisskb/src/arch/powerpc/kernel/exceptions-64s.S:1163: Error: junk at end of line: `UL)@highest' /kisskb/src/arch/powerpc/kernel/exceptions-64s.S:1175: Error: missing ')' /kisskb/src/arch/powerpc/kernel/exceptions-64s.S:1175: Error: operand out of range (0xc000000000000000 is not between 0xffffffffffff8000 and 0x0000000000007fff) /kisskb/src/arch/powerpc/kernel/exceptions-64s.S:1175: Error: syntax error; found `U', expected `,' /kisskb/src/arch/powerpc/kernel/exceptions-64s.S:1175: Error: junk at end of line: `UL)@highest' /kisskb/src/arch/powerpc/kernel/exceptions-64s.S:1182: Error: missing ')' /kisskb/src/arch/powerpc/kernel/exceptions-64s.S:1182: Error: operand out of range (0xc000000000000000 is not between 0xffffffffffff8000 and 0x0000000000007fff) /kisskb/src/arch/powerpc/kernel/exceptions-64s.S:1182: Error: syntax error; found `U', expected `,' /kisskb/src/arch/powerpc/kernel/exceptions-64s.S:1182: Error: junk at end of line: `UL)@highest' /kisskb/src/arch/powerpc/kernel/exceptions-64s.S:1219: Error: missing ')' /kisskb/src/arch/powerpc/kernel/exceptions-64s.S:1219: Error: operand out of range (0xc000000000000000 is not between 0xffffffffffff8000 and 0x0000000000007fff) /kisskb/src/arch/powerpc/kernel/exceptions-64s.S:1219: Error: syntax error; found `U', expected `,' /kisskb/src/arch/powerpc/kernel/exceptions-64s.S:1219: Error: junk at end of line: `UL)@highest' /kisskb/src/arch/powerpc/kernel/exceptions-64s.S:1254: Error: missing ')' /kisskb/src/arch/powerpc/kernel/exceptions-64s.S:1254: Error: operand out of range (0xc000000000000000 is not between 0xffffffffffff8000 and 0x0000000000007fff) /kisskb/src/arch/powerpc/kernel/exceptions-64s.S:1254: Error: syntax error; found `U', expected `,' /kisskb/src/arch/powerpc/kernel/exceptions-64s.S:1254: Error: junk at end of line: `UL)@highest' /kisskb/src/arch/powerpc/kernel/exceptions-64s.S:1260: Error: missing ')' /kisskb/src/arch/powerpc/kernel/exceptions-64s.S:1260: Error: operand out of range (0xc000000000000000 is not between 0xffffffffffff8000 and 0x0000000000007fff) /kisskb/src/arch/powerpc/kernel/exceptions-64s.S:1260: Error: syntax error; found `U', expected `,' /kisskb/src/arch/powerpc/kernel/exceptions-64s.S:1260: Error: junk at end of line: `UL)@highest' /kisskb/src/arch/powerpc/kernel/exceptions-64s.S:1289: Error: missing ')' /kisskb/src/arch/powerpc/kernel/exceptions-64s.S:1289: Error: operand out of range (0xc000000000000000 is not between 0xffffffffffff8000 and 0x0000000000007fff) /kisskb/src/arch/powerpc/kernel/exceptions-64s.S:1289: Error: syntax error; found `U', expected `,' /kisskb/src/arch/powerpc/kernel/exceptions-64s.S:1289: Error: junk at end of line: `UL)@highest' /kisskb/src/arch/powerpc/kernel/exceptions-64s.S:1385: Error: missing ')' /kisskb/src/arch/powerpc/kernel/exceptions-64s.S:1385: Error: operand out of range (0xc000000000000000 is not between 0xffffffffffff8000 and 0x0000000000007fff) /kisskb/src/arch/powerpc/kernel/exceptions-64s.S:1385: Error: syntax error; found `U', expected `,' /kisskb/src/arch/powerpc/kernel/exceptions-64s.S:1385: Error: junk at end of line: `UL)@highest' /kisskb/src/arch/powerpc/kernel/exceptions-64s.S:1403: Error: missing ')' /kisskb/src/arch/powerpc/kernel/exceptions-64s.S:1403: Error: operand out of range (0xc000000000000000 is not between 0xffffffffffff8000 and 0x0000000000007fff) /kisskb/src/arch/powerpc/kernel/exceptions-64s.S:1403: Error: syntax error; found `U', expected `,' /kisskb/src/arch/powerpc/kernel/exceptions-64s.S:1403: Error: junk at end of line: `UL)@highest' make[3]: *** [/kisskb/src/scripts/Makefile.build:367: arch/powerpc/kernel/head_64.o] Error 1 make[2]: *** [/kisskb/src/scripts/Makefile.build:492: arch/powerpc/kernel] Error 2 make[1]: *** [/kisskb/src/Makefile:1043: arch/powerpc] Error 2 make[1]: *** Waiting for unfinished jobs.... /kisskb/src/mm/hugetlb.c: In function 'alloc_pool_huge_page': /kisskb/src/mm/hugetlb.c:1434:5: warning: 'page' may be used uninitialized in this function [-Wuninitialized] /kisskb/src/kernel/trace/trace_dynevent.c: In function 'create_dyn_event': /kisskb/src/kernel/trace/trace_dynevent.c:89:5: warning: 'ret' may be used uninitialized in this function [-Wuninitialized] /kisskb/src/fs/proc/inode.c: In function 'proc_reg_open': /kisskb/src/include/linux/list.h:65:12: warning: 'pdeo' may be used uninitialized in this function [-Wuninitialized] /kisskb/src/fs/proc/inode.c:339:21: note: 'pdeo' was declared here /kisskb/src/fs/nfsd/nfs4xdr.c: In function 'nfsd4_encode_components_esc': /kisskb/src/fs/nfsd/nfs4xdr.c:2076:9: warning: 'str' may be used uninitialized in this function [-Wuninitialized] /kisskb/src/drivers/i2c/i2c-core-base.c: In function 'i2c_generic_scl_recovery': /kisskb/src/drivers/i2c/i2c-core-base.c:235:5: warning: 'ret' may be used uninitialized in this function [-Wuninitialized] /kisskb/src/fs/udf/unicode.c: In function 'udf_name_conv_char': /kisskb/src/fs/udf/unicode.c:132:8: warning: 'c' may be used uninitialized in this function [-Wuninitialized] /kisskb/src/kernel/futex.c: In function 'do_futex': /kisskb/src/kernel/futex.c:1662:3: warning: 'oldval' may be used uninitialized in this function [-Wuninitialized] /kisskb/src/kernel/futex.c:1637:6: note: 'oldval' was declared here /kisskb/src/drivers/tty/serial/8250/8250_core.c: In function 'univ8250_release_irq': /kisskb/src/drivers/tty/serial/8250/8250_core.c:247:18: warning: 'i' may be used uninitialized in this function [-Wuninitialized] /kisskb/src/drivers/tty/serial/8250/8250_core.c:227:19: note: 'i' was declared here make: *** [Makefile:152: sub-make] Error 2 Command 'make -s -j 10 ARCH=powerpc O=/kisskb/build/chleroy_pasemi_defconfig_powerpc-gcc4.6 CROSS_COMPILE=/opt/cross/kisskb/gcc-4.6.3-nolibc/powerpc-linux/bin/powerpc-linux- ' returned non-zero exit status 2 # rm -rf /kisskb/build/chleroy_pasemi_defconfig_powerpc-gcc4.6 # Build took: 0:00:59.912398