# 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/mips-linux/bin/mips-linux-gcc --version # < /opt/cross/kisskb/gcc-4.6.3-nolibc/mips-linux/bin/mips-linux-ld --version # < git log --format=%s --max-count=1 574823bfab82d9d8fa47f422778043fbb4b4f50e # < make -s -j 8 ARCH=mips O=/kisskb/build/linus_mips-defconfig_mips CROSS_COMPILE=/opt/cross/kisskb/gcc-4.6.3-nolibc/mips-linux/bin/mips-linux- defconfig # make -s -j 8 ARCH=mips O=/kisskb/build/linus_mips-defconfig_mips CROSS_COMPILE=/opt/cross/kisskb/gcc-4.6.3-nolibc/mips-linux/bin/mips-linux- /kisskb/src/arch/mips/vdso/Makefile:38: MIPS VDSO requires binutils >= 2.25 /kisskb/src/arch/mips/boot/dts/xilfpga/nexys4ddr.dts:109.16-112.8: Warning (i2c_bus_reg): /i2c@10A00000/ad7420@4B: I2C bus unit address format error, expected "4b" /kisskb/src/arch/mips/vdso/Makefile:38: MIPS VDSO requires binutils >= 2.25 /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/kernel/rcu/srcutree.c: In function 'init_srcu_struct_fields': /kisskb/src/kernel/rcu/srcutree.c:152:32: warning: 'levelspread[]' may be used uninitialized in this function [-Wuninitialized] /kisskb/src/kernel/rcu/srcutree.c:100:6: note: 'levelspread[]' 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/drivers/base/regmap/regmap.c: In function '_regmap_raw_write': /kisskb/src/drivers/base/regmap/regmap.c:1855:6: warning: 'ret' may be used uninitialized in this function [-Wuninitialized] /kisskb/src/drivers/base/regmap/regmap.c: In function 'regmap_raw_read': /kisskb/src/drivers/base/regmap/regmap.c:2594:6: warning: 'ret' may be used uninitialized in this function [-Wuninitialized] /kisskb/src/drivers/i2c/i2c-core-base.c: In function 'i2c_generic_scl_recovery': /kisskb/src/drivers/i2c/i2c-core-base.c:235:5: warning: 'ret' may be used uninitialized in this function [-Wuninitialized] /kisskb/src/drivers/tty/serial/8250/8250_core.c: In function 'univ8250_release_irq': /kisskb/src/drivers/tty/serial/8250/8250_core.c:247:18: warning: 'i' may be used uninitialized in this function [-Wuninitialized] /kisskb/src/drivers/tty/serial/8250/8250_core.c:227:19: note: 'i' was declared here /kisskb/src/arch/mips/vdso/Makefile:38: MIPS VDSO requires binutils >= 2.25 /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] FIT description: Linux 4.20.0-g574823bfab82 Created: Mon Jan 7 12:48:51 2019 Image 0 (kernel@0) Description: Linux 4.20.0-g574823bfab82 Created: Mon Jan 7 12:48:51 2019 Type: Kernel Image Compression: gzip compressed Data Size: 4326170 Bytes = 4224.78 KiB = 4.13 MiB Architecture: MIPS OS: Linux Load Address: 0x80100000 Entry Point: 0x8080b0d0 Hash algo: sha1 Hash value: bd2b5b2400331495fa98a8e9ec5c59aec010da0c Image 1 (fdt@boston) Description: img,boston Device Tree Created: Mon Jan 7 12:48:51 2019 Type: Flat Device Tree Compression: uncompressed Data Size: 3793 Bytes = 3.70 KiB = 0.00 MiB Architecture: MIPS Hash algo: sha1 Hash value: 4799f50d688573234da6e9d7701234d394759ef4 Image 2 (fdt@ni169445) Description: NI 169445 device tree Created: Mon Jan 7 12:48:51 2019 Type: Flat Device Tree Compression: uncompressed Data Size: 1871 Bytes = 1.83 KiB = 0.00 MiB Architecture: MIPS Hash algo: sha1 Hash value: 51b89b31605ee62038c8468c429af091dfc75ec7 Image 3 (fdt@xilfpga) Description: MIPSfpga (xilfpga) Device Tree Created: Mon Jan 7 12:48:51 2019 Type: Flat Device Tree Compression: uncompressed Data Size: 2708 Bytes = 2.64 KiB = 0.00 MiB Architecture: MIPS Hash algo: sha1 Hash value: 509ce58e44c561d54539e64e9d4b47054e696fc6 Default Configuration: 'conf@default' Configuration 0 (conf@default) Description: Generic Linux kernel Kernel: kernel@0 Configuration 1 (conf@boston) Description: Boston Linux kernel Kernel: kernel@0 FDT: fdt@boston Configuration 2 (conf@ni169445) Description: NI 169445 Linux Kernel Kernel: kernel@0 FDT: fdt@ni169445 Configuration 3 (conf@xilfpga) Description: MIPSfpga Linux kernel Kernel: kernel@0 FDT: fdt@xilfpga Completed OK # rm -rf /kisskb/build/linus_mips-defconfig_mips # Build took: 0:01:49.686979