泰晓科技 -- 聚焦 Linux - 追本溯源,见微知著!
网站地址:https://tinylab.org

泰晓Linux知识星球:1300+知识点,520+用户
请稍侯

RISC-V Linux 内核及周边技术动态第 99 期

呀呀呀 创作于 2024/07/09

时间:20240707
编辑:晓瑜
仓库:RISC-V Linux 内核技术调研活动
赞助:PLCT Lab, ISCAS

内核动态

RISC-V 架构支持

v1: serial: 8250: don’t lost port’s default capabilities

Commit b0b8c84cf58d (“serial: of_serial: Handle auto-flow-control property”) added support for fifo-size and hw-flow-control properties.

v2: Add SARADC support on Sophgo SoC

This patchset adds initial ADC support for Sophgo SoC.

v1: riscv: select ARCH_USE_SYM_ANNOTATIONS

Select ARCH_USE_SYM_ANNOTATIONS to ensure the deprecated macros such as ENTRY(), END(), WEAK() and so on are not available and we don’t regress.

v3: Add basic SPI support on TH1520

Implemented basic SPI support for TH1520 SoC.

v2: Prevent dynamic relocations in vDSO

Patch 2 uses a generic function to make sure the vDSO object does not contain any dynamic relocations. Patch 1 removes a dynamic relocation from vDSO in rv32 found with patch

v1: riscv: sophgo: Add pinctrl support for CV1800 series SoC

Add basic pinctrl driver for Sophgo CV1800 series SoCs.

v4: PCI: microchip: support using either instance 1 or 2

The current driver and binding for PolarFire SoC’s PCI controller assume that the root port instance in use is instance 1.

v3: riscv: add initial support for SpacemiT K1

Add initial support for it to allow more people to participate in building drivers to mainline for it.

v1: Simplify of_property_for_each_u32()

This series aims at simplifying of_property_for_each_u32() as well as making it more difficult to misuse it in the future.

v4: riscv: Add support for xtheadvector

All of the vector routines have been modified to support this alternative vector version based upon whether xtheadvector was determined to be supported at boot.

v6: riscv: sophgo: Add SG2042 external hardware monitor support

Add support for the onboard hardware monitor for SG2042.

v1: riscv: Enable generic CPU vulnerabilites support

Currently x86, ARM and ARM64 support generic CPU vulnerabilites, but RISC-V not

v6: bpf-next: Add 12-argument support for RV64 bpf trampoline

This patch adds 12 function arguments support for riscv64 bpf trampoline.

v8: riscv: mm: Add support for Svinval extension

The Svinval extension splits SFENCE.VMA instruction into finer-grained invalidation and ordering operations and is mandatory for RVA23S64 profile.

v3: riscv: sophgo: add thermal sensor support for cv180x/sg200x SoCs

This series implements driver for Sophgo cv180x/sg200x on-chip thermal sensor and adds thermal zones for CV1800B SoCs.

v4: RISC-V: Provide the frequency of time CSR via hwprobe

The RISC-V architecture makes a real time counter CSR (via RDTIME instruction) available for applications in U-mode but there is no architected mechanism for an application to discover the frequency the counter is running at.

v4: Provide the frequency of time CSR via hwprobe

Some applications (e.g., DPDK) use the time counter for basic performance analysis as well as fine grained time-keeping. So we need export the time CSR frequency to userspace by hwporbe syscall.

v3: RISC-V: Parse DT for Zkr to seed KASLR

Add functions to pi/fdt_early.c to help parse the FDT to check if the isa string has the Zkr extension.

v1: iommu/riscv: Support sharing irq lines between iommu queues

This is an additional patch for Tomasz Jeznach’s riscv iommu driver patch series.

v2: riscv: Extend sv39 linear mapping max size to 128G

This harmonizes all virtual addressing modes which can now all map (PGDIR_SIZE * PTRS_PER_PGD) / 4 of physical memory.

v1: arch: riscv: thead: implement basic spi

implemented basic spi support for TH1520 SoC. created a fixed clock and a simple spi0 node. updated the matching binding to include thead,th1520-spi as compatible. added a spidev device in devicetree which will utilise the spi0 node.

LoongArch 架构支持

v3: LoongArch: Add AVEC irqchip support

Introduce the advanced extended interrupt controllers.

v3: LoongArch: Add Loongson-3 CPUFreq driver support

This series add architectural preparation and CPUFreq driver for Loongson-3 (based on LoongArch).

v1: LoongArch: CPU parallel bring up

This series implemented CPU parallel bring up for LoongArch.

v1: Added Interrupt controller emulation for loongarch kvm

Add the interrupt controller simulation in kvm.

v1: LoongArch: rust: Use rustc option -Zdirect-access-external-data

This patch modifies the Rust code in vmlinux to directly access externa data, using PC-REL instead of GOT.

v1: AT24 EEPROM MTD Support

This series adds the intial support to handle EEPROMs via the MTD layer as well.

进程调度

v1: sched/fair: Optimize vlag entity placement

Optimize for common path when placing an entity with no lag. Since adjusting a zero lag is always going to produce a zero lag regardless of the local load, don’t bother about calaculating the adjusting factor.

v1: sched/numa: scan the vma if it has not been scanned for a while

Commit b7a5b537c55c08 (“sched/numa: Complete scanning of partial VMAs regardless of PID activity”) and commit 84db47ca7146d7 (“sched/numa: Fix mm numa_scan_seq based unconditional scan”) are found to bring back part of the performance.

v2: ARM, sched/topology: Check return value of kcalloc()

Check the return value of kcalloc() and panic() if memory allocation fails.

[PATCH-RT sched v2 0/2] Optimize the RT group scheduling

Patch v2 fix the issues arising from disabling the CONFIG_RT_GROUP_SCHED macro during compilation.

内存管理

v1: mm/page_alloc: put __free_pages_core() in __meminit section

Function __free_pages_core() is only used in bootmem init and hot-add memory init path. Let’s put it in __meminit section.

v1: mm: use zonelist_zone() to get zone

Instead of accessing zoneref->zone directly, use zonelist_zone() like other places for consistency.

v3: fs: multigrain timestamp redux

The conversion of ctime to be a ktime_t value has been dropped, and we now use an unused bit in the nsec field as the QUERIED flag (like the earlier patchset did).

v1: mm/vmstat: Defer the refresh_zone_stat_thresholds after all CPUs bringup

refresh_zone_stat_thresholds function has two loops which is expensive for higher number of CPUs and NUMA nodes.

v3: mm: thp: support “THPeligible” semantics for mTHP with anonymous shmem

After the commit 7fb1b252afb5 (“mm: shmem: add mTHP support for anonymous shmem”), we can configure different policies through the multi-size THP sysfs interface for anonymous shmem.

v2: Make core VMA operations internal and testable

This patch series isolates core VMA manipulation functionality into its own file, mm/vma.c, and provides an API to the rest of the mm code in mm/vma.h.

v3: Enable P2PDMA in Userspace RDMA

This patch series enables P2PDMA memory to be used in userspace RDMA transfers. With this series, P2PDMA memory mmaped into userspace (ie. only NVMe CMBs, at the moment) can then be used with ibv_reg_mr() (or similar) interfaces.

v3: support large folio swap-out and swap-in for shmem

Shmem will support large folio allocation [1] [2] to get a better performance, however, the memory reclaim still splits the precious large folios when trying to swap-out shmem, which may lead to the memory fragmentation issue and can not take advantage of the large folio for shmeme.

v9: enable bs > ps in XFS

The context and motivation can be seen in cover letter of the RFC v1 [0]. We also recorded a talk about this effort at LPC [1], if someone would like more context on this effort.

v4: mm/gup: Clear the LRU flag of a page before adding to LRU batch

This change makes the LRU flag of a page invisible for longer, which may impact some programs.

v2: Introduce tracepoint for hugetlbfs

Here we add some basic tracepoints for debugging hugetlbfs: {alloc, free, evict}_inode, setattr and fallocate.

v3: mm: introduce per-order mTHP split counters

At present, the split counters in THP statistics no longer include PTE-mapped mTHP.

v2: mm/zsmalloc: add zpdesc memory descriptor for zswap.zpool

According to Metthew’s plan, the page descriptor will be replace by a 8 bytes mem_desc on destination purpose.

文件系统

v2: forcealign for xfs

That series has got too big and also has a dependency on the core block atomic writes support, which has now been queued for 6.11 in Jens’ block tree .

v1: kpageflags: detect isolated KPF_THP folios

When folio is isolated, the PG_lru bit is cleared.

v1: exfat: check disk status during buffer write

We found that when writing a large file through buffer write, if the disk is inaccessible, exFAT does not return an error normally, which leads to the writing process not stopping properly.

v19: Script execution control (was O_MAYEXEC)

The ultimate goal of this patch series is to be able to ensure that direct file execution (e.g. ./script.sh) and indirect file execution (e.g. sh script.sh) lead to the same result, especially from a security point of view.

v1: Reject invalid mount id values early

Two small fixes to avoid doing unnecessary work if userspace provided invalid mount id values to either statmount() or listmount().

v6: fs: Improve eventpoll logging to stop indicting timerfd

It seems a timerfd caused the abort, but that can be confusing, as timerfds don’t create wakeup sources.

v3: fs/file.c: optimize the critical section of file_lock in

These 3 patches are created to reduce the critical section of file_lock in alloc_fd() and close_fd().

v2: vfs: don’t mod negative dentry count when on shrinker list

The nr_dentry_negative counter is intended to only account negative dentries that are present on the superblock LRU.

v1: kernel/ext4: sanity check for NULL pointer after ext4_force_shutdown

Test case: 2 threads write short inline data to a file.

v1: Fuse Passthrough cache issues

Attempting to recreate Android’s usage of Fuse Passthrough with the version now merged in the kernel, and I’ve run into a couple issues.

v1: fuse: Allow to align reads/writes

Read/writes IOs should be page aligned as fuse server might need to copy data to another buffer otherwise in order to fulfill network or device storage requirements.

v1: blk: optimization for classic polling

This removes the dependency on interrupts to wake up task.

网络设备

v2: net-next: ice: Adjust over allocation of memory in ice_sched_add_root_node() and ice_sched_add_node()

In ice_sched_add_root_node() and ice_sched_add_node() there are calls to devm_kcalloc() in order to allocate memory for array of pointers to ‘ice_sched_node’ structure.

GIT PULL: MHI changes for v6.11

The following changes since commit 1613e604df0cd359cf2a7fbd9be7a0bcfacfabd0:

v1: net-next: net: tn40xx: add per queue netdev-genl stats support

Add support for the netdev-genl per queue stats API.

v1: net: ice: Adjust memory overrun in ice_sched_add_root_node() and ice_sched_add_node()

In ice_sched_add_root_node() and ice_sched_add_node() there are calls to devm_kcalloc() in order to allocate memory for array of pointers to ‘ice_sched_node’ structure.

v1: net: ppp: reject claimed-as-LCP but actually malformed packets

Add ‘ppp_check_packet()’ to ensure that LCP packet has an actual body beyond PPP_LCP header bytes, and reject claimed-as-LCP but actually malformed data otherwise.

v16: net-next: net: Make timestamping selectable

This series updates the default MAC/PHY default timestamping and aims to allow the user to select the desired hwtstamp provider administratively.

v2: net-next: flower: rework TCA_FLOWER_KEY_ENC_FLAGS usage

This series reworks the recently added TCA_FLOWER_KEY_ENC_FLAGS attribute, to be more like TCA_FLOWER_KEY_FLAGS, and use the unused u32 flags field in FLOW_DISSECTOR_KEY_ENC_CONTROL, instead of adding a new flags field as FLOW_DISSECTOR_KEY_ENC_FLAGS.

v16: net-next: Introduce PHY listing and link_topology tracking

This is V16 of the phy_link_topology series, aiming at improving support for multiple PHYs being attached to the same MAC.

v1: net-next: bnxt_en: address string truncation

This series addresses several string truncation issues that are flagged by gcc-14.

v1: Add support for Amlogic HCI UART

Add support for Amlogic HCI UART, including dt-binding, Amlogic Bluetooth driver and enable HCIUART_AML in defconfig.

v1: bpf-next: seg6: Ensure that seg6_bpf_srh_states can only be accessed from input_action_end_bpf()

The per-CPU variable is `seg6_bpf_srh_states’ is first initialized in input_action_end_bpf() and then accessed during the bpf_prog_run_save_cb() invocation by the eBPF via the BPF callbacks.

v1: bpf: provide map key to BPF program after redirect

Both DEVMAP as well as CPUMAP provide the possibility to attach BPF programs to their entries that will be executed after a redirect was performed.

v1: net: wwan: t7xx: add support for Dell DW5933e

add support for Dell DW5933e (0x14c0, 0x4d75)

v7: net-next: virtio-net: support AF_XDP zero copy

v1: net-next: mlx5 misc patches 2023-07-05

This patchset contains features and small enhancements from the team to the mlx5 core and Eth drivers.

v1: net-next: net: stmmac: xgmac: add support for HW-accelerated VLAN stripping

Commit 750011e239a5 (“net: stmmac: Add support for HW-accelerated VLAN stripping”) introduced MAC level VLAN tag stripping for gmac4 core. This patch extend the support to xgmac core.

v1: netfilter: conntrack: tcp: do not lower timeout to CLOSE for in-window RSTs

With previous commit https://github.com/torvalds/linux/commit/be0502a (“netfilter: conntrack: tcp: only close if RST matches exact sequence”) to fight against TCP in-window reset attacks, current version of netfilter will keep the connection state in ESTABLISHED.

v1: Support for segment offloading on software interfaces for packets from virtual machine guests without the SKB_GSO_UDP_L4 flag.

When running virtual machines on a host, and the guest uses a kernel version below v6.2 (without commit https:// github.com/torvalds/linux/commit/860b7f27b8f78564ca5a2f607e0820b2d352a562),the UDP packets emitted from the guest do not include the SKB_GSO_UDP_L4 flag in their skb gso_type.

v1: net: bridge: mst: Check vlan state for egress decision

Fix this by temporarily forcing the port state to forwarding when in MST mode to allow checking the vlan state via br_allowed_egress().

v3: net: ethernet: mtk_ppe: Change PPE entries number to 16K

MT7981,7986 and 7988 all supports 32768 PPE entries, and MT7621/MT7620 supports 16384 PPE entries, but only set to 8192 entries in driver.

GIT PULL: Networking for v6.10-rc7

There’s one fix for power management with Intel’s e1000e here, Thorsten tells us there’s another problem that started in v6.9.

v3: net-next: tun: Assign missing bpf_net_context.

During the introduction of struct bpf_net_context handling for XDP-redirect, the tun driver has been missed.

v10: net: phy: bcm5481x: add support for BroadR-Reach mode

v8: iwl-next: ixgbe: Add support for Intel(R) E610 device

Add initial support for Intel(R) E610 Series of network devices.

v2: net-next: act_ct: prepare for stolen verdict coming from conntrack and nat engine

This helper releases the skb instantly (so drop_monitor can pinpoint exact location) and returns NF_STOLEN.

v1: net-next: net: ethernet: mtk_eth_soc: implement .{get,set}_pauseparam ethtool ops

Implement operations to get and set flow-control link parameters. Both is done by simply calling phylink_ethtool_{get,set}_pauseparam(). Fix whitespace in mtk_ethtool_ops while at it.

v2: net-net: tun: Assign missing bpf_net_context.

During the introduction of struct bpf_net_context handling for XDP-redirect, the tun driver has been missed.

安全增强

v1: randomize_kstack: Improve stack alignment codegen

The codgen for adding architecture-specific stack alignment to the effective alloca() usage is somewhat inefficient and allows a bit to get carried beyond the desired entropy range.

v2: printk: Add a short description string to kmsg_dump()

This patch adds a new struct kmsg_dump_detail, that will hold the reason and description, and pass it to the dump() callback.

v6: slab: Introduce dedicated bucket allocator

异步 IO

v4: io_uring: support sqe group and provide group kbuf

v1: io_uring/net: don’t clear msg_inq before io_recv_buf_select() needs it

A previous fix ended up clearing it earlier as an error case would potentially errantly set IORING_CQE_F_SOCK_NONEMPTY if the request got failed.

Rust For Linux

v1: rust: add module_params macro

This patch includes changes required for Rust kernel modules to utilize module parameters. This code implements read only support for integer types without sysfs support.

v1: Generic Allocator support for Rust

This patch series adds generic kernel allocator support for Rust, which so far is limited to kmalloc allocations.

v3: Rust and the shadow call stack sanitizer

This patch series makes it possible to use Rust together with the shadow call stack sanitizer.

v1: drm/panic: Add a qr_code panic screen

This series adds a new panic screen, with the kmsg data embedded in a QR-code.

v3: Rust bindings for cpufreq and OPP core + sample driver

This RFC adds initial rust bindings for two subsystems, cpufreq and operating performance points (OPP).

** BLURB HERE **

v1: Support several Rust toolchain versions

It is time to start supporting several Rust toolchain versions and thus establish a minimum Rust compiler and bindgen version.

BPF

v9: bpf-next: use network helpers, part 8

v2: bpf-next: bpf: track find_equal_scalars history on per-instruction level

This is a fix for precision tracking bug reported in [(https://lore.kernel.org/bpf/CAEf4BzZ0xidVCqB47XnkXcNhkPWF6_nTV7yt+_Lf0kcFEut2Mg@mail.gmail.com/)]. It supersedes my previous attempt to fix similar issue in commit .

v2: bpf-next: arm64, bpf: Add 12-argument support for bpf trampoline

The arm64 bpf JIT currently supports attaching the trampoline to functions with <= 8 arguments.

v2: bpf-next: no_caller_saved_registers attribute for helper calls

This RFC seeks to allow using no_caller_saved_registers gcc/clang attribute with some BPF helper functions (and kfuncs in the future).

v5: net: skmsg: skip zero length skb in sk_msg_recvmsg

This crash happens every time when running sockmap_skb_verdict_shutdown subtest in sockmap_basic.

v1: libbpf: add NULL checks to bpf_object__{prev_map,next_map}

In the current state, an erroneous call to bpf_object__find_map_by_name(NULL, …) leads to a segmentation fault through the following call chain:

v1: bpf-next: s390/bpf: Implement exceptions

this series implements exceptions in the s390x JIT. Patch 1 is a small refactoring, patch 2 is the implementation, and patch 3 enables the tests in the CI.

v1: bpf-next: bpftool: Mount bpffs when pinmaps path not under the bpffs

As qmonnet said [1], map pinning will fail if the pinmaps path not under the bpffs, like: libbpf: specified path /home/ubuntu/test/sock_ops_map is not on BPF FS

v4: net: skmsg: skip empty sge in sk_msg_recvmsg

This crash is because a NULL pointer is passed to page_address() in sk_msg_recvmsg().

v3: bpf-next: s390/bpf: Implement arena

v2: uprobes: add batched register/unregister APIs and per-CPU RW semaphore

This patch set, ultimately, switches global uprobes_treelock from RW spinlock to per-CPU RW semaphore, which has better performance and scales better under contention and multiple parallel threads triggering lots of uprobes.

v1: bpf-next: kbuild, bpf: reproducible BTF from pahole when KBUILD_BUILD_TIMESTAMP set

This was a problem since said BTF is baked into kernels and modules in .BTF sections, so parallel pahole was causing non-reproducible binary generation. Now with the above commit we have support for parallel reproducible BTF generation in pahole.

周边技术动态

Qemu

v1: RISC-V: Add preliminary textra trigger CSR functions

This series support to write MHVALUE and MHSELECT fields into textra32 and textra64 trigger CSRs. Besides, the additional matching condition between textra.MHVALUE and mcontext CSR is also implemented.

v3: target/riscv: Expose RV32 cpu to RV64 QEMU

This patch set has been tested with 6.9.0 Linux Image. And add an avocado test in tests/avocado.

v4: Support RISC-V CSR read/write in Qtest environment

These patches add functionality for unit testing RISC-V-specific registers. The first patch adds a Qtest backend, and the second implements a simple test.

v1: qemu: target/riscv: Add Zilsd and Zcmlsd extension support

This patch adds support for the Zilsd and Zcmlsd extension, which is documented at https://github.com/riscv/riscv-zilsd/releases/tag/v0.9.0

v3: target/riscv: Support zimop/zcmop/zama16b/zabha

All the patches in this patch set have been reviewed or acked.

v1: target/riscv: Validate the mode in write_vstvec

Base on the riscv-privileged spec, vstvec substitutes for the usual stvec. Therefore, the encoding of the MODE should also be restricted to 0 and 1.

U-Boot

v2: Make U-Boot memory reservations coherent

The aim of this patch series is to fix the current state of incoherence between modules when it comes to memory usage.

v2: Add Starfive JH7110 Cadence USB driver

Add Starfive JH7110 Cadence USB driver and related PHY driver. So the codes can be used in visionfive2 and star64 7110 board.



Read Album:

Read Related:

Read Latest: