# 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/arm-unknown-linux-gnueabi/bin/arm-unknown-linux-gnueabi-gcc --version # < /opt/cross/kisskb/gcc-4.6.3-nolibc/arm-unknown-linux-gnueabi/bin/arm-unknown-linux-gnueabi-ld --version # < git log --format=%s --max-count=1 574823bfab82d9d8fa47f422778043fbb4b4f50e # < make -s -j 8 ARCH=arm O=/kisskb/build/linus_at91_dt_defconfig_arm CROSS_COMPILE=/opt/cross/kisskb/gcc-4.6.3-nolibc/arm-unknown-linux-gnueabi/bin/arm-unknown-linux-gnueabi- at91_dt_defconfig # make -s -j 8 ARCH=arm O=/kisskb/build/linus_at91_dt_defconfig_arm CROSS_COMPILE=/opt/cross/kisskb/gcc-4.6.3-nolibc/arm-unknown-linux-gnueabi/bin/arm-unknown-linux-gnueabi- /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/ipc/shm.c: In function 'ksys_shmdt': /kisskb/src/ipc/shm.c:1686:59: warning: 'file' may be used uninitialized in this function [-Wuninitialized] /kisskb/src/net/core/gen_stats.c: In function '__gnet_stats_copy_basic': /kisskb/src/net/core/gen_stats.c:161:19: warning: 'seq' may be used uninitialized in this function [-Wuninitialized] /kisskb/src/lib/mpi/mpicoder.c: In function 'mpi_read_raw_from_sgl': /kisskb/src/lib/mpi/mpicoder.c:336:12: warning: 'buff' may be used uninitialized in this function [-Wuninitialized] /kisskb/src/drivers/gpio/gpiolib-of.c: In function 'of_gpiochip_add': /kisskb/src/drivers/gpio/gpiolib-of.c:455:8: warning: 'dflags' may be used uninitialized in this function [-Wuninitialized] /kisskb/src/drivers/gpio/gpiolib-of.c:441:19: note: 'dflags' was declared here /kisskb/src/drivers/gpio/gpiolib-of.c:455:8: warning: 'lflags' may be used uninitialized in this function [-Wuninitialized] /kisskb/src/drivers/gpio/gpiolib-of.c:440:25: note: 'lflags' was declared here /kisskb/src/net/core/dev.c: In function 'validate_xmit_skb_list': /kisskb/src/net/core/dev.c:3405:15: warning: 'tail' may be used uninitialized in this function [-Wuninitialized] /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/lib/rhashtable.c: In function 'rht_deferred_worker': /kisskb/src/lib/rhashtable.c:264:2: warning: 'next' may be used uninitialized in this function [-Wuninitialized] /kisskb/src/lib/rhashtable.c:229:28: note: 'next' was declared here /kisskb/src/drivers/gpu/drm/drm_dp_mst_topology.c: In function 'drm_dp_sideband_msg_build': /kisskb/src/drivers/gpu/drm/drm_dp_mst_topology.c:364:23: warning: 'hdrlen' 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/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/net/ipv6/ip6_output.c: In function '__ip6_append_data': /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/drivers/gpu/drm/drm_atomic.c: In function 'drm_atomic_check_only': /kisskb/src/drivers/gpu/drm/drm_atomic.c:420:38: warning: 'crtc_state' may be used uninitialized in this function [-Wuninitialized] /kisskb/src/drivers/gpu/drm/drm_atomic.c:399:25: note: 'crtc_state' was declared here /kisskb/src/drivers/mtd/ubi/eba.c: In function 'try_write_vid_and_data': /kisskb/src/drivers/mtd/ubi/eba.c:1001:7: warning: 'opnum' may be used uninitialized in this function [-Wuninitialized] /kisskb/src/net/mac80211/mlme.c: In function 'ieee80211_rx_mgmt_beacon': /kisskb/src/net/mac80211/mlme.c:1522:3: warning: 'pwr_level_cisco' may be used uninitialized in this function [-Wuninitialized] /kisskb/src/net/mac80211/mlme.c:1479:6: note: 'pwr_level_cisco' was declared here /kisskb/src/drivers/pwm/pwm-atmel-hlcdc.c: In function 'atmel_hlcdc_pwm_apply': /kisskb/src/drivers/pwm/pwm-atmel-hlcdc.c:78:56: warning: 'clk_period_ns' may be used uninitialized in this function [-Wuninitialized] /kisskb/src/drivers/rtc/rtc-rv3029c2.c: In function 'rv3029_probe': /kisskb/src/drivers/rtc/rtc-rv3029c2.c:664:3: warning: 'elem' may be used uninitialized in this function [-Wuninitialized] /kisskb/src/drivers/rtc/rtc-rv3029c2.c:643:40: note: 'elem' was declared here Completed OK # rm -rf /kisskb/build/linus_at91_dt_defconfig_arm # Build took: 0:01:16.684485