1. 10 12月, 2019 13 次提交
    • I
      x86/mm/pat: Fix typo in the Kconfig help text · b75baaf3
      Ingo Molnar 提交于
      Signed-off-by: NIngo Molnar <mingo@kernel.org>
      b75baaf3
    • I
      x86/mm/pat: Clean up <asm/memtype.h> externs · 533d49b3
      Ingo Molnar 提交于
      Half of the declarations have an 'extern', half of them not,
      use 'extern' consistently.
      
      This makes grepping for APIs easier, such as:
      
        dagon:~/tip> git grep -E '\<memtype_.*\(' arch/x86/ | grep extern
        arch/x86/include/asm/memtype.h:extern int memtype_reserve(u64 start, u64 end,
        arch/x86/include/asm/memtype.h:extern int memtype_free(u64 start, u64 end);
        arch/x86/include/asm/memtype.h:extern int memtype_kernel_map_sync(u64 base, unsigned long size,
        arch/x86/include/asm/memtype.h:extern int memtype_reserve_io(resource_size_t start, resource_size_t end,
        arch/x86/include/asm/memtype.h:extern void memtype_free_io(resource_size_t start, resource_size_t end);
        arch/x86/mm/pat/memtype.h:extern int memtype_check_insert(struct memtype *entry_new,
        arch/x86/mm/pat/memtype.h:extern struct memtype *memtype_erase(u64 start, u64 end);
        arch/x86/mm/pat/memtype.h:extern struct memtype *memtype_lookup(u64 addr);
        arch/x86/mm/pat/memtype.h:extern int memtype_copy_nth_element(struct memtype *entry_out, loff_t pos);
      Signed-off-by: NIngo Molnar <mingo@kernel.org>
      533d49b3
    • I
      x86/mm/pat: Rename <asm/pat.h> => <asm/memtype.h> · eb243d1d
      Ingo Molnar 提交于
      pat.h is a file whose main purpose is to provide the memtype_*() APIs.
      
      PAT is the low level hardware mechanism - but the high level abstraction
      is memtype.
      
      So name the header <memtype.h> as well - this goes hand in hand with memtype.c
      and memtype_interval.c.
      Signed-off-by: NIngo Molnar <mingo@kernel.org>
      eb243d1d
    • I
      x86/mm/pat: Standardize on memtype_*() prefix for APIs · ecdd6ee7
      Ingo Molnar 提交于
      Half of our memtype APIs are memtype_ prefixed, the other half are _memtype suffixed:
      
      	reserve_memtype()
      	free_memtype()
      	kernel_map_sync_memtype()
      	io_reserve_memtype()
      	io_free_memtype()
      
      	memtype_check_insert()
      	memtype_erase()
      	memtype_lookup()
      	memtype_copy_nth_element()
      
      Use prefixes consistently, like most other modern kernel APIs:
      
      	reserve_memtype()		=> memtype_reserve()
      	free_memtype()			=> memtype_free()
      	kernel_map_sync_memtype()	=> memtype_kernel_map_sync()
      	io_reserve_memtype()		=> memtype_reserve_io()
      	io_free_memtype()		=> memtype_free_io()
      
      	memtype_check_insert()		=> memtype_check_insert()
      	memtype_erase()			=> memtype_erase()
      	memtype_lookup()		=> memtype_lookup()
      	memtype_copy_nth_element()	=> memtype_copy_nth_element()
      Signed-off-by: NIngo Molnar <mingo@kernel.org>
      ecdd6ee7
    • I
      x86/mm/pat: Move the memtype related files to arch/x86/mm/pat/ · f9b57cf8
      Ingo Molnar 提交于
      - pat.c offers, dominantly, the memtype APIs - so rename it to memtype.c.
      
      - pageattr.c is offering, primarily, the set_memory*() page attribute APIs,
        which is offered via the <asm/set_memory.h> header: name the .c file
        along the same pattern.
      
      I.e. perform these renames, and move them all next to each other in arch/x86/mm/pat/:
      
          pat.c             => memtype.c
          pat_internal.h    => memtype.h
          pat_interval.c    => memtype_interval.c
      
          pageattr.c        => set_memory.c
          pageattr-test.c   => cpa-test.c
      Signed-off-by: NIngo Molnar <mingo@kernel.org>
      f9b57cf8
    • I
      x86/mm/pat: Clean up PAT initialization flags · d891b921
      Ingo Molnar 提交于
      Right now we have these variables that impact the PAT initialization sequence:
      
        pat_disabled
        boot_cpu_done
        pat_initialized
        init_cm_done
      
      Some have a pat_ prefix, some not, and the naming is random,
      which makes their purpose rather opaque.
      
      Name them consistently and according to their role:
      
        pat_disabled
        pat_bp_initialized
        pat_bp_enabled
        pat_cm_initialized
      
      Also rename pat_bsp_init() => pat_bp_init(), to use the canonical
      abbreviation.
      
      Also add a warning for double calls of init_cache_modes(), the call chains
      leading to this are complex and I couldn't convince myself that we never
      call this function twice - so utilize the flag for a debug check.
      
      No change in functionality intended.
      Signed-off-by: NIngo Molnar <mingo@kernel.org>
      d891b921
    • I
      x86/mm/pat: Harmonize 'struct memtype *' local variable and function parameter use · baf65855
      Ingo Molnar 提交于
      We have quite a zoo of 'struct memtype' variable nomenclature:
      
        new
        entry
        print_entry
        data
        match
        out
        memtype
      
      Beyond the randomness, some of these are outright confusing, especially
      when used in larger functions.
      
      Standardize them:
      
        entry
        entry_new
        entry_old
        entry_print
        entry_match
        entry_out
      Signed-off-by: NIngo Molnar <mingo@kernel.org>
      baf65855
    • I
      x86/mm/pat: Simplify the free_memtype() control flow · 47553d42
      Ingo Molnar 提交于
      Simplify/streamline the quirky handling of the pat_pagerange_is_ram() logic,
      and get rid of the 'err' local variable.
      Signed-off-by: NIngo Molnar <mingo@kernel.org>
      47553d42
    • I
      x86/mm/pat: Create fixed width output in... · ef35b0fc
      Ingo Molnar 提交于
      x86/mm/pat: Create fixed width output in /sys/kernel/debug/x86/pat_memtype_list, similar to the E820 debug printouts
      
      Before:
      
        write-back @ 0xbdfa9000-0xbdfaa000
        write-back @ 0xbdfaa000-0xbdfab000
        write-back @ 0xbdfab000-0xbdfac000
        uncached-minus @ 0xc0000000-0xd0000000
        uncached-minus @ 0xd0900000-0xd0920000
        uncached-minus @ 0xd0920000-0xd0940000
        uncached-minus @ 0xd0940000-0xd0960000
        uncached-minus @ 0xd0960000-0xd0980000
        uncached-minus @ 0xd0980000-0xd0981000
        uncached-minus @ 0xd0990000-0xd0991000
        uncached-minus @ 0xd09a0000-0xd09a1000
        uncached-minus @ 0xd09b0000-0xd09b1000
        uncached-minus @ 0xd0d00000-0xd0d01000
        uncached-minus @ 0xd0d10000-0xd0d11000
        uncached-minus @ 0xd0d20000-0xd0d21000
        uncached-minus @ 0xd0d40000-0xd0d41000
        uncached-minus @ 0xfed00000-0xfed01000
        uncached-minus @ 0xfed1f000-0xfed20000
        uncached-minus @ 0xfed40000-0xfed41000
      
      After:
      
        PAT: [mem 0x00000000bdf8e000-0x00000000bdfa8000] write-back
        PAT: [mem 0x00000000bdfa9000-0x00000000bdfaa000] write-back
        PAT: [mem 0x00000000bdfaa000-0x00000000bdfab000] write-back
        PAT: [mem 0x00000000bdfab000-0x00000000bdfac000] write-back
        PAT: [mem 0x00000000c0000000-0x00000000d0000000] uncached-minus
        PAT: [mem 0x00000000d0900000-0x00000000d0920000] uncached-minus
        PAT: [mem 0x00000000d0920000-0x00000000d0940000] uncached-minus
        PAT: [mem 0x00000000d0940000-0x00000000d0960000] uncached-minus
        PAT: [mem 0x00000000d0960000-0x00000000d0980000] uncached-minus
        PAT: [mem 0x00000000d0980000-0x00000000d0981000] uncached-minus
        PAT: [mem 0x00000000d0990000-0x00000000d0991000] uncached-minus
        PAT: [mem 0x00000000d09a0000-0x00000000d09a1000] uncached-minus
        PAT: [mem 0x00000000d09b0000-0x00000000d09b1000] uncached-minus
        PAT: [mem 0x00000000fed1f000-0x00000000fed20000] uncached-minus
        PAT: [mem 0x00000000fed40000-0x00000000fed41000] uncached-minus
      
      The advantage is that it's easier to parse at a glance - and the tree is ordered
      by start address, which is now reflected in putting the start address in the first
      column.
      
      This is also now similar to how we print e820 entries:
      
        BIOS-e820: [mem 0x00000000bafda000-0x00000000bb3d3fff] usable
        BIOS-e820: [mem 0x00000000bb3d4000-0x00000000bdd2efff] reserved
        BIOS-e820: [mem 0x00000000bdd2f000-0x00000000bddccfff] ACPI NVS
        BIOS-e820: [mem 0x00000000bddcd000-0x00000000bdea0fff] ACPI data
        BIOS-e820: [mem 0x00000000bdea1000-0x00000000bdf2efff] ACPI NVS
      
      Since this is a debugfs file not used by tools there's no known ABI dependencies.
      Signed-off-by: NIngo Molnar <mingo@kernel.org>
      ef35b0fc
    • I
      x86/mm/pat: Disambiguate PAT-disabled boot messages · 5557e831
      Ingo Molnar 提交于
      Right now we have these four types of PAT-disabled boot messages:
      
        x86/PAT: PAT support disabled.
        x86/PAT: PAT MSR is 0, disabled.
        x86/PAT: MTRRs disabled, skipping PAT initialization too.
        x86/PAT: PAT not supported by CPU.
      
      The first message is ambiguous in that it doesn't signal that PAT is off
      due to a boot option.
      
      The second message doesn't really make it clear that this is the MSR value
      during early bootup and it's the firmware environment that disabled PAT
      support.
      
      The fourth message doesn't really make it clear that we disable PAT support
      because CONFIG_MTRR is off in the kernel.
      
      Clarify, harmonize and fix the spelling in these user-visible messages:
      
        x86/PAT: PAT support disabled via boot option.
        x86/PAT: PAT support disabled by the firmware.
        x86/PAT: PAT support disabled because CONFIG_MTRR is disabled in the kernel.
        x86/PAT: PAT not supported by the CPU.
      
      Also add a fifth message, in case PAT support is disabled at build time:
      
        x86/PAT: PAT support disabled because CONFIG_X86_PAT is disabled in the kernel.
      
      Previously we'd just silently return from pat_init() without giving any indication
      that PAT support is off.
      
      Finally, clarify/extend some of the comments related to PAT initialization.
      Signed-off-by: NIngo Molnar <mingo@kernel.org>
      5557e831
    • I
      x86/mm/pat: Update the comments in pat.c and pat_interval.c and refresh the code a bit · aee7f913
      Ingo Molnar 提交于
      Tidy up the code:
      
       - add comments explaining the PAT code, the role of the functions and the logic
      
       - fix various typos and grammar while at it
      
       - simplify the file-scope memtype_interval_*() namespace to interval_*()
      
       - simplify stylistic complications such as unnecessary linebreaks
         or convoluted control flow
      
       - use the simpler '#ifdef CONFIG_*' pattern instead of '#if defined(CONFIG_*)' pattern
      
       - remove the non-idiomatic newline between late_initcall() and its function definition
      Signed-off-by: NIngo Molnar <mingo@kernel.org>
      aee7f913
    • I
      x86/setup: Enhance the comments · 360db4ac
      Ingo Molnar 提交于
      Update various comments, fix outright mistakes and meaningless descriptions.
      
      Also harmonize the style across the file, both in form and in language.
      
      Cc: linux-kernel@vger.kernel.org
      Cc: Borislav Petkov <bp@alien8.de>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Signed-off-by: NIngo Molnar <mingo@kernel.org>
      360db4ac
    • I
      x86/setup: Clean up the header portion of setup.c · 12609013
      Ingo Molnar 提交于
      In 20 years we accumulated 89 #include lines in setup.c,
      but we only need 30 of them (!) ...
      
      Get rid of the excessive ones, and while at it, sort the
      remaining ones alphabetically.
      
      Also get rid of the incomplete changelogs at the header of the file,
      and explain better what this file does.
      
      Cc: linux-kernel@vger.kernel.org
      Cc: Borislav Petkov <bp@alien8.de>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Signed-off-by: NIngo Molnar <mingo@kernel.org>
      12609013
  2. 09 12月, 2019 5 次提交
    • L
      Linux 5.5-rc1 · e42617b8
      Linus Torvalds 提交于
      e42617b8
    • L
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net · 95e6ba51
      Linus Torvalds 提交于
      Pull networking fixes from David Miller:
      
       1) More jumbo frame fixes in r8169, from Heiner Kallweit.
      
       2) Fix bpf build in minimal configuration, from Alexei Starovoitov.
      
       3) Use after free in slcan driver, from Jouni Hogander.
      
       4) Flower classifier port ranges don't work properly in the HW offload
          case, from Yoshiki Komachi.
      
       5) Use after free in hns3_nic_maybe_stop_tx(), from Yunsheng Lin.
      
       6) Out of bounds access in mqprio_dump(), from Vladyslav Tarasiuk.
      
       7) Fix flow dissection in dsa TX path, from Alexander Lobakin.
      
       8) Stale syncookie timestampe fixes from Guillaume Nault.
      
      [ Did an evil merge to silence a warning introduced by this pull - Linus ]
      
      * git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net: (84 commits)
        r8169: fix rtl_hw_jumbo_disable for RTL8168evl
        net_sched: validate TCA_KIND attribute in tc_chain_tmplt_add()
        r8169: add missing RX enabling for WoL on RTL8125
        vhost/vsock: accept only packets with the right dst_cid
        net: phy: dp83867: fix hfs boot in rgmii mode
        net: ethernet: ti: cpsw: fix extra rx interrupt
        inet: protect against too small mtu values.
        gre: refetch erspan header from skb->data after pskb_may_pull()
        pppoe: remove redundant BUG_ON() check in pppoe_pernet
        tcp: Protect accesses to .ts_recent_stamp with {READ,WRITE}_ONCE()
        tcp: tighten acceptance of ACKs not matching a child socket
        tcp: fix rejected syncookies due to stale timestamps
        lpc_eth: kernel BUG on remove
        tcp: md5: fix potential overestimation of TCP option space
        net: sched: allow indirect blocks to bind to clsact in TC
        net: core: rename indirect block ingress cb function
        net-sysfs: Call dev_hold always in netdev_queue_add_kobject
        net: dsa: fix flow dissection on Tx path
        net/tls: Fix return values to avoid ENOTSUPP
        net: avoid an indirect call in ____sys_recvmsg()
        ...
      95e6ba51
    • L
      Merge tag 'scsi-misc' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi · 138f371d
      Linus Torvalds 提交于
      Pull more SCSI updates from James Bottomley:
       "Eleven patches, all in drivers (no core changes) that are either minor
        cleanups or small fixes.
      
        They were late arriving, but still safe for -rc1"
      
      * tag 'scsi-misc' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi:
        scsi: MAINTAINERS: Add the linux-scsi mailing list to the ISCSI entry
        scsi: megaraid_sas: Make poll_aen_lock static
        scsi: sd_zbc: Improve report zones error printout
        scsi: qla2xxx: Fix qla2x00_request_irqs() for MSI
        scsi: qla2xxx: unregister ports after GPN_FT failure
        scsi: qla2xxx: fix rports not being mark as lost in sync fabric scan
        scsi: pm80xx: Remove unused include of linux/version.h
        scsi: pm80xx: fix logic to break out of loop when register value is 2 or 3
        scsi: scsi_transport_sas: Fix memory leak when removing devices
        scsi: lpfc: size cpu map by last cpu id set
        scsi: ibmvscsi_tgt: Remove unneeded variable rc
      138f371d
    • L
      Merge tag '5.5-rc-smb3-fixes-part2' of git://git.samba.org/sfrench/cifs-2.6 · a78f7cdd
      Linus Torvalds 提交于
      Pull cifs fixes from Steve French:
       "Nine cifs/smb3 fixes:
      
         - one fix for stable (oops during oplock break)
      
         - two timestamp fixes including important one for updating mtime at
           close to avoid stale metadata caching issue on dirty files (also
           improves perf by using SMB2_CLOSE_FLAG_POSTQUERY_ATTRIB over the
           wire)
      
         - two fixes for "modefromsid" mount option for file create (now
           allows mode bits to be set more atomically and accurately on create
           by adding "sd_context" on create when modefromsid specified on
           mount)
      
         - two fixes for multichannel found in testing this week against
           different servers
      
         - two small cleanup patches"
      
      * tag '5.5-rc-smb3-fixes-part2' of git://git.samba.org/sfrench/cifs-2.6:
        smb3: improve check for when we send the security descriptor context on create
        smb3: fix mode passed in on create for modetosid mount option
        cifs: fix possible uninitialized access and race on iface_list
        cifs: Fix lookup of SMB connections on multichannel
        smb3: query attributes on file close
        smb3: remove unused flag passed into close functions
        cifs: remove redundant assignment to pointer pneg_ctxt
        fs: cifs: Fix atime update check vs mtime
        CIFS: Fix NULL-pointer dereference in smb2_push_mandatory_locks
      a78f7cdd
    • L
      Merge branch 'work.misc' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs · 5bf9a06a
      Linus Torvalds 提交于
      Pull misc vfs cleanups from Al Viro:
       "No common topic, just three cleanups".
      
      * 'work.misc' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs:
        make __d_alloc() static
        fs/namespace: add __user to open_tree and move_mount syscalls
        fs/fnctl: fix missing __user in fcntl_rw_hint()
      5bf9a06a
  3. 08 12月, 2019 22 次提交
    • L
      Merge tag 'ntb-5.5' of git://github.com/jonmason/ntb · 9455d25f
      Linus Torvalds 提交于
      Pull NTB update from Jon Mason:
       "Just a simple patch to add a new Hygon Device ID to the AMD NTB device
        driver"
      
      * tag 'ntb-5.5' of git://github.com/jonmason/ntb:
        NTB: Add Hygon Device ID
      9455d25f
    • L
      Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input · 73721451
      Linus Torvalds 提交于
      Pull more input updates from Dmitry Torokhov:
      
       - fixups for Synaptics RMI4 driver
      
       - a quirk for Goodinx touchscreen on Teclast tablet
      
       - a new keycode definition for activating privacy screen feature found
         on a few "enterprise" laptops
      
       - updates to snvs_pwrkey driver
      
       - polling uinput device for writing (which is always allowed) now works
      
      * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input:
        Input: synaptics-rmi4 - don't increment rmiaddr for SMBus transfers
        Input: synaptics-rmi4 - re-enable IRQs in f34v7_do_reflash
        Input: goodix - add upside-down quirk for Teclast X89 tablet
        Input: add privacy screen toggle keycode
        Input: uinput - fix returning EPOLLOUT from uinput_poll
        Input: snvs_pwrkey - remove gratuitous NULL initializers
        Input: snvs_pwrkey - send key events for i.MX6 S, DL and Q
      73721451
    • L
      Merge tag 'iomap-5.5-merge-14' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux · 95207d55
      Linus Torvalds 提交于
      Pull iomap fixes from Darrick Wong:
       "Fix a race condition and a use-after-free error:
      
         - Fix a UAF when reporting writeback errors
      
         - Fix a race condition when handling page uptodate on fragmented file
           with blocksize < pagesize"
      
      * tag 'iomap-5.5-merge-14' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux:
        iomap: stop using ioend after it's been freed in iomap_finish_ioend()
        iomap: fix sub-page uptodate handling
      95207d55
    • L
      Merge tag 'xfs-5.5-merge-17' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux · 50caca9d
      Linus Torvalds 提交于
      Pull xfs fixes from Darrick Wong:
       "Fix a couple of resource management errors and a hang:
      
         - fix a crash in the log setup code when log mounting fails
      
         - fix a hang when allocating space on the realtime device
      
         - fix a block leak when freeing space on the realtime device"
      
      * tag 'xfs-5.5-merge-17' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux:
        xfs: fix mount failure crash on invalid iclog memory access
        xfs: don't check for AG deadlock for realtime files in bunmapi
        xfs: fix realtime file data space leak
      50caca9d
    • L
      Merge tag 'for-linus-5.5-ofs1' of git://git.kernel.org/pub/scm/linux/kernel/git/hubcap/linux · 316933cf
      Linus Torvalds 提交于
      Pull orangefs update from Mike Marshall:
       "orangefs: posix open permission checking...
      
        Orangefs has no open, and orangefs checks file permissions on each
        file access. Posix requires that file permissions be checked on open
        and nowhere else. Orangefs-through-the-kernel needs to seem posix
        compliant.
      
        The VFS opens files, even if the filesystem provides no method. We can
        see if a file was successfully opened for read and or for write by
        looking at file->f_mode.
      
        When writes are flowing from the page cache, file is no longer
        available. We can trust the VFS to have checked file->f_mode before
        writing to the page cache.
      
        The mode of a file might change between when it is opened and IO
        commences, or it might be created with an arbitrary mode.
      
        We'll make sure we don't hit EACCES during the IO stage by using
        UID 0"
      
      [ This is "posixish", but not a great solution in the long run, since a
        proper secure network server shouldn't really trust the client like this.
        But proper and secure POSIX behavior requires an open method and a
        resulting cookie for IO of some kind, or similar.    - Linus ]
      
      * tag 'for-linus-5.5-ofs1' of git://git.kernel.org/pub/scm/linux/kernel/git/hubcap/linux:
        orangefs: posix open permission checking...
      316933cf
    • L
      Merge tag 'nfsd-5.5' of git://linux-nfs.org/~bfields/linux · 911d137a
      Linus Torvalds 提交于
      Pull nfsd updates from Bruce Fields:
       "This is a relatively quiet cycle for nfsd, mainly various bugfixes.
      
        Possibly most interesting is Trond's fixes for some callback races
        that were due to my incomplete understanding of rpc client shutdown.
        Unfortunately at the last minute I've started noticing a new
        intermittent failure to send callbacks. As the logic seems basically
        correct, I'm leaving Trond's patches in for now, and hope to find a
        fix in the next week so I don't have to revert those patches"
      
      * tag 'nfsd-5.5' of git://linux-nfs.org/~bfields/linux: (24 commits)
        nfsd: depend on CRYPTO_MD5 for legacy client tracking
        NFSD fixing possible null pointer derefering in copy offload
        nfsd: check for EBUSY from vfs_rmdir/vfs_unink.
        nfsd: Ensure CLONE persists data and metadata changes to the target file
        SUNRPC: Fix backchannel latency metrics
        nfsd: restore NFSv3 ACL support
        nfsd: v4 support requires CRYPTO_SHA256
        nfsd: Fix cld_net->cn_tfm initialization
        lockd: remove __KERNEL__ ifdefs
        sunrpc: remove __KERNEL__ ifdefs
        race in exportfs_decode_fh()
        nfsd: Drop LIST_HEAD where the variable it declares is never used.
        nfsd: document callback_wq serialization of callback code
        nfsd: mark cb path down on unknown errors
        nfsd: Fix races between nfsd4_cb_release() and nfsd4_shutdown_callback()
        nfsd: minor 4.1 callback cleanup
        SUNRPC: Fix svcauth_gss_proxy_init()
        SUNRPC: Trace gssproxy upcall results
        sunrpc: fix crash when cache_head become valid before update
        nfsd: remove private bin2hex implementation
        ...
      911d137a
    • L
      Merge tag 'nfs-for-5.5-1' of git://git.linux-nfs.org/projects/trondmy/linux-nfs · fb9bf40c
      Linus Torvalds 提交于
      Pull NFS client updates from Trond Myklebust:
       "Highlights include:
      
        Features:
      
         - NFSv4.2 now supports cross device offloaded copy (i.e. offloaded
           copy of a file from one source server to a different target
           server).
      
         - New RDMA tracepoints for debugging congestion control and Local
           Invalidate WRs.
      
        Bugfixes and cleanups
      
         - Drop the NFSv4.1 session slot if nfs4_delegreturn_prepare waits for
           layoutreturn
      
         - Handle bad/dead sessions correctly in nfs41_sequence_process()
      
         - Various bugfixes to the delegation return operation.
      
         - Various bugfixes pertaining to delegations that have been revoked.
      
         - Cleanups to the NFS timespec code to avoid unnecessary conversions
           between timespec and timespec64.
      
         - Fix unstable RDMA connections after a reconnect
      
         - Close race between waking an RDMA sender and posting a receive
      
         - Wake pending RDMA tasks if connection fails
      
         - Fix MR list corruption, and clean up MR usage
      
         - Fix another RPCSEC_GSS issue with MIC buffer space"
      
      * tag 'nfs-for-5.5-1' of git://git.linux-nfs.org/projects/trondmy/linux-nfs: (79 commits)
        SUNRPC: Capture completion of all RPC tasks
        SUNRPC: Fix another issue with MIC buffer space
        NFS4: Trace lock reclaims
        NFS4: Trace state recovery operation
        NFSv4.2 fix memory leak in nfs42_ssc_open
        NFSv4.2 fix kfree in __nfs42_copy_file_range
        NFS: remove duplicated include from nfs4file.c
        NFSv4: Make _nfs42_proc_copy_notify() static
        NFS: Fallocate should use the nfs4_fattr_bitmap
        NFS: Return -ETXTBSY when attempting to write to a swapfile
        fs: nfs: sysfs: Remove NULL check before kfree
        NFS: remove unneeded semicolon
        NFSv4: add declaration of current_stateid
        NFSv4.x: Drop the slot if nfs4_delegreturn_prepare waits for layoutreturn
        NFSv4.x: Handle bad/dead sessions correctly in nfs41_sequence_process()
        nfsv4: Move NFSPROC4_CLNT_COPY_NOTIFY to end of list
        SUNRPC: Avoid RPC delays when exiting suspend
        NFS: Add a tracepoint in nfs_fh_to_dentry()
        NFSv4: Don't retry the GETATTR on old stateid in nfs4_delegreturn_done()
        NFSv4: Handle NFS4ERR_OLD_STATEID in delegreturn
        ...
      fb9bf40c
    • S
      smb3: improve check for when we send the security descriptor context on create · 231e2a0b
      Steve French 提交于
      We had cases in the previous patch where we were sending the security
      descriptor context on SMB3 open (file create) in cases when we hadn't
      mounted with with "modefromsid" mount option.
      
      Add check for that mount flag before calling ad_sd_context in
      open init.
      Signed-off-by: NSteve French <stfrench@microsoft.com>
      Reviewed-by: NPavel Shilovsky <pshilov@microsoft.com>
      231e2a0b
    • L
      Merge tag 'vfio-v5.5-rc1' of git://github.com/awilliam/linux-vfio · 94e89b40
      Linus Torvalds 提交于
      Pull VFIO updates from Alex Williamson:
      
       - Remove hugepage checks for reserved pfns (Ben Luo)
      
       - Fix irq-bypass unregister ordering (Jiang Yi)
      
      * tag 'vfio-v5.5-rc1' of git://github.com/awilliam/linux-vfio:
        vfio/pci: call irq_bypass_unregister_producer() before freeing irq
        vfio/type1: remove hugepage checks in is_invalid_reserved_pfn()
      94e89b40
    • L
      Merge tag 'for-linus-5.5b-rc1-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip · f74fd13f
      Linus Torvalds 提交于
      Pull more xen updates from Juergen Gross:
      
       - a patch to fix a build warning
      
       - a cleanup of no longer needed code in the Xen event handling
      
       - a small series for the Xen grant driver avoiding high order
         allocations and replacing an insane global limit by a per-call one
      
       - a small series fixing Xen frontend/backend module referencing
      
      * tag 'for-linus-5.5b-rc1-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip:
        xen-blkback: allow module to be cleanly unloaded
        xen/xenbus: reference count registered modules
        xen/gntdev: switch from kcalloc() to kvcalloc()
        xen/gntdev: replace global limit of mapped pages by limit per call
        xen/gntdev: remove redundant non-zero check on ret
        xen/events: remove event handling recursion detection
      f74fd13f
    • L
      Merge branch 'akpm' (patches from Andrew) · 6dc517a3
      Linus Torvalds 提交于
      Merge misc Kconfig updates from Andrew Morton:
       "A number of changes to Kconfig files under lib/ from Changbin Du and
        Krzysztof Kozlowski"
      
      * emailed patches from Andrew Morton <akpm@linux-foundation.org>:
        lib/: fix Kconfig indentation
        kernel-hacking: move DEBUG_FS to 'Generic Kernel Debugging Instruments'
        kernel-hacking: move DEBUG_BUGVERBOSE to 'printk and dmesg options'
        kernel-hacking: create a submenu for scheduler debugging options
        kernel-hacking: move SCHED_STACK_END_CHECK after DEBUG_STACK_USAGE
        kernel-hacking: move Oops into 'Lockups and Hangs'
        kernel-hacking: move kernel testing and coverage options to same submenu
        kernel-hacking: group kernel data structures debugging together
        kernel-hacking: create submenu for arch special debugging options
        kernel-hacking: group sysrq/kgdb/ubsan into 'Generic Kernel Debugging Instruments'
      6dc517a3
    • H
      r8169: fix rtl_hw_jumbo_disable for RTL8168evl · 0fc75219
      Heiner Kallweit 提交于
      In referenced fix we removed the RTL8168e-specific jumbo config for
      RTL8168evl in rtl_hw_jumbo_enable(). We have to do the same in
      rtl_hw_jumbo_disable().
      
      v2: fix referenced commit id
      
      Fixes: 14012c9f ("r8169: fix jumbo configuration for RTL8168evl")
      Signed-off-by: NHeiner Kallweit <hkallweit1@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      0fc75219
    • L
      pipe: don't use 'pipe_wait() for basic pipe IO · 85190d15
      Linus Torvalds 提交于
      pipe_wait() may be simple, but since it relies on the pipe lock, it
      means that we have to do the wakeup while holding the lock.  That's
      unfortunate, because the very first thing the waked entity will want to
      do is to get the pipe lock for itself.
      
      So get rid of the pipe_wait() usage by simply releasing the pipe lock,
      doing the wakeup (if required) and then using wait_event_interruptible()
      to wait on the right condition instead.
      
      wait_event_interruptible() handles races on its own by comparing the
      wakeup condition before and after adding itself to the wait queue, so
      you can use an optimistic unlocked condition for it.
      
      Cc: David Howells <dhowells@redhat.com>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      85190d15
    • J
      NTB: Add Hygon Device ID · 9b5b99a8
      Jiasen Lin 提交于
      Signed-off-by: NJiasen Lin <linjiasen@hygon.cn>
      Signed-off-by: NJon Mason <jdmason@kudzu.us>
      9b5b99a8
    • L
      pipe: remove 'waiting_writers' merging logic · a28c8b9d
      Linus Torvalds 提交于
      This code is ancient, and goes back to when we only had a single page
      for the pipe buffers.  The exact history is hidden in the mists of time
      (ie "before git", and in fact predates the BK repository too).
      
      At that long-ago point in time, it actually helped to try to merge big
      back-and-forth pipe reads and writes, and not limit pipe reads to the
      single pipe buffer in length just because that was all we had at a time.
      
      However, since then we've expanded the pipe buffers to multiple pages,
      and this logic really doesn't seem to make sense.  And a lot of it is
      somewhat questionable (ie "hmm, the user asked for a non-blocking read,
      but we see that there's a writer pending, so let's wait anyway to get
      the extra data that the writer will have").
      
      But more importantly, it makes the "go to sleep" logic much less
      obvious, and considering the wakeup issues we've had, I want to make for
      less of those kinds of things.
      
      Cc: David Howells <dhowells@redhat.com>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      a28c8b9d
    • L
      pipe: fix and clarify pipe read wakeup logic · f467a6a6
      Linus Torvalds 提交于
      This is the read side version of the previous commit: it simplifies the
      logic to only wake up waiting writers when necessary, and makes sure to
      use a synchronous wakeup.  This time not so much for GNU make jobserver
      reasons (that pipe never fills up), but simply to get the writer going
      quickly again.
      
      A bit less verbose commentary this time, if only because I assume that
      the write side commentary isn't going to be ignored if you touch this
      code.
      
      Cc: David Howells <dhowells@redhat.com>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      f467a6a6
    • L
      pipe: fix and clarify pipe write wakeup logic · 1b6b26ae
      Linus Torvalds 提交于
      The pipe rework ends up having been extra painful, partly becaused of
      actual bugs with ordering and caching of the pipe state, but also
      because of subtle performance issues.
      
      In particular, the pipe rework caused the kernel build to inexplicably
      slow down.
      
      The reason turns out to be that the GNU make jobserver (which limits the
      parallelism of the build) uses a pipe to implement a "token" system: a
      parallel submake will read a character from the pipe to get the job
      token before starting a new job, and will write a character back to the
      pipe when it is done.  The overall job limit is thus easily controlled
      by just writing the appropriate number of initial token characters into
      the pipe.
      
      But to work well, that really means that the old behavior of write
      wakeups being synchronous (WF_SYNC) is very important - when the pipe
      writer wakes up a reader, we want the reader to actually get scheduled
      immediately.  Otherwise you lose the parallelism of the build.
      
      The pipe rework lost that synchronous wakeup on write, and we had
      clearly all forgotten the reasons and rules for it.
      
      This rewrites the pipe write wakeup logic to do the required Wsync
      wakeups, but also clarifies the logic and avoids extraneous wakeups.
      
      It also ends up addign a number of comments about what oit does and why,
      so that we hopefully don't end up forgetting about this next time we
      change this code.
      
      Cc: David Howells <dhowells@redhat.com>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      1b6b26ae
    • E
      net_sched: validate TCA_KIND attribute in tc_chain_tmplt_add() · 2dd5616e
      Eric Dumazet 提交于
      Use the new tcf_proto_check_kind() helper to make sure user
      provided value is well formed.
      
      BUG: KMSAN: uninit-value in string_nocheck lib/vsprintf.c:606 [inline]
      BUG: KMSAN: uninit-value in string+0x4be/0x600 lib/vsprintf.c:668
      CPU: 0 PID: 12358 Comm: syz-executor.1 Not tainted 5.4.0-rc8-syzkaller #0
      Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
      Call Trace:
       __dump_stack lib/dump_stack.c:77 [inline]
       dump_stack+0x1c9/0x220 lib/dump_stack.c:118
       kmsan_report+0x128/0x220 mm/kmsan/kmsan_report.c:108
       __msan_warning+0x64/0xc0 mm/kmsan/kmsan_instr.c:245
       string_nocheck lib/vsprintf.c:606 [inline]
       string+0x4be/0x600 lib/vsprintf.c:668
       vsnprintf+0x218f/0x3210 lib/vsprintf.c:2510
       __request_module+0x2b1/0x11c0 kernel/kmod.c:143
       tcf_proto_lookup_ops+0x171/0x700 net/sched/cls_api.c:139
       tc_chain_tmplt_add net/sched/cls_api.c:2730 [inline]
       tc_ctl_chain+0x1904/0x38a0 net/sched/cls_api.c:2850
       rtnetlink_rcv_msg+0x115a/0x1580 net/core/rtnetlink.c:5224
       netlink_rcv_skb+0x431/0x620 net/netlink/af_netlink.c:2477
       rtnetlink_rcv+0x50/0x60 net/core/rtnetlink.c:5242
       netlink_unicast_kernel net/netlink/af_netlink.c:1302 [inline]
       netlink_unicast+0xf3e/0x1020 net/netlink/af_netlink.c:1328
       netlink_sendmsg+0x110f/0x1330 net/netlink/af_netlink.c:1917
       sock_sendmsg_nosec net/socket.c:637 [inline]
       sock_sendmsg net/socket.c:657 [inline]
       ___sys_sendmsg+0x14ff/0x1590 net/socket.c:2311
       __sys_sendmsg net/socket.c:2356 [inline]
       __do_sys_sendmsg net/socket.c:2365 [inline]
       __se_sys_sendmsg+0x305/0x460 net/socket.c:2363
       __x64_sys_sendmsg+0x4a/0x70 net/socket.c:2363
       do_syscall_64+0xb6/0x160 arch/x86/entry/common.c:291
       entry_SYSCALL_64_after_hwframe+0x44/0xa9
      RIP: 0033:0x45a649
      Code: ad b6 fb ff c3 66 2e 0f 1f 84 00 00 00 00 00 66 90 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 0f 83 7b b6 fb ff c3 66 2e 0f 1f 84 00 00 00 00
      RSP: 002b:00007f0790795c78 EFLAGS: 00000246 ORIG_RAX: 000000000000002e
      RAX: ffffffffffffffda RBX: 0000000000000003 RCX: 000000000045a649
      RDX: 0000000000000000 RSI: 0000000020000300 RDI: 0000000000000006
      RBP: 000000000075bfc8 R08: 0000000000000000 R09: 0000000000000000
      R10: 0000000000000000 R11: 0000000000000246 R12: 00007f07907966d4
      R13: 00000000004c8db5 R14: 00000000004df630 R15: 00000000ffffffff
      
      Uninit was created at:
       kmsan_save_stack_with_flags mm/kmsan/kmsan.c:149 [inline]
       kmsan_internal_poison_shadow+0x5c/0x110 mm/kmsan/kmsan.c:132
       kmsan_slab_alloc+0x97/0x100 mm/kmsan/kmsan_hooks.c:86
       slab_alloc_node mm/slub.c:2773 [inline]
       __kmalloc_node_track_caller+0xe27/0x11a0 mm/slub.c:4381
       __kmalloc_reserve net/core/skbuff.c:141 [inline]
       __alloc_skb+0x306/0xa10 net/core/skbuff.c:209
       alloc_skb include/linux/skbuff.h:1049 [inline]
       netlink_alloc_large_skb net/netlink/af_netlink.c:1174 [inline]
       netlink_sendmsg+0x783/0x1330 net/netlink/af_netlink.c:1892
       sock_sendmsg_nosec net/socket.c:637 [inline]
       sock_sendmsg net/socket.c:657 [inline]
       ___sys_sendmsg+0x14ff/0x1590 net/socket.c:2311
       __sys_sendmsg net/socket.c:2356 [inline]
       __do_sys_sendmsg net/socket.c:2365 [inline]
       __se_sys_sendmsg+0x305/0x460 net/socket.c:2363
       __x64_sys_sendmsg+0x4a/0x70 net/socket.c:2363
       do_syscall_64+0xb6/0x160 arch/x86/entry/common.c:291
       entry_SYSCALL_64_after_hwframe+0x44/0xa9
      
      Fixes: 6f96c3c6 ("net_sched: fix backward compatibility for TCA_KIND")
      Signed-off-by: NEric Dumazet <edumazet@google.com>
      Reported-by: Nsyzbot <syzkaller@googlegroups.com>
      Acked-by: NCong Wang <xiyou.wangcong@gmail.com>
      Cc: Marcelo Ricardo Leitner <marcelo.leitner@gmail.com>
      Cc: Jamal Hadi Salim <jhs@mojatatu.com>
      Cc: Jiri Pirko <jiri@resnulli.us>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      2dd5616e
    • H
      r8169: add missing RX enabling for WoL on RTL8125 · 00222d13
      Heiner Kallweit 提交于
      RTL8125 also requires to enable RX for WoL.
      
      v2: add missing Fixes tag
      
      Fixes: f1bce4ad ("r8169: add support for RTL8125")
      Signed-off-by: NHeiner Kallweit <hkallweit1@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      00222d13
    • S
      vhost/vsock: accept only packets with the right dst_cid · 8a3cc29c
      Stefano Garzarella 提交于
      When we receive a new packet from the guest, we check if the
      src_cid is correct, but we forgot to check the dst_cid.
      
      The host should accept only packets where dst_cid is
      equal to the host CID.
      Signed-off-by: NStefano Garzarella <sgarzare@redhat.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      8a3cc29c
    • G
      net: phy: dp83867: fix hfs boot in rgmii mode · fafc5db2
      Grygorii Strashko 提交于
      The commit ef87f7da ("net: phy: dp83867: move dt parsing to probe")
      causes regression on TI dra71x-evm and dra72x-evm, where DP83867 PHY is
      used in "rgmii-id" mode - the networking stops working.
      Unfortunately, it's not enough to just move DT parsing code to .probe() as
      it depends on phydev->interface value, which is set to correct value abter
      the .probe() is completed and before calling .config_init(). So, RGMII
      configuration can't be loaded from DT.
      
      To fix and issue
      - move RGMII validation code to .config_init()
      - parse RGMII parameters in dp83867_of_init(), but consider them as
      optional.
      
      Fixes: ef87f7da ("net: phy: dp83867: move dt parsing to probe")
      Signed-off-by: NGrygorii Strashko <grygorii.strashko@ti.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      fafc5db2
    • G
      net: ethernet: ti: cpsw: fix extra rx interrupt · 51302f77
      Grygorii Strashko 提交于
      Now RX interrupt is triggered twice every time, because in
      cpsw_rx_interrupt() it is asked first and then disabled. So there will be
      pending interrupt always, when RX interrupt is enabled again in NAPI
      handler.
      
      Fix it by first disabling IRQ and then do ask.
      
      Fixes: 870915fe ("drivers: net: cpsw: remove disable_irq/enable_irq as irq can be masked from cpsw itself")
      Signed-off-by: NGrygorii Strashko <grygorii.strashko@ti.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      51302f77