Re: [PATCH] HID: uhid: refactor deprecated strncpy

2023-09-15 Thread David Rheinsberg
Hi On Fri, Sep 15, 2023, at 7:13 AM, Kees Cook wrote: >> -/* @hid is zero-initialized, strncpy() is correct, strlcpy() not */ >> -len = min(sizeof(hid->name), sizeof(ev->u.create2.name)) - 1; >> -strncpy(hid->name, ev->u.create2.name, len); >> -len = min(sizeof(hid->phys), sizeof(e

Re: {PATCH 0/2] HID: wiimote: Minor change to spinlock usage

2020-09-07 Thread David Rheinsberg
andlers[] const > 2) HID: wiimote: narrow spinlock range in wiimote_hid_event() > > drivers/hid/hid-wiimote-core.c | 10 -- > 1 file changed, 4 insertions(+), 6 deletions(-) Looks still good ;) Reviewed-by: David Rheinsberg Thanks! David

Re: [PATCH 1/2] HID: wiimote: Initialize the controller LEDs with a device ID value

2020-06-25 Thread David Rheinsberg
Hi On Thu, 25 Jun 2020 at 00:09, David Korth wrote: > I've been manually setting the player IDs on Wii controllers when running > multiplayer games by writing to the /sys/class/leds/ directory. Having the > hid-wiimote driver do this itself significantly reduces setup time. What do you mean with

Re: [PATCH 1/2] HID: wiimote: Initialize the controller LEDs with a device ID value

2020-06-24 Thread David Rheinsberg
Hi On Tue, Jun 23, 2020 at 12:57 AM David Korth wrote: > > Based on a similar commit for Sony Sixaxis and DualShock 4 controllers: > HID: sony: Initialize the controller LEDs with a device ID value > > Wii remotes have the same player LED layout as Sixaxis controllers, > so the wiimote setup is b

Re: [PATCH] HID: uhid: actually use the err number from userspace

2019-08-14 Thread David Rheinsberg
Hey > > 2) I think you have to filter some of the error codes. For instance, > > if you return one of the -ERESTARTSYS codes, this might cause the > > syscall to restart (if auto-restart is enabled on this context). At > > the same time, this is not *that* bad. It might even be useful for the > >

Re: [PATCH] HID: uhid: actually use the err number from userspace

2019-08-13 Thread David Rheinsberg
Hey On Mon, Aug 12, 2019 at 6:21 PM Benjamin Tissoires wrote: > > This can help debugging the situation > > Signed-off-by: Benjamin Tissoires > --- > > Hi, > > not entirely sure if we can use this in a such simple way. > > However, this is useful to mimic device behaviour from userspace. > > Che

Re: [PATCH] apparmor: Restore Y/N in /sys for apparmor's "enabled"

2019-04-08 Thread David Rheinsberg
ule/apparmor/parameters/enabled > 1 > > After: > $ cat /sys/module/apparmor/parameters/enabled > Y > > Reported-by: David Rheinsberg > Link: > https://lkml.kernel.org/r/cadydso6k8vyb1eryt4g6+ehrlcvb68gabhvwuulkyjczcyn...@mail.gmail.com > Fixes: c5459b829

[REGRESSION] AppArmor module parameter layout changed with c5459b829b716

2019-04-08 Thread David Rheinsberg
Hi A recent commit changed how `/sys/module/apparmor/parameters/enabled` looks. It was "Y"/"N" before, now it is an integer. I *think* the commit that changed this was: commit c5459b829b716dafd226ad270f25c9a3050f7586 Author: Kees Cook Date: Thu Sep 13 22:28:48 2018 -0700 LSM: Plumb visibi