Skip to content
Permalink
Jakub-Kicinski…
Switch branches/tags

Commits on Jan 21, 2022

  1. ipv6: gro: flush instead of assuming different flows on hop_limit mis…

    …match
    
    IPv6 GRO considers packets to belong to different flows when their
    hop_limit is different. This seems counter-intuitive, the flow is
    the same. hop_limit may vary because of various bugs or hacks but
    that doesn't mean it's okay for GRO to reorder packets.
    
    Practical impact of this problem on overall TCP performance
    is unclear, but TCP itself detects this reordering and bumps
    TCPSACKReorder resulting in user complaints.
    
    Note that the code plays an easy to miss trick by upcasting next_hdr
    to a u16 pointer and compares next_hdr and hop_limit in one go.
    Coalesce the flush setting to reduce the instruction count a touch.
    
    Fixes: 787e920 ("ipv6: Add GRO support")
    Signed-off-by: Jakub Kicinski <kuba@kernel.org>
    Jakub Kicinski authored and intel-lab-lkp committed Jan 21, 2022

Commits on Jan 20, 2022

  1. Merge branch 'stmmac-fixes'

    Yuji Ishikawa says:
    
    ====================
    net: stmmac: dwmac-visconti: Fix bit definitions and clock configuration for RMII mode
    
    This series is a fix for RMII/MII operation mode of the dwmac-visconti driver.
    It is composed of two parts:
    
    * 1/2: fix constant definitions for cleared bits in ETHER_CLK_SEL register
    * 2/2: fix configuration of ETHER_CLK_SEL register for running in RMII operation mode.
    
      net: stmmac: dwmac-visconti: Fix bit definitions for ETHER_CLK_SEL
        v1 -> v2:
          - added Fixes tag to commit message
    
      net: stmmac: dwmac-visconti: Fix clock configuration for RMII mode
        v1 -> v2:
          - added Fixes tag to commit message
    ====================
    
    Signed-off-by: David S. Miller <davem@davemloft.net>
    davem330 committed Jan 20, 2022
  2. net: stmmac: dwmac-visconti: Fix clock configuration for RMII mode

    Bit pattern of the ETHER_CLOCK_SEL register for RMII/MII mode should be fixed.
    Also, some control bits should be modified with a specific sequence.
    
    Fixes: b38dd98 ("net: stmmac: Add Toshiba Visconti SoCs glue driver")
    Signed-off-by: Yuji Ishikawa <yuji2.ishikawa@toshiba.co.jp>
    Reviewed-by: Nobuhiro Iwamatsu <nobuhiro1.iwamatsu@toshiba.co.jp>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    Yuji Ishikawa authored and davem330 committed Jan 20, 2022
  3. net: stmmac: dwmac-visconti: Fix bit definitions for ETHER_CLK_SEL

    just 0 should be used to represent cleared bits
    
    * ETHER_CLK_SEL_DIV_SEL_20
    * ETHER_CLK_SEL_TX_CLK_EXT_SEL_IN
    * ETHER_CLK_SEL_RX_CLK_EXT_SEL_IN
    * ETHER_CLK_SEL_TX_CLK_O_TX_I
    * ETHER_CLK_SEL_RMII_CLK_SEL_IN
    
    Fixes: b38dd98 ("net: stmmac: Add Toshiba Visconti SoCs glue driver")
    Signed-off-by: Yuji Ishikawa <yuji2.ishikawa@toshiba.co.jp>
    Reviewed-by: Nobuhiro Iwamatsu <nobuhiro1.iwamatsu@toshiba.co.jp>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    Yuji Ishikawa authored and davem330 committed Jan 20, 2022
  4. ipv6_tunnel: Rate limit warning messages

    The warning messages can be invoked from the data path for every packet
    transmitted through an ip6gre netdev, leading to high CPU utilization.
    
    Fix that by rate limiting the messages.
    
    Fixes: 09c6bbf ("[IPV6]: Do mandatory IPv6 tunnel endpoint checks in realtime")
    Reported-by: Maksym Yaremchuk <maksymy@nvidia.com>
    Tested-by: Maksym Yaremchuk <maksymy@nvidia.com>
    Signed-off-by: Ido Schimmel <idosch@nvidia.com>
    Reviewed-by: Amit Cohen <amcohen@nvidia.com>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    idosch authored and davem330 committed Jan 20, 2022
  5. ethtool: Fix link extended state for big endian

    The link extended sub-states are assigned as enum that is an integer
    size but read from a union as u8, this is working for small values on
    little endian systems but for big endian this always give 0. Fix the
    variable in the union to match the enum size.
    
    Fixes: ecc31c6 ("ethtool: Add link extended state")
    Signed-off-by: Moshe Tal <moshet@nvidia.com>
    Reviewed-by: Ido Schimmel <idosch@nvidia.com>
    Tested-by: Ido Schimmel <idosch@nvidia.com>
    Reviewed-by: Gal Pressman <gal@nvidia.com>
    Reviewed-by: Amit Cohen <amcohen@nvidia.com>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    Moshe Tal authored and davem330 committed Jan 20, 2022
  6. net: phy: broadcom: hook up soft_reset for BCM54616S

    A problem was encountered with the Bel-Fuse 1GBT-SFP05 SFP module (which
    is a 1 Gbps copper module operating in SGMII mode with an internal
    BCM54616S PHY device) using the Xilinx AXI Ethernet MAC core, where the
    module would work properly on the initial insertion or boot of the
    device, but after the device was rebooted, the link would either only
    come up at 100 Mbps speeds or go up and down erratically.
    
    I found no meaningful changes in the PHY configuration registers between
    the working and non-working boots, but the status registers seemed to
    have a lot of error indications set on the SERDES side of the device on
    the non-working boot. I suspect the problem is that whatever happens on
    the SGMII link when the device is rebooted and the FPGA logic gets
    reloaded ends up putting the module's onboard PHY into a bad state.
    
    Since commit 6e2d85e ("net: phy: Stop with excessive soft reset")
    the genphy_soft_reset call is not made automatically by the PHY core
    unless the callback is explicitly specified in the driver structure. For
    most of these Broadcom devices, there is probably a hardware reset that
    gets asserted to reset the PHY during boot, however for SFP modules
    (where the BCM54616S is commonly found) no such reset line exists, so if
    the board keeps the SFP cage powered up across a reboot, it will end up
    with no reset occurring during reboots.
    
    Hook up the genphy_soft_reset callback for BCM54616S to ensure that a
    PHY reset is performed before the device is initialized. This appears to
    fix the issue with erratic operation after a reboot with this SFP
    module.
    
    Fixes: 6e2d85e ("net: phy: Stop with excessive soft reset")
    Signed-off-by: Robert Hancock <robert.hancock@calian.com>
    Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    robhancocksed authored and davem330 committed Jan 20, 2022
  7. net: sched: Clarify error message when qdisc kind is unknown

    When adding a tc rule with a qdisc kind that is not supported or not
    compiled into the kernel, the kernel emits the following error: "Error:
    Specified qdisc not found.". Found via tdc testing when ETS qdisc was not
    compiled in and it was not obvious right away what the message meant
    without looking at the kernel code.
    
    Change the error message to be more explicit and say the qdisc kind is
    unknown.
    
    Signed-off-by: Victor Nogueira <victor@mojatatu.com>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    vbnogueira authored and davem330 committed Jan 20, 2022
  8. net: fix information leakage in /proc/net/ptype

    In one net namespace, after creating a packet socket without binding
    it to a device, users in other net namespaces can observe the new
    `packet_type` added by this packet socket by reading `/proc/net/ptype`
    file. This is minor information leakage as packet socket is
    namespace aware.
    
    Add a net pointer in `packet_type` to keep the net namespace of
    of corresponding packet socket. In `ptype_seq_show`, this net pointer
    must be checked when it is not NULL.
    
    Fixes: 2feb27d ("[NETNS]: Minor information leak via /proc/net/ptype file.")
    Signed-off-by: Congyu Liu <liu3101@purdue.edu>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    Congyu-Liu authored and davem330 committed Jan 20, 2022
  9. Merge tag 'net-5.17-rc1' of git://git.kernel.org/pub/scm/linux/kernel…

    …/git/netdev/net
    
    Pull networking fixes from Jakub Kicinski:
     "Including fixes from netfilter, bpf.
    
      Quite a handful of old regression fixes but most of those are
      pre-5.16.
    
      Current release - regressions:
    
       - fix memory leaks in the skb free deferral scheme if upper layer
         protocols are used, i.e. in-kernel TCP readers like TLS
    
      Current release - new code bugs:
    
       - nf_tables: fix NULL check typo in _clone() functions
    
       - change the default to y for Vertexcom vendor Kconfig
    
       - a couple of fixes to incorrect uses of ref tracking
    
       - two fixes for constifying netdev->dev_addr
    
      Previous releases - regressions:
    
       - bpf:
          - various verifier fixes mainly around register offset handling
            when passed to helper functions
          - fix mount source displayed for bpffs (none -> bpffs)
    
       - bonding:
          - fix extraction of ports for connection hash calculation
          - fix bond_xmit_broadcast return value when some devices are down
    
       - phy: marvell: add Marvell specific PHY loopback
    
       - sch_api: don't skip qdisc attach on ingress, prevent ref leak
    
       - htb: restore minimal packet size handling in rate control
    
       - sfp: fix high power modules without diagnostic monitoring
    
       - mscc: ocelot:
          - don't let phylink re-enable TX PAUSE on the NPI port
          - don't dereference NULL pointers with shared tc filters
    
       - smsc95xx: correct reset handling for LAN9514
    
       - cpsw: avoid alignment faults by taking NET_IP_ALIGN into account
    
       - phy: micrel: use kszphy_suspend/_resume for irq aware devices,
         avoid races with the interrupt
    
      Previous releases - always broken:
    
       - xdp: check prog type before updating BPF link
    
       - smc: resolve various races around abnormal connection termination
    
       - sit: allow encapsulated IPv6 traffic to be delivered locally
    
       - axienet: fix init/reset handling, add missing barriers, read the
         right status words, stop queues correctly
    
       - add missing dev_put() in sock_timestamping_bind_phc()
    
      Misc:
    
       - ipv4: prevent accidentally passing RTO_ONLINK to
         ip_route_output_key_hash() by sanitizing flags
    
       - ipv4: avoid quadratic behavior in netns dismantle
    
       - stmmac: dwmac-oxnas: add support for OX810SE
    
       - fsl: xgmac_mdio: add workaround for erratum A-009885"
    
    * tag 'net-5.17-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net: (92 commits)
      ipv4: add net_hash_mix() dispersion to fib_info_laddrhash keys
      ipv4: avoid quadratic behavior in netns dismantle
      net/fsl: xgmac_mdio: Fix incorrect iounmap when removing module
      powerpc/fsl/dts: Enable WA for erratum A-009885 on fman3l MDIO buses
      dt-bindings: net: Document fsl,erratum-a009885
      net/fsl: xgmac_mdio: Add workaround for erratum A-009885
      net: mscc: ocelot: fix using match before it is set
      net: phy: micrel: use kszphy_suspend()/kszphy_resume for irq aware devices
      net: cpsw: avoid alignment faults by taking NET_IP_ALIGN into account
      nfc: llcp: fix NULL error pointer dereference on sendmsg() after failed bind()
      net: axienet: increase default TX ring size to 128
      net: axienet: fix for TX busy handling
      net: axienet: fix number of TX ring slots for available check
      net: axienet: Fix TX ring slot available check
      net: axienet: limit minimum TX ring size
      net: axienet: add missing memory barriers
      net: axienet: reset core on initialization prior to MDIO access
      net: axienet: Wait for PhyRstCmplt after core reset
      net: axienet: increase reset timeout
      bpf, selftests: Add ringbuf memory type confusion test
      ...
    torvalds committed Jan 20, 2022
  10. Merge branch 'akpm' (patches from Andrew)

    Merge more updates from Andrew Morton:
     "55 patches.
    
      Subsystems affected by this patch series: percpu, procfs, sysctl,
      misc, core-kernel, get_maintainer, lib, checkpatch, binfmt, nilfs2,
      hfs, fat, adfs, panic, delayacct, kconfig, kcov, and ubsan"
    
    * emailed patches from Andrew Morton <akpm@linux-foundation.org>: (55 commits)
      lib: remove redundant assignment to variable ret
      ubsan: remove CONFIG_UBSAN_OBJECT_SIZE
      kcov: fix generic Kconfig dependencies if ARCH_WANTS_NO_INSTR
      lib/Kconfig.debug: make TEST_KMOD depend on PAGE_SIZE_LESS_THAN_256KB
      btrfs: use generic Kconfig option for 256kB page size limit
      arch/Kconfig: split PAGE_SIZE_LESS_THAN_256KB from PAGE_SIZE_LESS_THAN_64KB
      configs: introduce debug.config for CI-like setup
      delayacct: track delays from memory compact
      Documentation/accounting/delay-accounting.rst: add thrashing page cache and direct compact
      delayacct: cleanup flags in struct task_delay_info and functions use it
      delayacct: fix incomplete disable operation when switch enable to disable
      delayacct: support swapin delay accounting for swapping without blkio
      panic: remove oops_id
      panic: use error_report_end tracepoint on warnings
      fs/adfs: remove unneeded variable make code cleaner
      FAT: use io_schedule_timeout() instead of congestion_wait()
      hfsplus: use struct_group_attr() for memcpy() region
      nilfs2: remove redundant pointer sbufs
      fs/binfmt_elf: use PT_LOAD p_align values for static PIE
      const_structs.checkpatch: add frequently used ops structs
      ...
    torvalds committed Jan 20, 2022
  11. lib: remove redundant assignment to variable ret

    The variable ret is being assigned a value that is never read.  If the
    for-loop is entered then ret is immediately re-assigned a new value.  If
    the for-loop is not executed ret is never read.  The assignment is
    redundant and can be removed.
    
    Link: https://lkml.kernel.org/r/20211230134557.83633-1-colin.i.king@gmail.com
    Signed-off-by: Colin Ian King <colin.i.king@gmail.com>
    Reviewed-by: Jarkko Sakkinen <jarkko@kernel.org>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
    ColinIanKing authored and torvalds committed Jan 20, 2022
  12. ubsan: remove CONFIG_UBSAN_OBJECT_SIZE

    The object-size sanitizer is redundant to -Warray-bounds, and
    inappropriately performs its checks at run-time when all information
    needed for the evaluation is available at compile-time, making it quite
    difficult to use:
    
      https://bugzilla.kernel.org/show_bug.cgi?id=214861
    
    With -Warray-bounds almost enabled globally, it doesn't make sense to
    keep this around.
    
    Link: https://lkml.kernel.org/r/20211203235346.110809-1-keescook@chromium.org
    Signed-off-by: Kees Cook <keescook@chromium.org>
    Reviewed-by: Marco Elver <elver@google.com>
    Cc: Masahiro Yamada <masahiroy@kernel.org>
    Cc: Michal Marek <michal.lkml@markovi.net>
    Cc: Nick Desaulniers <ndesaulniers@google.com>
    Cc: Nathan Chancellor <nathan@kernel.org>
    Cc: Andrey Ryabinin <ryabinin.a.a@gmail.com>
    Cc: "Peter Zijlstra (Intel)" <peterz@infradead.org>
    Cc: Stephen Rothwell <sfr@canb.auug.org.au>
    Cc: Arnd Bergmann <arnd@arndb.de>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
    kees authored and torvalds committed Jan 20, 2022
  13. kcov: fix generic Kconfig dependencies if ARCH_WANTS_NO_INSTR

    Until recent versions of GCC and Clang, it was not possible to disable
    KCOV instrumentation via a function attribute.  The relevant function
    attribute was introduced in 540540d ("kcov: add
    __no_sanitize_coverage to fix noinstr for all architectures").
    
    x86 was the first architecture to want a working noinstr, and at the
    time no compiler support for the attribute existed yet.  Therefore,
    commit 0f1441b ("objtool: Fix noinstr vs KCOV") introduced the
    ability to NOP __sanitizer_cov_*() calls in .noinstr.text.
    
    However, this doesn't work for other architectures like arm64 and s390
    that want a working noinstr per ARCH_WANTS_NO_INSTR.
    
    At the time of 0f1441b, we didn't yet have ARCH_WANTS_NO_INSTR,
    but now we can move the Kconfig dependency checks to the generic KCOV
    option.  KCOV will be available if:
    
    	- architecture does not care about noinstr, OR
    	- we have objtool support (like on x86), OR
    	- GCC is 12.0 or newer, OR
    	- Clang is 13.0 or newer.
    
    Link: https://lkml.kernel.org/r/20211201152604.3984495-1-elver@google.com
    Signed-off-by: Marco Elver <elver@google.com>
    Reviewed-by: Nathan Chancellor <nathan@kernel.org>
    Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org>
    Cc: Mark Rutland <mark.rutland@arm.com>
    Cc: Thomas Gleixner <tglx@linutronix.de>
    Cc: Ingo Molnar <mingo@redhat.com>
    Cc: Borislav Petkov <bp@alien8.de>
    Cc: Dave Hansen <dave.hansen@linux.intel.com>
    Cc: H. Peter Anvin <hpa@zytor.com>
    Cc: Nick Desaulniers <ndesaulniers@google.com>
    Cc: Dmitry Vyukov <dvyukov@google.com>
    Cc: Andrey Konovalov <andreyknvl@gmail.com>
    Cc: Catalin Marinas <catalin.marinas@arm.com>
    Cc: Will Deacon <will@kernel.org>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
    melver authored and torvalds committed Jan 20, 2022
  14. lib/Kconfig.debug: make TEST_KMOD depend on PAGE_SIZE_LESS_THAN_256KB

    Commit b05fbcc ("btrfs: disable build on platforms having page size
    256K") disabled btrfs for configurations that used a 256kB page size.
    However, it did not fully solve the problem because CONFIG_TEST_KMOD
    selects CONFIG_BTRFS, which does not account for the dependency.  This
    results in a Kconfig warning and the failed BUILD_BUG_ON error
    returning.
    
      WARNING: unmet direct dependencies detected for BTRFS_FS
        Depends on [n]: BLOCK [=y] && !PPC_256K_PAGES && !PAGE_SIZE_256KB [=y]
        Selected by [m]:
        - TEST_KMOD [=m] && RUNTIME_TESTING_MENU [=y] && m && MODULES [=y] && NETDEVICES [=y] && NET_CORE [=y] && INET [=y] && BLOCK [=y]
    
    To resolve this, add CONFIG_PAGE_SIZE_LESS_THAN_256KB as a dependency of
    CONFIG_TEST_KMOD so there is no more invalid configuration or build
    errors.
    
    Link: https://lkml.kernel.org/r/20211129230141.228085-4-nathan@kernel.org
    Fixes: b05fbcc ("btrfs: disable build on platforms having page size 256K")
    Signed-off-by: Nathan Chancellor <nathan@kernel.org>
    Reported-by: kernel test robot <lkp@intel.com>
    Cc: Chris Mason <clm@fb.com>
    Cc: David Sterba <dsterba@suse.com>
    Cc: Josef Bacik <josef@toxicpanda.com>
    Cc: Luis Chamberlain <mcgrof@kernel.org>
    Cc: Nick Desaulniers <ndesaulniers@google.com>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
    nathanchance authored and torvalds committed Jan 20, 2022
  15. btrfs: use generic Kconfig option for 256kB page size limit

    Use the newly introduced CONFIG_PAGE_SIZE_LESS_THAN_256KB to describe
    the dependency introduced by commit b05fbcc ("btrfs: disable build
    on platforms having page size 256K").
    
    Link: https://lkml.kernel.org/r/20211129230141.228085-3-nathan@kernel.org
    Signed-off-by: Nathan Chancellor <nathan@kernel.org>
    Acked-by: David Sterba <dsterba@suse.com>
    Cc: Chris Mason <clm@fb.com>
    Cc: Josef Bacik <josef@toxicpanda.com>
    Cc: kernel test robot <lkp@intel.com>
    Cc: Luis Chamberlain <mcgrof@kernel.org>
    Cc: Nick Desaulniers <ndesaulniers@google.com>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
    nathanchance authored and torvalds committed Jan 20, 2022
  16. arch/Kconfig: split PAGE_SIZE_LESS_THAN_256KB from PAGE_SIZE_LESS_THA…

    …N_64KB
    
    Patch series "Fix CONFIG_TEST_KMOD with 256kB page size".
    
    The kernel test robot reported a build error [1] from a failed assertion
    in fs/btrfs/inode.c with a hexagon randconfig that includes
    CONFIG_PAGE_SIZE_256KB.  This error is the same one that was addressed
    by commit b05fbcc ("btrfs: disable build on platforms having page
    size 256K") but CONFIG_TEST_KMOD selects CONFIG_BTRFS without having the
    "page size less than 256kB dependency", which results in the error
    reappearing.
    
    The first patch introduces CONFIG_PAGE_SIZE_LESS_THAN_256KB by splitting
    it off from CONFIG_PAGE_SIZE_LESS_THAN_64KB, which was introduced in
    commit 1f0e290 ("arch: Add generic Kconfig option indicating page
    size smaller than 64k") for a similar reason in 5.16-rc3.
    
    The second patch uses that configuration option for CONFIG_BTRFS to
    reduce duplication.
    
    The third patch resolves the build error by adding
    CONFIG_PAGE_SIZE_LESS_THAN_256KB as a dependency to CONFIG_TEST_KMOD so
    that CONFIG_BTRFS does not get enabled under that invalid configuration.
    
    [1]: https://lore.kernel.org/r/202111270255.UYOoN5VN-lkp@intel.com/
    
    This patch (of 3):
    
    btrfs requires a page size smaller than 256kB.  To use that dependency
    in other places, introduce CONFIG_PAGE_SIZE_LESS_THAN_256KB and reuse
    that dependency in CONFIG_PAGE_SIZE_LESS_THAN_64KB.
    
    Link: https://lkml.kernel.org/r/20211129230141.228085-1-nathan@kernel.org
    Link: https://lkml.kernel.org/r/20211129230141.228085-2-nathan@kernel.org
    Signed-off-by: Nathan Chancellor <nathan@kernel.org>
    Cc: Chris Mason <clm@fb.com>
    Cc: Josef Bacik <josef@toxicpanda.com>
    Cc: David Sterba <dsterba@suse.com>
    Cc: Luis Chamberlain <mcgrof@kernel.org>
    Cc: Nick Desaulniers <ndesaulniers@google.com>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
    nathanchance authored and torvalds committed Jan 20, 2022
  17. configs: introduce debug.config for CI-like setup

    Some general debugging features like kmemleak, KASAN, lockdep, UBSAN etc
    help fix many viruses like a microscope.  On the other hand, those
    features are scatter around and mixed up with more situational debugging
    options making them difficult to consume properly.  This cold help
    amplify the general debugging/testing efforts and help establish
    sensitive default values for those options across the broad.  This could
    also help different distros to collaborate on maintaining debug-flavored
    kernels.
    
    The config is based on years' experiences running daily CI inside the
    largest enterprise Linux distro company to seek regressions on
    linux-next builds on different bare-metal and virtual platforms.  It can
    be used for example,
    
      $ make ARCH=arm64 defconfig debug.config
    
    Since KASAN and KCSAN can't be enabled together, we will need to create
    a separate one for KCSAN later as well.
    
    Link: https://lkml.kernel.org/r/20211115134754.7334-1-quic_qiancai@quicinc.com
    Signed-off-by: Qian Cai <quic_qiancai@quicinc.com>
    Acked-by: Paul E. McKenney <paulmck@kernel.org>
    Cc: Marco Elver <elver@google.com>
    Cc: Dmitry Vyukov <dvyukov@google.com>
    Cc: Daniel Thompson <daniel.thompson@linaro.org>
    Cc: Masahiro Yamada <masahiroy@kernel.org>
    Cc: Naresh Kamboju <naresh.kamboju@linaro.org>
    Cc: "Stephen Rothwell" <sfr@canb.auug.org.au>
    Cc: Randy Dunlap <rdunlap@infradead.org>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
    qcsde authored and torvalds committed Jan 20, 2022
  18. delayacct: track delays from memory compact

    Delay accounting does not track the delay of memory compact.  When there
    is not enough free memory, tasks can spend a amount of their time
    waiting for compact.
    
    To get the impact of tasks in direct memory compact, measure the delay
    when allocating memory through memory compact.
    
    Also update tools/accounting/getdelays.c:
    
        / # ./getdelays_next  -di -p 304
        print delayacct stats ON
        printing IO accounting
        PID     304
    
        CPU             count     real total  virtual total    delay total  delay average
                          277      780000000      849039485       18877296          0.068ms
        IO              count    delay total  delay average
                            0              0              0ms
        SWAP            count    delay total  delay average
                            0              0              0ms
        RECLAIM         count    delay total  delay average
                            5    11088812685           2217ms
        THRASHING       count    delay total  delay average
                            0              0              0ms
        COMPACT         count    delay total  delay average
                            3          72758              0ms
        watch: read=0, write=0, cancelled_write=0
    
    Link: https://lkml.kernel.org/r/1638619795-71451-1-git-send-email-wang.yong12@zte.com.cn
    Signed-off-by: wangyong <wang.yong12@zte.com.cn>
    Reviewed-by: Jiang Xuexin <jiang.xuexin@zte.com.cn>
    Reviewed-by: Zhang Wenya <zhang.wenya1@zte.com.cn>
    Reviewed-by: Yang Yang <yang.yang29@zte.com.cn>
    Reviewed-by: Balbir Singh <bsingharora@gmail.com>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
    wangyong authored and torvalds committed Jan 20, 2022
  19. Documentation/accounting/delay-accounting.rst: add thrashing page cac…

    …he and direct compact
    
    Add thrashing page cache and direct compact related descriptions and
    update the usage of getdelays userspace utility.
    
    The following patches modifications have been updated:
    https://lore.kernel.org/all/20190312102002.31737-4-jinpuwang@gmail.com/
    https://lore.kernel.org/all/1638619795-71451-1-git-send-email-
    wang.yong12@zte.com.cn/
    
    Link: https://lkml.kernel.org/r/1639583021-92977-1-git-send-email-wang.yong12@zte.com.cn
    Signed-off-by: wangyong <wang.yong12@zte.com.cn>
    Reviewed-by: Yang Yang <yang.yang29@zte.com.cn>
    Reported-by: Zeal Robot <zealci@zte.com.cn>
    Cc: Balbir Singh <bsingharora@gmail.com>
    Cc: Peter Zijlstra <peterz@infradead.org>
    Cc: Ingo Molnar <mingo@kernel.org>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
    wangyong authored and torvalds committed Jan 20, 2022
  20. delayacct: cleanup flags in struct task_delay_info and functions use it

    Flags in struct task_delay_info is used to distinguish the difference
    between swapin and blkio delay acountings.  But after patch "delayacct:
    support swapin delay accounting for swapping without blkio", there is no
    need to do that since swapin and blkio delay accounting use their own
    functions.
    
    Link: https://lkml.kernel.org/r/20211124065958.36703-1-yang.yang29@zte.com.cn
    Signed-off-by: Yang Yang <yang.yang29@zte.com.cn>
    Cc: Balbir Singh <bsingharora@gmail.com>
    Cc: Ingo Molnar <mingo@kernel.org>
    Cc: Johannes Weiner <hannes@cmpxchg.org>
    Cc: Peter Zijlstra <peterz@infradead.org>
    Cc: Zeal Robot <zealci@zte.com.cn>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
    yangyang20220519 authored and torvalds committed Jan 20, 2022
  21. delayacct: fix incomplete disable operation when switch enable to dis…

    …able
    
    When a task is created after delayacct is enabled, kernel will do all
    the delay accountings for that task.  The problems is if user disables
    delayacct by set /proc/sys/kernel/task_delayacct to zero, only blkio
    delay accounting is disabled.
    
    Now disable all the kinds of delay accountings when
    /proc/sys/kernel/task_delayacct sets to zero.
    
    Link: https://lkml.kernel.org/r/20211123140342.32962-1-ran.xiaokai@zte.com.cn
    Signed-off-by: Yang Yang <yang.yang29@zte.com.cn>
    Reported-by: Zeal Robot <zealci@zte.com.cn>
    Cc: Balbir Singh <bsingharora@gmail.com>
    Cc: Peter Zijlstra <peterz@infradead.org>
    Cc: Ingo Molnar <mingo@kernel.org>
    Cc: Johannes Weiner <hannes@cmpxchg.org>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
    yangyang20220519 authored and torvalds committed Jan 20, 2022
  22. delayacct: support swapin delay accounting for swapping without blkio

    Currently delayacct accounts swapin delay only for swapping that cause
    blkio.  If we use zram for swapping, tools/accounting/getdelays can't
    get any SWAP delay.
    
    It's useful to get zram swapin delay information, for example to adjust
    compress algorithm or /proc/sys/vm/swappiness.
    
    Reference to PSI, it accounts any kind of swapping by doing its work in
    swap_readpage(), no matter whether swapping causes blkio.  Let delayacct
    do the similar work.
    
    Link: https://lkml.kernel.org/r/20211112083813.8559-1-yang.yang29@zte.com.cn
    Signed-off-by: Yang Yang <yang.yang29@zte.com.cn>
    Reported-by: Zeal Robot <zealci@zte.com.cn>
    Cc: Balbir Singh <bsingharora@gmail.com>
    Cc: Peter Zijlstra <peterz@infradead.org>
    Cc: Ingo Molnar <mingo@kernel.org>
    Cc: Johannes Weiner <hannes@cmpxchg.org>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
    yangyang20220519 authored and torvalds committed Jan 20, 2022
  23. panic: remove oops_id

    The oops id has been added as part of the end of trace marker for the
    kerneloops.org project.  The id is used to automatically identify
    duplicate submissions of the same report.  Identical looking reports
    with different a id can be considered as the same oops occurred again.
    
    The early initialisation of the oops_id can create a warning if the
    random core is not yet fully initialized.  On PREEMPT_RT it is
    problematic if the id is initialized on demand from non preemptible
    context.
    
    The kernel oops project is not available since 2017.  Remove the oops_id
    and use 0 in the output in case parser rely on it.
    
    Link: https://bugs.debian.org/953172
    Link: https://lkml.kernel.org/r/Ybdi16aP2NEugWHq@linutronix.de
    Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
    Cc: Arjan van de Ven <arjan@linux.intel.com>
    Cc: Thomas Gleixner <tglx@linutronix.de>
    Cc: Ingo Molnar <mingo@kernel.org>
    Cc: Peter Zijlstra <peterz@infradead.org>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
    Sebastian Andrzej Siewior authored and torvalds committed Jan 20, 2022
  24. panic: use error_report_end tracepoint on warnings

    Introduce the error detector "warning" to the error_report event and use
    the error_report_end tracepoint at the end of a warning report.
    
    This allows in-kernel tests but also userspace to more easily determine
    if a warning occurred without polling kernel logs.
    
    [akpm@linux-foundation.org: add comma to enum list, per Andy]
    
    Link: https://lkml.kernel.org/r/20211115085630.1756817-1-elver@google.com
    Signed-off-by: Marco Elver <elver@google.com>
    Cc: Steven Rostedt <rostedt@goodmis.org>
    Cc: Ingo Molnar <mingo@redhat.com>
    Cc: Alexander Potapenko <glider@google.com>
    Cc: Petr Mladek <pmladek@suse.com>
    Cc: Luis Chamberlain <mcgrof@kernel.org>
    Cc: Wei Liu <wei.liu@kernel.org>
    Cc: Mike Rapoport <rppt@kernel.org>
    Cc: Arnd Bergmann <arnd@arndb.de>
    Cc: John Ogness <john.ogness@linutronix.de>
    Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
    Cc: Alexander Popov <alex.popov@linux.com>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
    melver authored and torvalds committed Jan 20, 2022
  25. fs/adfs: remove unneeded variable make code cleaner

    Return value directly instead of taking this in a variable.
    
    Link: https://lkml.kernel.org/r/20211210023211.424609-1-chi.minghao@zte.com.cn
    Signed-off-by: Minghao Chi <chi.minghao@zte.com.cn>
    Reported-by: Zeal Robot <zealci@zte.com.cm>
    Cc: Christian Brauner <christian.brauner@ubuntu.com>
    Cc: Jan Kara <jack@suse.cz>
    Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
    Minghao Chi authored and torvalds committed Jan 20, 2022
  26. FAT: use io_schedule_timeout() instead of congestion_wait()

    congestion_wait() in this context is just a sleep - block devices do not
    support congestion signalling any more.
    
    The goal for this wait, which was introduced in commit ae78bf9
    ("[PATCH] add -o flush for fat") is to wait for any recently written
    data to get to storage.  We currently have no direct mechanism to do
    this, so a simple wait that behaves identically to the current
    congestion_wait() is the best we can do.
    
    This is a step towards removing congestion_wait()
    
    Link: https://lkml.kernel.org/r/163936544519.22433.13400436295732112065@noble.neil.brown.name
    Signed-off-by: NeilBrown <neilb@suse.de>
    Acked-by: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
    neilbrown authored and torvalds committed Jan 20, 2022
  27. hfsplus: use struct_group_attr() for memcpy() region

    In preparation for FORTIFY_SOURCE performing compile-time and run-time
    field bounds checking for memset(), avoid intentionally writing across
    neighboring fields.
    
    Add struct_group() to mark the "info" region (containing struct DInfo
    and struct DXInfo structs) in struct hfsplus_cat_folder and struct
    hfsplus_cat_file that are written into directly, so the compiler can
    correctly reason about the expected size of the writes.
    
    "pahole" shows no size nor member offset changes to struct
    hfsplus_cat_folder nor struct hfsplus_cat_file.  "objdump -d" shows no
    object code changes.
    
    Link: https://lkml.kernel.org/r/20211119192851.1046717-1-keescook@chromium.org
    Signed-off-by: Kees Cook <keescook@chromium.org>
    Acked-by: Christian Brauner <christian.brauner@ubuntu.com>
    Cc: Zhen Lei <thunder.leizhen@huawei.com>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
    kees authored and torvalds committed Jan 20, 2022
  28. nilfs2: remove redundant pointer sbufs

    Pointer sbufs is being assigned a value but it's not being used later
    on.  The pointer is redundant and can be removed.  Cleans up scan-build
    static analysis warning:
    
      fs/nilfs2/page.c:203:8: warning: Although the value stored to 'sbufs'
        is used in the enclosing expression, the value is never actually read
        from 'sbufs' [deadcode.DeadStores]
            sbh = sbufs = page_buffers(src);
    
    Link: https://lkml.kernel.org/r/20211211180955.550380-1-colin.i.king@gmail.com
    Link: https://lkml.kernel.org/r/1640712476-15136-1-git-send-email-konishi.ryusuke@gmail.com
    Signed-off-by: Colin Ian King <colin.i.king@gmail.com>
    Signed-off-by: Ryusuke Konishi <konishi.ryusuke@gmail.com>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
    ColinIanKing authored and torvalds committed Jan 20, 2022
  29. fs/binfmt_elf: use PT_LOAD p_align values for static PIE

    Extend commit ce81bb2 ("fs/binfmt_elf: use PT_LOAD p_align values
    for suitable start address") which fixed PIE binaries built with
    -Wl,-z,max-page-size=0x200000, to cover static PIE binaries.  This
    fixes:
    
        https://bugzilla.kernel.org/show_bug.cgi?id=215275
    
    Tested by verifying static PIE binaries with -Wl,-z,max-page-size=0x200000 loading.
    
    Link: https://lkml.kernel.org/r/20211209174052.370537-1-hjl.tools@gmail.com
    Signed-off-by: H.J. Lu <hjl.tools@gmail.com>
    Cc: Chris Kennelly <ckennelly@google.com>
    Cc: Al Viro <viro@zeniv.linux.org.uk>
    Cc: Alexey Dobriyan <adobriyan@gmail.com>
    Cc: Song Liu <songliubraving@fb.com>
    Cc: David Rientjes <rientjes@google.com>
    Cc: Ian Rogers <irogers@google.com>
    Cc: Hugh Dickins <hughd@google.com>
    Cc: Suren Baghdasaryan <surenb@google.com>
    Cc: Sandeep Patil <sspatil@google.com>
    Cc: Fangrui Song <maskray@google.com>
    Cc: Nick Desaulniers <ndesaulniers@google.com>
    Cc: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
    Cc: Mike Kravetz <mike.kravetz@oracle.com>
    Cc: Shuah Khan <shuah@kernel.org>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
    hjl-tools authored and torvalds committed Jan 20, 2022
  30. const_structs.checkpatch: add frequently used ops structs

    Add commonly used structs (>50 instances) which are always or almost
    always const.
    
    Link: https://lkml.kernel.org/r/20211127101134.33101-1-rikard.falkeborn@gmail.com
    Signed-off-by: Rikard Falkeborn <rikard.falkeborn@gmail.com>
    Cc: Joe Perches <joe@perches.com>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
    rikardfalkeborn authored and torvalds committed Jan 20, 2022
  31. checkpatch: improve Kconfig help test

    The Kconfig help test erroneously counts patch context lines as part of
    the help text.
    
    Fix that and improve the message block output.
    
    Link: https://lkml.kernel.org/r/06c0cdc157ae1502e8e9eb3624b9ea995cf11e7a.camel@perches.com
    Signed-off-by: Joe Perches <joe@perches.com>
    Tested-by: Randy Dunlap <rdunlap@infradead.org>
    Acked-by: Randy Dunlap <rdunlap@infradead.org>
    Cc: Andy Whitcroft <apw@canonical.com>
    Cc: Dwaipayan Ray <dwaipayanray1@gmail.com>
    Cc: Lukas Bulwahn <lukas.bulwahn@gmail.com>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
    JoePerches authored and torvalds committed Jan 20, 2022
  32. checkpatch: relax regexp for COMMIT_LOG_LONG_LINE

    One exceptions to the COMMIT_LOG_LONG_LINE rule is a file path followed
    by ':'.  That is typically some sort diagnostic message from a compiler
    or a build tool, in which case we don't want to wrap the lines but keep
    the message unmodified.
    
    The regular expression used to match this pattern currently doesn't
    accept absolute paths or + characters.  This can result in false
    positives as in the following (out-of-tree) example:
    
      ...
      /home/jerome/work/optee_repo_qemu/build/../toolchains/aarch32/bin/arm-linux-gnueabihf-ld.bfd: /home/jerome/work/toolchains-gcc10.2/aarch32/bin/../lib/gcc/arm-none-linux-gnueabihf/10.2.1/../../../../arm-none-linux-gnueabihf/lib/libstdc++.a(eh_alloc.o): in function `__cxa_allocate_exception':
      /tmp/dgboter/bbs/build03--cen7x86_64/buildbot/cen7x86_64--arm-none-linux-gnueabihf/build/src/gcc/libstdc++-v3/libsupc++/eh_alloc.cc:284: undefined reference to `malloc'
      ...
    
    Update the regular expression to match the above paths.
    
    Link: https://lkml.kernel.org/r/20210923143842.2837983-1-jerome@forissier.org
    Signed-off-by: Jerome Forissier <jerome@forissier.org>
    Acked-by: Joe Perches <joe@perches.com>
    Cc: Andy Whitcroft <apw@canonical.com>
    Cc: Dwaipayan Ray <dwaipayanray1@gmail.com>
    Cc: Lukas Bulwahn <lukas.bulwahn@gmail.com>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
    jforissier authored and torvalds committed Jan 20, 2022
  33. lib/test_meminit: destroy cache in kmem_cache_alloc_bulk() test

    Make do_kmem_cache_size_bulk() destroy the cache it creates.
    
    Link: https://lkml.kernel.org/r/aced20a94bf04159a139f0846e41d38a1537debb.1640018297.git.andreyknvl@google.com
    Fixes: 03a9349 ("lib/test_meminit: add a kmem_cache_alloc_bulk() test")
    Signed-off-by: Andrey Konovalov <andreyknvl@google.com>
    Reviewed-by: Marco Elver <elver@google.com>
    Cc: Alexander Potapenko <glider@google.com>
    Cc: Dmitry Vyukov <dvyukov@google.com>
    Cc: Andrey Ryabinin <ryabinin.a.a@gmail.com>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
    xairy authored and torvalds committed Jan 20, 2022
  34. uuid: remove licence boilerplate text from the header

    Remove licence boilerplate text from the UAPI header.
    
    Link: https://lkml.kernel.org/r/20211216113552.81199-2-andriy.shevchenko@linux.intel.com
    Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
    Acked-by: Christoph Hellwig <hch@lst.de>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
    andy-shev authored and torvalds committed Jan 20, 2022
Older