diff options
author | Steven Rostedt (Google) <rostedt@goodmis.org> | 2022-12-21 13:49:03 -0500 |
---|---|---|
committer | Steven Rostedt (Google) <rostedt@goodmis.org> | 2023-01-03 18:33:45 -0500 |
commit | 6476bc3b39f3e4dad6d2d9baa0e7a491fa08d8fc (patch) | |
tree | 4d58e8b0959ba02bed12d46b401a558913f9562c | |
parent | a053233c583fe3e7c53e99a233c3bfac0a828a3b (diff) | |
download | libtracefs-6476bc3b39f3e4dad6d2d9baa0e7a491fa08d8fc.tar.gz |
libtracefs: Make sure 32 bit works on 64 bit file systems
As stat() can overflow if a 32 bit user space reads a file on a file
system that has inodes greater than MAX_INT. Compile with
_FILE_OFFSET_BITS=64 that mitigates this problem on 32 bit user space.
Link: https://lore.kernel.org/linux-trace-devel/20221221134903.4520c983@gandalf.local.home
Reported-by: Mike Frysinger <vapier@google.com>
Tested-by: Ross Zwisler <zwisler@google.com>
Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
-rw-r--r-- | Makefile | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -164,6 +164,9 @@ export INCLUDES # Append required CFLAGS override CFLAGS += -D_GNU_SOURCE $(LIBTRACEEVENT_INCLUDES) $(INCLUDES) +# Make sure 32 bit stat() works on large file systems +override CFLAGS += -D_FILE_OFFSET_BITS=64 + all: all_cmd LIB_TARGET = libtracefs.a libtracefs.so.$(TRACEFS_VERSION) |