# 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/gcc-4.6.3-nolibc/sh4-linux/bin/sh4-linux-gcc --version # < /opt/cross/kisskb/gcc-4.6.3-nolibc/sh4-linux/bin/sh4-linux-ld --version # < git log --format=%s --max-count=1 574823bfab82d9d8fa47f422778043fbb4b4f50e # < make -s -j 10 ARCH=sh O=/kisskb/build/linus_titan_defconfig_sh4 CROSS_COMPILE=/opt/cross/kisskb/gcc-4.6.3-nolibc/sh4-linux/bin/sh4-linux- titan_defconfig # make -s -j 10 ARCH=sh O=/kisskb/build/linus_titan_defconfig_sh4 CROSS_COMPILE=/opt/cross/kisskb/gcc-4.6.3-nolibc/sh4-linux/bin/sh4-linux- Generating include/generated/machtypes.h :1318:2: warning: #warning syscall pkey_mprotect not implemented [-Wcpp] :1321:2: warning: #warning syscall pkey_alloc not implemented [-Wcpp] :1324:2: warning: #warning syscall pkey_free not implemented [-Wcpp] :1327:2: warning: #warning syscall statx not implemented [-Wcpp] :1333:2: warning: #warning syscall io_pgetevents not implemented [-Wcpp] :1336:2: warning: #warning syscall rseq not implemented [-Wcpp] /kisskb/src/arch/sh/kernel/cpu/sh4/../sh3/../../entry-common.S: Assembler messages: /kisskb/src/arch/sh/kernel/cpu/sh4/../sh3/../../entry-common.S:385: Warning: overflow in branch to syscall_exit_work; converted into longer instruction sequence /kisskb/src/arch/sh/kernel/cpu/sh4/../sh3/../../entry-common.S:388: Warning: overflow in branch to syscall_exit_work; converted into longer instruction sequence /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/net/bridge/br_netlink.c: In function 'br_afspec.isra.24': /kisskb/src/net/bridge/br_netlink.c:652:7: warning: 'err' may be used uninitialized in this function [-Wuninitialized] /kisskb/src/net/ipv6/ip6_output.c: In function '__ip6_append_data.isra.14': /kisskb/src/include/linux/skbuff.h:1338:6: warning: 'extra_uref' may be used uninitialized in this function [-Wuninitialized] /kisskb/src/net/ipv6/ip6_output.c:1270:14: note: 'extra_uref' was declared here /kisskb/src/net/ipv4/ip_output.c: In function '__ip_append_data': /kisskb/src/include/linux/skbuff.h:1338:6: warning: 'extra_uref' may be used uninitialized in this function [-Wuninitialized] /kisskb/src/net/ipv4/ip_output.c:885:14: note: 'extra_uref' was declared here /kisskb/src/drivers/net/tun.c: In function 'tun_get_user': /kisskb/src/drivers/net/tun.c:1843:30: warning: 'copylen' may be used uninitialized in this function [-Wuninitialized] /kisskb/src/drivers/net/tun.c:1533:34: warning: 'linear' may be used uninitialized in this function [-Wuninitialized] /kisskb/src/drivers/net/tun.c:1753:46: note: 'linear' was declared here /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] /kisskb/src/drivers/sh/clk/cpg.c: In function 'r8': /kisskb/src/drivers/sh/clk/cpg.c:41:2: warning: passing argument 1 of 'ioread8' discards 'const' qualifier from pointer target type [enabled by default] /kisskb/src/include/asm-generic/iomap.h:29:21: note: expected 'void *' but argument is of type 'const void *' /kisskb/src/drivers/sh/clk/cpg.c: In function 'r16': /kisskb/src/drivers/sh/clk/cpg.c:46:2: warning: passing argument 1 of 'ioread16' discards 'const' qualifier from pointer target type [enabled by default] /kisskb/src/include/asm-generic/iomap.h:30:21: note: expected 'void *' but argument is of type 'const void *' /kisskb/src/drivers/sh/clk/cpg.c: In function 'r32': /kisskb/src/drivers/sh/clk/cpg.c:51:2: warning: passing argument 1 of 'ioread32' discards 'const' qualifier from pointer target type [enabled by default] /kisskb/src/include/asm-generic/iomap.h:32:21: note: expected 'void *' but argument is of type 'const void *' Kernel: arch/sh/boot/zImage is ready Completed OK # rm -rf /kisskb/build/linus_titan_defconfig_sh4 # Build took: 0:01:50.203369