# 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 8 ARCH=powerpc O=/kisskb/build/chleroy_corenet64_smp_defconfig_powerpc-gcc4.6 CROSS_COMPILE=/opt/cross/kisskb/gcc-4.6.3-nolibc/powerpc-linux/bin/powerpc-linux- corenet64_smp_defconfig # make -s -j 8 ARCH=powerpc O=/kisskb/build/chleroy_corenet64_smp_defconfig_powerpc-gcc4.6 CROSS_COMPILE=/opt/cross/kisskb/gcc-4.6.3-nolibc/powerpc-linux/bin/powerpc-linux- /kisskb/src/kernel/cgroup/cgroup-v1.c: In function 'cgroup1_mount': /kisskb/src/kernel/cgroup/cgroup-v1.c:1263:20: warning: 'root' may be used uninitialized in this function [-Wuninitialized] /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/arch/powerpc/kernel/entry_64.S: Assembler messages: /kisskb/src/arch/powerpc/kernel/entry_64.S:279: Error: Unrecognized opcode: `kuap_check_amr' /kisskb/src/arch/powerpc/kernel/entry_64.S:317: Error: Unrecognized opcode: `kuap_restore_amr' /kisskb/src/arch/powerpc/kernel/entry_64.S:606: Error: Unrecognized opcode: `kuap_check_amr' make[3]: *** [/kisskb/src/scripts/Makefile.build:367: arch/powerpc/kernel/entry_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/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/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/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/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] make: *** [Makefile:152: sub-make] Error 2 Command 'make -s -j 8 ARCH=powerpc O=/kisskb/build/chleroy_corenet64_smp_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_corenet64_smp_defconfig_powerpc-gcc4.6 # Build took: 0:00:58.058163