# git rev-parse -q --verify c716a25b9b70084e1144f77423f5aedd772ea478^{commit} c716a25b9b70084e1144f77423f5aedd772ea478 already have revision, skipping fetch # git checkout -q -f -B kisskb c716a25b9b70084e1144f77423f5aedd772ea478 # git clean -qxdf # < git log -1 # commit c716a25b9b70084e1144f77423f5aedd772ea478 # Author: Thiago Jung Bauermann # Date: Thu Sep 20 01:38:58 2018 -0300 # # powerpc/pkeys: Fix reading of ibm, processor-storage-keys property # # scan_pkey_feature() uses of_property_read_u32_array() to read the # ibm,processor-storage-keys property and calls be32_to_cpu() on the # value it gets. The problem is that of_property_read_u32_array() already # returns the value converted to the CPU byte order. # # The value of pkeys_total ends up more or less sane because there's a min() # call in pkey_initialize() which reduces pkeys_total to 32. So in practice # the kernel ignores the fact that the hypervisor reserved one key for # itself (the device tree advertises 31 keys in my test VM). # # This is wrong, but the effect in practice is that when a process tries to # allocate the 32nd key, it gets an -EINVAL error instead of -ENOSPC which # would indicate that there aren't any keys available # # Fixes: cf43d3b26452 ("powerpc: Enable pkey subsystem") # Cc: stable@vger.kernel.org # v4.16+ # Signed-off-by: Thiago Jung Bauermann # Signed-off-by: Michael Ellerman # < /opt/cross/kisskb/korg/gcc-5.5.0-nolibc/powerpc64-linux/bin/powerpc64-linux-gcc --version # < git log --format=%s --max-count=1 c716a25b9b70084e1144f77423f5aedd772ea478 # < make -s -j 120 ARCH=powerpc O=/kisskb/build/powerpc-fixes_mpc7448_hpc2_defconfig_powerpc-gcc5 CROSS_COMPILE=/opt/cross/kisskb/korg/gcc-5.5.0-nolibc/powerpc64-linux/bin/powerpc64-linux- mpc7448_hpc2_defconfig # make -s -j 120 ARCH=powerpc O=/kisskb/build/powerpc-fixes_mpc7448_hpc2_defconfig_powerpc-gcc5 CROSS_COMPILE=/opt/cross/kisskb/korg/gcc-5.5.0-nolibc/powerpc64-linux/bin/powerpc64-linux- INFO: Uncompressed kernel (size 0x4ec6bc) overlaps the address of the wrapper(0x400000) INFO: Fixing the link_address of wrapper to (0x500000) INFO: Uncompressed kernel (size 0x4dc044) overlaps the address of the wrapper(0x400000) INFO: Fixing the link_address of wrapper to (0x500000) Image Name: Linux-4.19.0-rc3-gc716a25b9b70 Created: Fri Sep 21 02:02:03 2018 Image Type: PowerPC Linux Kernel Image (gzip compressed) Data Size: 2512471 Bytes = 2453.58 KiB = 2.40 MiB Load Address: 00000000 Entry Point: 00000000 Image Name: Linux-4.19.0-rc3-gc716a25b9b70 Created: Fri Sep 21 02:02:03 2018 Image Type: PowerPC Linux Kernel Image (gzip compressed) Data Size: 2535327 Bytes = 2475.91 KiB = 2.42 MiB Load Address: 00500000 Entry Point: 0050017c Completed OK # rm -rf /kisskb/build/powerpc-fixes_mpc7448_hpc2_defconfig_powerpc-gcc5 # Build took: 0:00:16.143813