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

泰晓实验箱:上手简单,配公开课
请稍侯

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

呀呀呀 创作于 2024/01/22

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

内核动态

RISC-V 架构支持

v6: riscv: sophgo: add clock support for Sophgo CV1800/SG2000 SoCs

Add clock controller support for the Sophgo CV1800B, CV1812H and SG2000.

Changed from v5:

  1. rebased to mainline master tree
  2. add SG2000 clock support.
  3. fix document link

v7: riscv: Create and document PR_RISCV_SET_ICACHE_FLUSH_CTX prctl

Improve the performance of icache flushing by creating a new prctl flag PR_RISCV_SET_ICACHE_FLUSH_CTX. The interface is left generic to allow for future expansions such as with the proposed J extension [1].

GIT PULL: RISC-V Patches for the 6.8 Merge Window, Part 1

The following changes since commit ed5b7cfd7839f9280a63365c1133482b42d0981f:

riscv: errata: andes: Probe for IOCP only once in boot stage (2023-12-06 07:18:58 -0800)

are available in the Git repository at:

git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux.git tags/riscv-for-linus-6.8-mw1

v2: riscv: add support for SBI Supervisor Software Events

The SBI Supervisor Software Events (SSE) extensions provides a mechanism to inject software events from an SBI implementation to supervisor software such that it preempts all other supervisor level traps and interrupts [1].

v1: -next: RISC-V: ACPI: Add LPI support

This series adds support for Low Power Idle (LPI) on ACPI based platforms.

LPI is described in the ACPI spec [1]. RISC-V FFH spec required to enable this is available at [2].

v2: Add StarFive JH8100 dwmac support

Add StarFive JH8100 dwmac support. JH8100 dwmac has one reset signal instead of 2 resets as in JH7110.

v1: clk: thead: add support for T-HEAD TH1520 AP clock controller

This series adds support for the AP sub system clock controller in the T-HEAD TH1520. This include CPU, DPU, GMAC and TEE PLLs.

Yangtao Li originally submitted this series back in May [1]. Jisheng made additional improvements and then passed on the work in progress to me. The driver code is cleaner than the version in the T-Head SDK [2].

v3: Basic clock and reset support for StarFive JH8100 RISC-V SoC

This patch series enabled basic clock & reset support for StarFive JH8100 SoC.

This patch series depends on the Initial device tree support for StarFive JH8100 SoC patch series which can be found at [1].

As it is recommended to refrain from merging fundamental patches like Device Tree, Clock & Reset, and PINCTRL tested on FPGA/Emulator, into the RISC-V Mainline, this patch series has been renamed to “RFC” patches. Yet, thanks to the reviewers who have reviewed the patches at [2]. The changes are captured below.

v7: Support Andes PMU extension

This patch series introduces the Andes PMU extension, which serves the same purpose as Sscofpmf. To use FDT-based probing for hardware support of the PMU extensions and introduce Andes PMU alternatives, we first convert T-Head’s PMU to CPU feature alternative.

v1: RISC-V: only flush icache when it has VM_EXEC set

As I-Cache flush on current RISC-V needs to send IPIs to every CPU cores in the system is very costly, limiting flush_icache_mm to be called only when vma->vm_flags has VM_EXEC can help minimize the frequency of these operations. It improves performance and reduces disturbances when copy_from_user_page is needed such as profiling with perf.

v1: Refactor CONFIG_DEBUG_WX and check_wx_pages debugfs attribute

Refer old discussion at https://lore.kernel.org/lkml/20200422152656.GF676@willie-the-truck/T/#m802eaf33efd6f8d575939d157301b35ac0d4a64f And https://github.com/KSPP/linux/issues/35

This series refactors CONFIG_DEBUG_WX for the 5 architectures implementing CONFIG_GENERIC_PTDUMP

First rename stuff in ARM which uses similar names while not implementing CONFIG_GENERIC_PTDUMP.

v1: riscv: sophgo: add reset support for SG2042

This series adds reset controller support for Sophgo SG2042 using reset-simple driver.

v15: riscv: Add fine-tuned checksum functions

Each architecture generally implements fine-tuned checksum functions to leverage the instruction set. This patch adds the main checksum functions that are used in networking. Tested on QEMU, this series allows the CHECKSUM_KUNIT tests to complete an average of 50.9% faster.

v2: riscv: Add support for BATCHED_UNMAP_TLB_FLUSH

Allow to defer the flushing of the TLB when unmapping pages, which allows to reduce the numbers of IPI and the number of sfence.vma.

v14: Refactoring Microchip PCIe driver and add StarFive PCIe

This patchset final purpose is add PCIe driver for StarFive JH7110 SoC. JH7110 using PLDA XpressRICH PCIe IP. Microchip PolarFire Using the same IP and have commit their codes, which are mixed with PLDA controller codes and Microchip platform codes.

回复: 回复: v13: Refactoring Microchip PCIe driver and add StarFive PCIe

Before doing this refactoring, we encountered the same bug with Kingston M.2 SSD, and we workaround the problem with the below patch, please have a try:

v7: riscv: sophgo: add clock support for sg2042

This series adds clock controller support for sophgo sg2042.

进程调度

v3: net/sched: Load modules via alias

These modules may be loaded lazily without user’s awareness and control. Add respective aliases to modules and request them under these aliases so that modprobe’s blacklisting mechanism (through aliases) works for them. (The same pattern exists e.g. for filesystem modules.)

v1: Revert “sched/cpufreq: Rework schedutil governor performance estimation” and dependent commit

if the fix that i proposed doesn’t work: https://lore.kernel.org/all/ZZ+ixagkxRPYyTCE@vingu-book/

Yeah - although of course Linus is free to just pull the revert as well. I’ll try to reproduce the regression locally as well.

内存管理

v11: mm/gup: Introduce memfd_pin_folios() for pinning memfd folios

Currently, some drivers (e.g, Udmabuf) that want to longterm-pin the pages/folios associated with a memfd, do so by simply taking a reference on them. This is not desirable because the pages/folios may reside in Movable zone or CMA block.

Therefore, having drivers use memfd_pin_folios() API ensures that the folios are appropriately pinned via FOLL_PIN for longterm DMA.

GIT PULL: percpu changes for v6.8-rc1

This enables the percpu page allocator for risc-v as a fallback path.

Separately, I just sent out a respin of Thomas’ cpu hotplug related fixes for percpu_counters in [1]. I’ll hopefully pull that in shortly and get it into for-next for some wider testing.

v2: 0/3: lib/percpu_counter, cpu/hotplug: Cure the cpu_dying_mask woes

This is a respin of Thomas’ series [1] against v6.7-rc4. Largely it’s the same minus a slight change in percpu_counter.c for batch percpu_counters and updating __percpu_counter_limited_add().

v1: mm/mempolicy: weighted interleave mempolicy with sysfs extension

Weighted interleave is a new interleave policy intended to make use of heterogeneous memory environments appearing with CXL.

The existing interleave mechanism does an even round-robin distribution of memory across all nodes in a nodemask, while weighted interleave distributes memory across nodes according to a provided weight. (Weight = # of page allocations per round)

v1: mm: z3fold: rename CONFIG_Z3FOLD to CONFIG_Z3FOLD_DEPRECATED

The z3fold compressed pages allocator is not widely used, most users use zsmalloc. The only disadvantage of zsmalloc in comparison is the dependency on MMU, and zbud is a more common option for !MMU as it was the default zswap allocator for a long time.

v1: mm/compaction: Reduce unnecessary loops

Compaction will be triggered when we write 1 to ‘/proc/sys/vm/ compact_memory’. During the execution of the process, when we send SIGKILL to terminate the compaction, the process does not exit immediately. Instead, it will continue to loop through the remaining zones and nodes before exiting.

v6: Introduce mseal()

This patchset proposes a new mseal() syscall for the Linux kernel.

In a nutshell, mseal() protects the VMAs of a given virtual memory range against modifications, such as changes to their permission bits.

v1: Convert memcontrol charge moving to use folios

No part of these patches should change behaviour; all the called functions already convert from page to folio, so this ought to simply be a reduction in the number of calls to compound_head().

v1: mm/filemap: Allow arch to request folio size for exec memory

Change the readahead config so that if it is being requested for an executable mapping, do a synchronous read of an arch-specified size in a naturally aligned manner.

v3: mm: convert mm counter to take a folio

Make sure all mm_counter() and mm_counter_file() callers have a folio, then convert mm counter functions to take a folio, which saves some compound_head() calls.

v4: -next: minor improvements for x86 mce processing

In this patchset, we remove the unused macro EX_TYPE_COPY and centralize the processing of memory-failure to do_machine_check() to avoid calling memory_failure_queue() separately for different MC-Safe scenarios. In addition, MCE_IN_KERNEL_COPYIN is renamed MCE_IN_KERNEL_COPY_MC to expand its usage scope.

v1: mm: memcontrol: don’t throttle dying tasks on memory.high

While investigating hosts with high cgroup memory pressures, Tejun found culprit zombie tasks that had were holding on to a lot of memory, had SIGKILL pending, but were stuck in memory.high reclaim.

v5: cxl: Add support for CXL feature commands, CXL device patrol scrub control and DDR5 ECS control features

  1. Add support for CXL feature mailbox commands.
  2. Add CXL device scrub driver supporting patrol scrub control and ECS control features.
  3. Add scrub subsystem driver supports configuring memory scrubs in the system.
  4. Register CXL device patrol scrub and ECS with scrub subsystem.
  5. Add common library for RASF and RAS2 PCC interfaces.
  6. Add driver for ACPI RAS2 feature table (RAS2).
  7. Add memory RAS2 driver and register with scrub subsystem.

v1: *** SUBJECT HERE ***

** BLURB HERE **

mode change 100644 => 100755 include/linux/swap.hmode change 100644 => 100755 mm/vmscan.cmode change 100644 => 100755 mm/workingset.c

v1: mm/mmap: introduce vma_range_init()

There is a lot of code needs to set the range of vma, introduce vma_range_init() to initialize the range of vma.

v2: tools/mm: Add thpmaps script to dump THP usage info

With the proliferation of large folios for file-backed memory, and more recently the introduction of multi-size THP for anonymous memory, it is becoming useful to be able to see exactly how large folios are mapped into processes. For some architectures (e.g. arm64), if most memory is mapped using contpte-sized and -aligned blocks, TLB usage can be optimized so it’s useful to see where these requirements are and are not being met.

v1: support tmpfs hugepage PMD is not split when COW

Transparent hugepages in tmpfs can enhance TLB efficiency by reducing TLB misses. However, during Copy-On-Write (COW) memory faults, these hugepages may be split. In some scenarios, preventing this splitting is desirable. We might introduce a shmem_huge_fault to inhibit this behavior, along with a mount parameter to enable or disable this function.

v1: mm/mmap: simplify vma link and unlink

The file parameter in the __remove_shared_vm_struct is no longer used, remove it.

These functions vma_link() and mmap_region() have some of the same code, introduce vma_link_file() helper function to simplify the code.

v1: mm: kasan: avoid resetting aux_lock

With commit 63b85ac56a64 (“kasan: stop leaking stack trace handles”), KASAN zeroes out alloc meta when an object is freed. The zeroed out data purposefully includes alloc and auxiliary stack traces but also accidentally includes aux_lock.

v16: Drivers for Gunyah hypervisor

Gunyah is a Type-1 hypervisor independent of any high-level OS kernel, and runs in a higher CPU privilege level. It does not depend on any lower-privileged OS kernel/code for its core functionality. This increases its security and can support a much smaller trusted computing base than a Type-2 hypervisor. Gunyah is designed for isolated virtual machine use cases and to support launching trusted+isolated virtual machines from a relatively less trusted host virtual machine.

v1: netfs, afs, erofs, cifs: Don’t use certain internal folio_*() functions

Here are some patches that replace the use of folio_index(), folio_mapping() and folio_file_mapping() in some filesystem code. I’ll add them to my netfs-lib branch.

v1: netfs, cachefiles: More additional patches

Here are some additional patches for my netfs-lib tree:

(1) Mark netfs_unbuffered_write_iter_locked() static as it’s only used inthe file in which it is defined.

(2) Display a counter for DIO writes in /proc/fs/netfs/stats.

(3) Fix the interaction between write-streaming (dirty data innon-uptodate pages) and the culling of a cache file trying to writethat to the cache.

v1: mm, oom: Add lru_add_drain() in __oom_reap_task_mm()

The oom_reaper tries to reclaim additional memory owned by the oom victim. In __oom_reap_task_mm(), it uses mmu_gather for batched page free. After oom_reaper was added, mmu_gather feature introduced CONFIG_MMU_GATHER_NO_GATHER (in ‘commit 952a31c9e6fa (“asm-generic/tlb: Introduce CONFIG_HAVE_MMU_GATHER_NO_GATHER=y”)’, an option to skip batched page free. If set, tlb_batch_pages_flush(), which is responsible for calling lru_add_drain(), is skipped during tlb_finish_mmu(). Without it, pages could still be held by per-cpu fbatches rather than be freed.

v1: efi: Disable mirror feature during crashkernel

If system have no mirrored memory or use crashkernel.high while kernelcore=mirror is enabled in cmdline, during crashkernel, there will be limited mirrored memory and this usually lead to OOM.

v6: implement “memmap on memory” feature on s390

This series provides “memmap on memory” support on s390 platform. “memmap on memory” allows struct pages array to be allocated from the hotplugged memory range instead of allocating it from main system memory.

v1: -next: mm/filemap: avoid type conversion

The return type of function folio_test_hugetlb is bool type, there is no need to assign it to an integer type.

文件系统

v2: netfs, fscache: Prevent Oops in fscache_put_cache()

This function dereferences “cache” and then checks if it’s IS_ERR_OR_NULL(). Check first, then dereference.

Reply: v1: fuse: use page cache pages for writeback io when virtio_fs is in use

Any comments about this RFC patch? Thanks.

Regards, Lege.wang

v3: Set casefold/fscrypt dentry operations through sb->s_d_op

Thank you, Eric and Al, for your feedback on the previous version.

This version has some big changes: instead of only configuring on the case-insensitive case, we do it for case-sensitive fscrypt as well, and disable d_revalidate as needed. This pretty much reverses the way fscrypt operated (only enable d_revalidate for dentries that require it), but has the advantage we can be consistent among variations of case-insensitive/sensitive, encrypted/unencrypted configurations.

v1: filemap: Convert generic_perform_write() to support large folios

Modelled after the loop in iomap_write_iter(), copy larger chunks from userspace if the filesystem has created large folios.

v2: fsnotify: optimize the case of no content event watchers

Commit e43de7f0862b (“fsnotify: optimize the case of no marks of any type”) optimized the case where there are no fsnotify watchers on any of the filesystem’s objects.

It is quite common for a system to have a single local filesystem and it is quite common for the system to have some inotify watches on some config files or directories, so the optimization of no marks at all is often not in effect.

git pull: vfs.git misc pile

The following changes since commit b85ea95d086471afb4ad062012a4d73cd328fa86:

Linux 6.7-rc1 (2023-11-12 16:19:07 -0800)

are available in the Git repository at:

git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs.git tags/pull-misc

git pull: dcache stuff

The following changes since commit 4a0b33f771db2b82fdfad08b9f34def786162865:

selinux: saner handling of policy reloads (2023-11-16 12:45:33 -0500)

are available in the Git repository at:

git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs.git tags/pull-dcache

git pull: vfs.git minixfs series

The following changes since commit b85ea95d086471afb4ad062012a4d73cd328fa86:

Linux 6.7-rc1 (2023-11-12 16:19:07 -0800)

are available in the Git repository at:

git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs.git tags/pull-minix

for you to fetch changes up to 41e9a7faff514fcb2d4396b0ffde30386a153c7f:

v1: eventfd: add a BUILD_BUG_ON() to ensure consistency between EFD_SEMAPHORE and the uapi

introduce a BUILD_BUG_ON to check that the EFD_SEMAPHORE is equal to its definition in the uapi file, just like EFD_CLOEXEC and EFD_NONBLOCK.

v1: fsnotify: optimize the case of no access event watchers

Commit e43de7f0862b (“fsnotify: optimize the case of no marks of any type”) optimized the case where there are no fsnotify watchers on any of the filesystem’s objects.

It is quite common for a system to have a single local filesystem and it is quite common for the system to have some inotify watches on some config files or directories, so the optimization of no marks at all is often not in effect.

v1: fsnotify: compile out fsnotify permission hooks if !FANOTIFY_ACCESS_PERMISSIONS

The depency of FANOTIFY_ACCESS_PERMISSIONS on SECURITY made sure that the fsnotify permission hooks were never called when SECURITY was disabled.

v1: netfs, afs, erofs, cifs: Don’t use certain internal folio_*() functions

Here are some patches that replace the use of folio_index(), folio_mapping() and folio_file_mapping() in some filesystem code. I’ll add them to my netfs-lib branch.

v1: Revert “fsnotify: optionally pass access range in file permission hooks”

This commit added an extra fsnotify call from rw_verify_area(), which can be a very hot path. In my testing, this adds roughly 5-6% extra overhead per IO, which is quite a lot. As a result, throughput of said test also drops by 5-6%, as it is CPU bound. Looking at perf, it’s apparent why:

which directly correlates with performance lost.

GIT PULL: sysctl changes for v6.8-rc1

The following changes since commit 861deac3b092f37b2c5e6871732f3e11486f7082:

Linux 6.7-rc7 (2023-12-23 16:25:56 -0800)

are available in the Git repository at:

git://git.kernel.org/pub/scm/linux/kernel/git/mcgrof/linux.git/ tags/sysctl-6.8-rc1

for you to fetch changes up to 561429807d50aad76f1205b0b1d7b4aacf365d4e:

sysctl: remove struct ctl_path (2023-12-28 05:02:42 -0800)

v2: Improve buffer head documentation

Turn buffer head documentation into its own document, and make many general improvements to the docs. Obviously there is much more that could be done. Tested with make htmldocs.

v1: Enable tmpfs quotas

This series enable quota tools to manage tmpfs user/group quotas now the kernel support is released in 6.6.

Honza, this is just a RFC as I’d like to know your input on the approach used here.

v1: fs/proc/task_mmu: move mmu notification mechanism inside mm lock

Move mmu notification mechanism inside mm lock to prevent race condition in other components which depend on it. The notifier will invalidate memory range. Depending upon the number of iterations, different memory ranges would be invalidated.

v4: fuse: Add support for resend pending requests

After the FUSE daemon crashes, the fuse mount point becomes inaccessible. In some production environments, a watchdog daemon is used to preserve the FUSE connection’s file descriptor (fd). When the FUSE daemon crashes, a new FUSE daemon is started and takes over the fd from the watchdog daemon, allowing it to continue providing services.

v1: fs: Wrong function name in comment

This comment refers to function mark_buffer_inode_dirty(), but the function is actually called mark_buffer_dirty_inode(), so fix the comment.

GIT PULL: fsnotify changes for 6.8-rc1

git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs.git fsnotify_for_v6.8-rc1

to get fanotify changes allowing use of fanotify directory events even for filesystems such as FUSE which don’t report proper fsid.

v1: fuse: basic support for idmapped mounts

Dear friends,

This patch series aimed to provide support for idmapped mounts for fuse. We already have idmapped mounts support for almost all widely-used filesystems:

  • local (ext4, btrfs, xfs, fat, vfat, ntfs3, squashfs, f2fs, erofs, ZFS (out-of-tree))
  • network (ceph)

v1: netfs: use kfree_sensitive() instend of kfree() in fscache_free_cookie()

key might contain private information, so use kfree_sensitive to free it. In fscache_free_cookie() use kfree_sensitive().

GIT PULL: xfs: new code for 6.8

Please pull this branch with changes for xfs for 6.8-rc1.

Online repair functionality continues to be expanded. Please refer to the section “New code for 6.8” for a brief description of changes added to Online repair.

v1: blk: optimization for classic polling

This removes the dependency on interrupts to wake up task. Set task state as TASK_RUNNING, if need_resched() returns true, while polling for IO completion. Earlier, polling task used to sleep, relying on interrupt to wake it up. This made some IO take very long when interrupt-coalescing is enabled in NVMe.

网络设备

v1: iproute2: ss: show extra info when ‘–processes’ is not used

A recent modification broke “extra” options for all protocols showing info about the processes when ‘-p’ / ‘–processes’ option was not used as well. In other words, all the additional bits displayed at the end or at the next line were no longer printed if the user didn’t ask to show info about processes as well.

v1: net-next: MT7530 DSA Subdriver Improvements Act II

I’m submitting this to receive reviews while net-next is closed.

v1: net-next: net: dsa: mt7530: support OF-based registration of switch MDIO bus

Currently the MDIO bus of the switches the MT7530 DSA subdriver controls can only be registered as non-OF-based. Bring support for registering the bus OF-based.

v2: net: tcp: make sure init the accept_queue’s spinlocks once

When the socket receives the ACK packet during the three-way handshake, it will hold spinlock. And then the user actively shutdowns the socket and listens to the socket immediately, the spinlock will be initialized. When the socket is going to release the spinlock, a warning is generated. Also the same issue to fastopenq.lock.

v1: wifi: mac80211: tx: Add __must_hold() annotation

Annotates ieee80211_set_beacon_cntdwn() with a __must_hold() annotation to make it clear that ieee80211_set_beacon_cntdwn() is only intended to be called when the caller has a lock on the argument “link.”

v1: vsock/test: add ‘–peer-port’ input argument

Implement port for given CID as input argument instead of using hardcoded value ‘1234’. This allows to run different test instances on a single CID. Port argument is not required parameter and if it is not set, then default value will be ‘1234’ - thus we preserve previous behaviour.

v4: ss: pretty-printing BPF socket-local storage

BPF allows programs to store socket-specific data using BPF_MAP_TYPE_SK_STORAGE maps. The data is attached to the socket itself, and Martin added INET_DIAG_REQ_SK_BPF_STORAGES, so it can be fetched using the INET_DIAG mechanism.

vxlan: how to expose opt-in RFC conformity with unprocessed header flags

Hi!

We got a customer that reported an issue where the Linux VXLAN implementation diverges from the RFC, namely when any of the (reserved) flags other than the VNI one is set, the kernel just drops the package.

v1: net: nbd: always initialize struct msghdr completely

syzbot complains that msg->msg_get_inq value can be uninitialized [1]

struct msghdr got many new fields recently, we should always make sure their values is zero by default.

v1: net: add more sanity check in virtio_net_hdr_to_skb()

syzbot/KMSAN reports access to uninitialized data from gso_features_check() [1]

The repro use af_packet, injecting a gso packet and hdrlen == 0.

We could fix the issue making gso_features_check() more careful while dealing with NETIF_F_TSO_MANGLEID in fast path.

v7: RESEND: can: xilinx_can: Add ECC feature support

Add ECC feature support to Tx and Rx FIFOs for Xilinx CAN Controller. ECC is an IP configuration option where counter registers are added in IP for 1bit/2bit ECC errors count and reset. Also driver reports 1bit/2bit ECC errors for FIFOs based on ECC error interrupts.

v1: net: sched: track device in tcf_block_get/put_ext() only for clsact binder types

Clsact/ingress qdisc is not the only one using shared block, red is also using it. The device tracking was originally introduced by commit 913b47d3424e (“net/sched: Introduce tc block netdev tracking infra”) for clsact/ingress only. Commit 94e2557d086a (“net: sched: move block device tracking into tcf_block_get/put_ext()”) mistakenly enabled that for red as well.

v1: net: udp: annotate data-races around up->pending

up->pending can be read without holding the socket lock, as pointed out by syzbot [1]

Add READ_ONCE() in lockless contexts, and WRITE_ONCE() on write side.

v1: iwl-next: i40e: Log FW state in recovery mode

Introduce logging FW state in recovery mode functionality.

1st patch adds implementation of admin command reading content of alt ram. 2nd patch utilices the command to get trace buffer data and logs it when entering recovery mode.

v2: net-next: net: tcp: accept old ack during closing

In the case above, simultaneous close is happening, and the FIN and ACK packet that send from the server is out of order. Then, the FIN will be dropped by the client, as it has an old ack. Then, the server has to retransmit the FIN, which can cause delay if the server has set the SO_LINGER on the socket.

v1: net: mptcp: better validation of MPTCPOPT_MP_JOIN option

Based on a syzbot report (see 4th patch in the series).

Paolo suggested to do the same for OPTIONS_MPTCP_MPC (5th patch)

v1: iproute2: man/tc-mirred: don’t recommend modprobe

Use ip link add instead of explicit modprobe. Kernel will do correct module loading if necessary.

v1: net: fill in MODULE_DESCRIPTION()s for wx_lib

W=1 builds now warn if module is built without a MODULE_DESCRIPTION(). Add a description to Wangxun’s common code lib.

v1: net: wireguard: receive: annotate data-race around receiving_counter.counter

Syzkaller with KCSAN identified a data-race issue [1] when accessing keypair->receiving_counter.counter.

v2: net: dsa: vsc73xx: Add null pointer check to vsc73xx_gpio_probe

devm_kasprintf() returns a pointer to dynamically allocated memory which can be NULL upon failure.

v1: iwl-net: i40e: Include types.h to some headers

Commit 56df345917c0 (“i40e: Remove circular header dependencies and fix headers”) redistributed a number of includes from one large header file to the locations they were needed.

v1: selftests/net/tcp-ao: Use LDLIBS instead of LDFLAGS

The intel test robot uses only selftest’s Makefile, not the top linux Makefile:

[net-next RFC PATCH 0/5] net: phy: split at803x

This is the last patchset of a long series of cleanup and preparation to make at803x better maintainable and permit the addition of other QCOM PHY Families.

v1: Add PPE device tree node for Qualcomm IPQ SoC

The PPE(packet process engine) hardware block is supported by Qualcomm IPQ platforms, such as IPQ9574 and IPQ5332. The PPE includes the various packet processing modules such as the routing and bridging flow engines, L2 switch capability, VLAN and tunnels.

v8: net-next: Ethernet DWMAC5 fault IRQ support

Add support to listen Ethernet HW common safery IRQ for correctable and uncorrectable fault. The safety IRQ will be triggered for ECC(error correction code), DPP(data path parity, FSM(finite state machine) error.

v1: net: af_unix: Avoid a wakeup if data has been not arrived

In the following scenarios, unnecessary wake-up may occur. When a thread sends a piece of data and then immediately calls recv to wait for the server’s data, the server, upon receiving this thread’s data, calls back unix_write_space to wake up this thread.

v1: net: phy: micrel: reset KSZ9x31 when resuming

On a Renesas Ebisu board, the KSZ9031 PHY is stalled after resuming if the interface has not been brought up before suspending. If it had been brought up before, phylib ensures that reset is asserted before suspending.

v1: tg3: add new module param to force device power down on reboot

The bug #1917471 was fixed in commit 2ca1c94ce0b6 (“tg3: Disable tg3 device on system reboot to avoid triggering AER”) but was reintroduced by commit 9fc3bc764334 (“tg3: power down device only on SYSTEM_POWER_OFF”).

安全增强

v3: Add device tree for IBM system1 BMC

This patchset adds device tree for IBM system1 bmc board.

v1: bcachefs: Replace strlcpy() with strscpy()

strlcpy() reads the entire source buffer first. This read may exceed the destination size limit. This is both inefficient and can lead to linear read overflows if a source string is not NUL-terminated[1]. Additionally, it returns the size of the source string, not the resulting size of the destination string. In an effort to remove strlcpy() completely[2], replace strlcpy() here with strscpy().

v1: ARM: unwind: Add missing “Call trace:” line

Every other architecture in Linux includes the line “Call trace:” before backtraces. In some cases ARM would print “Backtrace:”, but this was only via 1 specific call path, and wasn’t included in CPU Oops nor things like KASAN, UBSAN, etc that called dump_stack().

v1: Enable PSTORE_RAM as a module in the arm64 defconfig

This series enables the PSTORE_RAM config, aka the ramoops driver, in the defconfig.

v2: ASoC: ti: j721e-evm: Use devm_kcalloc() instead of devm_kzalloc()

Use 2-factor multiplication argument form devm_kcalloc() instead of devm_kzalloc().

异步 IO

v2: io_uring: Adjustments for io_ring_ctx_alloc()

Date: Wed, 10 Jan 2024 21:38:12 +0100

A few update suggestions were taken into account from static source code analysis.

Rust For Linux

v1: Rust enablement for LoongArch

Enable Rust support for the LoongArch architecture.

GIT PULL: Rust for v6.8

This is the next round of the Rust support.

All the commits have been in linux-next for more than a couple weeks, but only for 3 -next tags given the holidays (first one next-20231222).

No conflicts expected. No changes to the C side.

BPF

v1: bpf-next: bpf: Minor improvements for bpf_cmp.

Few minor improvements for bpf_cmp() macro: . reduce number of args in __bpf_cmp() . rename NOFLIP to UNLIKELY . add a comment about 64-bit truncation in “i” constraint . use “ri” constraint for sizeof(rhs) <= 4 . improve error message for bpf_cmp_likely()

v2: bpf: libbpf: Apply map_set_def_max_entries() for inner_maps on creation

Previous behaviour created a zero filled btf_map_def for inner maps and tried to use it for a map creation but the linux kernel forbids to create a BPF_MAP_TYPE_PERF_EVENT_ARRAY map with max_entries=0.

RFC: Mark “inlined by some callers” functions in BTF

The user may not realize switch_mm() is inlined by leave_mm(), and we are not tracing the code path leave_mm => switch_mm. (This is x86_64, and both functions are in arch/x86/mm/tlb.c.)

v1: bpf: apply map_set_def_max_entries() for inner_maps on creation

This patch allows to create BPF_MAP_TYPE_ARRAY_OF_MAPS and BPF_MAP_TYPE_HASH_OF_MAPS with values of BPF_MAP_TYPE_PERF_EVENT_ARRAY.

v2: dwarves: pahole: Inject kfunc decl tags into BTF

This commit teaches pahole to parse symbols in .BTF_ids section in vmlinux and discover exported kfuncs. Pahole then takes the list of kfuncs and injects a BTF_KIND_DECL_TAG for each kfunc.

v1: bpf-next: bpf, selftests/bpf: Support PTR_MAYBE_NULL for struct_ops arguments.

Allow passing a null pointer to the operators provided by a struct_ops object. This is an RFC to collect feedbacks/opinions.

v2: bpf-next: bpf: Add bpf_iter_cpumask

Three new kfuncs, namely bpf_iter_cpumask_{new,next,destroy}, have been added for the new bpf_iter_cpumask functionality. These kfuncs enable the iteration of percpu data, such as runqueues, system_group_pcpu, and more.

v3: bpf-next: selftests/bpf: add inline assembly helpers to access array elements

When accessing an array, even if you insert your own bounds check, sometimes the compiler will remove the check. bpf_cmp() will force the compiler to do the check.

v2: bpf-next: selftests/bpf: detect testing prog flags support

Various tests specify extra testing prog_flags when loading BPF programs, like BPF_F_TEST_RND_HI32, and more recently also BPF_F_TEST_REG_INVARIANTS. While BPF_F_TEST_RND_HI32 is old enough to not cause much problem on older kernels, BPF_F_TEST_REG_INVARIANTS is very fresh and unconditionally specifying it causes selftests to fail on even slightly outdated kernels.

GIT PULL: Networking for v6.8

The most interesting thing is probably the networking structs reorganization and a significant amount of changes is around self-tests.

v1: find_vma BPF test: increase length CPU computation

Some aarch64 systems running a PREEMPT_RT patched kernel, needs more time to complete the test. This change mirrors: commit ba83af059153 (“Improve stability of find_vma BPF test”) addressing similar requirements and allowing the QTI SA8775P based systems, and others, to complete the test when running RT kernel.

[Bpf] v1: bpf-next: Introduce concept of conformance groups

The discussion of what the actual conformance groups should be is still in progress, so this is just part 1 which only uses “legacy” for deprecated instructions and “basic” for everything else. Subsequent patches will add more groups as discussion continues.

v2: bpf-next: Improvements for tracking scalars in the BPF verifier

The goal of this series is to extend the verifier’s capabilities of tracking scalars when they are spilled to stack, especially when the spill or fill is narrowing. It also contains a fix by Eduard for infinite loop detection and a state pruning optimization by Eduard that compensates for a verification complexity regression introduced by tracking unbounded scalars.

v1: bpf-next: infer packet range for ‘if pkt ==/!= pkt_end’ instructions

As suggested by Maciej Żenczykowski in [1], extend try_match_pkt_pointers to allow verification of BPF, generated for C code like below:

if (data + 42 != data_end) { … }

周边技术动态

Qemu

v5: target/riscv: deprecate riscv_cpu_options[]

This version is a resend of patches 10 to 17 from v4, reviewed-by and tested-by tags added, rebased with Alistair’s riscv-to-apply.next. Patches 01 to 09 of v4 are already queued.

v5: Support RISC-V IOPMP

This series implements IOPMP specification v1.0.0-draft4 rapid-k model and add IOPMP device to RISC-V virt machine.

v2: target/riscv: Add support for ‘B’ extension

Add support for the new (fast track) ‘B’ extension [1] this extension uses the misa.B bit to indicate that the Zba, Zbb and Zbs extensions are present.

v1: target/riscv: Check for ‘A’ extension on all atomic instructions

Add requirement that ‘A’ is enabled for all atomic instructions that lack the check. This makes the 64-bit versions consistent with the 32-bit versions in the same file.

v3: riscv: support new isa extension detection devicetree properties

Making it a series to keep the standalone change to riscv_isa_string() that Drew reported separate.

v1: riscv-to-apply queue

The following changes since commit 9468484fe904ab4691de6d9c34616667f377ceac:

Merge tag ‘block-pull-request’ of https://gitlab.com/stefanha/qemu into staging (2024-01-09 10:32:23 +0000)

v2: riscv: add rv32i,rv32e and rv64e CPUs

This version shrank to 2 patches since most of the prep work was already done by the RVA22 profile implementation, which is now queued in riscv-to-apply.next.

U-Boot

v1: riscv: qemu: enable booting on a second virtio device

QEMU RISC-V supports multiple virtio devices, but only tries to boot to the first one. Enable support for a second virtio device, that is useful for instance to boot on a disk image + an installer. Ideally that should be made dynamic, but that’s a first step.

v1: board: starfive: handle compatible property in dynamic DT configuration

The difference between the StarFive VisionFive 2 1.2A and 1.3B boards is handled dynamically by looking at the PCB version in the EEPROM in order to have a single u-boot version for both versions of the board. While the “model” property is correctly handled, the “compatible” one is always the the one of version 1.3b.

This patch add support for dynamically configuring that property.

Pull request smbios-2024-04-rc1

The following changes since commit c5e461fbf7cc72f0c1c8a79226b6a5170e56cb4d:

Merge tag ‘u-boot-imx-master-20240108’ of https://gitlab.denx.de/u-boot/custodians/u-boot-imx (2024-01-08 13:39:43 -0500)

v1: riscv: sophgo: milkv_duo: add support for Milk-V Duo board

The Milk-V Duo board is built upon Sophgo’s CV1800B SoC, featuring two XuanTie C906 CPUs running at 1.0GHz and 700MHz, respectively.



Read Album:

Read Related:

Read Latest: