Re: [PATCH] counter: Allow 32-bit tasks to use the character device

From: William Breathitt Gray

Date: Sat Oct 31 2026 - 13:59:04 EST



On Mon, 28 Sep 2026 20:21:38 -0500, Danish Khateeb wrote:
> counter_fops has no .compat_ioctl, so COUNTER_ADD_WATCH_IOCTL,
> COUNTER_ENABLE_EVENTS_IOCTL and COUNTER_DISABLE_EVENTS_IOCTL fail with
> -ENOTTY for 32-bit tasks on a 64-bit kernel, e.g. armhf userspace on
> arm64. Without a watch, such a task gets no events from /dev/counterN.
>
> struct counter_watch has the same layout for 32-bit and 64-bit tasks,
> and the other two ioctls take no argument, so compat_ptr_ioctl() is
> enough. struct counter_event, which read() returns, has the same layout
> too.
>
> [...]

I don't believe this warrants a backport to the stable trees, so I've
dropped the respective Cc tag.

Applied, thanks!

[1/1] counter: Allow 32-bit tasks to use the character device
commit: d722f879730c766ed9347352f4b5855a4841125d

Best regards,
--
William Breathitt Gray <wbg@xxxxxxxxxx>