[PATCH v2 2/3] x86/kprobes: Prohibit kprobing on INT and UD

2024-02-03 Thread Jinghao Jia
Both INT (INT n, INT1, INT3, INTO) and UD (UD0, UD1, UD2) serve special purposes in the kernel, e.g., INT3 is used by KGDB and UD2 is involved in LLVM-KCFI instrumentation. At the same time, attaching kprobes on these instructions (particularly UD) will pollute the stack trace dumped in the kernel

[PATCH v2 3/3] x86/kprobes: Boost more instructions from grp2/3/4/5

2024-02-03 Thread Jinghao Jia
With the instruction decoder, we are now able to decode and recognize instructions with opcode extensions. There are more instructions in these groups that can be boosted: Group 2: ROL, ROR, RCL, RCR, SHL/SAL, SHR, SAR Group 3: TEST, NOT, NEG, MUL, IMUL, DIV, IDIV Group 4: INC, DEC (byte

[PATCH v2 1/3] x86/kprobes: Refactor can_{probe,boost} return type to bool

2024-02-03 Thread Jinghao Jia
Both can_probe and can_boost have int return type but are using int as boolean in their context. Refactor both functions to make them actually return boolean. Signed-off-by: Jinghao Jia --- arch/x86/kernel/kprobes/common.h | 2 +- arch/x86/kernel/kprobes/core.c | 33

Re: [PATCH net-next v4 5/5] tools: virtio: introduce vhost_net_test

2024-02-03 Thread Yunsheng Lin
On 2024/2/4 9:30, Jason Wang wrote: > On Fri, Feb 2, 2024 at 8:24 PM Yunsheng Lin wrote: >> >> On 2024/2/2 12:05, Jason Wang wrote: >>> On Tue, Jan 30, 2024 at 7:38 PM Yunsheng Lin wrote: introduce vhost_net_test basing on virtio_test to test vhost_net changing in the kernel. >>>

[PATCH v2 0/3] x86/kprobes: add exception opcode detector and boost more opcodes

2024-02-03 Thread Jinghao Jia
Hi everyone, This patch set makes the following 3 changes: - It refactors the can_probe and can_boost function to make them return bool instead of int. Both functions are just using int as bool so let's make them return a real boolean value. - It adds an exception opcode detector to prevent

Re: [PATCH net-next v4 5/5] tools: virtio: introduce vhost_net_test

2024-02-03 Thread Jason Wang
On Fri, Feb 2, 2024 at 8:24 PM Yunsheng Lin wrote: > > On 2024/2/2 12:05, Jason Wang wrote: > > On Tue, Jan 30, 2024 at 7:38 PM Yunsheng Lin wrote: > >> > >> introduce vhost_net_test basing on virtio_test to test > >> vhost_net changing in the kernel. > > > > Let's describe what kind of test is

Re: [RFC PATCH] kprobes: Use synchronize_rcu_tasks_rude in kprobe_optimizer

2024-02-03 Thread Yang Jihong
Hello, On 2024/2/4 6:00, Paul E. McKenney wrote: On Mon, Jan 29, 2024 at 08:58:10AM +0800, Yang Jihong wrote: Hello, On 2024/1/28 3:22, Paul E. McKenney wrote: On Tue, Jan 09, 2024 at 07:28:29PM +0800, Yang Jihong wrote: Hello, PING. I had a similar problem. Is this solution feasible?

Re: [PATCH v13 2/6] ring-buffer: Introducing ring-buffer mapping functions

2024-02-03 Thread Steven Rostedt
On Tue, 30 Jan 2024 16:22:06 + Vincent Donnefort wrote: > > > +static void rb_update_meta_page(struct ring_buffer_per_cpu *cpu_buffer) > > > +{ > > > + struct trace_buffer_meta *meta = cpu_buffer->meta_page; > > > + > > > + WRITE_ONCE(meta->reader.read, cpu_buffer->reader_page->read); > > > +

Re: [PATCH v13 2/6] ring-buffer: Introducing ring-buffer mapping functions

2024-02-03 Thread Steven Rostedt
On Mon, 29 Jan 2024 14:27:58 + Vincent Donnefort wrote: > --- /dev/null > +++ b/include/uapi/linux/trace_mmap.h > @@ -0,0 +1,43 @@ > +/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ > +#ifndef _TRACE_MMAP_H_ > +#define _TRACE_MMAP_H_ > + > +#include > + > +/** > + * struct

Re: [RFC PATCH] kprobes: Use synchronize_rcu_tasks_rude in kprobe_optimizer

2024-02-03 Thread Paul E. McKenney
On Mon, Jan 29, 2024 at 08:58:10AM +0800, Yang Jihong wrote: > Hello, > > On 2024/1/28 3:22, Paul E. McKenney wrote: > > On Tue, Jan 09, 2024 at 07:28:29PM +0800, Yang Jihong wrote: > > > Hello, > > > > > > PING. > > > > > > I had a similar problem. Is this solution feasible? > > > > Sadly,

Re: [PATCH] usb: typec: anx7688: Add driver for ANX7688 USB-C HDMI bridge

2024-02-03 Thread Ondřej Jirman
Hi Pavel, On Thu, Feb 01, 2024 at 11:41:56AM +0100, Pavel Machek wrote: > From: Ondrej Jirman > > This is driver for ANX7688 USB-C HDMI, with flashing and debugging > features removed. ANX7688 is rather criticial piece on PinePhone, > there's no display and no battery charging without it.

Re: INFO: rcu detected stall in nsim_fib_event_work

2024-02-03 Thread Hillf Danton
On Sat, 03 Feb 2024 14:16:16 +0800 Ubisectech Sirius > Hello. > We are Ubisectech Sirius Team, the vulnerability lab of China ValiantSec. > Recently, our team has discovered a issue in Linux kernel > 6.8.0-rc2-g6764c317b6bb. > Attached to the email were a POC file of the issue. Could you test