From: Willy Tarreau <w@1wt.eu>
To: Warner Losh <imp@bsdimp.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2] tools/nolibc: Fix S_ISxxx macros
Date: Sun, 8 Jan 2023 10:34:36 +0100 [thread overview]
Message-ID: <20230108093436.GC17754@1wt.eu> (raw)
In-Reply-To: <20230106171834.41532-1-imp@bsdimp.com>
Hello Warner,
On Fri, Jan 06, 2023 at 10:18:34AM -0700, Warner Losh wrote:
> The mode field has the type encoded as an value in a field, not as a bit
> mask. Mask the mode with S_IFMT instead of each type to test. Otherwise,
> false positives are possible: eg S_ISDIR will return true for block
> devices because S_IFDIR = 0040000 and S_IFBLK = 0060000 since mode is
> masked with S_IFDIR instead of S_IFMT. These macros now match the
> similar definitions in tools/include/uapi/linux/stat.h.
I'm impressed to see how I managed to make that gross a mistake!
Thanks for catching it and for the fix, its now queued.
Willy
prev parent reply other threads:[~2023-01-08 9:34 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-01-06 17:18 [PATCH v2] tools/nolibc: Fix S_ISxxx macros Warner Losh
2023-01-08 9:34 ` Willy Tarreau [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230108093436.GC17754@1wt.eu \
--to=w@1wt.eu \
--cc=imp@bsdimp.com \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.