# git rev-parse -q --verify 574823bfab82d9d8fa47f422778043fbb4b4f50e^{commit} 574823bfab82d9d8fa47f422778043fbb4b4f50e already have revision, skipping fetch # git checkout -q -f -B kisskb 574823bfab82d9d8fa47f422778043fbb4b4f50e # git clean -qxdf # < git log -1 # commit 574823bfab82d9d8fa47f422778043fbb4b4f50e # Author: Linus Torvalds # Date: Sat Jan 5 17:50:59 2019 -0800 # # Change mincore() to count "mapped" pages rather than "cached" pages # # The semantics of what "in core" means for the mincore() system call are # somewhat unclear, but Linux has always (since 2.3.52, which is when # mincore() was initially done) treated it as "page is available in page # cache" rather than "page is mapped in the mapping". # # The problem with that traditional semantic is that it exposes a lot of # system cache state that it really probably shouldn't, and that users # shouldn't really even care about. # # So let's try to avoid that information leak by simply changing the # semantics to be that mincore() counts actual mapped pages, not pages # that might be cheaply mapped if they were faulted (note the "might be" # part of the old semantics: being in the cache doesn't actually guarantee # that you can access them without IO anyway, since things like network # filesystems may have to revalidate the cache before use). # # In many ways the old semantics were somewhat insane even aside from the # information leak issue. From the very beginning (and that beginning is # a long time ago: 2.3.52 was released in March 2000, I think), the code # had a comment saying # # Later we can get more picky about what "in core" means precisely. # # and this is that "later". Admittedly it is much later than is really # comfortable. # # NOTE! This is a real semantic change, and it is for example known to # change the output of "fincore", since that program literally does a # mmmap without populating it, and then doing "mincore()" on that mapping # that doesn't actually have any pages in it. # # I'm hoping that nobody actually has any workflow that cares, and the # info leak is real. # # We may have to do something different if it turns out that people have # valid reasons to want the old semantics, and if we can limit the # information leak sanely. # # Cc: Kevin Easton # Cc: Jiri Kosina # Cc: Masatake YAMATO # Cc: Andrew Morton # Cc: Greg KH # Cc: Peter Zijlstra # Cc: Michal Hocko # Signed-off-by: Linus Torvalds # < /opt/cross/kisskb/arcompact-buildroot-2015.08.1/bin/arc-buildroot-linux-uclibc-gcc --version # < /opt/cross/kisskb/arcompact-buildroot-2015.08.1/bin/arc-buildroot-linux-uclibc-ld --version # < git log --format=%s --max-count=1 574823bfab82d9d8fa47f422778043fbb4b4f50e # < make -s -j 10 ARCH=arc O=/kisskb/build/linus_axs101_defconfig_arcompact CROSS_COMPILE=/opt/cross/kisskb/arcompact-buildroot-2015.08.1/bin/arc-buildroot-linux-uclibc- axs101_defconfig # Added to kconfig CONFIG_INITRAMFS_SOURCE="" # yes \n | make -s -j 10 ARCH=arc O=/kisskb/build/linus_axs101_defconfig_arcompact CROSS_COMPILE=/opt/cross/kisskb/arcompact-buildroot-2015.08.1/bin/arc-buildroot-linux-uclibc- oldconfig yes: standard output: Broken pipe # make -s -j 10 ARCH=arc O=/kisskb/build/linus_axs101_defconfig_arcompact CROSS_COMPILE=/opt/cross/kisskb/arcompact-buildroot-2015.08.1/bin/arc-buildroot-linux-uclibc- /kisskb/src/arch/arc/boot/dts/axs10x_mb.dtsi:221.15-225.6: Warning (i2c_bus_reg): /axs10x_mb/i2c@0x1f000/eeprom@0x54: I2C bus unit address format error, expected "54" /kisskb/src/arch/arc/boot/dts/axs10x_mb.dtsi:227.15-231.6: Warning (i2c_bus_reg): /axs10x_mb/i2c@0x1f000/eeprom@0x57: I2C bus unit address format error, expected "57" /kisskb/src/arch/arc/mm/tlb.c: In function 'do_tlb_overlap_fault': /kisskb/src/arch/arc/mm/tlb.c:914:2: warning: variable length array 'pd0' is used [-Wvla] unsigned int pd0[mmu->ways]; ^ In file included from /kisskb/src/mm/memblock.c:13:0: /kisskb/src/mm/memblock.c: In function '__free_pages_memory': /kisskb/src/include/linux/kernel.h:846:29: warning: comparison of distinct pointer types lacks a cast [enabled by default] (!!(sizeof((typeof(x) *)1 == (typeof(y) *)1))) ^ /kisskb/src/include/linux/kernel.h:860:4: note: in expansion of macro '__typecheck' (__typecheck(x, y) && __no_side_effects(x, y)) ^ /kisskb/src/include/linux/kernel.h:870:24: note: in expansion of macro '__safe_cmp' __builtin_choose_expr(__safe_cmp(x, y), \ ^ /kisskb/src/include/linux/kernel.h:879:19: note: in expansion of macro '__careful_cmp' #define min(x, y) __careful_cmp(x, y, <) ^ /kisskb/src/mm/memblock.c:1889:11: note: in expansion of macro 'min' order = min(MAX_ORDER - 1UL, __ffs(start)); ^ In file included from /kisskb/src/arch/arc/include/asm/atomic.h:16:0, from /kisskb/src/include/linux/atomic.h:7, from /kisskb/src/include/asm-generic/bitops/lock.h:5, from /kisskb/src/arch/arc/include/asm/bitops.h:429, from /kisskb/src/include/linux/bitops.h:19, from /kisskb/src/include/linux/kernel.h:11, from /kisskb/src/include/linux/list.h:9, from /kisskb/src/include/linux/module.h:9, from /kisskb/src/net/core/filter.c:24: /kisskb/src/net/core/filter.c: In function 'bpf_clear_redirect_map': /kisskb/src/arch/arc/include/asm/cmpxchg.h:95:29: warning: value computed is not used [-Wunused-value] #define cmpxchg(ptr, o, n) ((typeof(*(ptr)))__cmpxchg((ptr), \ ^ /kisskb/src/net/core/filter.c:3469:4: note: in expansion of macro 'cmpxchg' cmpxchg(&ri->map, map, NULL); ^ /kisskb/src/net/ipv4/tcp_input.c: In function 'tcp_data_queue': /kisskb/src/net/ipv4/tcp_input.c:4324:49: warning: array subscript is above array bounds [-Warray-bounds] tp->selective_acks[i-1] = tp->selective_acks[i]; ^ In file included from /kisskb/src/arch/arc/include/asm/atomic.h:16:0, from /kisskb/src/include/linux/atomic.h:7, from /kisskb/src/include/asm-generic/bitops/lock.h:5, from /kisskb/src/arch/arc/include/asm/bitops.h:429, from /kisskb/src/include/linux/bitops.h:19, from /kisskb/src/include/linux/kernel.h:11, from /kisskb/src/include/linux/list.h:9, from /kisskb/src/include/linux/wait.h:7, from /kisskb/src/include/linux/wait_bit.h:8, from /kisskb/src/include/linux/fs.h:6, from /kisskb/src/fs/nfs/nfs3acl.c:2: /kisskb/src/fs/nfs/nfs3acl.c: In function 'nfs3_abort_get_acl': /kisskb/src/arch/arc/include/asm/cmpxchg.h:95:29: warning: value computed is not used [-Wunused-value] #define cmpxchg(ptr, o, n) ((typeof(*(ptr)))__cmpxchg((ptr), \ ^ /kisskb/src/fs/nfs/nfs3acl.c:44:2: note: in expansion of macro 'cmpxchg' cmpxchg(p, sentinel, ACL_NOT_CACHED); ^ In file included from /kisskb/src/arch/arc/include/asm/atomic.h:16:0, from /kisskb/src/include/linux/atomic.h:7, from /kisskb/src/include/asm-generic/bitops/lock.h:5, from /kisskb/src/arch/arc/include/asm/bitops.h:429, from /kisskb/src/include/linux/bitops.h:19, from /kisskb/src/include/linux/kernel.h:11, from /kisskb/src/fs/posix_acl.c:13: /kisskb/src/fs/posix_acl.c: In function 'get_acl': /kisskb/src/arch/arc/include/asm/cmpxchg.h:95:29: warning: value computed is not used [-Wunused-value] #define cmpxchg(ptr, o, n) ((typeof(*(ptr)))__cmpxchg((ptr), \ ^ /kisskb/src/fs/posix_acl.c:147:3: note: in expansion of macro 'cmpxchg' cmpxchg(p, sentinel, ACL_NOT_CACHED); ^ Completed OK # rm -rf /kisskb/build/linus_axs101_defconfig_arcompact # Build took: 0:01:45.147336