linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] HID: bpf: fix hid_bpf_input_report() when hid-core is not ready
@ 2024-04-11  7:05 Benjamin Tissoires
  2024-04-11  9:08 ` Jiri Kosina
  2024-04-11 14:05 ` Benjamin Tissoires
  0 siblings, 2 replies; 5+ messages in thread
From: Benjamin Tissoires @ 2024-04-11  7:05 UTC (permalink / raw)
  To: Jiri Kosina, Benjamin Tissoires; +Cc: linux-input, linux-kernel

Reported by linux-next:
After merging the hid tree, today's linux-next build (x86_64 allmodconfig)
failed like this:

x86_64-linux-gnu-ld: vmlinux.o: in function `hid_bpf_input_report':
(.text+0x1c75181): undefined reference to `hid_input_report'

Caused by commit 9be50ac30a83 ("HID: bpf: allow to inject HID event
from BPF")

I just forgot to put the indirection in place.

Link: https://lore.kernel.org/linux-kernel/20240411105131.7830f966@canb.auug.org.au/
Signed-off-by: Benjamin Tissoires <bentiss@kernel.org>
---
Seems like an overlook in my patch.
---
 drivers/hid/bpf/hid_bpf_dispatch.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/hid/bpf/hid_bpf_dispatch.c b/drivers/hid/bpf/hid_bpf_dispatch.c
index 79ece3d1b9e2..10289f44d0cc 100644
--- a/drivers/hid/bpf/hid_bpf_dispatch.c
+++ b/drivers/hid/bpf/hid_bpf_dispatch.c
@@ -534,7 +534,7 @@ hid_bpf_input_report(struct hid_bpf_ctx *ctx, enum hid_report_type type, u8 *buf
 
 	hdev = (struct hid_device *)ctx->hid; /* discard const */
 
-	return hid_input_report(hdev, type, buf, size, 0);
+	return hid_bpf_ops->hid_input_report(hdev, type, buf, size, 0);
 }
 __bpf_kfunc_end_defs();
 

---
base-commit: 685dadafbde29dc3d6b7a13be284d684b06d4d4f
change-id: 20240411-fix-hid-bpf-fb67411ac650

Best regards,
-- 
Benjamin Tissoires <bentiss@kernel.org>


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH] HID: bpf: fix hid_bpf_input_report() when hid-core is not ready
  2024-04-11  7:05 [PATCH] HID: bpf: fix hid_bpf_input_report() when hid-core is not ready Benjamin Tissoires
@ 2024-04-11  9:08 ` Jiri Kosina
  2024-04-11  9:51   ` Benjamin Tissoires
  2024-04-11 14:05 ` Benjamin Tissoires
  1 sibling, 1 reply; 5+ messages in thread
From: Jiri Kosina @ 2024-04-11  9:08 UTC (permalink / raw)
  To: Benjamin Tissoires; +Cc: linux-input, linux-kernel

On Thu, 11 Apr 2024, Benjamin Tissoires wrote:

> Reported by linux-next:
> After merging the hid tree, today's linux-next build (x86_64 allmodconfig)
> failed like this:
> 
> x86_64-linux-gnu-ld: vmlinux.o: in function `hid_bpf_input_report':
> (.text+0x1c75181): undefined reference to `hid_input_report'
> 
> Caused by commit 9be50ac30a83 ("HID: bpf: allow to inject HID event
> from BPF")
> 
> I just forgot to put the indirection in place.
> 
> Link: https://lore.kernel.org/linux-kernel/20240411105131.7830f966@canb.auug.org.au/
> Signed-off-by: Benjamin Tissoires <bentiss@kernel.org>

Please also include Fixes: tag.

Thanks,

-- 
Jiri Kosina
SUSE Labs


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] HID: bpf: fix hid_bpf_input_report() when hid-core is not ready
  2024-04-11  9:08 ` Jiri Kosina
@ 2024-04-11  9:51   ` Benjamin Tissoires
  2024-04-11  9:57     ` Benjamin Tissoires
  0 siblings, 1 reply; 5+ messages in thread
From: Benjamin Tissoires @ 2024-04-11  9:51 UTC (permalink / raw)
  To: Jiri Kosina; +Cc: linux-input, linux-kernel

On Apr 11 2024, Jiri Kosina wrote:
> On Thu, 11 Apr 2024, Benjamin Tissoires wrote:
> 
> > Reported by linux-next:
> > After merging the hid tree, today's linux-next build (x86_64 allmodconfig)
> > failed like this:
> > 
> > x86_64-linux-gnu-ld: vmlinux.o: in function `hid_bpf_input_report':
> > (.text+0x1c75181): undefined reference to `hid_input_report'
> > 
> > Caused by commit 9be50ac30a83 ("HID: bpf: allow to inject HID event
> > from BPF")
> > 
> > I just forgot to put the indirection in place.
> > 
> > Link: https://lore.kernel.org/linux-kernel/20240411105131.7830f966@canb.auug.org.au/
> > Signed-off-by: Benjamin Tissoires <bentiss@kernel.org>
> 
> Please also include Fixes: tag.

Oops, correct. I'll add the following (in case b4 is smart enough to
pick it up by itself):

Fixes: 9be50ac30a83 ("HID: bpf: allow to inject HID event from BPF")

Cheers,
Benjamin

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] HID: bpf: fix hid_bpf_input_report() when hid-core is not ready
  2024-04-11  9:51   ` Benjamin Tissoires
@ 2024-04-11  9:57     ` Benjamin Tissoires
  0 siblings, 0 replies; 5+ messages in thread
From: Benjamin Tissoires @ 2024-04-11  9:57 UTC (permalink / raw)
  To: Jiri Kosina; +Cc: linux-input, linux-kernel

On Apr 11 2024, Benjamin Tissoires wrote:
> On Apr 11 2024, Jiri Kosina wrote:
> > On Thu, 11 Apr 2024, Benjamin Tissoires wrote:
> > 
> > > Reported by linux-next:
> > > After merging the hid tree, today's linux-next build (x86_64 allmodconfig)
> > > failed like this:
> > > 
> > > x86_64-linux-gnu-ld: vmlinux.o: in function `hid_bpf_input_report':
> > > (.text+0x1c75181): undefined reference to `hid_input_report'
> > > 
> > > Caused by commit 9be50ac30a83 ("HID: bpf: allow to inject HID event
> > > from BPF")
> > > 
> > > I just forgot to put the indirection in place.
> > > 
> > > Link: https://lore.kernel.org/linux-kernel/20240411105131.7830f966@canb.auug.org.au/
> > > Signed-off-by: Benjamin Tissoires <bentiss@kernel.org>
> > 
> > Please also include Fixes: tag.
> 
> Oops, correct. I'll add the following (in case b4 is smart enough to
> pick it up by itself):

FTR, b4 is actually smart enough to pick this one up :)

> 
> Fixes: 9be50ac30a83 ("HID: bpf: allow to inject HID event from BPF")
> 
Cheers,
Benjamin

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] HID: bpf: fix hid_bpf_input_report() when hid-core is not ready
  2024-04-11  7:05 [PATCH] HID: bpf: fix hid_bpf_input_report() when hid-core is not ready Benjamin Tissoires
  2024-04-11  9:08 ` Jiri Kosina
@ 2024-04-11 14:05 ` Benjamin Tissoires
  1 sibling, 0 replies; 5+ messages in thread
From: Benjamin Tissoires @ 2024-04-11 14:05 UTC (permalink / raw)
  To: Jiri Kosina, Benjamin Tissoires; +Cc: linux-input, linux-kernel

On Thu, 11 Apr 2024 09:05:56 +0200, Benjamin Tissoires wrote:
> Reported by linux-next:
> After merging the hid tree, today's linux-next build (x86_64 allmodconfig)
> failed like this:
> 
> x86_64-linux-gnu-ld: vmlinux.o: in function `hid_bpf_input_report':
> (.text+0x1c75181): undefined reference to `hid_input_report'
> 
> [...]

Applied to hid/hid.git (for-6.10/hid-bpf), thanks!

[1/1] HID: bpf: fix hid_bpf_input_report() when hid-core is not ready
      https://git.kernel.org/hid/hid/c/b912cf042072

Cheers,
-- 
Benjamin Tissoires <bentiss@kernel.org>


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2024-04-11 14:05 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-04-11  7:05 [PATCH] HID: bpf: fix hid_bpf_input_report() when hid-core is not ready Benjamin Tissoires
2024-04-11  9:08 ` Jiri Kosina
2024-04-11  9:51   ` Benjamin Tissoires
2024-04-11  9:57     ` Benjamin Tissoires
2024-04-11 14:05 ` Benjamin Tissoires

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).