# git rev-parse -q --verify d497ebf5fb3a026c0817f8c96cde578787f24093^{commit} d497ebf5fb3a026c0817f8c96cde578787f24093 already have revision, skipping fetch # git checkout -q -f -B kisskb d497ebf5fb3a026c0817f8c96cde578787f24093 # git clean -qxdf # < git log -1 # commit d497ebf5fb3a026c0817f8c96cde578787f24093 # Author: Frederic Barrat # Date: Mon Jun 18 14:14:36 2018 +0200 # # ocxl: Fix page fault handler in case of fault on dying process # # If a process exits without doing proper cleanup, there's a window # where an opencapi device can try to access the memory of the dying # process and may trigger a page fault. That's an expected scenario and # the ocxl driver holds a reference on the mm_struct of the process # until the opencapi device is notified of the process exiting. # However, if mm_users is already at 0, i.e. the address space of the # process has already been destroyed, the driver shouldn't try resolving # the page fault, as it will fail, but it can also try accessing already # freed data. # # It is fixed by only calling the bottom half of the page fault handler # if mm_users is greater than 0 and get a reference on mm_users instead # of mm_count. Otherwise, we can safely return a translation fault to # the device, as its associated memory context is being removed. The # opencapi device will be properly cleaned up shortly after when closing # the file descriptors. # # Fixes: 5ef3166e8a32 ("ocxl: Driver code for 'generic' opencapi devices") # Cc: stable@vger.kernel.org # v4.16+ # Signed-off-by: Frederic Barrat # Reviewed-By: Alastair D'Silva # Acked-by: Andrew Donnellan # Signed-off-by: Michael Ellerman # < /opt/cross/kisskb/gcc-5.3.0-nolibc/powerpc64-linux/bin/powerpc64-linux-gcc --version # < git log --format=%s --max-count=1 d497ebf5fb3a026c0817f8c96cde578787f24093 # < make -s -j 120 ARCH=powerpc O=/kisskb/build/powerpc-next_mpc85xx_smp_defconfig_powerpc-5.3 CROSS_COMPILE=/opt/cross/kisskb/gcc-5.3.0-nolibc/powerpc64-linux/bin/powerpc64-linux- mpc85xx_smp_defconfig # make -s -j 120 ARCH=powerpc O=/kisskb/build/powerpc-next_mpc85xx_smp_defconfig_powerpc-5.3 CROSS_COMPILE=/opt/cross/kisskb/gcc-5.3.0-nolibc/powerpc64-linux/bin/powerpc64-linux- /kisskb/src/net/Makefile:24: CC cannot link executables. Skipping bpfilter. /kisskb/src/net/Makefile:24: CC cannot link executables. Skipping bpfilter. In file included from /kisskb/src/include/linux/kernel.h:10:0, from /kisskb/src/include/linux/list.h:9, from /kisskb/src/include/linux/module.h:9, from /kisskb/src/drivers/net/ethernet/freescale/fs_enet/mac-scc.c:15: /kisskb/src/drivers/net/ethernet/freescale/fs_enet/mac-scc.c: In function 'allocate_bd': /kisskb/src/include/linux/err.h:22:49: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast] #define IS_ERR_VALUE(x) unlikely((unsigned long)(void *)(x) >= (unsigned long)-MAX_ERRNO) ^ /kisskb/src/include/linux/compiler.h:77:42: note: in definition of macro 'unlikely' # define unlikely(x) __builtin_expect(!!(x), 0) ^ /kisskb/src/drivers/net/ethernet/freescale/fs_enet/mac-scc.c:139:6: note: in expansion of macro 'IS_ERR_VALUE' if (IS_ERR_VALUE(fep->ring_mem_addr)) ^ arch/powerpc/boot/mpc8555cds.dtb: Warning (pci_device_bus_num): /pci@e0008000/i8259@19000:bus-range: PCI bus number 1 out of range, expected (0 - 0) arch/powerpc/boot/mpc8541cds.dtb: Warning (pci_device_bus_num): /pci@e0008000/i8259@19000:bus-range: PCI bus number 1 out of range, expected (0 - 0) INFO: Uncompressed kernel (size 0xbf36e4) overlaps the address of the wrapper(0x400000) INFO: Fixing the link_address of wrapper to (0xc00000) INFO: Uncompressed kernel (size 0xbf36e4) overlaps the address of the wrapper(0x400000) INFO: Fixing the link_address of wrapper to (0xc00000) INFO: Uncompressed kernel (size 0xbf36e4) overlaps the address of the wrapper(0x400000) INFO: Fixing the link_address of wrapper to (0xc00000) INFO: Uncompressed kernel (size 0xbf36e4) overlaps the address of the wrapper(0x400000) INFO: Fixing the link_address of wrapper to (0xc00000) INFO: Uncompressed kernel (size 0xbf36e4) overlaps the address of the wrapper(0x400000) INFO: Fixing the link_address of wrapper to (0xc00000) INFO: Uncompressed kernel (size 0xbf36e4) overlaps the address of the wrapper(0x400000) INFO: Fixing the link_address of wrapper to (0xc00000) INFO: Uncompressed kernel (size 0xbf36e4) overlaps the address of the wrapper(0x400000) INFO: Fixing the link_address of wrapper to (0xc00000) INFO: Uncompressed kernel (size 0xbf36e4) overlaps the address of the wrapper(0x400000) INFO: Fixing the link_address of wrapper to (0xc00000) INFO: Uncompressed kernel (size 0xbf36e4) overlaps the address of the wrapper(0x400000) INFO: Fixing the link_address of wrapper to (0xc00000) INFO: Uncompressed kernel (size 0xbf36e4) overlaps the address of the wrapper(0x400000) INFO: Fixing the link_address of wrapper to (0xc00000) INFO: Uncompressed kernel (size 0xbf36e4) overlaps the address of the wrapper(0x400000) INFO: Fixing the link_address of wrapper to (0xc00000) INFO: Uncompressed kernel (size 0xbf36e4) overlaps the address of the wrapper(0x400000) INFO: Fixing the link_address of wrapper to (0xc00000) INFO: Uncompressed kernel (size 0xbf36e4) overlaps the address of the wrapper(0x400000) INFO: Fixing the link_address of wrapper to (0xc00000) INFO: Uncompressed kernel (size 0xbf36e4) overlaps the address of the wrapper(0x400000) INFO: Fixing the link_address of wrapper to (0xc00000) INFO: Uncompressed kernel (size 0xbf36e4) overlaps the address of the wrapper(0x400000) INFO: Fixing the link_address of wrapper to (0xc00000) INFO: Uncompressed kernel (size 0xbe2f2c) overlaps the address of the wrapper(0x400000) INFO: Fixing the link_address of wrapper to (0xc00000) Image Name: Linux-4.18.0-rc3-gd497ebf Created: Tue Jul 3 02:09:44 2018 Image Type: PowerPC Linux Kernel Image (gzip compressed) Data Size: 5895087 Bytes = 5756.92 kB = 5.62 MB Load Address: 00c00000 Entry Point: 00c00278 Image Name: Linux-4.18.0-rc3-gd497ebf Created: Tue Jul 3 02:09:44 2018 Image Type: PowerPC Linux Kernel Image (gzip compressed) Data Size: 5896724 Bytes = 5758.52 kB = 5.62 MB Load Address: 00c00000 Entry Point: 00c0020c Image Name: Linux-4.18.0-rc3-gd497ebf Created: Tue Jul 3 02:09:44 2018 Image Type: PowerPC Linux Kernel Image (gzip compressed) Data Size: 5895261 Bytes = 5757.09 kB = 5.62 MB Load Address: 00c00000 Entry Point: 00c0020c Image Name: Linux-4.18.0-rc3-gd497ebf Created: Tue Jul 3 02:09:44 2018 Image Type: PowerPC Linux Kernel Image (gzip compressed) Data Size: 5895088 Bytes = 5756.92 kB = 5.62 MB Load Address: 00c00000 Entry Point: 00c00278 Image Name: Linux-4.18.0-rc3-gd497ebf Created: Tue Jul 3 02:09:44 2018 Image Type: PowerPC Linux Kernel Image (gzip compressed) Data Size: 5895182 Bytes = 5757.01 kB = 5.62 MB Load Address: 00c00000 Entry Point: 00c0020c Image Name: Linux-4.18.0-rc3-gd497ebf Created: Tue Jul 3 02:09:44 2018 Image Type: PowerPC Linux Kernel Image (gzip compressed) Data Size: 5895350 Bytes = 5757.18 kB = 5.62 MB Load Address: 00c00000 Entry Point: 00c0020c Image Name: Linux-4.18.0-rc3-gd497ebf Created: Tue Jul 3 02:09:44 2018 Image Type: PowerPC Linux Kernel Image (gzip compressed) Data Size: 5895266 Bytes = 5757.10 kB = 5.62 MB Load Address: 00c00000 Entry Point: 00c00278 Image Name: Linux-4.18.0-rc3-gd497ebf Created: Tue Jul 3 02:09:44 2018 Image Type: PowerPC Linux Kernel Image (gzip compressed) Data Size: 5896523 Bytes = 5758.32 kB = 5.62 MB Load Address: 00c00000 Entry Point: 00c0020c Image Name: Linux-4.18.0-rc3-gd497ebf Created: Tue Jul 3 02:09:44 2018 Image Type: PowerPC Linux Kernel Image (gzip compressed) Data Size: 5895015 Bytes = 5756.85 kB = 5.62 MB Load Address: 00c00000 Entry Point: 00c0020c Image Name: Linux-4.18.0-rc3-gd497ebf Created: Tue Jul 3 02:09:44 2018 Image Type: PowerPC Linux Kernel Image (gzip compressed) Data Size: 5896721 Bytes = 5758.52 kB = 5.62 MB Load Address: 00c00000 Entry Point: 00c0020c Image Name: Linux-4.18.0-rc3-gd497ebf Created: Tue Jul 3 02:09:44 2018 Image Type: PowerPC Linux Kernel Image (gzip compressed) Data Size: 5895013 Bytes = 5756.85 kB = 5.62 MB Load Address: 00c00000 Entry Point: 00c0020c Image Name: Linux-4.18.0-rc3-gd497ebf Created: Tue Jul 3 02:09:44 2018 Image Type: PowerPC Linux Kernel Image (gzip compressed) Data Size: 5895136 Bytes = 5756.97 kB = 5.62 MB Load Address: 00c00000 Entry Point: 00c0020c Image Name: Linux-4.18.0-rc3-gd497ebf Created: Tue Jul 3 02:09:44 2018 Image Type: PowerPC Linux Kernel Image (gzip compressed) Data Size: 5896428 Bytes = 5758.23 kB = 5.62 MB Load Address: 00c00000 Entry Point: 00c0020c Image Name: Linux-4.18.0-rc3-gd497ebf Created: Tue Jul 3 02:09:44 2018 Image Type: PowerPC Linux Kernel Image (gzip compressed) Data Size: 5895102 Bytes = 5756.94 kB = 5.62 MB Load Address: 00c00000 Entry Point: 00c00278 Image Name: Linux-4.18.0-rc3-gd497ebf Created: Tue Jul 3 02:09:44 2018 Image Type: PowerPC Linux Kernel Image (gzip compressed) Data Size: 5871611 Bytes = 5734.00 kB = 5.60 MB Load Address: 00000000 Entry Point: 00000000 Image Name: Linux-4.18.0-rc3-gd497ebf Created: Tue Jul 3 02:09:44 2018 Image Type: PowerPC Linux Kernel Image (gzip compressed) Data Size: 5895041 Bytes = 5756.88 kB = 5.62 MB Load Address: 00c00000 Entry Point: 00c00278 Completed OK # rm -rf /kisskb/build/powerpc-next_mpc85xx_smp_defconfig_powerpc-5.3 # Build took: 0:00:51.947819