diff options
author | Steven Rostedt (Google) <rostedt@goodmis.org> | 2022-12-21 13:46:56 -0500 |
---|---|---|
committer | Steven Rostedt (Google) <rostedt@goodmis.org> | 2023-01-03 16:45:14 -0500 |
commit | 169a55a0e8e8aacf4f9998ae00d749e447ac3f51 (patch) | |
tree | 89c9bb416d81704de2a1613a70c5bd789c435d72 | |
parent | 8be5640ff4e64ca07b9c711afc0af89c958ed4f2 (diff) | |
download | libtraceevent-169a55a0e8e8aacf4f9998ae00d749e447ac3f51.tar.gz |
libtraceevent: Make sure 32 bit work 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/20221221134656.79589e83@gandalf.local.home
Reported-by: Mike Frysinger <vapier@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 @@ override CFLAGS += -fPIC override CFLAGS += $(CONFIG_FLAGS) $(INCLUDES) $(PLUGIN_DIR_SQ) override CFLAGS += $(udis86-flags) -D_GNU_SOURCE +# Make sure 32 bit stat() works on large file systems +override CFLAGS += -D_FILE_OFFSET_BITS=64 + ifeq ($(VERBOSE),1) Q = else |