From: SJ Park <sj@kernel.org>
To: Yichong Chen <chenyichong@uniontech.com>
Cc: SJ Park <sj@kernel.org>,
mst@redhat.com, jasowang@redhat.com, xuanzhuo@linux.alibaba.com,
eperezma@redhat.com, akpm@linux-foundation.org, rppt@kernel.org,
ljs@kernel.org, pabeni@redhat.com, linux-kernel@vger.kernel.org,
virtualization@lists.linux.dev
Subject: Re: [PATCH v2 2/2] tools/include: Include stdint.h for SIZE_MAX in overflow.h
Date: Wed, 1 Jul 2026 06:35:02 -0700 [thread overview]
Message-ID: <20260701133503.41823-1-sj@kernel.org> (raw)
In-Reply-To: <20260629022124.131894-3-chenyichong@uniontech.com>
On Mon, 29 Jun 2026 10:21:24 +0800 Yichong Chen <chenyichong@uniontech.com> wrote:
> tools/include/linux/overflow.h uses SIZE_MAX in its size helper
> functions.
>
> Include stdint.h so tools users that include overflow.h without another
> SIZE_MAX provider can build.
On the latest mm-new reverting this patch (for test), I was able to build
tools/virtio.
git checkout akpm.korg.mm/mm-new
[...]
HEAD is now at f5ea2fbe68e0c mm/swap, PM: hibernate: atomically replace hibernation pin
$ git revert 9d462d8b9b705548451325ee4376dfd549e14aa2 -s --no-edit
[detached HEAD f2202247e38d9] Revert "tools/include: include stdint.h for SIZE_MAX in overflow.h"
Date: Wed Jul 1 06:33:03 2026 -0700
1 file changed, 1 deletion(-)
$ make -C tools/virtio/ clean
make: Entering directory '/home/lkhack/worktree.linux/tools/virtio'
rm -f *.o vringh_test virtio_test vhost_net_test vhost_test/*.o \
vhost_test/.*.cmd vhost_test/Module.symvers \
vhost_test/modules.order *.d
make: Leaving directory '/home/lkhack/worktree.linux/tools/virtio'
$ make -C tools/virtio/ test
make: Entering directory '/home/lkhack/worktree.linux/tools/virtio'
cc -g -O2 -Werror -Wno-maybe-uninitialized -Wall -I. -I../include/ -I ../../usr/include/ -Wno-pointer-sign -fno-strict-overflow -fno-strict-aliasing -fno-common -MMD -U_FORTIFY_SOURCE -include ../../include/linux/kconfig.h -mfunction-return=thunk -fcf-protection=none -mindirect-branch-register -pthread -c -o virtio_test.o virtio_test.c
cc -g -O2 -Werror -Wno-maybe-uninitialized -Wall -I. -I../include/ -I ../../usr/include/ -Wno-pointer-sign -fno-strict-overflow -fno-strict-aliasing -fno-common -MMD -U_FORTIFY_SOURCE -include ../../include/linux/kconfig.h -mfunction-return=thunk -fcf-protection=none -mindirect-branch-register -pthread -c -o virtio_ring.o ../../drivers/virtio/virtio_ring.c
cc -pthread virtio_test.o virtio_ring.o -o virtio_test
cc -g -O2 -Werror -Wno-maybe-uninitialized -Wall -I. -I../include/ -I ../../usr/include/ -Wno-pointer-sign -fno-strict-overflow -fno-strict-aliasing -fno-common -MMD -U_FORTIFY_SOURCE -include ../../include/linux/kconfig.h -mfunction-return=thunk -fcf-protection=none -mindirect-branch-register -pthread -c -o vringh_test.o vringh_test.c
cc -g -O2 -Werror -Wno-maybe-uninitialized -Wall -I. -I../include/ -I ../../usr/include/ -Wno-pointer-sign -fno-strict-overflow -fno-strict-aliasing -fno-common -MMD -U_FORTIFY_SOURCE -include ../../include/linux/kconfig.h -mfunction-return=thunk -fcf-protection=none -mindirect-branch-register -pthread -c -o vringh.o ../../drivers/vhost/vringh.c
cc -pthread vringh_test.o vringh.o virtio_ring.o -o vringh_test
cc -g -O2 -Werror -Wno-maybe-uninitialized -Wall -I. -I../include/ -I ../../usr/include/ -Wno-pointer-sign -fno-strict-overflow -fno-strict-aliasing -fno-common -MMD -U_FORTIFY_SOURCE -include ../../include/linux/kconfig.h -mfunction-return=thunk -fcf-protection=none -mindirect-branch-register -pthread -c -o vhost_net_test.o vhost_net_test.c
cc -pthread vhost_net_test.o virtio_ring.o -o vhost_net_test
make: Leaving directory '/home/lkhack/worktree.linux/tools/virtio'
Am I missing something?
>
> Signed-off-by: Yichong Chen <chenyichong@uniontech.com>
> ---
> tools/include/linux/overflow.h | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/tools/include/linux/overflow.h b/tools/include/linux/overflow.h
> index 3427d7880326..98963688143f 100644
> --- a/tools/include/linux/overflow.h
> +++ b/tools/include/linux/overflow.h
> @@ -1,4 +1,5 @@
> /* SPDX-License-Identifier: GPL-2.0 OR MIT */
> +#include <stdint.h>
> #ifndef __LINUX_OVERFLOW_H
> #define __LINUX_OVERFLOW_H
Shouldn't the include placed after #define __LINUX_OVERFLOW_H ?
Thanks,
SJ
[...]
next prev parent reply other threads:[~2026-07-01 13:35 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-29 2:21 [PATCH v2 0/2] tools: Fix tools/virtio test build Yichong Chen
2026-06-29 2:21 ` [PATCH v2 1/2] tools/virtio: Add missing compat definitions for vhost_net_test Yichong Chen
2026-07-01 13:36 ` SJ Park
2026-06-29 2:21 ` [PATCH v2 2/2] tools/include: Include stdint.h for SIZE_MAX in overflow.h Yichong Chen
2026-07-01 13:35 ` SJ Park [this message]
2026-07-02 2:20 ` Yichong Chen
2026-06-29 9:09 ` [PATCH v2 0/2] tools: Fix tools/virtio test build Eugenio Perez Martin
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=20260701133503.41823-1-sj@kernel.org \
--to=sj@kernel.org \
--cc=akpm@linux-foundation.org \
--cc=chenyichong@uniontech.com \
--cc=eperezma@redhat.com \
--cc=jasowang@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=ljs@kernel.org \
--cc=mst@redhat.com \
--cc=pabeni@redhat.com \
--cc=rppt@kernel.org \
--cc=virtualization@lists.linux.dev \
--cc=xuanzhuo@linux.alibaba.com \
/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.