[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20240620083602.GB30070@redhat.com>
Date: Thu, 20 Jun 2024 10:36:02 +0200
From: Oleg Nesterov <oleg@...hat.com>
To: "Liao, Chang" <liaochang1@...wei.com>
Cc: jolsa@...nel.org, rostedt@...dmis.org, mhiramat@...nel.org,
ast@...nel.org, daniel@...earbox.net, andrii@...nel.org,
nathan@...nel.org, peterz@...radead.org, mingo@...hat.com,
mark.rutland@....com, linux-perf-users@...r.kernel.org,
linux-kernel@...r.kernel.org, bpf@...r.kernel.org
Subject: Re: [PATCH bpf-next] uprobes: Fix the xol slots reserved for
uretprobe trampoline
On 06/20, Liao, Chang wrote:
>
> However, when i asm porting uretprobe trampoline to arm64
> to explore its benefits on that architecture, i discovered the problem that
> single slot is not large enought for trampoline code.
Ah, but then I'd suggest to make the changelog more clear. It looks as
if the problem was introduced by the patch from Jiri. Note that we was
confused as well ;)
And,
+ /* Reserve enough slots for the uretprobe trampoline */
+ for (slot_nr = 0;
+ slot_nr < max((insns_size / UPROBE_XOL_SLOT_BYTES), 1);
+ slot_nr++)
this doesn't look right. Just suppose that insns_size = UPROBE_XOL_SLOT_BYTES + 1.
I'd suggest DIV_ROUND_UP(insns_size, UPROBE_XOL_SLOT_BYTES).
And perhaps it would be better to send this change along with
uretprobe_trampoline_for_arm64 ?
Oleg.
Powered by blists - more mailing lists