Re: [PATCH 1/5] nolibc: fix fd_set type

From: Willy Tarreau
Date: Sat Dec 10 2022 - 03:46:57 EST


On Fri, Dec 09, 2022 at 03:19:35PM +0100, Sven Schnelle wrote:
> The kernel uses unsigned long for the fd_set bitmap,
> but nolibc use u32. This works fine on little endian
> machines, but fails on big endian. Convert to unsigned
> long to fix this.

Thank you for spotting and fixing this one! I had been using these for
a long time, including for pure user-land code to manipulate bits and
never thought about the risk of incompatibility when passing them as-is
to the kernel! It's fairly possible that I'm having non-working code for
64-bit BE machines at a few places!

> Signed-off-by: Sven Schnelle <svens@xxxxxxxxxxxxx>

Acked-by: Willy Tarreau <w@xxxxxx>

Willy