From: Jens Axboe <axboe@kernel.dk>
To: David Wei <dw@davidwei.uk>, io-uring@vger.kernel.org
Cc: Pavel Begunkov <asml.silence@gmail.com>
Subject: Re: [PATCH liburing] sanitize: add ifdef guard around sanitizer functions
Date: Wed, 2 Oct 2024 18:45:39 -0600 [thread overview]
Message-ID: <55026b93-bcbd-422d-8ff4-1542247e375a@kernel.dk> (raw)
In-Reply-To: <20241003000209.1159551-1-dw@davidwei.uk>
On 10/2/24 6:02 PM, David Wei wrote:
> Otherwise there are redefinition errors during compilation if
> CONFIG_USE_SANITIZER isn't set.
>
> Signed-off-by: David Wei <dw@davidwei.uk>
> ---
> src/sanitize.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/src/sanitize.c b/src/sanitize.c
> index 46391a6..db5930d 100644
> --- a/src/sanitize.c
> +++ b/src/sanitize.c
> @@ -118,6 +118,7 @@ static inline void initialize_sanitize_handlers()
> sanitize_handlers_initialized = true;
> }
>
> +#if defined(CONFIG_USE_SANITIZER)
> void liburing_sanitize_ring(struct io_uring *ring)
> {
> struct io_uring_sq *sq = &ring->sq;
> @@ -174,3 +175,4 @@ void liburing_sanitize_iovecs(const struct iovec *iovecs, unsigned nr)
> }
> }
> }
> +#endif
Hmm, but src/sanitize.o should not be built unless that is set. How is
this happening?
--
Jens Axboe
prev parent reply other threads:[~2024-10-03 0:45 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-03 0:02 [PATCH liburing] sanitize: add ifdef guard around sanitizer functions David Wei
2024-10-03 0:45 ` Jens Axboe [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=55026b93-bcbd-422d-8ff4-1542247e375a@kernel.dk \
--to=axboe@kernel.dk \
--cc=asml.silence@gmail.com \
--cc=dw@davidwei.uk \
--cc=io-uring@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox