mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] tools/nolibc: fix spelling of FD_SETBITMASK in FD_* macros
@ 2025-06-20  8:33 Willy Tarreau
  2025-06-21  8:19 ` Thomas Weißschuh
  0 siblings, 1 reply; 4+ messages in thread
From: Willy Tarreau @ 2025-06-20  8:33 UTC (permalink / raw)
  To: Thomas Weißschuh; +Cc: linux-kernel, Willy Tarreau, stable

While nolibc-test does test syscalls, it doesn't test as much the rest
of the macros, and a wrong spelling of FD_SETBITMASK in commit
feaf75658783a broke programs using either FD_SET() or FD_CLR() without
being noticed. Let's fix these macros.

Fixes: feaf75658783a ("nolibc: fix fd_set type")
Cc: stable@vger.kernel.org # v6.2+
Signed-off-by: Willy Tarreau <w@1wt.eu>
---
 tools/include/nolibc/types.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/tools/include/nolibc/types.h b/tools/include/nolibc/types.h
index 30904be544ed0..16c6e9ec9451f 100644
--- a/tools/include/nolibc/types.h
+++ b/tools/include/nolibc/types.h
@@ -128,7 +128,7 @@ typedef struct {
 		int __fd = (fd);					\
 		if (__fd >= 0)						\
 			__set->fds[__fd / FD_SETIDXMASK] &=		\
-				~(1U << (__fd & FX_SETBITMASK));	\
+				~(1U << (__fd & FD_SETBITMASK));	\
 	} while (0)
 
 #define FD_SET(fd, set) do {						\
@@ -145,7 +145,7 @@ typedef struct {
 		int __r = 0;						\
 		if (__fd >= 0)						\
 			__r = !!(__set->fds[__fd / FD_SETIDXMASK] &	\
-1U << (__fd & FD_SET_BITMASK));						\
+1U << (__fd & FD_SETBITMASK));						\
 		__r;							\
 	})
 
-- 
2.17.5


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

* Re: [PATCH] tools/nolibc: fix spelling of FD_SETBITMASK in FD_* macros
  2025-06-20  8:33 [PATCH] tools/nolibc: fix spelling of FD_SETBITMASK in FD_* macros Willy Tarreau
@ 2025-06-21  8:19 ` Thomas Weißschuh
  2025-06-21  8:21   ` Willy Tarreau
  0 siblings, 1 reply; 4+ messages in thread
From: Thomas Weißschuh @ 2025-06-21  8:19 UTC (permalink / raw)
  To: Willy Tarreau; +Cc: Thomas Weißschuh, linux-kernel, stable

On 2025-06-20 10:33:25+0200, Willy Tarreau wrote:
> While nolibc-test does test syscalls, it doesn't test as much the rest
> of the macros, and a wrong spelling of FD_SETBITMASK in commit
> feaf75658783a broke programs using either FD_SET() or FD_CLR() without
> being noticed. Let's fix these macros.
> 
> Fixes: feaf75658783a ("nolibc: fix fd_set type")
> Cc: stable@vger.kernel.org # v6.2+
> Signed-off-by: Willy Tarreau <w@1wt.eu>

Acked-by: Thomas Weißschuh <linux@weissschuh.net>

Let me know if I should apply it.

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

* Re: [PATCH] tools/nolibc: fix spelling of FD_SETBITMASK in FD_* macros
  2025-06-21  8:19 ` Thomas Weißschuh
@ 2025-06-21  8:21   ` Willy Tarreau
  2025-06-21  8:36     ` Thomas Weißschuh
  0 siblings, 1 reply; 4+ messages in thread
From: Willy Tarreau @ 2025-06-21  8:21 UTC (permalink / raw)
  To: Thomas Weißschuh; +Cc: Thomas Weißschuh, linux-kernel, stable

On Sat, Jun 21, 2025 at 10:19:52AM +0200, Thomas Weißschuh wrote:
> On 2025-06-20 10:33:25+0200, Willy Tarreau wrote:
> > While nolibc-test does test syscalls, it doesn't test as much the rest
> > of the macros, and a wrong spelling of FD_SETBITMASK in commit
> > feaf75658783a broke programs using either FD_SET() or FD_CLR() without
> > being noticed. Let's fix these macros.
> > 
> > Fixes: feaf75658783a ("nolibc: fix fd_set type")
> > Cc: stable@vger.kernel.org # v6.2+
> > Signed-off-by: Willy Tarreau <w@1wt.eu>
> 
> Acked-by: Thomas Weißschuh <linux@weissschuh.net>
> 
> Let me know if I should apply it.

As you prefer, given that you already have other ones in flight, maybe
you want to order them as desired. Otherwise I'll push it.

Thanks!
Willy

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

* Re: [PATCH] tools/nolibc: fix spelling of FD_SETBITMASK in FD_* macros
  2025-06-21  8:21   ` Willy Tarreau
@ 2025-06-21  8:36     ` Thomas Weißschuh
  0 siblings, 0 replies; 4+ messages in thread
From: Thomas Weißschuh @ 2025-06-21  8:36 UTC (permalink / raw)
  To: Willy Tarreau; +Cc: Thomas Weißschuh, linux-kernel, stable

On 2025-06-21 10:21:34+0200, Willy Tarreau wrote:
> On Sat, Jun 21, 2025 at 10:19:52AM +0200, Thomas Weißschuh wrote:
> > On 2025-06-20 10:33:25+0200, Willy Tarreau wrote:
> > > While nolibc-test does test syscalls, it doesn't test as much the rest
> > > of the macros, and a wrong spelling of FD_SETBITMASK in commit
> > > feaf75658783a broke programs using either FD_SET() or FD_CLR() without
> > > being noticed. Let's fix these macros.
> > > 
> > > Fixes: feaf75658783a ("nolibc: fix fd_set type")
> > > Cc: stable@vger.kernel.org # v6.2+
> > > Signed-off-by: Willy Tarreau <w@1wt.eu>
> > 
> > Acked-by: Thomas Weißschuh <linux@weissschuh.net>
> > 
> > Let me know if I should apply it.
> 
> As you prefer, given that you already have other ones in flight, maybe
> you want to order them as desired. Otherwise I'll push it.

Then feel free to push it.
I have nothing going on right now.


Thomas

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

end of thread, other threads:[~2025-06-21  8:36 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-06-20  8:33 [PATCH] tools/nolibc: fix spelling of FD_SETBITMASK in FD_* macros Willy Tarreau
2025-06-21  8:19 ` Thomas Weißschuh
2025-06-21  8:21   ` Willy Tarreau
2025-06-21  8:36     ` Thomas Weißschuh

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®