Linux 5.18.9
Greg Kroah-Hartman
maintainerI'm announcing the release of the 5.18.9 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
------------
Makefile | 2 - arch/powerpc/include/asm/ftrace.h | 4 +- arch/powerpc/kernel/trace/ftrace.c | 15 +++++++-- arch/powerpc/mm/mem.c | 2 + drivers/clocksource/Kconfig | 2 - drivers/clocksource/timer-ixp4xx.c | 25 ---------------- drivers/md/bcache/btree.c | 1 drivers/md/bcache/writeback.c | 1 drivers/net/ethernet/huawei/hinic/hinic_devlink.c | 4 -- fs/io_uring.c | 34 +++++++++++----------- include/linux/platform_data/timer-ixp4xx.h | 11 ------- kernel/time/tick-sched.c | 1 12 files changed, 40 insertions(+), 62 deletions(-)
Coly Li (1):
bcache: memset on stack variables in bch_btree_check() and bch_sectors_dirty_init()
Greg Kroah-Hartman (1):
Linux 5.18.9
Kees Cook (1):
hinic: Replace memcpy() with direct assignment
Linus Walleij (1):
clocksource/drivers/ixp4xx: Drop boardfile probe path
Masahiro Yamada (1):
tick/nohz: unexport __init-annotated tick_nohz_full_setup()
Naveen N. Rao (1):
powerpc/ftrace: Remove ftrace init tramp once kernel init is complete
Pavel Begunkov (1):
io_uring: fix not locked access to fixed buf table
Greg Kroah-Hartman
maintainerMakefile +1 -1
@@ -1,7 +1,7 @@ # SPDX-License-Identifier: GPL-2.0 VERSION = 5 PATCHLEVEL = 18 -SUBLEVEL = 8 +SUBLEVEL = 9 EXTRAVERSION = NAME = Superb Owl
arch/powerpc/include/asm/ftrace.h +3 -1
@@ -86,7 +86,7 @@ static inline bool arch_syscall_match_sym_name(const char *sym, const char *name#endif /* PPC64_ELF_ABI_v1 */ #endif /* CONFIG_FTRACE_SYSCALLS */ -#ifdef CONFIG_PPC64 +#if defined(CONFIG_PPC64 ) && defined(CONFIG_FUNCTION_TRACER )#include <asm/paca.h> static inline void this_cpu_disable_ftrace (void )
@@ -110,11 +110,13 @@ static inline u8 this_cpu_get_ftrace_enabled(void)return get_paca ()->ftrace_enabled; } +void ftrace_free_init_tramp (void );#else /* CONFIG_PPC64 */ static inline void this_cpu_disable_ftrace (void ) { }static inline void this_cpu_enable_ftrace (void ) { }static inline void this_cpu_set_ftrace_enabled (u8 ftrace_enabled) { }static inline u8 this_cpu_get_ftrace_enabled (void ) {return 1 ; } +static inline void ftrace_free_init_tramp (void ) { }#endif /* CONFIG_PPC64 */ #endif /* !__ASSEMBLY__ */
arch/powerpc/kernel/trace/ftrace.c +12 -3
@@ -306,9 +306,7 @@ static int setup_mcount_compiler_tramp(unsigned long tramp)/* Is this a known long jump tramp? */ for (i =0 ; i <NUM_FTRACE_TRAMPS ; i++) -if (!ftrace_tramps[i]) -break ; -else if (ftrace_tramps[i] == tramp) +if (ftrace_tramps[i] == tramp)return 0 ;/* Is this a known plt tramp? */
@@ -863,6 +861,17 @@ void arch_ftrace_update_code(int command)extern unsigned int ftrace_tramp_text[], ftrace_tramp_init[]; +void ftrace_free_init_tramp (void ) +{ +int i; + +for (i =0 ; i <NUM_FTRACE_TRAMPS && ftrace_tramps[i]; i++) +if (ftrace_tramps[i] == (unsigned long )ftrace_tramp_init) { + ftrace_tramps[i] =0 ; +return ; + } +} +int __init ftrace_dyn_arch_init (void ) {int i;
arch/powerpc/mm/mem.c +2 -0
@@ -22,6 +22,7 @@#include <asm/kasan.h> #include <asm/svm.h> #include <asm/mmzone.h> +#include <asm/ftrace.h> #include <mm/mmu_decl.h>
@@ -312,6 +313,7 @@ void free_initmem(void) ppc_md.progress = ppc_printk_progress;mark_initmem_nx ();free_initmem_default (POISON_FREE_INITMEM ); +ftrace_free_init_tramp (); }/*
drivers/clocksource/Kconfig +1 -1
@@ -80,7 +80,7 @@ config IXP4XX_TIMER bool "Intel XScale IXP4xx timer driver" if COMPILE_TEST depends on HAS_IOMEM select CLKSRC_MMIO - select TIMER_OF if OF + select TIMER_OF help Enables support for the Intel XScale IXP4xx SoC timer.
drivers/clocksource/timer-ixp4xx.c +0 -25
@@ -19,8 +19,6 @@#include <linux/of_address.h> #include <linux/of_irq.h> #include <linux/platform_device.h> -/* Goes away with OF conversion */ -#include <linux/platform_data/timer-ixp4xx.h> /* * Constants to make it easy to access Timer Control/Status registers
@@ -263,28 +261,6 @@ static struct platform_driver ixp4xx_timer_driver = { };builtin_platform_driver (ixp4xx_timer_driver); -/** -* ixp4xx_timer_setup() - Timer setup function to be called from boardfiles -* @timerbase: physical base of timer block -* @timer_irq: Linux IRQ number for the timer -* @timer_freq: Fixed frequency of the timer -*/ -void __init ixp4xx_timer_setup (resource_size_t timerbase, -int timer_irq, -unsigned int timer_freq) -{ -void __iomem *base; - - base =ioremap (timerbase,0x100 ); -if (!base) { -pr_crit ("IXP4xx: can't remap timer\n" ); -return ; - } -ixp4xx_timer_register (base, timer_irq, timer_freq); -} -EXPORT_SYMBOL_GPL (ixp4xx_timer_setup); - -#ifdef CONFIG_OF static __init int ixp4xx_of_timer_init (struct device_node *np) {void __iomem *base;
@@ -315,4 +291,3 @@ static __init int ixp4xx_of_timer_init(struct device_node *np)return ret; }TIMER_OF_DECLARE (ixp4xx,"intel,ixp4xx-timer" , ixp4xx_of_timer_init); -#endif
drivers/md/bcache/btree.c +1 -0
@@ -2017,6 +2017,7 @@ int bch_btree_check(struct cache_set *c)if (c->root->level ==0 )return 0 ; +memset (&check_state,0 ,sizeof (struct btree_check_state )); check_state.c = c; check_state.total_threads =bch_btree_chkthread_nr (); check_state.key_idx =0 ;
drivers/md/bcache/writeback.c +1 -0
@@ -950,6 +950,7 @@ void bch_sectors_dirty_init(struct bcache_device *d)return ; } +memset (&state,0 ,sizeof (struct bch_dirty_init_state )); state.c = c; state.d = d; state.total_threads =bch_btre_dirty_init_thread_nr ();
drivers/net/ethernet/huawei/hinic/hinic_devlink.c +1 -3
@@ -43,9 +43,7 @@ static bool check_image_valid(struct hinic_devlink_priv *priv, const u8 *buf,for (i =0 ; i < fw_image->fw_info.fw_section_cnt; i++) { len += fw_image->fw_section_info[i].fw_section_len; -memcpy (&host_image->image_section_info[i], - &fw_image->fw_section_info[i], -sizeof (struct fw_section_info_st )); + host_image->image_section_info[i] = fw_image->fw_section_info[i]; } if (len != fw_image->fw_len ||
fs/io_uring.c +18 -16
@@ -3187,6 +3187,21 @@ static int io_prep_rw(struct io_kiocb *req, const struct io_uring_sqe *sqe)int ret; kiocb->ki_pos =READ_ONCE (sqe->off); +/* used for fixed read/write too - just read unconditionally */ + req->buf_index =READ_ONCE (sqe->buf_index); + req->imu =NULL ; + +if (req->opcode ==IORING_OP_READ_FIXED || + req->opcode ==IORING_OP_WRITE_FIXED ) { +struct io_ring_ctx *ctx = req->ctx; +u16 index; + +if (unlikely (req->buf_index >= ctx->nr_user_bufs)) +return -EFAULT ; + index =array_index_nospec (req->buf_index, ctx->nr_user_bufs); + req->imu = ctx->user_bufs[index]; +io_req_set_rsrc_node (req, ctx,0 ); + } ioprio =READ_ONCE (sqe->ioprio);if (ioprio) {
@@ -3199,11 +3214,9 @@ static int io_prep_rw(struct io_kiocb *req, const struct io_uring_sqe *sqe) kiocb->ki_ioprio =get_current_ioprio (); } - req->imu =NULL ; req->rw.addr =READ_ONCE (sqe->addr); req->rw.len =READ_ONCE (sqe->len); req->rw.flags =READ_ONCE (sqe->rw_flags); - req->buf_index =READ_ONCE (sqe->buf_index);return 0 ; }
@@ -3335,20 +3348,9 @@ static int __io_import_fixed(struct io_kiocb *req, int rw, struct iov_iter *iterstatic int io_import_fixed (struct io_kiocb *req,int rw,struct iov_iter *iter,unsigned int issue_flags) { -struct io_mapped_ubuf *imu = req->imu; -u16 index, buf_index = req->buf_index; - -if (likely (!imu)) { -struct io_ring_ctx *ctx = req->ctx; - -if (unlikely (buf_index >= ctx->nr_user_bufs)) -return -EFAULT ; -io_req_set_rsrc_node (req, ctx, issue_flags); - index =array_index_nospec (buf_index, ctx->nr_user_bufs); - imu =READ_ONCE (ctx->user_bufs[index]); - req->imu = imu; - } -return __io_import_fixed (req, rw, iter, imu); +if (WARN_ON_ONCE (!req->imu)) +return -EFAULT ; +return __io_import_fixed (req, rw, iter, req->imu); }static void io_ring_submit_unlock (struct io_ring_ctx *ctx,bool needs_lock)
include/linux/platform_data/timer-ixp4xx.h deleted +0 -11
@@ -1,11 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0 */ -#ifndef __TIMER_IXP4XX_H -#define __TIMER_IXP4XX_H - -#include <linux/ioport.h> - -void __init ixp4xx_timer_setup (resource_size_t timerbase, -int timer_irq, -unsigned int timer_freq); - -#endif
kernel/time/tick-sched.c +0 -1
@@ -526,7 +526,6 @@ void __init tick_nohz_full_setup(cpumask_var_t cpumask)cpumask_copy (tick_nohz_full_mask, cpumask); tick_nohz_full_running = true; } -EXPORT_SYMBOL_GPL (tick_nohz_full_setup);static int tick_nohz_cpu_down (unsigned int cpu) {