Re: [PATCH 1/5] perf: Add dummy pmu module

2024-10-18 Thread Lucas De Marchi
On Wed, Oct 16, 2024 at 10:51:02AM +0200, Peter Zijlstra wrote: On Tue, Oct 08, 2024 at 01:34:57PM -0500, Lucas De Marchi wrote: +static int parse_device(const char __user *ubuf, size_t size, u32 *instance) +{ + char buf[16]; + ssize_t len; + + if (size > sizeof(buf) - 1) +

Re: [PATCH 1/5] perf: Add dummy pmu module

2024-10-16 Thread Peter Zijlstra
On Tue, Oct 08, 2024 at 01:34:57PM -0500, Lucas De Marchi wrote: > +static int parse_device(const char __user *ubuf, size_t size, u32 *instance) > +{ > + char buf[16]; > + ssize_t len; > + > + if (size > sizeof(buf) - 1) > + return -E2BIG; > + > + len = strncpy_from_user

Re: [PATCH 1/5] perf: Add dummy pmu module

2024-10-14 Thread Lucas De Marchi
On Mon, Oct 14, 2024 at 05:26:19PM -0700, Jeff Johnson wrote: On 10/8/24 11:34, Lucas De Marchi wrote: ... +module_init(dummy_init); +module_exit(dummy_exit); + +MODULE_AUTHOR("Lucas De Marchi "); +MODULE_LICENSE("GPL"); Since commit 1fffe7a34c89 ("script: modpost: emit a warning when the desc

Re: [PATCH 1/5] perf: Add dummy pmu module

2024-10-14 Thread Jeff Johnson
On 10/8/24 11:34, Lucas De Marchi wrote: ... > +module_init(dummy_init); > +module_exit(dummy_exit); > + > +MODULE_AUTHOR("Lucas De Marchi "); > +MODULE_LICENSE("GPL"); Since commit 1fffe7a34c89 ("script: modpost: emit a warning when the description is missing"), a module without a MODULE_DESCRIPT

[PATCH 1/5] perf: Add dummy pmu module

2024-10-08 Thread Lucas De Marchi
Simple dummy module that mimics what can be done with drivers to bind/unbind them from the bus, which should trigger resource release. This is mostly based on how i915 and (pending changes for) xe drivers are interacting with perf pmu. A few differences due to not having backing hardware or for si