* [PATCH AUTOSEL 5.15 2/4] riscv: Unconditionnally select KASAN_VMALLOC if KASAN
2023-05-09 3:55 [PATCH AUTOSEL 5.15 1/4] sched: Fix KCSAN noinstr violation Sasha Levin
@ 2023-05-09 3:55 ` Sasha Levin
2023-05-09 3:55 ` [PATCH AUTOSEL 5.15 3/4] powerpc/fsl_uli1575: Allow to disable FSL_ULI1575 support Sasha Levin
2023-05-09 3:55 ` [PATCH AUTOSEL 5.15 4/4] recordmcount: Fix memory leaks in the uwrite function Sasha Levin
2 siblings, 0 replies; 4+ messages in thread
From: Sasha Levin @ 2023-05-09 3:55 UTC (permalink / raw)
To: linux-kernel, stable
Cc: Alexandre Ghiti, Björn Töpel, Palmer Dabbelt,
Sasha Levin, paul.walmsley, palmer, aou, linux-riscv
From: Alexandre Ghiti <alexghiti@rivosinc.com>
[ Upstream commit 864046c512c2cd8418dc928b91981fb12a80396c ]
If KASAN is enabled, VMAP_STACK depends on KASAN_VMALLOC so enable
KASAN_VMALLOC with KASAN so that we can enable VMAP_STACK by default.
Signed-off-by: Alexandre Ghiti <alexghiti@rivosinc.com>
Reviewed-by: Björn Töpel <bjorn@rivosinc.com>
Link: https://lore.kernel.org/r/20230203075232.274282-7-alexghiti@rivosinc.com
Signed-off-by: Palmer Dabbelt <palmer@rivosinc.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
arch/riscv/Kconfig | 1 +
1 file changed, 1 insertion(+)
diff --git a/arch/riscv/Kconfig b/arch/riscv/Kconfig
index bf602e38962fa..ba62a3846e369 100644
--- a/arch/riscv/Kconfig
+++ b/arch/riscv/Kconfig
@@ -102,6 +102,7 @@ config RISCV
select HAVE_SYSCALL_TRACEPOINTS
select IRQ_DOMAIN
select IRQ_FORCED_THREADING
+ select KASAN_VMALLOC if KASAN
select MODULES_USE_ELF_RELA if MODULES
select MODULE_SECTIONS if MODULES
select OF
--
2.39.2
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH AUTOSEL 5.15 3/4] powerpc/fsl_uli1575: Allow to disable FSL_ULI1575 support
2023-05-09 3:55 [PATCH AUTOSEL 5.15 1/4] sched: Fix KCSAN noinstr violation Sasha Levin
2023-05-09 3:55 ` [PATCH AUTOSEL 5.15 2/4] riscv: Unconditionnally select KASAN_VMALLOC if KASAN Sasha Levin
@ 2023-05-09 3:55 ` Sasha Levin
2023-05-09 3:55 ` [PATCH AUTOSEL 5.15 4/4] recordmcount: Fix memory leaks in the uwrite function Sasha Levin
2 siblings, 0 replies; 4+ messages in thread
From: Sasha Levin @ 2023-05-09 3:55 UTC (permalink / raw)
To: linux-kernel, stable
Cc: Pali Rohár, Michael Ellerman, Sasha Levin, andriy.shevchenko,
linus.walleij, arnd, linuxppc-dev
From: Pali Rohár <pali@kernel.org>
[ Upstream commit 22fdf79171e8509db54599fd2c05ef0022ee83f5 ]
ULI1575 PCIe south bridge exists only on some Freescale boards. Allow to
disable CONFIG_FSL_ULI1575 symbol when it is not explicitly selected and
only implied. This is achieved by marking symbol as visible by providing
short description. Also adds dependency for this symbol to prevent enabling
it on platforms on which driver does not compile.
Signed-off-by: Pali Rohár <pali@kernel.org>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://msgid.link/20230409000812.18904-7-pali@kernel.org
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
arch/powerpc/platforms/Kconfig | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/arch/powerpc/platforms/Kconfig b/arch/powerpc/platforms/Kconfig
index e02d29a9d12ff..ec8b6b855b8de 100644
--- a/arch/powerpc/platforms/Kconfig
+++ b/arch/powerpc/platforms/Kconfig
@@ -261,7 +261,9 @@ config CPM2
on it (826x, 827x, 8560).
config FSL_ULI1575
- bool
+ bool "ULI1575 PCIe south bridge support"
+ depends on FSL_SOC_BOOKE || PPC_86xx
+ select FSL_PCI
select GENERIC_ISA_DMA
help
Supports for the ULI1575 PCIe south bridge that exists on some
--
2.39.2
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH AUTOSEL 5.15 4/4] recordmcount: Fix memory leaks in the uwrite function
2023-05-09 3:55 [PATCH AUTOSEL 5.15 1/4] sched: Fix KCSAN noinstr violation Sasha Levin
2023-05-09 3:55 ` [PATCH AUTOSEL 5.15 2/4] riscv: Unconditionnally select KASAN_VMALLOC if KASAN Sasha Levin
2023-05-09 3:55 ` [PATCH AUTOSEL 5.15 3/4] powerpc/fsl_uli1575: Allow to disable FSL_ULI1575 support Sasha Levin
@ 2023-05-09 3:55 ` Sasha Levin
2 siblings, 0 replies; 4+ messages in thread
From: Sasha Levin @ 2023-05-09 3:55 UTC (permalink / raw)
To: linux-kernel, stable
Cc: Hao Zeng, Steven Rostedt, Sasha Levin, chenhuacai, zhangqing
From: Hao Zeng <zenghao@kylinos.cn>
[ Upstream commit fa359d068574d29e7d2f0fdd0ebe4c6a12b5cfb9 ]
Common realloc mistake: 'file_append' nulled but not freed upon failure
Link: https://lkml.kernel.org/r/20230426010527.703093-1-zenghao@kylinos.cn
Signed-off-by: Hao Zeng <zenghao@kylinos.cn>
Suggested-by: Steven Rostedt <rostedt@goodmis.org>
Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
scripts/recordmcount.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/scripts/recordmcount.c b/scripts/recordmcount.c
index cce12e1971d85..ec692af8ce9eb 100644
--- a/scripts/recordmcount.c
+++ b/scripts/recordmcount.c
@@ -102,6 +102,7 @@ static ssize_t uwrite(void const *const buf, size_t const count)
{
size_t cnt = count;
off_t idx = 0;
+ void *p = NULL;
file_updated = 1;
@@ -109,7 +110,10 @@ static ssize_t uwrite(void const *const buf, size_t const count)
off_t aoffset = (file_ptr + count) - file_end;
if (aoffset > file_append_size) {
- file_append = realloc(file_append, aoffset);
+ p = realloc(file_append, aoffset);
+ if (!p)
+ free(file_append);
+ file_append = p;
file_append_size = aoffset;
}
if (!file_append) {
--
2.39.2
^ permalink raw reply related [flat|nested] 4+ messages in thread