Linux 5.18.7
Greg Kroah-Hartman
maintainerI'm announcing the release of the 5.18.7 kernel.
All users of the 5.18 kernel series must upgrade.
The updated 5.18.y git tree can be found at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git linux-5.18.y
and can be browsed at the normal kernel.org git web browser:
https://git.kernel.org/?p=linux/kernel/git/stable/linux-stable.git;a=summary
thanks,
greg k-h
------------
Documentation/devicetree/bindings/nvmem/fsl,layerscape-sfp.yaml | 14 + Makefile | 2 arch/s390/mm/pgtable.c | 2 arch/x86/boot/boot.h | 36 ++- arch/x86/boot/main.c | 2 drivers/net/ethernet/sun/cassini.c | 4 drivers/net/wireless/realtek/rtlwifi/rtl8192de/phy.c | 5 drivers/net/wwan/iosm/iosm_ipc_protocol_ops.c | 10 - fs/io_uring.c | 2 fs/notify/fanotify/fanotify.c | 24 -- fs/notify/fsnotify.c | 85 ++++----- fs/zonefs/super.c | 94 ++++++---- include/linux/fsnotify_backend.h | 31 ++- kernel/bpf/btf.c | 4 tools/testing/selftests/bpf/prog_tests/fexit_bpf2bpf.c | 14 + tools/testing/selftests/bpf/progs/freplace_global_func.c | 18 + 16 files changed, 216 insertions(+), 131 deletions(-)
Amir Goldstein (2):
fsnotify: introduce mark type iterator
fsnotify: consistent behavior for parent not watching children
Christian Borntraeger (1):
s390/mm: use non-quiescing sske for KVM switch to keyed guest
Damien Le Moal (1):
zonefs: fix zonefs_iomap_begin() for reads
Greg Kroah-Hartman (1):
Linux 5.18.7
Jakub Kicinski (2):
wifi: rtlwifi: remove always-true condition pointed out by GCC 12
net: wwan: iosm: remove pointless null check
Jens Axboe (1):
io_uring: use original request task for inflight tracking
Kees Cook (1):
x86/boot: Wrap literal addresses in absolute_pointer()
Martin Liška (1):
eth: sun: cassini: remove dead code
Sean Anderson (1):
dt-bindings: nvmem: sfp: Add clock properties
Toke Høiland-Jørgensen (2):
bpf: Fix calling global functions from BPF_PROG_TYPE_EXT programs selftests/bpf: Add selftest for calling global functions from freplace
Greg Kroah-Hartman
maintainerDocumentation/devicetree/bindings/nvmem/fsl,layerscape-sfp.yaml +14 -0
@@ -24,15 +24,29 @@ properties: reg: maxItems: 1 + clocks: + maxItems: 1 + description: + The SFP clock. Typically, this is the platform clock divided by 4. + + clock-names: + const: sfp + required: - compatible - reg + - clock-names + - clocks unevaluatedProperties: false examples: - | + #include <dt-bindings/clock/fsl,qoriq-clockgen.h> efuse@1e80000 { compatible = "fsl,ls1028a-sfp"; reg = <0x1e80000 0x8000>; + clocks = <&clockgen QORIQ_CLK_PLATFORM_PLL + QORIQ_CLK_PLL_DIV(4)>; + clock-names = "sfp"; };
Makefile +1 -1
@@ -1,7 +1,7 @@ # SPDX-License-Identifier: GPL-2.0 VERSION = 5 PATCHLEVEL = 18 -SUBLEVEL = 6 +SUBLEVEL = 7 EXTRAVERSION = NAME = Superb Owl
arch/s390/mm/pgtable.c +1 -1
@@ -748,7 +748,7 @@ void ptep_zap_key(struct mm_struct *mm, unsigned long addr, pte_t *ptep)pgste_val (pgste) |=PGSTE_GR_BIT |PGSTE_GC_BIT ; ptev =pte_val (*ptep);if (!(ptev & _PAGE_INVALID) && (ptev & _PAGE_WRITE)) -page_set_storage_key (ptev &PAGE_MASK ,PAGE_DEFAULT_KEY ,1 ); +page_set_storage_key (ptev &PAGE_MASK ,PAGE_DEFAULT_KEY ,0 );pgste_set_unlock (ptep, pgste);preempt_enable (); }
arch/x86/boot/boot.h +24 -12
@@ -110,66 +110,78 @@ typedef unsigned int addr_t;static inline u8 rdfs8 (addr_t addr) { +u8 *ptr = (u8 *)absolute_pointer (addr);u8 v; - asmvolatile ("movb %%fs:%1,%0" :"=q" (v) :"m" (*(u8 *)addr)); + asmvolatile ("movb %%fs:%1,%0" :"=q" (v) :"m" (*ptr));return v; }static inline u16 rdfs16 (addr_t addr) { +u16 *ptr = (u16 *)absolute_pointer (addr);u16 v; - asmvolatile ("movw %%fs:%1,%0" :"=r" (v) :"m" (*(u16 *)addr)); + asmvolatile ("movw %%fs:%1,%0" :"=r" (v) :"m" (*ptr));return v; }static inline u32 rdfs32 (addr_t addr) { +u32 *ptr = (u32 *)absolute_pointer (addr);u32 v; - asmvolatile ("movl %%fs:%1,%0" :"=r" (v) :"m" (*(u32 *)addr)); + asmvolatile ("movl %%fs:%1,%0" :"=r" (v) :"m" (*ptr));return v; }static inline void wrfs8 (u8 v,addr_t addr) { - asmvolatile ("movb %1,%%fs:%0" :"+m" (*(u8 *)addr) :"qi" (v)); +u8 *ptr = (u8 *)absolute_pointer (addr); + asmvolatile ("movb %1,%%fs:%0" :"+m" (*ptr) :"qi" (v)); }static inline void wrfs16 (u16 v,addr_t addr) { - asmvolatile ("movw %1,%%fs:%0" :"+m" (*(u16 *)addr) :"ri" (v)); +u16 *ptr = (u16 *)absolute_pointer (addr); + asmvolatile ("movw %1,%%fs:%0" :"+m" (*ptr) :"ri" (v)); }static inline void wrfs32 (u32 v,addr_t addr) { - asmvolatile ("movl %1,%%fs:%0" :"+m" (*(u32 *)addr) :"ri" (v)); +u32 *ptr = (u32 *)absolute_pointer (addr); + asmvolatile ("movl %1,%%fs:%0" :"+m" (*ptr) :"ri" (v)); }static inline u8 rdgs8 (addr_t addr) { +u8 *ptr = (u8 *)absolute_pointer (addr);u8 v; - asmvolatile ("movb %%gs:%1,%0" :"=q" (v) :"m" (*(u8 *)addr)); + asmvolatile ("movb %%gs:%1,%0" :"=q" (v) :"m" (*ptr));return v; }static inline u16 rdgs16 (addr_t addr) { +u16 *ptr = (u16 *)absolute_pointer (addr);u16 v; - asmvolatile ("movw %%gs:%1,%0" :"=r" (v) :"m" (*(u16 *)addr)); + asmvolatile ("movw %%gs:%1,%0" :"=r" (v) :"m" (*ptr));return v; }static inline u32 rdgs32 (addr_t addr) { +u32 *ptr = (u32 *)absolute_pointer (addr);u32 v; - asmvolatile ("movl %%gs:%1,%0" :"=r" (v) :"m" (*(u32 *)addr)); + asmvolatile ("movl %%gs:%1,%0" :"=r" (v) :"m" (*ptr));return v; }static inline void wrgs8 (u8 v,addr_t addr) { - asmvolatile ("movb %1,%%gs:%0" :"+m" (*(u8 *)addr) :"qi" (v)); +u8 *ptr = (u8 *)absolute_pointer (addr); + asmvolatile ("movb %1,%%gs:%0" :"+m" (*ptr) :"qi" (v)); }static inline void wrgs16 (u16 v,addr_t addr) { - asmvolatile ("movw %1,%%gs:%0" :"+m" (*(u16 *)addr) :"ri" (v)); +u16 *ptr = (u16 *)absolute_pointer (addr); + asmvolatile ("movw %1,%%gs:%0" :"+m" (*ptr) :"ri" (v)); }static inline void wrgs32 (u32 v,addr_t addr) { - asmvolatile ("movl %1,%%gs:%0" :"+m" (*(u32 *)addr) :"ri" (v)); +u32 *ptr = (u32 *)absolute_pointer (addr); + asmvolatile ("movl %1,%%gs:%0" :"+m" (*ptr) :"ri" (v)); }/* Note: these only return true/false, not a signed return value! */
arch/x86/boot/main.c +1 -1
@@ -33,7 +33,7 @@ static void copy_boot_params(void)u16 cl_offset; };const struct old_cmdline *const oldcmd = - (const struct old_cmdline *)OLD_CL_ADDRESS ; +absolute_pointer (OLD_CL_ADDRESS );BUILD_BUG_ON (sizeof (boot_params) !=4096 );memcpy (&boot_params.hdr, &hdr,sizeof (hdr));
drivers/net/ethernet/sun/cassini.c +2 -2
@@ -1313,7 +1313,7 @@ static void cas_init_rx_dma(struct cas *cp)writel (val, cp->regs +REG_RX_PAGE_SIZE );/* enable the header parser if desired */ -if (CAS_HP_FIRMWARE == cas_prog_null) +if (&CAS_HP_FIRMWARE [0 ] == &cas_prog_null[0 ])return ; val =CAS_BASE (HP_CFG_NUM_CPU ,CAS_NCPUS >63 ?0 :CAS_NCPUS );
@@ -3780,7 +3780,7 @@ static void cas_reset(struct cas *cp, int blkflag)/* program header parser */ if ((cp->cas_flags &CAS_FLAG_TARGET_ABORT ) || - (CAS_HP_ALT_FIRMWARE == cas_prog_null)) { + (&CAS_HP_ALT_FIRMWARE [0 ] == &cas_prog_null[0 ])) {cas_load_firmware (cp,CAS_HP_FIRMWARE ); }else {cas_load_firmware (cp,CAS_HP_ALT_FIRMWARE );
drivers/net/wireless/realtek/rtlwifi/rtl8192de/phy.c +1 -4
@@ -2386,10 +2386,7 @@ void rtl92d_phy_reload_iqk_setting(struct ieee80211_hw *hw, u8 channel)rtl_dbg (rtlpriv,COMP_SCAN ,DBG_LOUD ,"Just Read IQK Matrix reg for channel:%d....\n" , channel); -if ((rtlphy->iqk_matrix[indexforchannel]. - value[0 ] !=NULL ) -/*&&(regea4 != 0) */ ) - _rtl92d_phy_patha_fill_iqk_matrix(hw, true, + _rtl92d_phy_patha_fill_iqk_matrix(hw, true, rtlphy->iqk_matrix[ indexforchannel].value, 0, (rtlphy->iqk_matrix[
drivers/net/wwan/iosm/iosm_ipc_protocol_ops.c +0 -10
@@ -372,8 +372,6 @@ bool ipc_protocol_dl_td_prepare(struct iosm_protocol *ipc_protocol,struct sk_buff *ipc_protocol_dl_td_process (struct iosm_protocol *ipc_protocol,struct ipc_pipe *pipe) { -u32 tail = -le32_to_cpu (ipc_protocol->p_ap_shm->tail_array[pipe->pipe_nr]);struct ipc_protocol_td *p_td;struct sk_buff *skb;
@@ -403,14 +401,6 @@ struct sk_buff *ipc_protocol_dl_td_process(struct iosm_protocol *ipc_protocol, goto ret; } -if (!IPC_CB (skb)) { -dev_err (ipc_protocol->dev,"pipe# %d, tail: %d skb_cb is NULL" , - pipe->pipe_nr, tail); -ipc_pcie_kfree_skb (ipc_protocol->pcie, skb); - skb =NULL ; - goto ret; - } -if (p_td->buffer.address !=IPC_CB (skb)->mapping) {dev_err (ipc_protocol->dev,"invalid buf=%llx or skb=%p" , (unsigned long long )p_td->buffer.address, skb->data);
fs/io_uring.c +1 -1
@@ -1647,7 +1647,7 @@ static inline void io_req_track_inflight(struct io_kiocb *req) {if (!(req->flags &REQ_F_INFLIGHT )) { req->flags |=REQ_F_INFLIGHT ; -atomic_inc (¤t->io_uring->inflight_tracked); +atomic_inc (&req->task->io_uring->inflight_tracked); } }
fs/notify/fanotify/fanotify.c +5 -19
@@ -319,12 +319,8 @@ static u32 fanotify_group_event_mask(struct fsnotify_group *group,return 0 ; } -fsnotify_foreach_iter_type (type) { -if (!fsnotify_iter_should_report_type (iter_info, type)) -continue ; - mark = iter_info->marks[type]; - -/* Apply ignore mask regardless of ISDIR and ON_CHILD flags */ + fsnotify_foreach_iter_mark_type(iter_info, mark, type) { +/* Apply ignore mask regardless of mark's ISDIR flag */ marks_ignored_mask |= mark->ignored_mask;/*
@@ -334,14 +330,6 @@ static u32 fanotify_group_event_mask(struct fsnotify_group *group,if (event_mask &FS_ISDIR && !(mark->mask &FS_ISDIR ))continue ; -/* -* If the event is on a child and this mark is on a parent not -* watching children, don't send it! -*/ -if (type ==FSNOTIFY_ITER_TYPE_PARENT && - !(mark->mask &FS_EVENT_ON_CHILD )) -continue ; - marks_mask |= mark->mask;/* Record the mark types of this group that matched the event */
@@ -849,16 +837,14 @@ static struct fanotify_event *fanotify_alloc_event(*/ static __kernel_fsid_t fanotify_get_fsid (struct fsnotify_iter_info *iter_info) { +struct fsnotify_mark *mark;int type;__kernel_fsid_t fsid = {}; -fsnotify_foreach_iter_type (type) { + fsnotify_foreach_iter_mark_type(iter_info, mark, type) {struct fsnotify_mark_connector *conn; -if (!fsnotify_iter_should_report_type (iter_info, type)) -continue ; - - conn =READ_ONCE (iter_info->marks[type]->connector); + conn =READ_ONCE (mark->connector);/* Mark is just getting destroyed or created? */ if (!conn)continue ;
fs/notify/fsnotify.c +44 -41
138 lines not on this page · raw message
fs/zonefs/super.c +64 -30
180 lines not on this page · raw message
include/linux/fsnotify_backend.h +24 -7
@@ -370,6 +370,7 @@ static inline bool fsnotify_valid_obj_type(unsigned int obj_type)struct fsnotify_iter_info {struct fsnotify_mark *marks[FSNOTIFY_ITER_TYPE_COUNT ]; +struct fsnotify_group *current_group;unsigned int report_mask;int srcu_idx; };
@@ -386,20 +387,31 @@ static inline void fsnotify_iter_set_report_type( iter_info->report_mask |= (1U << iter_type); } -static inline void fsnotify_iter_set_report_type_mark ( -struct fsnotify_iter_info *iter_info,int iter_type, -struct fsnotify_mark *mark) +static inline struct fsnotify_mark *fsnotify_iter_mark ( +struct fsnotify_iter_info *iter_info,int iter_type) { - iter_info->marks[iter_type] = mark; - iter_info->report_mask |= (1U << iter_type); +if (fsnotify_iter_should_report_type (iter_info, iter_type)) +return iter_info->marks[iter_type]; +return NULL ; +} + +static inline int fsnotify_iter_step (struct fsnotify_iter_info *iter,int type, +struct fsnotify_mark **markp) +{ +while (type <FSNOTIFY_ITER_TYPE_COUNT ) { + *markp =fsnotify_iter_mark (iter, type); +if (*markp) +break ; + type++; + } +return type; }#define FSNOTIFY_ITER_FUNCS (name,NAME ) \ static inline struct fsnotify_mark *fsnotify_iter_##name##_mark( \ struct fsnotify_iter_info *iter_info) \ { \ - return (iter_info->report_mask & (1U << FSNOTIFY_ITER_TYPE_##NAME)) ? \ - iter_info->marks[FSNOTIFY_ITER_TYPE_##NAME] : NULL; \ + return fsnotify_iter_mark(iter_info, FSNOTIFY_ITER_TYPE_##NAME); \ }FSNOTIFY_ITER_FUNCS (inode,INODE )
@@ -409,6 +421,11 @@ FSNOTIFY_ITER_FUNCS(sb, SB)#define fsnotify_foreach_iter_type (type) \ for (type = 0; type < FSNOTIFY_ITER_TYPE_COUNT; type++) +#define fsnotify_foreach_iter_mark_type (iter, mark, type) \ + for (type = 0; \ + type = fsnotify_iter_step(iter, type, &mark), \ + type < FSNOTIFY_ITER_TYPE_COUNT; \ + type++)/* * fsnotify_connp_t is what we embed in objects which connector can be attached
kernel/bpf/btf.c +2 -2
@@ -5769,6 +5769,7 @@ static int btf_check_func_arg_match(struct bpf_verifier_env *env, struct bpf_reg_state *regs, bool ptr_to_mem_ok) { +enum bpf_prog_type prog_type =resolve_prog_type (env->prog);struct bpf_verifier_log *log = &env->log;u32 i, nargs, ref_id, ref_obj_id =0 ;bool is_kfunc =btf_is_kernel (btf);
@@ -5834,8 +5835,7 @@ static int btf_check_func_arg_match(struct bpf_verifier_env *env,if (ret <0 )return ret; -if (btf_get_prog_ctx_type (log, btf, t, - env->prog->type, i)) { +if (btf_get_prog_ctx_type (log, btf, t, prog_type, i)) {/* If function expects ctx type in BTF check that caller * is passing PTR_TO_CTX. */
tools/testing/selftests/bpf/prog_tests/fexit_bpf2bpf.c +14 -0
@@ -395,6 +395,18 @@ static void test_func_map_prog_compatibility(void) "./test_attach_probe.o"); } +static void test_func_replace_global_func (void ) +{ +const char *prog_name[] = { +"freplace/test_pkt_access" , + }; + +test_fexit_bpf2bpf_common ("./freplace_global_func.o" , +"./test_pkt_access.o" , +ARRAY_SIZE (prog_name), + prog_name, false,NULL ); +} +/* NOTE: affect other tests, must run in serial mode */ void serial_test_fexit_bpf2bpf (void ) {
@@ -416,4 +428,6 @@ void serial_test_fexit_bpf2bpf(void)test_func_replace_multi ();if (test__start_subtest ("fmod_ret_freplace" ))test_fmod_ret_freplace (); +if (test__start_subtest ("func_replace_global_func" )) +test_func_replace_global_func (); }
tools/testing/selftests/bpf/progs/freplace_global_func.c new file +18 -0
@@ -0,0 +1,18 @@ +// SPDX-License-Identifier: GPL-2.0 +#include <linux/bpf.h> +#include <bpf/bpf_helpers.h> + +__noinline +int test_ctx_global_func(struct __sk_buff *skb) +{ +volatile int retval =1 ; +return retval; +} + +SEC("freplace/test_pkt_access") +int new_test_pkt_access (struct __sk_buff *skb) +{ +return test_ctx_global_func (skb); +} + +char _license[] SEC("license") = "GPL";