Skip to content
  1. Mar 29, 2022
  2. Mar 28, 2022
    • David S. Miller's avatar
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/netfilter/nf · 2aa2f88c
      David S. Miller authored
      
      
      Pablo Neira Ayuso says:
      
      ====================
      Netfilter fixes for net
      
      The following patchset contains Netfilter fixes for net:
      
      1) Incorrect output device in nf_egress hook, from Phill Sutter.
      
      2) Preserve liberal flag in TCP conntrack state, reported by Sven Auhagen.
      
      3) Use GFP_KERNEL_ACCOUNT flag for nf_tables objects, from Vasily Averin.
      ====================
      
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      2aa2f88c
    • Petr Mladek's avatar
      e7dbd4d5
    • Vasily Averin's avatar
      memcg: enable accounting for nft objects · 33758c89
      Vasily Averin authored
      
      
      nftables replaces iptables, but it lacks memcg accounting.
      
      This patch account most of the memory allocation associated with nft
      and should protect the host from misusing nft inside a memcg restricted
      container.
      
      Signed-off-by: default avatarVasily Averin <vvs@openvz.org>
      Signed-off-by: default avatarPablo Neira Ayuso <pablo@netfilter.org>
      33758c89
    • Muchun Song's avatar
      mm: kfence: fix missing objcg housekeeping for SLAB · ae085d7f
      Muchun Song authored
      The objcg is not cleared and put for kfence object when it is freed,
      which could lead to memory leak for struct obj_cgroup and wrong
      statistics of NR_SLAB_RECLAIMABLE_B or NR_SLAB_UNRECLAIMABLE_B.
      
      Since the last freed object's objcg is not cleared,
      mem_cgroup_from_obj() could return the wrong memcg when this kfence
      object, which is not charged to any objcgs, is reallocated to other
      users.
      
      A real word issue [1] is caused by this bug.
      
      Link: https://lore.kernel.org/all/000000000000cabcb505dae9e577@google.com/
      
       [1]
      Reported-by: default avatar <syzbot+f8c45ccc7d5d45fc5965@syzkaller.appspotmail.com>
      Fixes: d3fb45f3
      
       ("mm, kfence: insert KFENCE hooks for SLAB")
      Signed-off-by: default avatarMuchun Song <songmuchun@bytedance.com>
      Cc: Dmitry Vyukov <dvyukov@google.com>
      Cc: Marco Elver <elver@google.com>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      ae085d7f
    • Stephen Rothwell's avatar
      f82da161
    • Linus Torvalds's avatar
      Merge tag 'landlock-5.18-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/mic/linux · 29cbaa3e
      Linus Torvalds authored
      Pull landlock updates from Mickaël Salaün:
       "These two commits contain a minor fix for the sandboxer sample, and a
        Landlock ruleset FD name standardization"
      
      * tag 'landlock-5.18-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/mic/linux:
        landlock: Use square brackets around "landlock-ruleset"
        samples/landlock: Fix path_list memory leak
      29cbaa3e
    • Linus Torvalds's avatar
      Merge tag 'mailbox-v5.18' of git://git.linaro.org/landing-teams/working/fujitsu/integration · 50d602d8
      Linus Torvalds authored
      Pull mailbox updates from Jassi Brar:
       "qcom:
         - add support for MSM8976
      
        mtk:
         - enable mt8186
         - add ADSP controller driver
      
        ti:
         - use poll mode during suspend
      
        tegra:
         - fix tx channel flush
      
        imx:
         - add i.MX8 SECO MU support
         - prepare for, and add iMX93 support"
      
      * tag 'mailbox-v5.18' of git://git.linaro.org/landing-teams/working/fujitsu/integration:
        dt-bindings: mailbox: add definition for mt8186
        mailbox: ti-msgmgr: Operate mailbox in polled mode during system suspend
        mailbox: ti-msgmgr: Refactor message read during interrupt handler
        mailbox: imx: support i.MX93 S401 MU
        mailbox: imx: support dual interrupts
        mailbox: imx: extend irq to an array
        dt-bindings: mailbox: imx-mu: add i.MX93 S4 MU support
        dt-bindings: mailbox: imx-mu: add i.MX93 MU
        mailbox: imx: add i.MX8 SECO MU support
        mailbox: imx: introduce rxdb callback
        dt-bindings: mailbox: imx-mu: add i.MX8 SECO MU support
        mailbox: imx: enlarge timeout while reading/writing messages to SCFW
        mailbox: imx: fix crash in resume on i.mx8ulp
        mailbox: imx: fix wakeup failure from freeze mode
        mailbox: mediatek: add support for adsp mailbox controller
        dt-bindings: mailbox: mtk,adsp-mbox: add mtk adsp-mbox document
        mailbox: qcom-apcs-ipc: Add compatible for MSM8976 SoC
        dt-bindings: mailbox: Add compatible for the MSM8976
        mailbox: tegra-hsp: Flush whole channel
      50d602d8
    • Linus Torvalds's avatar
      Merge tag 'leds-5.18-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/pavel/linux-leds · dfb0a0b7
      Linus Torvalds authored
      Pull LED updates from Pavel Machek:
       "Nothing major here, there are two drivers that need review and did not
        make it into this round"
      
      * tag 'leds-5.18-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/pavel/linux-leds:
        leds: pca955x: Allow zero LEDs to be specified
        leds: pca955x: Make the gpiochip always expose all pins
        leds: simatic-ipc-leds: Don't directly deref ioremap_resource() returned ptr
        leds: simatic-ipc-leds: Make simatic_ipc_led_mem_res static
        leds: lm3692x: Return 0 from remove callback
        leds: sgm3140: Add ocs,ocp8110 compatible
        dt-bindings: vendor-prefixes: Add ocs prefix
        dt-bindings: leds: common: fix unit address in max77693 example
      dfb0a0b7
    • Linus Torvalds's avatar
      Merge tag 'perf-tools-for-v5.18-2022-03-26' of... · 7b58b82b
      Linus Torvalds authored
      Merge tag 'perf-tools-for-v5.18-2022-03-26' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux
      
      Pull perf tools updates from Arnaldo Carvalho de Melo:
       "New features:
      
        perf ftrace:
      
         - Add -n/--use-nsec option to the 'latency' subcommand.
      
           Default: usecs:
      
           $ sudo perf ftrace latency -T dput -a sleep 1
           #   DURATION     |      COUNT | GRAPH                          |
                0 - 1    us |    2098375 | #############################  |
                1 - 2    us |         61 |                                |
                2 - 4    us |         33 |                                |
                4 - 8    us |         13 |                                |
                8 - 16   us |        124 |                                |
               16 - 32   us |        123 |                                |
               32 - 64   us |          1 |                                |
               64 - 128  us |          0 |                                |
              128 - 256  us |          1 |                                |
              256 - 512  us |          0 |                                |
      
           Better granularity with nsec:
      
           $ sudo perf ftrace latency -T dput -a -n sleep 1
           #   DURATION     |      COUNT | GRAPH                          |
                0 - 1    us |          0 |                                |
                1 - 2    ns |          0 |                                |
                2 - 4    ns |          0 |                                |
                4 - 8    ns |          0 |                                |
                8 - 16   ns |          0 |                                |
               16 - 32   ns |          0 |                                |
               32 - 64   ns |          0 |                                |
               64 - 128  ns |    1163434 | ##############                 |
              128 - 256  ns |     914102 | #############                  |
              256 - 512  ns |        884 |                                |
              512 - 1024 ns |        613 |                                |
                1 - 2    us |         31 |                                |
                2 - 4    us |         17 |                                |
                4 - 8    us |          7 |                                |
                8 - 16   us |        123 |                                |
               16 - 32   us |         83 |                                |
      
        perf lock:
      
         - Add -c/--combine-locks option to merge lock instances in the same
           class into a single entry.
      
           # perf lock report -c
                          Name acquired contended avg wait(ns) total wait(ns) max wait(ns) min wait(ns)
      
                 rcu_read_lock   251225         0            0              0            0            0
            hrtimer_bases.lock    39450         0            0              0            0            0
           &sb->s_type->i_l...    10301         1          662            662          662          662
              ptlock_ptr(page)    10173         2          701           1402          760          642
           &(ei->i_block_re...     8732         0            0              0            0            0
                  &xa->xa_lock     8088         0            0              0            0            0
                   &base->lock     6705         0            0              0            0            0
                   &p->pi_lock     5549         0            0              0            0            0
           &dentry->d_lockr...     5010         4         1274           5097         1844          789
                     &ep->lock     3958         0            0              0            0            0
      
            - Add -F/--field option to customize the list of fields to output:
      
           $ perf lock report -F contended,wait_max -k avg_wait
                           Name contended max wait(ns) avg wait(ns)
      
                 slock-AF_INET6         1        23543        23543
              &lruvec->lru_lock         5        18317        11254
                 slock-AF_INET6         1        10379        10379
                     rcu_node_1         1         2104         2104
            &dentry->d_lockr...         1         1844         1844
            &dentry->d_lockr...         1         1672         1672
               &newf->file_lock        15         2279         1025
            &dentry->d_lockr...         1          792          792
      
         - Add --synth=no option for record, as there is no need to symbolize,
           lock names comes from the tracepoints.
      
        perf record:
      
         - Threaded recording, opt-in, via the new --threads command line
           option.
      
         - Improve AMD IBS (Instruction-Based Sampling) error handling
           messages.
      
        perf script:
      
         - Add 'brstackinsnlen' field (use it with -F) for branch stacks.
      
         - Output branch sample type in 'perf script'.
      
        perf report:
      
         - Add "addr_from" and "addr_to" sort dimensions.
      
         - Print branch stack entry type in 'perf report --dump-raw-trace'
      
         - Fix symbolization for chrooted workloads.
      
        Hardware tracing:
      
        Intel PT:
      
         - Add CFE (Control Flow Event) and EVD (Event Data) packets support.
      
         - Add MODE.Exec IFLAG bit support.
      
           Explanation about these features from the "Intel® 64 and IA-32
           architectures software developer’s manual combined volumes: 1, 2A,
           2B, 2C, 2D, 3A, 3B, 3C, 3D, and 4" PDF at:
      
              https://cdrdv2.intel.com/v1/dl/getContent/671200
      
           At page 3951:
            "32.2.4
      
             Event Trace is a capability that exposes details about the
             asynchronous events, when they are generated, and when their
             corresponding software event handler completes execution. These
             include:
      
              o Interrupts, including NMI and SMI, including the interrupt
                vector when defined.
      
              o Faults, exceptions including the fault vector.
      
                 - Page faults additionally include the page fault address,
                   when in context.
      
              o Event handler returns, including IRET and RSM.
      
              o VM exits and VM entries.¹
      
                 - VM exits include the values written to the “exit reason”
                   and “exit qualification” VMCS fields. INIT and SIPI events.
      
              o TSX aborts, including the abort status returned for the RTM
                instructions.
      
              o Shutdown.
      
             Additionally, it provides indication of the status of the
             Interrupt Flag (IF), to indicate when interrupts are masked"
      
        ARM CoreSight:
      
         - Use advertised caps/min_interval as default sample_period on ARM
           spe.
      
         - Update deduction of TRCCONFIGR register for branch broadcast on
           ARM's CoreSight ETM.
      
        Vendor Events (JSON):
      
        Intel:
      
         - Update events and metrics for: Alderlake, Broadwell, Broadwell DE,
           BroadwellX, CascadelakeX, Elkhartlake, Bonnell, Goldmont,
           GoldmontPlus, Westmere EP-DP, Haswell, HaswellX, Icelake, IcelakeX,
           Ivybridge, Ivytown, Jaketown, Knights Landing, Nehalem EP,
           Sandybridge, Silvermont, Skylake, Skylake Server, SkylakeX,
           Tigerlake, TremontX, Westmere EP-SP, and Westmere EX.
      
        ARM:
      
         - Add support for HiSilicon CPA PMU aliasing.
      
        perf stat:
      
         - Fix forked applications enablement of counters.
      
         - The 'slots' should only be printed on a different order than the
           one specified on the command line when 'topdown' events are
           present, fix it.
      
        Miscellaneous:
      
         - Sync msr-index, cpufeatures header files with the kernel sources.
      
         - Stop using some deprecated libbpf APIs in 'perf trace'.
      
         - Fix some spelling mistakes.
      
         - Refactor the maps pointers usage to pave the way for using refcount
           debugging.
      
         - Only offer the --tui option on perf top, report and annotate when
           perf was built with libslang.
      
         - Don't mention --to-ctf in 'perf data --help' when not linking with
           the required library, libbabeltrace.
      
         - Use ARRAY_SIZE() instead of ad hoc equivalent, spotted by
           array_size.cocci.
      
         - Enhance the matching of sub-commands abbreviations:
      	'perf c2c rec' -> 'perf c2c record'
      	'perf c2c recport -> error
      
         - Set build-id using build-id header on new mmap records.
      
         - Fix generation of 'perf --version' string.
      
        perf test:
      
         - Add test for the arm_spe event.
      
         - Add test to check unwinding using fame-pointer (fp) mode on arm64.
      
         - Make metric testing more robust in 'perf test'.
      
         - Add error message for unsupported branch stack cases.
      
        libperf:
      
         - Add API for allocating new thread map array.
      
         - Fix typo in perf_evlist__open() failure error messages in libperf
           tests.
      
        perf c2c:
      
         - Replace bitmap_weight() with bitmap_empty() where appropriate"
      
      * tag 'perf-tools-for-v5.18-2022-03-26' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux: (143 commits)
        perf evsel: Improve AMD IBS (Instruction-Based Sampling) error handling messages
        perf python: Add perf_env stubs that will be needed in evsel__open_strerror()
        perf tools: Enhance the matching of sub-commands abbreviations
        libperf tests: Fix typo in perf_evlist__open() failure error messages
        tools arm64: Import cputype.h
        perf lock: Add -F/--field option to control output
        perf lock: Extend struct lock_key to have print function
        perf lock: Add --synth=no option for record
        tools headers cpufeatures: Sync with the kernel sources
        tools headers cpufeatures: Sync with the kernel sources
        perf stat: Fix forked applications enablement of counters
        tools arch x86: Sync the msr-index.h copy with the kernel sources
        perf evsel: Make evsel__env() always return a valid env
        perf build-id: Fix spelling mistake "Cant" -> "Can't"
        perf header: Fix spelling mistake "could't" -> "couldn't"
        perf script: Add 'brstackinsnlen' for branch stacks
        perf parse-events: Move slots only with topdown
        perf ftrace latency: Update documentation
        perf ftrace latency: Add -n/--use-nsec option
        perf tools: Fix version kernel tag
        ...
      7b58b82b
    • Linus Torvalds's avatar
      Merge tag 'memblock-v5.18-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rppt/memblock · 02f9a04d
      Linus Torvalds authored
      Pull memblock updates from Mike Rapoport:
       "Test suite and a small cleanup:
      
         - A small cleanup of unused variable in __next_mem_pfn_range_in_zone
      
         - Initial test suite to simulate memblock behaviour in userspace"
      
      * tag 'memblock-v5.18-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rppt/memblock: (27 commits)
        memblock tests: Add TODO and README files
        memblock tests: Add memblock_alloc_try_nid tests for bottom up
        memblock tests: Add memblock_alloc_try_nid tests for top down
        memblock tests: Add memblock_alloc_from tests for bottom up
        memblock tests: Add memblock_alloc_from tests for top down
        memblock tests: Add memblock_alloc tests for bottom up
        memblock tests: Add memblock_alloc tests for top down
        memblock tests: Add simulation of physical memory
        memblock tests: Split up reset_memblock function
        memblock tests: Fix testing with 32-bit physical addresses
        memblock: __next_mem_pfn_range_in_zone: remove unneeded local variable nid
        memblock tests: Add memblock_free tests
        memblock tests: Add memblock_add_node test
        memblock tests: Add memblock_remove tests
        memblock tests: Add memblock_reserve tests
        memblock tests: Add memblock_add tests
        memblock tests: Add memblock reset function
        memblock tests: Add skeleton of the memblock simulator
        tools/include: Add debugfs.h stub
        tools/include: Add pfn.h stub
        ...
      02f9a04d
    • Linus Torvalds's avatar
      Merge tag 'for-linus' of https://github.com/openrisc/linux · 88b3be5c
      Linus Torvalds authored
      Pull OpenRISC updates from Stafford Horne:
       "Not much for OpenRISC this merge window, I do have some things on the
        back burner like sparse warning cleanups and new defconfigs. But I
        didn't get time to polish the patches off for this round. There are
        OpenRISC updates coming in via other queues like removal of set_fs()
        and possibly new generic ticket locks.
      
        This just has a small fixup to remove duplicate initializer in memcpy
        from Kuniyuki Iwashima"
      
      * tag 'for-linus' of https://github.com/openrisc/linux:
        openrisc/boot: Remove unnecessary initialisation in memcpy().
      88b3be5c
    • Linus Torvalds's avatar
      Merge tag 'x86_core_for_5.18_rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 70010521
      Linus Torvalds authored
      Pull x86 CET-IBT (Control-Flow-Integrity) support from Peter Zijlstra:
       "Add support for Intel CET-IBT, available since Tigerlake (11th gen),
        which is a coarse grained, hardware based, forward edge
        Control-Flow-Integrity mechanism where any indirect CALL/JMP must
        target an ENDBR instruction or suffer #CP.
      
        Additionally, since Alderlake (12th gen)/Sapphire-Rapids, speculation
        is limited to 2 instructions (and typically fewer) on branch targets
        not starting with ENDBR. CET-IBT also limits speculation of the next
        sequential instruction after the indirect CALL/JMP [1].
      
        CET-IBT is fundamentally incompatible with retpolines, but provides,
        as described above, speculation limits itself"
      
      [1] https://www.intel.com/content/www/us/en/developer/articles/technical/software-security-guidance/technical-documentation/branch-history-injection.html
      
      * tag 'x86_core_for_5.18_rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (53 commits)
        kvm/emulate: Fix SETcc emulation for ENDBR
        x86/Kconfig: Only allow CONFIG_X86_KERNEL_IBT with ld.lld >= 14.0.0
        x86/Kconfig: Only enable CONFIG_CC_HAS_IBT for clang >= 14.0.0
        kbuild: Fixup the IBT kbuild changes
        x86/Kconfig: Do not allow CONFIG_X86_X32_ABI=y with llvm-objcopy
        x86: Remove toolchain check for X32 ABI capability
        x86/alternative: Use .ibt_endbr_seal to seal indirect calls
        objtool: Find unused ENDBR instructions
        objtool: Validate IBT assumptions
        objtool: Add IBT/ENDBR decoding
        objtool: Read the NOENDBR annotation
        x86: Annotate idtentry_df()
        x86,objtool: Move the ASM_REACHABLE annotation to objtool.h
        x86: Annotate call_on_stack()
        objtool: Rework ASM_REACHABLE
        x86: Mark __invalid_creds() __noreturn
        exit: Mark do_group_exit() __noreturn
        x86: Mark stop_this_cpu() __noreturn
        objtool: Ignore extra-symbol code
        objtool: Rename --duplicate to --lto
        ...
      70010521
  3. Mar 27, 2022