Commit 01b2a5217173 ("tracing: Add ioctl() to force ring buffer waiters to wake up") added a callback to unlocked_ioctl, however in PCuABI the function signature of file_operations->unlocked_ioctl in include/linux/fs.h has been changed to take a user_uintptr_t arg as the third param.
Update the signature of tracing_buffers_ioctl to avoid compilation errors as below when tracing is enabled.
kernel/trace/trace.c:8396:20: error: incompatible function pointer types initializing 'long (*)(struct file *, unsigned int, user_uintptr_t)' (aka 'long (*)(struct file *, unsigned int, unsigned __intcap)') with an expression of type 'long (struct file *, unsigned int, unsigned long)' [-Werror,-Wincompatible-function-pointer-types]
Reported-by: Teo Couprie Diaz teo.coupriediaz@arm.com Signed-off-by: Zachary Leaf zachary.leaf@arm.com ---
note: this patch is for incoming rebase from 5.18->6.1
kernel/trace/trace.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c index 5cfc95a52bc3..3ad1db4c4a3e 100644 --- a/kernel/trace/trace.c +++ b/kernel/trace/trace.c @@ -8367,7 +8367,7 @@ tracing_buffers_splice_read(struct file *file, loff_t *ppos, }
/* An ioctl call with cmd 0 to the ring buffer file will wake up all waiters */ -static long tracing_buffers_ioctl(struct file *file, unsigned int cmd, unsigned long arg) +static long tracing_buffers_ioctl(struct file *file, unsigned int cmd, user_uintptr_t arg) { struct ftrace_buffer_info *info = file->private_data; struct trace_iterator *iter = &info->iter; -- 2.34.1
On 18/01/2023 17:30, Zachary Leaf wrote:
Commit 01b2a5217173 ("tracing: Add ioctl() to force ring buffer waiters to wake up") added a callback to unlocked_ioctl, however in PCuABI the function signature of file_operations->unlocked_ioctl in include/linux/fs.h has been changed to take a user_uintptr_t arg as the third param.
Update the signature of tracing_buffers_ioctl to avoid compilation errors as below when tracing is enabled.
kernel/trace/trace.c:8396:20: error: incompatible function pointer types initializing 'long (*)(struct file *, unsigned int, user_uintptr_t)' (aka 'long (*)(struct file *, unsigned int, unsigned __intcap)') with an expression of type 'long (struct file *, unsigned int, unsigned long)' [-Werror,-Wincompatible-function-pointer-types]
Reported-by: Teo Couprie Diaz teo.coupriediaz@arm.com Signed-off-by: Zachary Leaf zachary.leaf@arm.com
note: this patch is for incoming rebase from 5.18->6.1
kernel/trace/trace.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Applied on my 6.1 branch [1], thanks!
Kevin
[1] https://git.morello-project.org/kbrodsky-arm/linux/-/commits/morello/next-6....
diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c index 5cfc95a52bc3..3ad1db4c4a3e 100644 --- a/kernel/trace/trace.c +++ b/kernel/trace/trace.c @@ -8367,7 +8367,7 @@ tracing_buffers_splice_read(struct file *file, loff_t *ppos, }
/* An ioctl call with cmd 0 to the ring buffer file will wake up all waiters */ -static long tracing_buffers_ioctl(struct file *file, unsigned int cmd, unsigned long arg) +static long tracing_buffers_ioctl(struct file *file, unsigned int cmd, user_uintptr_t arg) { struct ftrace_buffer_info *info = file->private_data; struct trace_iterator *iter = &info->iter; -- 2.34.1
linux-morello mailing list -- linux-morello@op-lists.linaro.org To unsubscribe send an email to linux-morello-leave@op-lists.linaro.org
linux-morello@op-lists.linaro.org