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

泰晓Linux系统盘,不用安装,即插即跑
请稍侯

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

呀呀呀 创作于 2024/09/09

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

内核动态

RISC-V 架构支持

v1: Allow to enable PREEMPT_RT.

The printk bits required for PREEMPT_RT are sitting in linux-next.

v1: pwm: Add pwm driver for Sophgo SG2042

Add driver for pwm controller of Sophgo SG2042 SoC.

v3: bpf-next: Local vmtest enhancement and RV64 enabled

Patch 1-3 fix some problem about bpf selftests. Patch 4 add local rootfs image support for vmtest. Patch 5 enable cross-platform testing for vmtest. Patch 6-10 enable vmtest on RV64.

v1: pinctrl: k210: Make (p)clk local to k210_fpioa_probe()

There were never any users of k210_fpioa_data.clk and k210_fpioa_data.pclk outside k210_fpioa_probe().

v1: add function arguments to ftrace

These patches add support for printing function arguments in ftrace.

v1: -next: riscv: Use LIST_HEAD() to simplify code

list_head can be initialized automatically with LIST_HEAD() instead of calling INIT_LIST_HEAD().

GIT PULL: RISC-V Sophgo Devicetrees for v6.12

Please pull dt changes for RISC-V/Sophgo.

v2: riscv: Disable preemption while handling PR_RISCV_CTX_SW_FENCEI_OFF

The icache will be flushed in switch_to() if force_icache_flush is true, or in flush_icache_deferred() if icache_stale_mask is set.

v2: i2c: designware: Group all DesignWare drivers under a single option

This is a proposal for Kconfig improvement regarding the Synopsys DesignWare I2C adapter driver.

v4: riscv: spacemit: add pinctrl support to K1 SoC

This series adds pinctrl support to SpacemiT’s K1 SoC, the controller uses a single register to describe all pin functions, including bias pull up/down, drive strength, schmitter trigger, slew rate, strong pull-up, mux mode.

v1: pinctrl: Add T-Head TH1520 SoC pin controllers

This adds a pin control driver created by Emil for the T-Head TH1520 RISC-V SoC used on the Lichee Pi 4A and BeagleV Ahead boards and updates the device trees to make use of it.

v1: -next: irqchip/sifive-plic: Make use of __assign_bit() API

We have for some time the __assign_bit() API to replace open coded

v13: riscv: sophgo: add dmamux support for Sophgo CV1800/SG2000 SoCs

Add dma multiplexer support for the Sophgo CV1800/SG2000 SoCs.

v4: Enable serial NOR flash on RZ/G2UL SMARC EVK

This patch series aims to enable serial NOR flash on RZ/G2UL SMARC EVK.

LoongArch 架构支持

v1: smp: Mark smp_prepare_boot_cpu() __init

Function smp_prepare_boot_cpu() is only called at boot stage, here mark it as __init.

v1: Consolidate IO memcpy functions

Several architectures have almost the same implementation for__memcpy_toio, __memcpy_fromio and memset_io.

v4: LoongArch/percpu: Simplify _percpu_read() and _percpu_write()

_percpu_read() and _percpu_write() macros call __percpu_read() and __percpu_write() static inline functions that result in a single assembly instruction.

v3: Add EDAC driver for loongson memory controller

Add a simple EDAC driver which report single bit errors (CE) only on loongson platform.

v1: longsoon/percpu: Simplify _percpu_read() and _percpu_write()

_percpu_read() and _percpu_write() macros call __percpu_read() and __percpu_write() static inline functions that result in a single assembly instruction.

ARM 架构支持

v1: arm64: qcom: sda660-ifc6560: enable GPU and WiFi support

Follow the MSM8998 example and limit num_context_banks on SDM630 / SDM660 platforms.

v2: SLUB: Add support for per object memory policies

In SLUB the memory policies are applied on a
per page frame / folio bases.

GIT PULL: Allwinner SoC device tree changes for 6.12

Here’s the Allwinner device tree changes for 6.12.

v1: arm64/mm: use lm_alias() with addresses passed to memblock_free()

This fixes the following splat at boot time (seen with CONFIG_DEBUG_VIRTUAL=y):

v6: arm-cs-trace-disasm.py/perf must accommodate non-zero DSO text offset

v1: Correct perf sampling with guest VMs

This series cleans up perf recording around guest events and improves the accuracy of the resulting perf reports.

v1: irqchip/gic: prevent buffer overflow in gic_ipi_send_mask()

ARM GIC arch v2 spec claims support for just 8 CPU interfaces.

v7: Marvell Odyssey uncore performance monitor support

This series of patches introduces support for uncore performance monitor units (PMUs) on the Marvell Odyssey platform.

v4: perf: Add Arm Network-on-Chip PMU driver

v1: Add support for Ariaboard Photonicat RK3568

Add dts for Ariaboard Photonicat RK3568.

v2: Do not shatter hugezeropage on wp-fault

It was observed at [1] and [2] that the current kernel behaviour of shattering a hugezeropage is inconsistent and suboptimal.

v3: Add support for Kontron OSM-S i.MX8MP SoM and carrier boards

Patch 1: board DT bindings Patch 2: OSM-S i.MX8MP SoM and BL carrier board devicetrees Patch 3: i.MX8MP SMARC module and eval carrier board devicetrees

v1: Add initial support for QCS8300

Add initial support for QCS8300 SoC and QCS8300 RIDE board.

v5: can-next: can: rockchip_canfd: add support for CAN-FD IP core found on Rockchip RK3568

This series adds support for the CAN-FD IP core found on the Rockchip RK3568.

v4: clk: imx8qxp: Defer instead of failing probe

When of_clk_parent_fill is ran without all the parent clocks having been probed then the probe function will return -EINVAL, making it so that the probe isn’t attempted again.

v2: mfd: syscon: Use regmap max_register_is_0 as needed

syscon has always set the optional max_register configuration of regmap to ensure the correct checks are in place.

X86 架构支持

v1: drm/etnaviv: Print error message when driver can’t get pages

This error could happen when the GFP_HIGHUSER flag is set, such an error can also be seen on the X86 platform.

v9: Dynamic Allocation of the reserved_mem array

The reserved_mem array is used to store data for the different reserved memory regions defined in the DT of a device.

v2: platform/x86:intel/pmc: Ignore all LTRs during suspend

Add support to ignore all LTRs before suspend and restore the previous LTR values after suspend.

v3: mm: Introduce ADDR_LIMIT_47BIT personality flag

Some applications rely on placing data in free bits addresses allocated by mmap.

[RFC/PATCHSET 00/10] perf tools: Do not set attr.exclude_guest by default (v3)

I found perf tools set exclude_guest bit inconsistently.

v1: 6.10: 6.10.9-rc2 review

This is the start of the stable review cycle for the 6.10.9 release.

v3: Adjustments for preferred core detection

Preferred core detection is fragile in that any CPU that reports less than 255 for any core is assumed to be a preferred core design.

v3: nosnp sev command line support

Provide “nosnp” boot option via “sev=nosnp” kernel command line to prevent SEV-SNP[1] capable host kernel from enabling SEV-SNP and initializing Reverse Map Table (RMP) [1].

v1: random: Include <linux/percpu.h> and resolve circular include dependency

There were several attempts to resolve circular include dependency after the addition of percpu.h: 1c9df907da83 (“random: fix circular include dependency on arm64 after addition of percpu.h”), c0842fbc1b18 (“random32: move the pseudo-random 32-bit definitions to prandom.h”) and finally d9f29deb7fe8 (“prandom: Remove unused include”) that completely removes inclusion of <linux/percpu.h>.

v1: KVM: VMX: Also clear SGX EDECCSSA in KVM CPU caps when SGX is disabled

When SGX EDECCSSA support was added to KVM in commit 16a7fe3728a8, it forgot to clear the X86_FEATURE_SGX_EDECCSSA bit in KVM CPU caps when KVM SGX is disabled.

v1: rust: block: Use 32-bit atomics

Not all architectures have core::sync::atomic::AtomicU64 available. In particular, 32-bit x86 doesn’t support it. AtomicU32 is available everywhere, so use that instead.

v6: x86/cacheinfo: Set the number of leaves per CPU

This is the case of Intel Meteor Lake, which now is out in the world.

v2: Enable measuring the kernel’s Source-based Code Coverage and MC/DC with Clang

This series adds support for building x86-64 kernels with Clang’s Source- based Code Coverage[1] in order to facilitate Modified Condition/Decision Coverage (MC/DC)[2] that provably correlates to source code for all levels of compiler optimization.

[RFC/PATCH 0/5] perf: Relax privilege restriction on AMD IBS (v3)

This is RFC v3 to allow AMD IBS to regular users on the default settings where kernel-level profiling is disabled (perf_event_paranoid=2).

v7: x86/resctrl: Support AMD Assignable Bandwidth Monitoring Counters (ABMC)

This series adds the support for Assignable Bandwidth Monitoring Counters (ABMC). It is also called QoS RMID Pinning feature

v3: power: supply: extension API

Introduce a mechanism for drivers to extend the properties implemented by a power supply.

v2: mm: Care about shadow stack guard gap when getting an unmapped area

As covered in the commit log for c44357c2e76b (“x86/mm: care about shadow stack guard gap during placement”) our current mmap() implementation does not take care to ensure that a new mapping isn’t placed with existing mappings inside it’s own guard gaps.

v1: iommu/amd: Add parameter to limit V1 page-sizes to 4 KiB

Add the ‘pgsize_4k’ as a valid value to the amd_iommu= command line parameter to limit the page-sizes used for V1 page-tables for 4 KiB.

v1: TDX MMU Part 2

This series picks up where “TDX MMU prep series part 1” left off in implementing the parts of TDX support that deal with shared and private memory.

v8: Final pieces of Intel new families support

All except one of the precursor patches were merged to Linus’ tree in the v6.11 merge window.

v1: vdso: Use only headers from the vdso/ namespace

The recent implementation of getrandom in the generic vdso library, includes headers from outside of the vdso/ namespace.

v1: x86/percpu: Unify __pcpu_op{1,2}_N() macros to __pcpu_op_N()

Unify __pcpu_op1_N() and __pcpu_op2_N() macros to __pcpu_op_N() by applying the macro only to asm mnemonic, not to the mnemonic plus its arguments.

进程调度

v1: sched: Improve cache locality of RSEQ concurrency IDs

Intermittent workloads behaving in bursts spaced by more than 100ms on each CPU exhibit bad cache locality and degraded performance compared to purely per-cpu data indexing, because concurrency IDs are allocated over various CPUs and cores, therefore losing cache locality of the associated data.

v3: sched/topology: optimize topology_span_sane()

The function may call cpumask_equal with tl->mask(cpu) == tl->mask(i), even when cpu != i. In such case, cpumask_equal() would always return true, and we can proceed to the next iteration immediately.

内存管理

v1: maple_tree: Mark three functions as __maybe_unused

People keep trying to remove three functions that are going to be used in a feature that is being developed.

v4: implement async block discards and other ops via io_uring

There is an interest in having asynchronous block operations like discard and write zeroes.

v1: mm/vmalloc.c: use helper function va_size()

Use helper function va_size() to improve code readability. No functional modification involved.

v1: uprobes,mm: speculative lockless VMA-to-uprobe lookup

Implement speculative (lockless) resolution of VMA to inode to uprobe, bypassing the need to take mmap_lock for reads, if possible.

v1: mm: hwpoison: two more poison recovery

One more CoW path to support poison recorvery in do_cow_fault(), and the last copy_user_highpage() user is replaced to copy_mc_user_highpage() from copy_present_page() during fork to support poison recorvery too.

v1: mm/show_mem.c: report alloc tags in human readable units

We already do this when reporting slab info - more consistent and more readable.

v8: mm: enable large folios swap-in support

Currently, we support mTHP swapout but not swapin. This means that once mTHP is swapped out, it will come back as small folios when swapped in.

v1: arm64: Add infrastructure for use of AT_HWCAP3

Since arm64 has now used all of AT_HWCAP2 it needs to either start using AT_HWCAP3 (which was recently added for PowerPC) or start allocating bits 32..61 of AT_HWCAP first.

v3: tmpfs: Add case-insensitive support for tmpfs

This patchset adds support for case-insensitive file names lookups in tmpfs.

v4: memcg: add charging of already allocated slab objects

At the moment, the slab objects are charged to the memcg at the allocation time. However there are cases where slab objects are allocated at the time where the right target memcg to charge it to is not known.

v1: mm: migrate: simplify find_mm_struct()

Use find_get_task_by_vpid() to replace the task_struct find logic in find_mm_struct(), note that this patch move the ptrace_may_access() call out from rcu_read_lock() scope, this is ok because it actually does not need it, find_get_task_by_vpid() already get the pid and task safely, ptrace_may_access() can use the task safely, like what sched_core_share_pid() similarly do.

v1: mm: thp: simplify split_huge_pages_pid()

The helper find_get_task_by_vpid() can totally replace the task_struct find logic in split_huge_pages_pid(), so use it to simplify the code.

v2: mm: arm64: document why pte is not advanced in contpte_ptep_set_access_flags()

According to David and Ryan, there isn’t a bug here, even though we don’t advance the PTE entry, because __ptep_set_access_flags() only uses the access flags from the entry.

v4: slab: add struct kmem_cache_args

This is v4 which allows NULL to be passed in the struct kmem_cache_args argument of kmem_cache_create() and substitutes default parameters in this case.

v1: mm: use unique zsmalloc caches names

Each zsmalloc pool maintains several named kmem-caches for zs_handle-s and zspage-s.

v1: mm/damon/vaddr: protect vma traversal in __damon_va_thre_regions() with rcu read lock

Traversing VMAs of a given maple tree should be protected by rcu read lock. However, __damon_va_three_regions() is not doing the protection. Hold the lock.

v2: mm/hugetlb: simplify refs in memfd_alloc_folio

The folio_try_get in memfd_alloc_folio is not necessary. Delete it, and delete the matching folio_put in memfd_pin_folios.

v1: mm/mm_init.c: add zidcache to the init_reserved_page function

Each call to the init_reserved_page function will look up the corresponding zid for the given pfn parameter.

v1: mm/slab: Optimize the code logic in find_mergeable()

We can first assess the flags, if it’s unmergeable, there’s no need to calculate the size and align.

v1: dm verity: don’t use WQ_MEM_RECLAIM

Since dm-verity doesn’t support writes, the kernel’s memory reclaim code will never wait on dm-verity work. That makes the use of WQ_MEM_RECLAIM in dm-verity unnecessary.

v1: RESEND: usb: gadget: dummy_hcd: execute hrtimer callback in softirq context

Commit a7f3813e589f (“usb: gadget: dummy_hcd: Switch to hrtimer transfer scheduler”) switched dummy_hcd to use hrtimer and made the timer’s callback be executed in the hardirq context.

文件系统

v6: Hardware wrapped key support for QCom ICE and UFS core

I took this work over from Gaurav Kashyap and integrated Eric’s series into it for an easier discussion on the actual API to be used for wrapped keys as well as if and how to enable users to indicate whether wrapped keys should be used at all.

v1: -next: ext4: don’t pass full mapping flags to ext4_es_insert_extent()

When converting a delalloc extent in ext4_es_insert_extent(), since we only want to pass the info of whether the quota has already been claimed if the allocation is a direct allocation from ext4_map_create_blocks(), there is no need to pass full mapping flags, so changes to just pass whether the EXT4_GET_BLOCKS_DELALLOC_RESERVE bit is set.

v2: extensible syscalls: CHECK_FIELDS to allow for easier feature detection

This is something that I’ve been thinking about for a while.

v4: nfsd: implement the “delstid” draft

I’ve been working on some pynfs testcases for CB_GETATTR, and have found more bugs in our implementation.

v5: fanotify: add pre-content hooks

v1: fs/pipe: Correct imprecise wording in comment

The comment inaccurately describes what pipefs is - that is, a file system.

v1: iomap: clean preallocated blocks in iomap_end() when 0 bytes was written.

Recently, syzbot reported a issue as following:

网络设备

v1: net-next: net: ibm: emac: modernize modules

Use devm and dev_* instead of printk.

v1: net: hsr: prevent NULL pointer dereference in hsr_proxy_announce()

In the function hsr_proxy_annouance() added in the previous commit with ProxyNodeTable data”), the return value of the hsr_port_get_hsr() function is not checked to be a NULL pointer, which causes a NULL pointer dereference.

v2: net-next: net: Convert using devm_clk_get_enabled()/devm_clk_get_optional_enabled()

v11: ipsec-next: Add IP-TFS mode to xfrm

This patchset adds a new xfrm mode implementing on-demand IP-TFS. IP-TFS (AggFrag encapsulation) has been standardized in RFC9347.

v5: net-next:pull request: ice: support devlink subfunction

Currently ice driver does not allow creating more than one networking device per physical function.

v4: landlock: Signal scoping support

This patch series adds scoping mechanism for signals.

v1: bpf: sock_map: add a cond_resched() in sock_hash_free()

Several syzbot soft lockup reports all have in common sock_hash_free()

If a map with a large number of buckets is destroyed, we need to yield the cpu when needed.

v4: ethtool-next: Introduce PHY listing and targeting

This series adds the ethtool-side support to list PHYs associated to a netdevice, as well as allowing to target PHYs for some commands

v1: net-next: RX software timestamp for all - round 3

I know the series is more than 15 patches, but I didn’t want to have a 4th round for a single patch.

v10: net-next: net: stmmac: FPE via ethtool + tc

Move the Frame Preemption(FPE) over to the new standard API which uses ethtool-mm/tc-mqprio/tc-taprio.

v2: net: bpf: devmap: provide rxq after redirect

Add bugfix and related selftest.

v1: lib80211: Use ERR_CAST() to return

Using ERR_CAST() is more reasonable and safer, When it is necessary to convert the type of an error pointer and return it.

v1: ixgbe: Manual AN-37 for troublesome link partners for X550 SFI

Some (Juniper MX5) SFP link partners exhibit a disinclination to autonegotiate with X550 configured in SFI mode.

v6: net-next: Add support to PHYLINK for LAN743x/PCI11x1x chips

Divide the PHYLINK adaptation and SFP modifications into two separate patch series.

v2: net-next: net: ti: icssg-prueth: Make pa_stats optional

pa_stats is optional in dt bindings, make it optional in driver as well.

v2: net: dsa: felix: ignore pending status of TAS module when it’s disabled

The TAS module could not be configured when it’s running in pending status.

v1: net: r8169: correct the reset timing of RTL8125 for link-change event

The commit 621735f59064 (“r8169: fix rare issue with broken rx after link-down on RTL8125”) set a reset work for RTL8125 in r8169_phylink_handler() to avoid the MAC from locking up, this makes the connection broken after unplugging then re-plugging the Ethernet cable.

v1: net-next: bnxt_en: implement tcp-data-split ethtool command

NICs that use the bnxt_en driver support tcp-data-split feature named HDS(header-data-split).

安全增强

v2: -next: Introduce several opposite string choice helpers

Similar to the exists helper: str_enable_disable/ str_enabled_disabled/str_on_off/str_yes_no helpers, we can add the opposite helpers. That’s str_disable_enable, str_disabled_enabled, str_off_on and str_no_yes.

v10: Add support for aw96103/aw96105 proximity sensor

Add drivers that support Awinic aw96103/aw96105 proximity sensors.

v2: -next: coccinelle: Add some rules for string_chioces helpers.

We found that many of the detection rules for helpers in string_choices.h are missing. This series of patches is intended to complete these rules.

异步 IO

v1: [6.1][0/2] io_uring: Do not set PF_NO_SETAFFINITY on poller threads

Setting the PF_NO_SETAFFINITY flag creates problems in combination with cpuset operations (see commit messages for details).

Rust For Linux

v2: rust: Initial MIPS support

This series added MIPS arch support to rust for linux, hopefully MIPS is not too late to the party :-)

v1: rust: lint improvements

This is a series that contains a series of lint-related things.

v1: rust: arch/um: Rust modules support for UML

The series make Rust modules running under x86_64 UML, as a supplement for the previous work.

v1: RESEND: block, rust: simplify validate_block_size() function

Using range and contains() method is just fancy shmancy way of writing two comparisons. Using range doesn’t prevent any bugs here because typing “=” in range can be forgotten just as easily as in “<=” operator.

v1: block, rust: simplify validate_block_size() function

Using range and contains() method is just fancy shmancy way of writing two comparisons which IMO is less readable.

BPF

v2: bpf-next: bpftool: improve btf c dump sorting stability

Existing algorithm for BTF C dump sorting uses only types and names of the structs and unions for ordering.

v3: bpf-next: allow kfuncs in tracepoint and perf event

It is possible to call a cpumask kfunc within a raw tp_btf program but not possible within tracepoint or perf event programs.

v1: bpf-next: bpf: change int cmd argument in __sys_bpf into typed enum bpf_cmd

This improves BTF data recorded about this function and makes debugging/tracing better, because now command can be displayed as symbolic name, instead of obscure number.

v1: bpf-next: bpf: Check percpu map value size first

Percpu map is often used, but the map value size limit often ignored, like issue: https://github.com/iovisor/bcc/issues/2519.

v1: net-next: Unmask upper DSCP bits - part 4 (last)

This patchset finishes to unmask the upper DSCP bits in the IPv4 flow key in preparation for allowing IPv4 FIB rules to match on DSCP. No functional changes are expected.

v2: -next: perf stat: Support inherit events for bperf

bperf (perf-stat –bpf-counter) has not supported inherit events during fork() since it was first introduced.

v2: bpf-next: bpf: Allow skb dynptr for tp_btf

This makes bpf_dynptr_from_skb usable for tp_btf, so that we can easily parse skb in tracepoints. This has been discussed in [0], and Martin suggested to use dynptr (instead of helpers like bpf_skb_load_bytes).

v1: bpf-next: bpf: Follow up on gen_epilogue

The set addresses some follow ups on the earlier gen_epilogue patch set.

v1: bpf-next: xsk: bump xsk_queue::queue_empty_descs in xp_can_alloc()

We have STAT_FILL_EMPTY test case in xskxceiver that tries to process traffic with fill queue being empty which currently fails for zero copy ice driver after it started to use xsk_buff_can_alloc() API.

v5: uprobes: RCU-protected hot path optimizations

This patch set is heavily inspired by Peter Zijlstra’s uprobe optimization patches ([0]) and continues that work, albeit trying to keep complexity to the minimum, and attepting to reuse existing primitives as much as possible.

v1: rcu: Add light-weight readers for SRCU

This series provides light-weight readers for SRCU.

v2: bpf-next: bpf, arm64: Jit BPF_CALL to direct call when possible

Currently, BPF_CALL is always jited to indirect call. When target is within the range of direct call, BPF_CALL can be jited to direct call.

v1: HID: HID: bpf: add a new hook to control hid-generic

This is a slight change from the fundamentals of HID-BPF.

v1: bpf-next: libbpf: Add support for aliased BPF programs

This adds libbpf support for creating multiple BPF programs having the same instructions using symbol aliases.

周边技术动态

Qemu

v5: bsd-user: Comprehensive RISCV Support

Key Changes Compared to Version 4: Minor formatting changes

v7: riscv: QEMU RISC-V IOMMU Support

In this new version the only significant code change was made in patch 3, where we’re no longer modifying the host address with the translated address.

v6: target/riscv: Add Smrnmi support.

This patchset added support for Smrnmi Extension in RISC-V.

U-Boot

v5: efi: Add a test for EFI bootmeth

The test coverage for the EFI bootmeth is incomplete since it does not actually boot the application. This series creates a simple test for this purpose.



Read Album:

Read Related:

Read Latest: