2019-04-19 21:55:08

by Andrew Morton

[permalink] [raw]
Subject: mmotm 2019-04-19-14-53 uploaded

The mm-of-the-moment snapshot 2019-04-19-14-53 has been uploaded to

http://www.ozlabs.org/~akpm/mmotm/

mmotm-readme.txt says

README for mm-of-the-moment:

http://www.ozlabs.org/~akpm/mmotm/

This is a snapshot of my -mm patch queue. Uploaded at random hopefully
more than once a week.

You will need quilt to apply these patches to the latest Linus release (5.x
or 5.x-rcY). The series file is in broken-out.tar.gz and is duplicated in
http://ozlabs.org/~akpm/mmotm/series

The file broken-out.tar.gz contains two datestamp files: .DATE and
.DATE-yyyy-mm-dd-hh-mm-ss. Both contain the string yyyy-mm-dd-hh-mm-ss,
followed by the base kernel version against which this patch series is to
be applied.

This tree is partially included in linux-next. To see which patches are
included in linux-next, consult the `series' file. Only the patches
within the #NEXT_PATCHES_START/#NEXT_PATCHES_END markers are included in
linux-next.


A full copy of the full kernel tree with the linux-next and mmotm patches
already applied is available through git within an hour of the mmotm
release. Individual mmotm releases are tagged. The master branch always
points to the latest release, so it's constantly rebasing.

http://git.cmpxchg.org/cgit.cgi/linux-mmotm.git/



The directory http://www.ozlabs.org/~akpm/mmots/ (mm-of-the-second)
contains daily snapshots of the -mm tree. It is updated more frequently
than mmotm, and is untested.

A git copy of this tree is available at

http://git.cmpxchg.org/cgit.cgi/linux-mmots.git/

and use of this tree is similar to
http://git.cmpxchg.org/cgit.cgi/linux-mmotm.git/, described above.


This mmotm tree contains the following patches against 5.1-rc5:
(patches marked "*" will be included in linux-next)

origin.patch
* mm-add-sys-kernel-slab-cache-cache_dma32.patch
* userfaultfd-use-rcu-to-free-the-task-struct-when-fork-fails.patch
* mm-memory_hotplug-drop-memory-device-reference-after-find_memory_block.patch
* zram-pass-down-the-bvec-we-need-to-read-into-in-the-work-struct.patch
* lib-kconfigdebug-fix-build-error-without-config_block.patch
* lib-test_vmalloc-do-not-create-cpumask_t-variable-on-stack.patch
* mm-do-not-boost-watermarks-to-avoid-fragmentation-for-the-discontig-memory-model.patch
* mm-page_alloc-always-use-a-captured-page-regardless-of-compaction-result.patch
* prctl-fix-false-positive-in-validate_prctl_map.patch
* scripts-spellingtxt-add-more-typos-to-spellingtxt-and-sort.patch
* arch-sh-boards-mach-dreamcast-irqc-remove-duplicate-header.patch
* debugobjects-move-printk-out-of-db-lock-critical-sections.patch
* ocfs2-use-common-file-type-conversion.patch
* ocfs2-fix-ocfs2-read-inode-data-panic-in-ocfs2_iget.patch
* ocfs2-clear-zero-in-unaligned-direct-io.patch
* ocfs2-clear-zero-in-unaligned-direct-io-checkpatch-fixes.patch
* ocfs2-wait-for-recovering-done-after-direct-unlock-request.patch
* ocfs2-checkpoint-appending-truncate-log-transaction-before-flushing.patch
* ramfs-support-o_tmpfile.patch
mm.patch
* list-add-function-list_rotate_to_front.patch
* slob-respect-list_head-abstraction-layer.patch
* slob-use-slab_list-instead-of-lru.patch
* slub-add-comments-to-endif-pre-processor-macros.patch
* slub-use-slab_list-instead-of-lru.patch
* slab-use-slab_list-instead-of-lru.patch
* mm-remove-stale-comment-from-page-struct.patch
* slub-remove-useless-kmem_cache_debug-before-remove_full.patch
* mm-slab-remove-unneed-check-in-cpuup_canceled.patch
* slub-update-the-comment-about-slab-frozen.patch
* slab-fix-an-infinite-loop-in-leaks_show.patch
* slab-fix-an-infinite-loop-in-leaks_show-fix.patch
* mm-vmscan-drop-zone-id-from-kswapd-tracepoints.patch
* mm-cma_debugc-fix-the-break-condition-in-cma_maxchunk_get.patch
* userfaultfd-sysctl-add-vmunprivileged_userfaultfd.patch
* userfaultfd-sysctl-add-vmunprivileged_userfaultfd-fix.patch
* page-cache-store-only-head-pages-in-i_pages.patch
* page-cache-store-only-head-pages-in-i_pages-fix.patch
* page-cache-store-only-head-pages-in-i_pages-fix-fix.patch
* mm-page_alloc-disallow-__gfp_comp-in-alloc_pages_exact.patch
* mm-move-recent_rotated-pages-calculation-to-shrink_inactive_list.patch
* mm-move-nr_deactivate-accounting-to-shrink_active_list.patch
* mm-move-nr_deactivate-accounting-to-shrink_active_list-fix.patch
* mm-remove-pages_to_free-argument-of-move_active_pages_to_lru.patch
* mm-generalize-putback-scan-functions.patch
* mm-gup-replace-get_user_pages_longterm-with-foll_longterm.patch
* mm-gup-replace-get_user_pages_longterm-with-foll_longterm-v3.patch
* mm-gup-change-write-parameter-to-flags-in-fast-walk.patch
* mm-gup-change-gup-fast-to-use-flags-rather-than-a-write-bool.patch
* mm-gup-add-foll_longterm-capability-to-gup-fast.patch
* mm-gup-add-foll_longterm-capability-to-gup-fast-v3.patch
* ib-hfi1-use-the-new-foll_longterm-flag-to-get_user_pages_fast.patch
* ib-hfi1-use-the-new-foll_longterm-flag-to-get_user_pages_fast-v3.patch
* ib-qib-use-the-new-foll_longterm-flag-to-get_user_pages_fast.patch
* ib-mthca-use-the-new-foll_longterm-flag-to-get_user_pages_fast.patch
* mmmemory_hotplug-unlock-1gb-hugetlb-on-x86_64.patch
* mmmemory_hotplug-drop-redundant-hugepage_migration_supported-check.patch
* mm-memory_hotplug-fix-the-wrong-usage-of-n_high_memory.patch
* mm-compaction-fix-an-undefined-behaviour.patch
* mm-compaction-fix-an-undefined-behaviour-fix.patch
* mm-cma-fix-the-bitmap-status-to-show-failed-allocation-reason.patch
* mm-compaction-show-gfp-flag-names-in-try_to_compact_pages-tracepoint.patch
* mm-compaction-some-tracepoints-should-be-defined-only-when-config_compaction-is-set.patch
* mm-change-mm_update_next_owner-to-update-mm-owner-with-write_once.patch
* mm-isolation-remove-redundant-pfn_valid_within-in-__first_valid_page.patch
* mm-vmscan-add-tracepoints-for-node-reclaim.patch
* mm-memcontrol-track-lru-counts-in-the-vmstats-array.patch
* mm-memcontrol-replace-zone-summing-with-lruvec_page_state.patch
* mm-memcontrol-replace-node-summing-with-memcg_page_state.patch
* mm-memcontrol-push-down-mem_cgroup_node_nr_lru_pages.patch
* mm-memcontrol-push-down-mem_cgroup_nr_lru_pages.patch
* mm-memcontrol-quarantine-the-mem_cgroup_nr_lru_pages-api.patch
* mm-cma-fix-crash-on-cma-allocation-if-bitmap-allocation-fails.patch
* initramfs-free-initrd-memory-if-opening-initrdimage-fails.patch
* initramfs-cleanup-initrd-freeing.patch
* initramfs-factor-out-a-helper-to-populate-the-initrd-image.patch
* initramfs-cleanup-populate_rootfs.patch
* initramfs-cleanup-populate_rootfs-fix.patch
* initramfs-move-the-legacy-keepinitrd-parameter-to-core-code.patch
* initramfs-proide-a-generic-free_initrd_mem-implementation.patch
* initramfs-poison-freed-initrd-memory.patch
* init-provide-a-generic-free_initmem-implementation.patch
* hexagon-switch-over-to-generic-free_initmem.patch
* init-free_initmem-poison-freed-init-memory.patch
* riscv-switch-over-to-generic-free_initmem.patch
* sh-advertise-gigantic-page-support.patch
* sparc-advertise-gigantic-page-support.patch
* mm-simplify-memory_isolation-compaction-cma-into-contig_alloc.patch
* hugetlb-allow-to-free-gigantic-pages-regardless-of-the-configuration.patch
* mm-introduce-put_user_page-placeholder-versions.patch
* mm-page_mkclean-vs-madv_dontneed-race.patch
* mm-vmscan-drop-may_writepage-and-classzone_idx-from-direct-reclaim-begin-template.patch
* mem-hotplug-fix-node-spanned-pages-when-we-have-a-node-with-only-zone_movable.patch
* hugetlbfs-fix-potential-over-underflow-setting-node-specific-nr_hugepages.patch
* mm-hugetlb-get-rid-of-nodemask_alloc.patch
* mm-__pagevec_lru_add_fn-typo-fix.patch
* mm-balloon-drop-unused-function-stubs.patch
* mm-sparse-clean-up-the-obsolete-code-comment.patch
* drivers-base-memoryc-clean-up-relicts-in-function-parameters.patch
* huegtlbfs-on-restore-reserve-error-path-retain-subpool-reservation.patch
* hugetlb-use-same-fault-hash-key-for-shared-and-private-mappings.patch
* mm-change-locked_vms-type-from-unsigned-long-to-atomic64_t.patch
* vfio-type1-drop-mmap_sem-now-that-locked_vm-is-atomic.patch
* vfio-spapr_tce-drop-mmap_sem-now-that-locked_vm-is-atomic.patch
* fpga-dlf-afu-drop-mmap_sem-now-that-locked_vm-is-atomic.patch
* powerpc-mmu-drop-mmap_sem-now-that-locked_vm-is-atomic.patch
* kvm-book3s-drop-mmap_sem-now-that-locked_vm-is-atomic.patch
* mm-hmm-select-mmu-notifier-when-selecting-hmm-v2.patch
* mm-hmm-use-reference-counting-for-hmm-struct-v3.patch
* mm-hmm-do-not-erase-snapshot-when-a-range-is-invalidated.patch
* mm-hmm-improve-and-rename-hmm_vma_get_pfns-to-hmm_range_snapshot-v2.patch
* mm-hmm-improve-and-rename-hmm_vma_fault-to-hmm_range_fault-v3.patch
* mm-hmm-improve-driver-api-to-work-and-wait-over-a-range-v3.patch
* mm-hmm-add-default-fault-flags-to-avoid-the-need-to-pre-fill-pfns-arrays-v2.patch
* mm-hmm-mirror-hugetlbfs-snapshoting-faulting-and-dma-mapping-v3.patch
* mm-hmm-allow-to-mirror-vma-of-a-file-on-a-dax-backed-filesystem-v3.patch
* mm-hmm-add-helpers-to-test-if-mm-is-still-alive-or-not.patch
* mm-hmm-add-an-helper-function-that-fault-pages-and-map-them-to-a-device-v3.patch
* mm-hmm-add-an-helper-function-that-fault-pages-and-map-them-to-a-device-v3-fix.patch
* mm-hmm-convert-various-hmm_pfn_-to-device_entry-which-is-a-better-name.patch
* mm-mmu_notifier-helper-to-test-if-a-range-invalidation-is-blockable.patch
* mm-mmu_notifier-convert-user-range-blockable-to-helper-function.patch
* mm-mmu_notifier-convert-mmu_notifier_range-blockable-to-a-flags.patch
* mm-mmu_notifier-contextual-information-for-event-enums.patch
* mm-mmu_notifier-contextual-information-for-event-triggering-invalidation-v2.patch
* mm-mmu_notifier-use-correct-mmu_notifier-events-for-each-invalidation.patch
* mm-mmu_notifier-pass-down-vma-and-reasons-why-mmu-notifier-is-happening-v2.patch
* mm-mmu_notifier-mmu_notifier_range_update_to_read_only-helper.patch
* mm-enable-error-injection-at-add_to_page_cache.patch
* mm-enable-error-injection-at-add_to_page_cache-fix.patch
* mm-rmap-use-the-pramapcount-to-do-the-check.patch
* mm-use-mm_zero_struct_page-from-sparc-on-all-64b-architectures.patch
* mm-drop-meminit_pfn_in_nid-as-it-is-redundant.patch
* mm-implement-new-zone-specific-memblock-iterator.patch
* mm-initialize-max_order_nr_pages-at-a-time-instead-of-doing-larger-sections.patch
* mm-memory_hotplug-cleanup-memory-offline-path.patch
* mm-memory_hotplug-provide-a-more-generic-restrictions-for-memory-hotplug.patch
* mm-memory_hotplug-provide-a-more-generic-restrictions-for-memory-hotplug-fix.patch
* mm-filemap-fix-minor-typo.patch
* mm-memory_hotplug-release-memory-resource-after-arch_remove_memory.patch
* mm-memory_hotplug-release-memory-resource-after-arch_remove_memory-fix.patch
* mm-memory_hotplug-make-unregister_memory_section-never-fail.patch
* mm-memory_hotplug-make-__remove_section-never-fail.patch
* mm-memory_hotplug-make-__remove_pages-and-arch_remove_memory-never-fail.patch
* mm-fix-false-positive-overcommit_guess-failures.patch
* mm-remove-redundant-default-n-from-kconfig-s.patch
* mm-introduce-new-vm_map_pages-and-vm_map_pages_zero-api.patch
* arm-mm-dma-mapping-convert-to-use-vm_map_pages.patch
* drivers-firewire-core-isoc-convert-to-use-vm_map_pages_zero.patch
* drm-rockchip-rockchip_drm_gemc-convert-to-use-vm_map_pages.patch
* drm-xen-xen_drm_front_gemc-convert-to-use-vm_map_pages.patch
* iommu-dma-iommuc-convert-to-use-vm_map_pages.patch
* videobuf2-videobuf2-dma-sgc-convert-to-use-vm_map_pages.patch
* xen-gntdevc-convert-to-use-vm_map_pages.patch
* xen-privcmd-bufc-convert-to-use-vm_map_pages_zero.patch
* x86-numa-always-initialize-all-possible-nodes.patch
* mm-be-more-verbose-about-zonelist-initialization.patch
* fs-syncc-sync_file_range2-may-use-wb_sync_all-writeback.patch
* mm-simplify-shrink_inactive_list.patch
* mm-hmm-add-arch_has_hmm_mirror-arch_has_hmm_device-kconfig.patch
* mm-refactor-__vunmap-to-avoid-duplicated-call-to-find_vm_area.patch
* mm-show-number-of-vmalloc-pages-in-proc-meminfo.patch
* mm-remove-might_sleep-in-__remove_vm_area.patch
* mm-page_alloc-remove-unnecessary-parameter-in-rmqueue_pcplist.patch
* z3fold-introduce-helper-functions.patch
* z3fold-improve-compression-by-extending-search.patch
* z3fold-add-structure-for-buddy-handles.patch
* z3fold-support-page-migration.patch
* z3fold-support-page-migration-fix.patch
* hugetlbfs-always-use-address-space-in-inode-for-resv_map-pointer.patch
* memcg-schedule-high-reclaim-for-remote-memcgs-on-high_work.patch
* memcg-schedule-high-reclaim-for-remote-memcgs-on-high_work-v3.patch
* psi-introduce-state_mask-to-represent-stalled-psi-states.patch
* psi-make-psi_enable-static.patch
* psi-rename-psi-fields-in-preparation-for-psi-trigger-addition.patch
* psi-rename-psi-fields-in-preparation-for-psi-trigger-addition-v6.patch
* psi-split-update_stats-into-parts.patch
* psi-track-changed-states.patch
* refactor-header-includes-to-allow-kthreadh-inclusion-in-psi_typesh.patch
* psi-introduce-psi-monitor.patch
* mm-add-priority-threshold-to-__purge_vmap_area_lazy.patch
* mm-vmap-keep-track-of-free-blocks-for-vmap-allocation.patch
* mm-vmap-keep-track-of-free-blocks-for-vmap-allocation-v3.patch
* mm-vmap-keep-track-of-free-blocks-for-vmap-allocation-v4.patch
* mm-vmap-add-debug_augment_propagate_check-macro.patch
* mm-vmap-add-debug_augment_propagate_check-macro-v4.patch
* mm-vmap-add-debug_augment_lowest_match_check-macro.patch
* mm-vmap-add-debug_augment_lowest_match_check-macro-v4.patch
* mm-proportional-memorylowmin-reclaim.patch
* mm-make-memoryemin-the-baseline-for-utilisation-determination.patch
* mm-make-memoryemin-the-baseline-for-utilisation-determination-fix.patch
* mm-add-probe_user_read.patch
* mm-add-probe_user_read-fix.patch
* powerpc-use-probe_user_read.patch
* mm-vmalloc-convert-vmap_lazy_nr-to-atomic_long_t.patch
* mm-shuffle-initial-free-memory-to-improve-memory-side-cache-utilization.patch
* mm-shuffle-initial-free-memory-to-improve-memory-side-cache-utilization-fix.patch
* mm-move-buddy-list-manipulations-into-helpers.patch
* mm-move-buddy-list-manipulations-into-helpers-fix.patch
* mm-move-buddy-list-manipulations-into-helpers-fix2.patch
* mm-maintain-randomization-of-page-free-lists.patch
* mm-maintain-randomization-of-page-free-lists-checkpatch-fixes.patch
* mm-vmscan-remove-unused-lru_pages-argument.patch
* mm-mincore-make-mincore-more-conservative.patch
* mm-mincore-make-mincore-more-conservative-v2.patch
* mm-dont-expose-page-to-fast-gup-before-its-ready.patch
* info-task-hung-in-generic_file_write_iter.patch
* info-task-hung-in-generic_file_write-fix.patch
* fs-select-avoid-clang-stack-usage-warning.patch
* kdb-get-rid-of-broken-attempt-to-print-ccversion-in-kdb-summary.patch
* remove-spdx-with-linux-syscall-note-from-kernel-space-headers.patch
* notifiers-double-register-detection.patch
* kernel-latencytopc-remove-unnecessary-checks-for-latencytop_enabled.patch
* kernel-latencytopc-rename-clear_all_latency_tracing-to-clear_tsk_latency_tracing.patch
* byteorder-sanity-check-toolchain-vs-kernel-endianess.patch
* lib-bitmapc-remove-unused-export_symbols.patch
* lib-bitmapc-guard-exotic-bitmap-functions-by-config_numa.patch
* lib-genallocc-export-symbol-addr_in_gen_pool.patch
* lib-genallocc-rename-addr_in_gen_pool-to-gen_pool_has_addr.patch
* lib-genallocc-rename-addr_in_gen_pool-to-gen_pool_has_addr-fix.patch
* lib-plist-rename-debug_pi_list-to-debug_plist.patch
* lib-sort-make-swap-functions-more-generic.patch
* lib-sort-use-more-efficient-bottom-up-heapsort-variant.patch
* lib-sort-avoid-indirect-calls-to-built-in-swap.patch
* lib-list_sort-simplify-and-remove-max_list_length_bits.patch
* lib-list_sort-simplify-and-remove-max_list_length_bits-fix.patch
* lib-list_sort-optimize-number-of-calls-to-comparison-function.patch
* lib-move-mathematic-helpers-to-separate-folder.patch
* lib-move-mathematic-helpers-to-separate-folder-fix.patch
* lib-math-move-int_pow-from-pwm_blc-for-wider-use.patch
* lib-make-bitmap_parselist_user-a-wrapper-on-bitmap_parselist.patch
* lib-rework-bitmap_parselist.patch
* lib-rework-bitmap_parselist-v5.patch
* lib-test_bitmap-switch-test_bitmap_parselist-to-ktime_get.patch
* lib-test_bitmap-add-testcases-for-bitmap_parselist.patch
* lib-test_bitmap-add-testcases-for-bitmap_parselist-v5.patch
* lib-test_bitmap-add-tests-for-bitmap_parselist_user.patch
* lib-fix-possible-incorrect-result-from-rational-fractions-helper.patch
* bitopsh-sanitize-rotate-primitives.patch
* lib-test_vmallocc-test_func-eliminate-local-ret.patch
* checkpatch-dont-interpret-stack-dumps-as-commit-ids.patch
* checkpatch-fix-something.patch
* fs-binfmt_elfc-remove-unneeded-initialization-of-mm-start_stack.patch
* elf-make-scope-of-pos-variable-smaller.patch
* elf-free-pt_interp-filename-asap.patch
* elf-free-pt_interp-filename-asap-fix.patch
* elf-delete-trailing-return-in-functions-returning-void.patch
* elf-save-1-indent-level.patch
* elf-move-variables-initialization-closer-to-their-usage.patch
* elf-extract-prot_-calculations.patch
* elf-init-pt_regs-pointer-later.patch
* autofs-fix-some-word-usage-odities-in-autofstxt.patch
* autofs-update-autofstxt-for-strictexpire-mount-option.patch
* autofs-update-autofs_exp_leaves-description.patch
* autofs-update-mount-control-expire-desription-with-autofs_exp_forced.patch
* autofs-add-description-of-ignore-pseudo-mount-option.patch
* fat-issue-flush-after-the-writeback-of-fat.patch
* signal-annotate-implicit-fall-through.patch
* exec-move-recursion_depth-out-of-critical-sections.patch
* cpumask-fix-double-string-traverse-in-cpumask_parse.patch
* cpumask-fix-double-string-traverse-in-cpumask_parse-fix.patch
* rapidio-fix-a-null-pointer-derefenrece-when-create_workqueue-fails.patch
* kernel-sysctlc-switch-to-bitmap_zalloc.patch
* sysctl-return-einval-if-val-violates-minmax.patch
* convert-struct-pid-count-to-refcount_t.patch
* convert-struct-pid-count-to-refcount_t-fix.patch
* eventfd-prepare-id-to-userspace-via-fdinfo.patch
* gcov-clang-move-common-gcc-code-into-gcc_basec.patch
* gcov-docs-add-a-note-on-gcc-vs-clang-differences.patch
* gcov-clang-support.patch
* gcov-clang-support-checkpatch-fixes.patch
* panic-avoid-the-extra-noise-dmesg.patch
* panic-reboot-allow-specifying-reboot_mode-for-panic-only.patch
* pps-descriptor-based-gpio.patch
* dt-bindings-pps-pps-gpio-pps-echo-implementation.patch
* pps-pps-gpio-pps-echo-implementation.patch
* scripts-gdb-find-vmlinux-where-it-was-before.patch
* scripts-gdb-add-kernel-config-dumping-command.patch
* scripts-gdb-add-kernel-config-dumping-command-v2.patch
* scripts-gdb-add-rb-tree-iterating-utilities.patch
* scripts-gdb-add-rb-tree-iterating-utilities-v2.patch
* scripts-gdb-add-a-timer-list-command.patch
* scripts-gdb-add-a-timer-list-command-v2.patch
* scripts-gdb-silence-pep8-checks.patch
* ipc-prevent-lockup-on-alloc_msg-and-free_msg.patch
* ipc-mqueue-remove-redundant-wq-task-assignment.patch
* ipc-mqueue-optimize-msg_get.patch
* ipc-allow-boot-time-extension-of-ipcmni-from-32k-to-16m.patch
* ipc-conserve-sequence-numbers-in-ipcmni_extend-mode.patch
* ipc-do-cyclic-id-allocation-for-the-ipc-object.patch
* ipc-do-cyclic-id-allocation-for-the-ipc-object-fix.patch
linux-next.patch
linux-next-rejects.patch
linux-next-git-rejects.patch
* pinctrl-fix-pxa2xxc-build-warnings.patch
* scripts-atomic-check-atomicssh-dont-assume-that-scripts-are-executable.patch
* doc-mm-migration-doesnt-use-foll_split-anymore.patch
* reiserfs-force-type-conversion-in-xattr_hash.patch
* fs-coda-psdevc-remove-duplicate-header.patch
* include-replace-tsk-to-task-in-linux-sched-signalh.patch
* fs-cachefiles-nameic-remove-duplicate-header.patch
* fs-block_devc-remove-duplicate-header.patch
* kernel-resource-use-resource_overlaps-to-simplify-region_intersects.patch
* treewide-replace-include-asm-sizesh-with-include-linux-sizesh.patch
* arch-remove-asm-sizesh-amd-asm-generic-sizesh.patch
* mm-rename-ambiguously-named-memorystat-counters-and-functions.patch
* mm-rename-ambiguously-named-memorystat-counters-and-functions-fix.patch
* mm-consider-subtrees-in-memoryevents.patch
* fsl_hypervisor-dereferencing-error-pointers-in-ioctl.patch
* fsl_hypervisor-prevent-integer-overflow-in-ioctl.patch
* mm-memcontrol-make-cgroup-stats-and-events-query-api-explicitly-local.patch
* mm-memcontrol-make-cgroup-stats-and-events-query-api-explicitly-local-fix.patch
* mm-memcontrol-move-stat-event-counting-functions-out-of-line.patch
* mm-memcontrol-fix-recursive-statistics-correctness-scalabilty.patch
* mm-memcontrol-fix-numa-round-robin-reclaim-at-intermediate-level.patch
* fix-read-buffer-overflow-in-delta-ipc.patch
make-sure-nobodys-leaking-resources.patch
releasing-resources-with-children.patch
mutex-subsystem-synchro-test-module.patch
kernel-forkc-export-kernel_thread-to-modules.patch
slab-leaks3-default-y.patch
workaround-for-a-pci-restoring-bug.patch


2019-04-20 04:39:22

by Randy Dunlap

[permalink] [raw]
Subject: Re: mmotm 2019-04-19-14-53 uploaded (objtool)

On 4/19/19 2:53 PM, [email protected] wrote:
> The mm-of-the-moment snapshot 2019-04-19-14-53 has been uploaded to
>
> http://www.ozlabs.org/~akpm/mmotm/
>
> mmotm-readme.txt says
>
> README for mm-of-the-moment:
>
> http://www.ozlabs.org/~akpm/mmotm/
>
> This is a snapshot of my -mm patch queue. Uploaded at random hopefully
> more than once a week.

on x86_64:

CC lib/strncpy_from_user.o
lib/strncpy_from_user.o: warning: objtool: strncpy_from_user()+0x315: call to __ubsan_handle_add_overflow() with UACCESS enabled
CC lib/strnlen_user.o
lib/strnlen_user.o: warning: objtool: strnlen_user()+0x337: call to __ubsan_handle_sub_overflow() with UACCESS enabled



obj files are attached.


--
~Randy


Attachments:
strncpy_from_user.o (8.28 kB)
strnlen_user.o (7.88 kB)
Download all attachments

2019-04-23 08:26:15

by Peter Zijlstra

[permalink] [raw]
Subject: Re: mmotm 2019-04-19-14-53 uploaded (objtool)

On Fri, Apr 19, 2019 at 09:36:46PM -0700, Randy Dunlap wrote:
> On 4/19/19 2:53 PM, [email protected] wrote:
> > The mm-of-the-moment snapshot 2019-04-19-14-53 has been uploaded to
> >
> > http://www.ozlabs.org/~akpm/mmotm/
> >
> > mmotm-readme.txt says
> >
> > README for mm-of-the-moment:
> >
> > http://www.ozlabs.org/~akpm/mmotm/
> >
> > This is a snapshot of my -mm patch queue. Uploaded at random hopefully
> > more than once a week.
>
> on x86_64:
>
> CC lib/strncpy_from_user.o
> lib/strncpy_from_user.o: warning: objtool: strncpy_from_user()+0x315: call to __ubsan_handle_add_overflow() with UACCESS enabled
> CC lib/strnlen_user.o
> lib/strnlen_user.o: warning: objtool: strnlen_user()+0x337: call to __ubsan_handle_sub_overflow() with UACCESS enabled

Lemme guess, you're using GCC < 8 ? That had a bug where UBSAN
considered signed overflow UB when using -fno-strict-overflow or
-fwrapv.

Now, we could of course allow this symbol, but I found only the below
was required to make allyesconfig build without issue.

Andy, Linus?

(note: the __put_user thing is from this one:

drivers/gpu/drm/i915/i915_gem_execbuffer.c: if (unlikely(__put_user(offset, &urelocs[r-stack].presumed_offset))) {

where (ptr) ends up non-trivial due to UBSAN)

---

diff --git a/arch/x86/include/asm/uaccess.h b/arch/x86/include/asm/uaccess.h
index 22ba683afdc2..c82abd6e4ca3 100644
--- a/arch/x86/include/asm/uaccess.h
+++ b/arch/x86/include/asm/uaccess.h
@@ -427,10 +427,11 @@ do { \
({ \
__label__ __pu_label; \
int __pu_err = -EFAULT; \
- __typeof__(*(ptr)) __pu_val; \
- __pu_val = x; \
+ __typeof__(*(ptr)) __pu_val = (x); \
+ __typeof__(ptr) __pu_ptr = (ptr); \
+ __typeof__(size) __pu_size = (size); \
__uaccess_begin(); \
- __put_user_size(__pu_val, (ptr), (size), __pu_label); \
+ __put_user_size(__pu_val, __pu_ptr, __pu_size, __pu_label); \
__pu_err = 0; \
__pu_label: \
__uaccess_end(); \
diff --git a/lib/strncpy_from_user.c b/lib/strncpy_from_user.c
index 58eacd41526c..07045bc4872e 100644
--- a/lib/strncpy_from_user.c
+++ b/lib/strncpy_from_user.c
@@ -26,7 +26,7 @@
static inline long do_strncpy_from_user(char *dst, const char __user *src, long count, unsigned long max)
{
const struct word_at_a_time constants = WORD_AT_A_TIME_CONSTANTS;
- long res = 0;
+ unsigned long res = 0;

/*
* Truncate 'max' to the user-specified limit, so that
diff --git a/lib/strnlen_user.c b/lib/strnlen_user.c
index 1c1a1b0e38a5..0729378ad3e9 100644
--- a/lib/strnlen_user.c
+++ b/lib/strnlen_user.c
@@ -28,7 +28,7 @@
static inline long do_strnlen_user(const char __user *src, unsigned long count, unsigned long max)
{
const struct word_at_a_time constants = WORD_AT_A_TIME_CONSTANTS;
- long align, res = 0;
+ unsigned long align, res = 0;
unsigned long c;

/*

2019-04-23 15:47:31

by Randy Dunlap

[permalink] [raw]
Subject: Re: mmotm 2019-04-19-14-53 uploaded (objtool)

On 4/23/19 1:24 AM, Peter Zijlstra wrote:
> On Fri, Apr 19, 2019 at 09:36:46PM -0700, Randy Dunlap wrote:
>> On 4/19/19 2:53 PM, [email protected] wrote:
>>> The mm-of-the-moment snapshot 2019-04-19-14-53 has been uploaded to
>>>
>>> http://www.ozlabs.org/~akpm/mmotm/
>>>
>>> mmotm-readme.txt says
>>>
>>> README for mm-of-the-moment:
>>>
>>> http://www.ozlabs.org/~akpm/mmotm/
>>>
>>> This is a snapshot of my -mm patch queue. Uploaded at random hopefully
>>> more than once a week.
>>
>> on x86_64:
>>
>> CC lib/strncpy_from_user.o
>> lib/strncpy_from_user.o: warning: objtool: strncpy_from_user()+0x315: call to __ubsan_handle_add_overflow() with UACCESS enabled
>> CC lib/strnlen_user.o
>> lib/strnlen_user.o: warning: objtool: strnlen_user()+0x337: call to __ubsan_handle_sub_overflow() with UACCESS enabled
>
> Lemme guess, you're using GCC < 8 ? That had a bug where UBSAN
> considered signed overflow UB when using -fno-strict-overflow or
> -fwrapv.

Correct. 7.4.0.

Patch works for me. Thanks.

Acked-by: Randy Dunlap <[email protected]> # build-tested


> Now, we could of course allow this symbol, but I found only the below
> was required to make allyesconfig build without issue.
>
> Andy, Linus?
>
> (note: the __put_user thing is from this one:
>
> drivers/gpu/drm/i915/i915_gem_execbuffer.c: if (unlikely(__put_user(offset, &urelocs[r-stack].presumed_offset))) {
>
> where (ptr) ends up non-trivial due to UBSAN)
>
> ---
>
> diff --git a/arch/x86/include/asm/uaccess.h b/arch/x86/include/asm/uaccess.h
> index 22ba683afdc2..c82abd6e4ca3 100644
> --- a/arch/x86/include/asm/uaccess.h
> +++ b/arch/x86/include/asm/uaccess.h
> @@ -427,10 +427,11 @@ do { \
> ({ \
> __label__ __pu_label; \
> int __pu_err = -EFAULT; \
> - __typeof__(*(ptr)) __pu_val; \
> - __pu_val = x; \
> + __typeof__(*(ptr)) __pu_val = (x); \
> + __typeof__(ptr) __pu_ptr = (ptr); \
> + __typeof__(size) __pu_size = (size); \
> __uaccess_begin(); \
> - __put_user_size(__pu_val, (ptr), (size), __pu_label); \
> + __put_user_size(__pu_val, __pu_ptr, __pu_size, __pu_label); \
> __pu_err = 0; \
> __pu_label: \
> __uaccess_end(); \
> diff --git a/lib/strncpy_from_user.c b/lib/strncpy_from_user.c
> index 58eacd41526c..07045bc4872e 100644
> --- a/lib/strncpy_from_user.c
> +++ b/lib/strncpy_from_user.c
> @@ -26,7 +26,7 @@
> static inline long do_strncpy_from_user(char *dst, const char __user *src, long count, unsigned long max)
> {
> const struct word_at_a_time constants = WORD_AT_A_TIME_CONSTANTS;
> - long res = 0;
> + unsigned long res = 0;
>
> /*
> * Truncate 'max' to the user-specified limit, so that
> diff --git a/lib/strnlen_user.c b/lib/strnlen_user.c
> index 1c1a1b0e38a5..0729378ad3e9 100644
> --- a/lib/strnlen_user.c
> +++ b/lib/strnlen_user.c
> @@ -28,7 +28,7 @@
> static inline long do_strnlen_user(const char __user *src, unsigned long count, unsigned long max)
> {
> const struct word_at_a_time constants = WORD_AT_A_TIME_CONSTANTS;
> - long align, res = 0;
> + unsigned long align, res = 0;
> unsigned long c;
>
> /*
>


--
~Randy

2019-04-23 16:08:43

by Andy Lutomirski

[permalink] [raw]
Subject: Re: mmotm 2019-04-19-14-53 uploaded (objtool)



> On Apr 23, 2019, at 1:24 AM, Peter Zijlstra <[email protected]> wrote:
>
>> On Fri, Apr 19, 2019 at 09:36:46PM -0700, Randy Dunlap wrote:
>>> On 4/19/19 2:53 PM, [email protected] wrote:
>>> The mm-of-the-moment snapshot 2019-04-19-14-53 has been uploaded to
>>>
>>> http://www.ozlabs.org/~akpm/mmotm/
>>>
>>> mmotm-readme.txt says
>>>
>>> README for mm-of-the-moment:
>>>
>>> http://www.ozlabs.org/~akpm/mmotm/
>>>
>>> This is a snapshot of my -mm patch queue. Uploaded at random hopefully
>>> more than once a week.
>>
>> on x86_64:
>>
>> CC lib/strncpy_from_user.o
>> lib/strncpy_from_user.o: warning: objtool: strncpy_from_user()+0x315: call to __ubsan_handle_add_overflow() with UACCESS enabled
>> CC lib/strnlen_user.o
>> lib/strnlen_user.o: warning: objtool: strnlen_user()+0x337: call to __ubsan_handle_sub_overflow() with UACCESS enabled
>
> Lemme guess, you're using GCC < 8 ? That had a bug where UBSAN
> considered signed overflow UB when using -fno-strict-overflow or
> -fwrapv.
>
> Now, we could of course allow this symbol, but I found only the below
> was required to make allyesconfig build without issue.
>
> Andy, Linus?
>
> (note: the __put_user thing is from this one:
>
> drivers/gpu/drm/i915/i915_gem_execbuffer.c: if (unlikely(__put_user(offset, &urelocs[r-stack].presumed_offset))) {
>
> where (ptr) ends up non-trivial due to UBSAN)
>
> ---
>
> diff --git a/arch/x86/include/asm/uaccess.h b/arch/x86/include/asm/uaccess.h
> index 22ba683afdc2..c82abd6e4ca3 100644
> --- a/arch/x86/include/asm/uaccess.h
> +++ b/arch/x86/include/asm/uaccess.h
> @@ -427,10 +427,11 @@ do { \
> ({ \
> __label__ __pu_label; \
> int __pu_err = -EFAULT; \
> - __typeof__(*(ptr)) __pu_val; \
> - __pu_val = x; \
> + __typeof__(*(ptr)) __pu_val = (x); \
> + __typeof__(ptr) __pu_ptr = (ptr); \

Hmm. I wonder if this forces the address calculation to be done before STAC, which means that gcc can’t use mov ..., %gs:(fancy stuff). It probably depends on how clever the optimizer is. Have you looked at the generated code?

Other than that, it seems reasonable to me.

> + __typeof__(size) __pu_size = (size); \
> __uaccess_begin(); \
> - __put_user_size(__pu_val, (ptr), (size), __pu_label); \
> + __put_user_size(__pu_val, __pu_ptr, __pu_size, __pu_label); \
> __pu_err = 0; \
> __pu_label: \
> __uaccess_end(); \
> diff --git a/lib/strncpy_from_user.c b/lib/strncpy_from_user.c
> index 58eacd41526c..07045bc4872e 100644
> --- a/lib/strncpy_from_user.c
> +++ b/lib/strncpy_from_user.c
> @@ -26,7 +26,7 @@
> static inline long do_strncpy_from_user(char *dst, const char __user *src, long count, unsigned long max)
> {
> const struct word_at_a_time constants = WORD_AT_A_TIME_CONSTANTS;
> - long res = 0;
> + unsigned long res = 0;
>
> /*
> * Truncate 'max' to the user-specified limit, so that
> diff --git a/lib/strnlen_user.c b/lib/strnlen_user.c
> index 1c1a1b0e38a5..0729378ad3e9 100644
> --- a/lib/strnlen_user.c
> +++ b/lib/strnlen_user.c
> @@ -28,7 +28,7 @@
> static inline long do_strnlen_user(const char __user *src, unsigned long count, unsigned long max)
> {
> const struct word_at_a_time constants = WORD_AT_A_TIME_CONSTANTS;
> - long align, res = 0;
> + unsigned long align, res = 0;
> unsigned long c;
>
> /*
>

2019-04-23 16:21:54

by Linus Torvalds

[permalink] [raw]
Subject: Re: mmotm 2019-04-19-14-53 uploaded (objtool)

On Tue, Apr 23, 2019 at 1:25 AM Peter Zijlstra <[email protected]> wrote:
>
> Now, we could of course allow this symbol, but I found only the below
> was required to make allyesconfig build without issue.
>
> Andy, Linus?

Ack on that patch. Except I think the uaccess.h part should be a
separate commit: I think it goes along with 2a418cf3f5f1
("x86/uaccess: Don't leak the AC flag into __put_user() value
evaluation") we did earlier. I think the logic is the same - it's not
just the _value_ that can have complex calculations, the address can
too (although admittedly that's really not supposed to be common, but
you clearly found one case where a complier misfeature made it happen,
so...).

I also wonder if we should just make "count" be "unsigned long" in
do_{strncpy_from,strnlen}_user() too, since we've already done

if (unlikely(count <= 0))
return 0;

in the caller, so it *is* unsigned by then, and we'd not be mixing
signedness when comparing "max/count/res".

Linus

2019-04-23 17:37:03

by Peter Zijlstra

[permalink] [raw]
Subject: Re: mmotm 2019-04-19-14-53 uploaded (objtool)

On Tue, Apr 23, 2019 at 09:19:50AM -0700, Linus Torvalds wrote:

> Ack on that patch. Except I think the uaccess.h part should be a
> separate commit:

Of course, I'll go write proper patches.

2019-04-23 17:40:36

by Peter Zijlstra

[permalink] [raw]
Subject: Re: mmotm 2019-04-19-14-53 uploaded (objtool)

On Tue, Apr 23, 2019 at 09:07:01AM -0700, Andy Lutomirski wrote:
> > diff --git a/arch/x86/include/asm/uaccess.h b/arch/x86/include/asm/uaccess.h
> > index 22ba683afdc2..c82abd6e4ca3 100644
> > --- a/arch/x86/include/asm/uaccess.h
> > +++ b/arch/x86/include/asm/uaccess.h
> > @@ -427,10 +427,11 @@ do { \
> > ({ \
> > __label__ __pu_label; \
> > int __pu_err = -EFAULT; \
> > - __typeof__(*(ptr)) __pu_val; \
> > - __pu_val = x; \
> > + __typeof__(*(ptr)) __pu_val = (x); \
> > + __typeof__(ptr) __pu_ptr = (ptr); \
>
> Hmm. I wonder if this forces the address calculation to be done
> before STAC, which means that gcc can’t use mov ..., %gs:(fancy
> stuff). It probably depends on how clever the optimizer is. Have you
> looked at the generated code?

I have not; will do before posting the real patch.

2019-04-23 18:58:44

by Peter Zijlstra

[permalink] [raw]
Subject: Re: mmotm 2019-04-19-14-53 uploaded (objtool)

On Tue, Apr 23, 2019 at 07:39:12PM +0200, Peter Zijlstra wrote:
> On Tue, Apr 23, 2019 at 09:07:01AM -0700, Andy Lutomirski wrote:
> > > diff --git a/arch/x86/include/asm/uaccess.h b/arch/x86/include/asm/uaccess.h
> > > index 22ba683afdc2..c82abd6e4ca3 100644
> > > --- a/arch/x86/include/asm/uaccess.h
> > > +++ b/arch/x86/include/asm/uaccess.h
> > > @@ -427,10 +427,11 @@ do { \
> > > ({ \
> > > __label__ __pu_label; \
> > > int __pu_err = -EFAULT; \
> > > - __typeof__(*(ptr)) __pu_val; \
> > > - __pu_val = x; \
> > > + __typeof__(*(ptr)) __pu_val = (x); \
> > > + __typeof__(ptr) __pu_ptr = (ptr); \
> >
> > Hmm. I wonder if this forces the address calculation to be done
> > before STAC, which means that gcc can’t use mov ..., %gs:(fancy
> > stuff). It probably depends on how clever the optimizer is. Have you
> > looked at the generated code?
>
> I have not; will do before posting the real patch.

x86_64-defconfig using gcc-7.3:

$ ./compare.sh defconfig-build defconfig-build1 vmlinux
compat_fillonedir 228 227 -1,+0
copy_fpstate_to_sigframe 446 448 +2,+0
total 11374268 11374269 +1,+0


$ ./compare.sh defconfig-build defconfig-build1 vmlinux copy_fpstate_to_sigframe

...

0000 ffffffff81027448: 90 nop \ 0000 ffffffff81027448: 8b 15 92 75 a8 01 mov 0x1a87592(%rip),%edx
0000 ffffffff81027449: 90 nop \ 0000 ffffffff8102744a: R_X86_64_PC32 fpu_user_xstate_size-0x4
0000 ffffffff8102744a: 90 nop \ 0000 ffffffff8102744e: 48 01 da add %rbx,%rdx
0000 ffffffff8102744b: 8b 15 8f 75 a8 01 mov 0x1a8758f(%rip),%edx \ 0000 ffffffff81027451: 90 nop
0000 ffffffff8102744d: R_X86_64_PC32 fpu_user_xstate_size-0x4 \ 0000 ffffffff81027452: 90 nop
0000 ffffffff81027451: c7 04 13 45 58 50 46 movl $0x46505845,(%rbx,%rdx,1) \ 0000 ffffffff81027453: 90 nop
0000 ffffffff81027458: 31 d2 xor %edx,%edx \ 0000 ffffffff81027454: c7 02 45 58 50 46 movl $0x46505845,(%rdx)
0000 ffffffff8102745a: 90 nop \ 0000 ffffffff8102745a: 31 d2 xor %edx,%edx
0000 ffffffff8102745b: 90 nop \ 0000 ffffffff8102745c: 90 nop
0000 ffffffff8102745c: 90 nop \ 0000 ffffffff8102745d: 90 nop
0000 ffffffff8102745d: 90 nop \ 0000 ffffffff8102745e: 90 nop
0000 ffffffff8102745e: 90 nop \ 0000 ffffffff8102745f: 90 nop
0000 ffffffff8102745f: 90 nop \ 0000 ffffffff81027460: 90 nop
0000 ffffffff81027460: 90 nop \ 0000 ffffffff81027461: 90 nop
0000 ffffffff81027461: 90 nop \ 0000 ffffffff81027462: 90 nop
0000 ffffffff81027462: 90 nop \ 0000 ffffffff81027463: 90 nop
0000 ffffffff81027463: 31 c9 xor %ecx,%ecx \ 0000 ffffffff81027464: 90 nop

...

So yes, it changes some code, but meh.