[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250527153007.GD8333@redhat.com>
Date: Tue, 27 May 2025 17:30:08 +0200
From: Oleg Nesterov <oleg@...hat.com>
To: Pu Lehui <pulehui@...weicloud.com>
Cc: mhiramat@...nel.org, peterz@...radead.org, akpm@...ux-foundation.org,
Liam.Howlett@...cle.com, lorenzo.stoakes@...cle.com, vbabka@...e.cz,
jannh@...gle.com, pfalcato@...e.de, linux-mm@...ck.org,
linux-kernel@...r.kernel.org, pulehui@...wei.com
Subject: Re: [RFC PATCH v2 1/2] mm/mremap: Fix uprobe anon page be
overwritten when expanding vma during mremap
Not that this is really important, but the test-case looks broken,
On 05/27, Pu Lehui wrote:
>
> #define _GNU_SOURCE
> #include <fcntl.h>
> #include <unistd.h>
> #include <syscall.h>
> #include <sys/mman.h>
> #include <linux/perf_event.h>
>
> int main(int argc, char *argv[])
> {
> int fd = open(FNAME, O_RDWR|O_CREAT, 0600);
FNAME is not defined
> struct perf_event_attr attr = {
> .type = 9,
Cough ;) Yes I too used perf_event_attr.type == 9 when I wrote another
test-case. Because I am lazy and this is what I see in
/sys/bus/event_source/devices/uprobe/type on my machine.
But me should not assume that perf_pmu_register(&perf_uprobe) -> idr_alloc()
will return 9.
> write(fd, "x", 1);
looks unnecessary.
Oleg.
Powered by blists - more mailing lists