1. 11 6月, 2020 19 次提交
  2. 10 6月, 2020 21 次提交
    • L
      Merge tag 'fuse-update-5.8' of git://git.kernel.org/pub/scm/linux/kernel/git/mszeredi/fuse · 5b14671b
      Linus Torvalds 提交于
      Pull fuse updates from Miklos Szeredi:
      
       - Fix a rare deadlock in virtiofs
      
       - Fix st_blocks in writeback cache mode
      
       - Fix wrong checks in splice move causing spurious warnings
      
       - Fix a race between a GETATTR request and a FUSE_NOTIFY_INVAL_INODE
         notification
      
       - Use rb-tree instead of linear search for pages currently under
         writeout by userspace
      
       - Fix copy_file_range() inconsistencies
      
      * tag 'fuse-update-5.8' of git://git.kernel.org/pub/scm/linux/kernel/git/mszeredi/fuse:
        fuse: copy_file_range should truncate cache
        fuse: fix copy_file_range cache issues
        fuse: optimize writepages search
        fuse: update attr_version counter on fuse_notify_inval_inode()
        fuse: don't check refcount after stealing page
        fuse: fix weird page warning
        fuse: use dump_page
        virtiofs: do not use fuse_fill_super_common() for device installation
        fuse: always allow query of st_dev
        fuse: always flush dirty data on close(2)
        fuse: invalidate inode attr in writeback cache mode
        fuse: Update stale comment in queue_interrupt()
        fuse: BUG_ON correction in fuse_dev_splice_write()
        virtiofs: Add mount option and atime behavior to the doc
        virtiofs: schedule blocking async replies in separate worker
      5b14671b
    • L
      Merge tag 'ovl-update-5.8' of git://git.kernel.org/pub/scm/linux/kernel/git/mszeredi/vfs · 52435c86
      Linus Torvalds 提交于
      Pull overlayfs updates from Miklos Szeredi:
       "Fixes:
      
         - Resolve mount option conflicts consistently
      
         - Sync before remount R/O
      
         - Fix file handle encoding corner cases
      
         - Fix metacopy related issues
      
         - Fix an unintialized return value
      
         - Add missing permission checks for underlying layers
      
        Optimizations:
      
         - Allow multipe whiteouts to share an inode
      
         - Optimize small writes by inheriting SB_NOSEC from upper layer
      
         - Do not call ->syncfs() multiple times for sync(2)
      
         - Do not cache negative lookups on upper layer
      
         - Make private internal mounts longterm"
      
      * tag 'ovl-update-5.8' of git://git.kernel.org/pub/scm/linux/kernel/git/mszeredi/vfs: (27 commits)
        ovl: remove unnecessary lock check
        ovl: make oip->index bool
        ovl: only pass ->ki_flags to ovl_iocb_to_rwf()
        ovl: make private mounts longterm
        ovl: get rid of redundant members in struct ovl_fs
        ovl: add accessor for ofs->upper_mnt
        ovl: initialize error in ovl_copy_xattr
        ovl: drop negative dentry in upper layer
        ovl: check permission to open real file
        ovl: call secutiry hook in ovl_real_ioctl()
        ovl: verify permissions in ovl_path_open()
        ovl: switch to mounter creds in readdir
        ovl: pass correct flags for opening real directory
        ovl: fix redirect traversal on metacopy dentries
        ovl: initialize OVL_UPPERDATA in ovl_lookup()
        ovl: use only uppermetacopy state in ovl_lookup()
        ovl: simplify setting of origin for index lookup
        ovl: fix out of bounds access warning in ovl_check_fb_len()
        ovl: return required buffer size for file handles
        ovl: sync dirty data when remounting to ro mode
        ...
      52435c86
    • L
      Merge tag 'afs-fixes-20200609' of git://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs · 4964dd29
      Linus Torvalds 提交于
      Pull AFS fixes from David Howells:
       "A set of small patches to fix some things, most of them minor.
      
         - Fix a memory leak in afs_put_sysnames()
      
         - Fix an oops in AFS file locking
      
         - Fix new use of BUG()
      
         - Fix debugging statements containing %px
      
         - Remove afs_zero_fid as it's unused
      
         - Make afs_zap_data() static"
      
      * tag 'afs-fixes-20200609' of git://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs:
        afs: Make afs_zap_data() static
        afs: Remove afs_zero_fid as it's not used
        afs: Fix debugging statements with %px to be %p
        afs: Fix use of BUG()
        afs: Fix file locking
        afs: Fix memory leak in afs_put_sysnames()
      4964dd29
    • S
      clk: mediatek: Remove ifr{0,1}_cfg_regs structures · 9ac1eafa
      Stephen Boyd 提交于
      These aren't used and the macros that reference them aren't used either.
      Remove the dead code to avoid compile warnings.
      
      Cc: Owen Chen <owen.chen@mediatek.com>
      Cc: Mars Cheng <mars.cheng@mediatek.com>
      Cc: Macpaul Lin <macpaul.lin@mediatek.com>
      Fixes: 1aca9939 ("clk: mediatek: Add MT6765 clock support")
      Reported-by: Nkbuild test robot <lkp@intel.com>
      Signed-off-by: NStephen Boyd <sboyd@kernel.org>
      Link: https://lore.kernel.org/r/20200609211847.27366-1-sboyd@kernel.org
      9ac1eafa
    • C
      clk: baikal-t1: remove redundant assignment to variable 'divider' · 45edc7e2
      Colin Ian King 提交于
      The variable divider is being initialized with a value that is never read
      and it is being updated later with a new value.  The initialization is
      redundant and can be removed.
      
      Addresses-Coverity: ("Unused value")
      Signed-off-by: NColin Ian King <colin.king@canonical.com>
      Link: https://lore.kernel.org/r/20200602172435.70282-1-colin.king@canonical.comReviewed-by: NSerge Semin <fancer.lancer@gmail.com>
      Signed-off-by: NStephen Boyd <sboyd@kernel.org>
      45edc7e2
    • C
      8ae91d36
    • L
      dt-bindings: clock: Add a missing include to MMP Audio Clock binding · 30b23968
      Lubomir Rintel 提交于
      The include file for input clock in the example was missing, breaking the
      validation.
      Signed-off-by: NLubomir Rintel <lkundrak@v3.sk>
      Reported-by: NRob Herring <robh+dt@kernel.org>
      Link: https://lore.kernel.org/r/20200605065258.567858-1-lkundrak@v3.skAcked-by: NRob Herring <robh@kernel.org>
      Signed-off-by: NStephen Boyd <sboyd@kernel.org>
      30b23968
    • L
      Merge tag 'f2fs-for-5.8' of git://git.kernel.org/pub/scm/linux/kernel/git/jaegeuk/f2fs · 42612e77
      Linus Torvalds 提交于
      Pull f2fs updates from Jaegeuk Kim:
       "In this round, we've added some knobs to enhance compression feature
        and harden testing environment. In addition, we've fixed several bugs
        reported from Android devices such as long discarding latency, device
        hanging during quota_sync, etc.
      
        Enhancements:
         - support lzo-rle algorithm
         - add two ioctls to release and reserve blocks for compression
         - support partial truncation/fiemap on compressed file
         - introduce sysfs entries to attach IO flags explicitly
         - add iostat trace point along with read io stat
      
        Bug fixes:
         - fix long discard latency
         - flush quota data by f2fs_quota_sync correctly
         - fix to recover parent inode number for power-cut recovery
         - fix lz4/zstd output buffer budget
         - parse checkpoint mount option correctly
         - avoid inifinite loop to wait for flushing node/meta pages
         - manage discard space correctly
      
        And some refactoring and clean up patches were added"
      
      * tag 'f2fs-for-5.8' of git://git.kernel.org/pub/scm/linux/kernel/git/jaegeuk/f2fs: (51 commits)
        f2fs: attach IO flags to the missing cases
        f2fs: add node_io_flag for bio flags likewise data_io_flag
        f2fs: remove unused parameter of f2fs_put_rpages_mapping()
        f2fs: handle readonly filesystem in f2fs_ioc_shutdown()
        f2fs: avoid utf8_strncasecmp() with unstable name
        f2fs: don't return vmalloc() memory from f2fs_kmalloc()
        f2fs: fix retry logic in f2fs_write_cache_pages()
        f2fs: fix wrong discard space
        f2fs: compress: don't compress any datas after cp stop
        f2fs: remove unneeded return value of __insert_discard_tree()
        f2fs: fix wrong value of tracepoint parameter
        f2fs: protect new segment allocation in expand_inode_data
        f2fs: code cleanup by removing ifdef macro surrounding
        f2fs: avoid inifinite loop to wait for flushing node pages at cp_error
        f2fs: flush dirty meta pages when flushing them
        f2fs: fix checkpoint=disable:%u%%
        f2fs: compress: fix zstd data corruption
        f2fs: add compressed/gc data read IO stat
        f2fs: fix potential use-after-free issue
        f2fs: compress: don't handle non-compressed data in workqueue
        ...
      42612e77
    • L
      Merge tag 'exfat-for-5.8-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/linkinjeon/exfat · ad57a102
      Linus Torvalds 提交于
      Pull exfat update from Namjae Jeon:
       "Bug fixes:
         - Fix memory leak on mount failure with iocharset= option
         - Fix incorrect update of stream entry
         - Fix cluster range validation error
      
        Clean-ups:
         - Remove unused code and unneeded assignment
         - Rename variables in exfat structure as specification
         - Reorganize boot sector analysis code
         - Simplify exfat_utf8_d_hash and exfat_utf8_d_cmp()
         - Optimize exfat entry cache functions
         - Improve wording of EXFAT_DEFAULT_IOCHARSET config option
      
       New Feature:
         - Add boot region verification"
      
      * tag 'exfat-for-5.8-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/linkinjeon/exfat:
        exfat: Fix potential use after free in exfat_load_upcase_table()
        exfat: fix range validation error in alloc and free cluster
        exfat: fix incorrect update of stream entry in __exfat_truncate()
        exfat: fix memory leak in exfat_parse_param()
        exfat: remove unnecessary reassignment of p_uniname->name_len
        exfat: standardize checksum calculation
        exfat: add boot region verification
        exfat: separate the boot sector analysis
        exfat: redefine PBR as boot_sector
        exfat: optimize dir-cache
        exfat: replace 'time_ms' with 'time_cs'
        exfat: remove the assignment of 0 to bool variable
        exfat: Remove unused functions exfat_high_surrogate() and exfat_low_surrogate()
        exfat: Simplify exfat_utf8_d_hash() for code points above U+FFFF
        exfat: Improve wording of EXFAT_DEFAULT_IOCHARSET config option
        exfat: Use a more common logging style
        exfat: Simplify exfat_utf8_d_cmp() for code points above U+FFFF
      ad57a102
    • L
      x86: use proper parentheses around new uaccess macro argument uses · 3beff76b
      Linus Torvalds 提交于
      __get_kernel_nofault() didn't have the parentheses around the use of
      'src' and 'dst' macro arguments, making the casts potentially do the
      wrong thing.
      
      The parentheses aren't necessary with the current very limited use in
      mm/access.c, but it's bad form, and future use-cases might have very
      unexpected errors as a result.
      
      Do the same for unsafe_copy_loop() while at it, although in that case it
      is an entirely internal x86 uaccess helper macro that isn't used
      anywhere else and any other use would be invalid anyway.
      
      Fixes: fa94111d ("x86: use non-set_fs based maccess routines")
      Cc: Christoph Hellwig <hch@lst.de>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      3beff76b
    • D
      afs: Make afs_zap_data() static · c68421bb
      David Howells 提交于
      Make afs_zap_data() static as it's only used in the file in which it is
      defined.
      Signed-off-by: NDavid Howells <dhowells@redhat.com>
      c68421bb
    • D
      afs: Remove afs_zero_fid as it's not used · 4a06fa54
      David Howells 提交于
      Remove afs_zero_fid as it's not used.
      Signed-off-by: NDavid Howells <dhowells@redhat.com>
      4a06fa54
    • D
      afs: Fix debugging statements with %px to be %p · fed79fd7
      David Howells 提交于
      Fix a couple of %px to be %p in debugging statements.
      
      Fixes: e49c7b2f ("afs: Build an abstraction around an "operation" concept")
      Fixes: 8a070a96 ("afs: Detect cell aliases 1 - Cells with root volumes")
      Reported-by: NKees Cook <keescook@chromium.org>
      Signed-off-by: NDavid Howells <dhowells@redhat.com>
      Reviewed-by: NKees Cook <keescook@chromium.org>
      fed79fd7
    • L
      Merge tag 'trace-v5.8' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace · d1e521ad
      Linus Torvalds 提交于
      Pull tracing updates from Steven Rostedt:
       "No new features this release. Mostly clean ups, restructuring and
        documentation.
      
         - Have ftrace_bug() show ftrace errors before the WARN, as the WARN
           will reboot the box before the error messages are printed if
           panic_on_warn is set.
      
         - Have traceoff_on_warn disable tracing sooner (before prints)
      
         - Write a message to the trace buffer that its being disabled when
           disable_trace_on_warning() is set.
      
         - Separate out synthetic events from histogram code to let it be used
           by other parts of the kernel.
      
         - More documentation on histogram design.
      
         - Other small fixes and clean ups"
      
      * tag 'trace-v5.8' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace:
        tracing: Remove obsolete PREEMPTIRQ_EVENTS kconfig option
        tracing/doc: Fix ascii-art in histogram-design.rst
        tracing: Add a trace print when traceoff_on_warning is triggered
        ftrace,bug: Improve traceoff_on_warn
        selftests/ftrace: Distinguish between hist and synthetic event checks
        tracing: Move synthetic events to a separate file
        tracing: Fix events.rst section numbering
        tracing/doc: Fix typos in histogram-design.rst
        tracing: Add hist_debug trace event files for histogram debugging
        tracing: Add histogram-design document
        tracing: Check state.disabled in synth event trace functions
        tracing/probe: reverse arguments to list_add
        tools/bootconfig: Add a summary of test cases and return error
        ftrace: show debugging information when panic_on_warn set
      d1e521ad
    • L
      Merge tag 'linux-kselftest-kunit-5.8-rc1' of... · 595a56ac
      Linus Torvalds 提交于
      Merge tag 'linux-kselftest-kunit-5.8-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest
      
      Pull Kunit updates from Shuah Khan:
       "This consists of:
      
         - Several config fragment fixes from Anders Roxell to improve test
           coverage.
      
         - Improvements to kunit run script to use defconfig as default and
           restructure the code for config/build/exec/parse from Vitor Massaru
           Iha and David Gow.
      
         - Miscellaneous documentation warn fix"
      
      * tag 'linux-kselftest-kunit-5.8-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest:
        security: apparmor: default KUNIT_* fragments to KUNIT_ALL_TESTS
        fs: ext4: default KUNIT_* fragments to KUNIT_ALL_TESTS
        drivers: base: default KUNIT_* fragments to KUNIT_ALL_TESTS
        lib: Kconfig.debug: default KUNIT_* fragments to KUNIT_ALL_TESTS
        kunit: default KUNIT_* fragments to KUNIT_ALL_TESTS
        kunit: Kconfig: enable a KUNIT_ALL_TESTS fragment
        kunit: Fix TabError, remove defconfig code and handle when there is no kunitconfig
        kunit: use KUnit defconfig by default
        kunit: use --build_dir=.kunit as default
        Documentation: test.h - fix warnings
        kunit: kunit_tool: Separate out config/build/exec/parse
      595a56ac
    • L
      Merge tag 'linux-kselftest-5.8-rc1' of... · fc2fb38c
      Linus Torvalds 提交于
      Merge tag 'linux-kselftest-5.8-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest
      
      Pull kselftest updates from Shuah Khan:
       "This consists of:
      
         - Several fixes from Masami Hiramatsu to improve coverage for lib and
           sysctl tests.
      
         - Clean up to vdso test and a new test for getcpu() from Mark Brown.
      
         - Add new gen_tar selftests Makefile target generate selftest package
           running "make gen_tar" in selftests directory from Veronika
           Kabatova.
      
         - Other miscellaneous fixes to timens, exec, tpm2 tests"
      
      * tag 'linux-kselftest-5.8-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest:
        selftests/sysctl: Make sysctl test driver as a module
        selftests/sysctl: Fix to load test_sysctl module
        lib: Make test_sysctl initialized as module
        lib: Make prime number generator independently selectable
        selftests/ftrace: Return unsupported if no error_log file
        selftests/ftrace: Use printf for backslash included command
        selftests/timens: handle a case when alarm clocks are not supported
        Kernel selftests: Add check if TPM devices are supported
        selftests: vdso: Add a selftest for vDSO getcpu()
        selftests: vdso: Use a header file to prototype parse_vdso API
        selftests: vdso: Rename vdso_test to vdso_test_gettimeofday
        selftests/exec: Verify execve of non-regular files fail
        selftests: introduce gen_tar Makefile target
      fc2fb38c
    • L
      Merge branch 'akpm' (patches from Andrew) · a5ad5742
      Linus Torvalds 提交于
      Merge even more updates from Andrew Morton:
      
       - a kernel-wide sweep of show_stack()
      
       - pagetable cleanups
      
       - abstract out accesses to mmap_sem - prep for mmap_sem scalability work
      
       - hch's user acess work
      
      Subsystems affected by this patch series: debug, mm/pagemap, mm/maccess,
      mm/documentation.
      
      * emailed patches from Andrew Morton <akpm@linux-foundation.org>: (93 commits)
        include/linux/cache.h: expand documentation over __read_mostly
        maccess: return -ERANGE when probe_kernel_read() fails
        x86: use non-set_fs based maccess routines
        maccess: allow architectures to provide kernel probing directly
        maccess: move user access routines together
        maccess: always use strict semantics for probe_kernel_read
        maccess: remove strncpy_from_unsafe
        tracing/kprobes: handle mixed kernel/userspace probes better
        bpf: rework the compat kernel probe handling
        bpf:bpf_seq_printf(): handle potentially unsafe format string better
        bpf: handle the compat string in bpf_trace_copy_string better
        bpf: factor out a bpf_trace_copy_string helper
        maccess: unify the probe kernel arch hooks
        maccess: remove probe_read_common and probe_write_common
        maccess: rename strnlen_unsafe_user to strnlen_user_nofault
        maccess: rename strncpy_from_unsafe_strict to strncpy_from_kernel_nofault
        maccess: rename strncpy_from_unsafe_user to strncpy_from_user_nofault
        maccess: update the top of file comment
        maccess: clarify kerneldoc comments
        maccess: remove duplicate kerneldoc comments
        ...
      a5ad5742
    • O
      uprobes: ensure that uprobe->offset and ->ref_ctr_offset are properly aligned · 013b2deb
      Oleg Nesterov 提交于
      uprobe_write_opcode() must not cross page boundary; prepare_uprobe()
      relies on arch_uprobe_analyze_insn() which should validate "vaddr" but
      some architectures (csky, s390, and sparc) don't do this.
      
      We can remove the BUG_ON() check in prepare_uprobe() and validate the
      offset early in __uprobe_register(). The new IS_ALIGNED() check matches
      the alignment check in arch_prepare_kprobe() on supported architectures,
      so I think that all insns must be aligned to UPROBE_SWBP_INSN_SIZE.
      
      Another problem is __update_ref_ctr() which was wrong from the very
      beginning, it can read/write outside of kmap'ed page unless "vaddr" is
      aligned to sizeof(short), __uprobe_register() should check this too.
      Reported-by: NLinus Torvalds <torvalds@linux-foundation.org>
      Suggested-by: NLinus Torvalds <torvalds@linux-foundation.org>
      Signed-off-by: NOleg Nesterov <oleg@redhat.com>
      Reviewed-by: NSrikar Dronamraju <srikar@linux.vnet.ibm.com>
      Acked-by: NChristian Borntraeger <borntraeger@de.ibm.com>
      Tested-by: NSven Schnelle <svens@linux.ibm.com>
      Cc: Steven Rostedt <rostedt@goodmis.org>
      Cc: stable@vger.kernel.org
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      013b2deb
    • L
      include/linux/cache.h: expand documentation over __read_mostly · 4fa72523
      Luis Chamberlain 提交于
      __read_mostly can easily be misused by folks, its not meant for just
      read-only data.  There are performance reasons for using it, but we also
      don't provide any guidance about its use.  Provide a bit more guidance
      over its use.
      Signed-off-by: NLuis Chamberlain <mcgrof@kernel.org>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Reviewed-by: NKees Cook <keescook@chromium.org>
      Acked-by: NChristoph Lameter <cl@linux.com>
      Acked-by: NRafael Aquini <aquini@redhat.com>
      Cc: Arnd Bergmann <arnd@arndb.de>
      Cc: Matthew Wilcox <willy@infradead.org>
      Link: http://lkml.kernel.org/r/20200507161424.2584-1-mcgrof@kernel.orgSigned-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      4fa72523
    • C
      maccess: return -ERANGE when probe_kernel_read() fails · 2a71e81d
      Christoph Hellwig 提交于
      Allow the callers to distinguish a real unmapped address vs a range
      that can't be probed.
      Suggested-by: NMasami Hiramatsu <mhiramat@kernel.org>
      Signed-off-by: NChristoph Hellwig <hch@lst.de>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Reviewed-by: NMasami Hiramatsu <mhiramat@kernel.org>
      Cc: Alexei Starovoitov <ast@kernel.org>
      Cc: Daniel Borkmann <daniel@iogearbox.net>
      Cc: "H. Peter Anvin" <hpa@zytor.com>
      Cc: Ingo Molnar <mingo@elte.hu>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Link: http://lkml.kernel.org/r/20200521152301.2587579-24-hch@lst.deSigned-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      2a71e81d
    • C
      x86: use non-set_fs based maccess routines · fa94111d
      Christoph Hellwig 提交于
      Provide arch_kernel_read and arch_kernel_write routines to implement the
      maccess routines without messing with set_fs and without stac/clac that
      opens up access to user space.
      
      [akpm@linux-foundation.org: coding style fixes]
      Signed-off-by: NChristoph Hellwig <hch@lst.de>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Cc: Alexei Starovoitov <ast@kernel.org>
      Cc: Daniel Borkmann <daniel@iogearbox.net>
      Cc: "H. Peter Anvin" <hpa@zytor.com>
      Cc: Ingo Molnar <mingo@elte.hu>
      Cc: Masami Hiramatsu <mhiramat@kernel.org>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Link: http://lkml.kernel.org/r/20200521152301.2587579-20-hch@lst.deSigned-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      fa94111d