[PATCH] trace: riscv: Remove deprecated kprobe on ftrace support

2024-06-13 Thread Jinjie Ruan
precated kprobe on ftrace support, which is misunderstood. Signed-off-by: Jinjie Ruan --- arch/riscv/Kconfig| 1 - arch/riscv/kernel/probes/Makefile | 1 - arch/riscv/kernel/probes/ftrace.c | 65 --- 3 files changed, 67 deletions(-) delete mode 10

[PATCH] tracing: Replace strncpy() with strscpy() when copying comm

2024-07-31 Thread Jinjie Ruan
Replace the depreciated[1] strncpy() calls with strscpy() when copying comm. Link: https://github.com/KSPP/linux/issues/90 [1] Signed-off-by: Jinjie Ruan --- kernel/trace/trace.c | 2 +- kernel/trace/trace_events_hist.c | 4 ++-- kernel/trace/trace_sched_switch.c | 2 +- 3 files

[PATCH] driver core: Fix a null-ptr-deref in module_add_driver()

2024-08-12 Thread Jinjie Ruan
odule: don't ignore sysfs_create_link() failures") Signed-off-by: Jinjie Ruan --- drivers/base/module.c | 14 +- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/drivers/base/module.c b/drivers/base/module.c index f742ad2a21da..c4eaa1158d54 100644 --- a/drivers/base

[PATCH] ieee802154: Fix build error

2024-09-09 Thread Jinjie Ruan
6ad9cc5157 ("ieee802154: Add NXP MCR20A IEEE 802.15.4 transceiver driver") Signed-off-by: Jinjie Ruan --- drivers/net/ieee802154/Kconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/net/ieee802154/Kconfig b/drivers/net/ieee802154/Kconfig index 95da876c5613..1075e24b11de 1006

[PATCH 0/7] net: Use IRQF_NO_AUTOEN flag in request_irq()

2024-09-09 Thread Jinjie Ruan
drivers to request_irq(). It prevents the automatic enabling of the requested interrupt in the same safe way. With that the usage can be simplified and corrected. Only compile-tested. Jinjie Ruan (7): net: apple: bmac: Use IRQF_NO_AUTOEN flag in request_irq() net: enetc: Use IRQF_NO_AUTO

[PATCH 1/7] net: apple: bmac: Use IRQF_NO_AUTOEN flag in request_irq()

2024-09-09 Thread Jinjie Ruan
disable_irq() after request_irq() still has a time gap in which interrupts can come. request_irq() with IRQF_NO_AUTOEN flag will disable IRQ auto-enable when request IRQ. Signed-off-by: Jinjie Ruan --- drivers/net/ethernet/apple/bmac.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions

[PATCH 3/7] nfp: Use IRQF_NO_AUTOEN flag in request_irq()

2024-09-09 Thread Jinjie Ruan
disable_irq() after request_irq() still has a time gap in which interrupts can come. request_irq() with IRQF_NO_AUTOEN flag will disable IRQ auto-enable when request IRQ. Signed-off-by: Jinjie Ruan --- drivers/net/ethernet/netronome/nfp/nfp_net_common.c | 5 ++--- 1 file changed, 2 insertions

[PATCH 2/7] net: enetc: Use IRQF_NO_AUTOEN flag in request_irq()

2024-09-09 Thread Jinjie Ruan
disable_irq() after request_irq() still has a time gap in which interrupts can come. request_irq() with IRQF_NO_AUTOEN flag will disable IRQ auto-enable when request IRQ. Fixes: bbb96dc7fa1a ("enetc: Factor out the traffic start/stop procedures") Signed-off-by: Jinjie Ruan --- d

[PATCH 4/7] net: ieee802154: mcr20a: Use IRQF_NO_AUTOEN flag in request_irq()

2024-09-09 Thread Jinjie Ruan
disable_irq() after request_irq() still has a time gap in which interrupts can come. request_irq() with IRQF_NO_AUTOEN flag will disable IRQ auto-enable when request IRQ. Fixes: 8c6ad9cc5157 ("ieee802154: Add NXP MCR20A IEEE 802.15.4 transceiver driver") Signed-off-by: Jinjie Ruan --

[PATCH 5/7] wifi: p54: Use IRQF_NO_AUTOEN flag in request_irq()

2024-09-09 Thread Jinjie Ruan
disable_irq() after request_irq() still has a time gap in which interrupts can come. request_irq() with IRQF_NO_AUTOEN flag will disable IRQ auto-enable when request IRQ. Fixes: Signed-off-by: Jinjie Ruan --- drivers/net/wireless/intersil/p54/p54spi.c | 4 +--- 1 file changed, 1 insertion(+), 3

[PATCH 6/7] wifi: mwifiex: Use IRQF_NO_AUTOEN flag in request_irq()

2024-09-09 Thread Jinjie Ruan
disable_irq() after request_irq() still has a time gap in which interrupts can come. request_irq() with IRQF_NO_AUTOEN flag will disable IRQ auto-enable when request IRQ. Signed-off-by: Jinjie Ruan --- drivers/net/wireless/marvell/mwifiex/main.c | 4 ++-- 1 file changed, 2 insertions(+), 2

[PATCH 7/7] wifi: wl1251: Use IRQF_NO_AUTOEN flag in request_irq()

2024-09-09 Thread Jinjie Ruan
lified and corrected. irq_set_status_flags(irq, IRQ_NOAUTOEN); request_irq(dev, irq...); Signed-off-by: Jinjie Ruan --- drivers/net/wireless/ti/wl1251/sdio.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/wireless/ti/wl1251/sdio.c b/d

Re: [PATCH 0/7] net: Use IRQF_NO_AUTOEN flag in request_irq()

2024-09-10 Thread Jinjie Ruan
On 2024/9/9 22:39, Kalle Valo wrote: > Jinjie Ruan writes: > >> As commit cbe16f35bee6 ("genirq: Add IRQF_NO_AUTOEN for request_irq/nmi()") >> said, reqeust_irq() and then disable_irq() is unsafe. >> >> And the code below is subobtimal: >>

Re: [PATCH] kunit: string-stream: Fix a UAF bug in kunit_init_suite()

2024-11-11 Thread Jinjie Ruan
On 2024/11/9 21:02, Kuan-Wei Chiu wrote: > On Sat, Nov 09, 2024 at 08:40:30PM +0800, Kuan-Wei Chiu wrote: >> Hi Jinjie, >> >> On Thu, Oct 24, 2024 at 05:43:03PM +0800, Jinjie Ruan wrote: >>> In kunit_debugfs_create_suite(), if allo

Re: [PATCH] kunit: string-stream: Fix a UAF bug in kunit_init_suite()

2024-11-11 Thread Jinjie Ruan
On 2024/11/9 20:40, Kuan-Wei Chiu wrote: > Hi Jinjie, > > On Thu, Oct 24, 2024 at 05:43:03PM +0800, Jinjie Ruan wrote: >> In kunit_debugfs_create_suite(), if alloc_string_stream() fails in the >> kunit_suite_for_each_test_case() loop, the "suite->log = stream&quo

[PATCH v2] kunit: string-stream: Fix a UAF bug in kunit_init_suite()

2024-11-12 Thread Jinjie Ruan
unit") Suggested-by: Kuan-Wei Chiu Signed-off-by: Jinjie Ruan --- v2: - Correct the fix way. - Add Suggested-by. --- lib/kunit/debugfs.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/kunit/debugfs.c b/lib/kunit/debugfs.c index d548750a325a..b25d214b93e1 100644 -

[PATCH] kunit: string-stream: Fix a UAF bug in kunit_init_suite()

2024-10-24 Thread Jinjie Ruan
c ("kunit: string-stream: Decouple string_stream from kunit") Signed-off-by: Jinjie Ruan --- lib/kunit/string-stream.c | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/kunit/string-stream.c b/lib/kunit/string-stream.c index 54f4fdcbfac8..00ad518b730b 100644 --- a/lib/kunit/string-stream

Re: [PATCH] kunit: string-stream: Fix a UAF bug in kunit_init_suite()

2024-11-06 Thread Jinjie Ruan
Gentle Ping. On 2024/10/24 17:43, Jinjie Ruan wrote: > In kunit_debugfs_create_suite(), if alloc_string_stream() fails in the > kunit_suite_for_each_test_case() loop, the "suite->log = stream" > has assigned before, and the error path only free the suite->log's str