trace-cmd: Make sure 32 bit works on 64 bit file systems
PATCH 1/1 trace-cmd: Make sure 32 bit works on 64 bit file systems
From: "Steven Rostedt (Google)" <[email protected]>
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.
Reported-by Mike Frysinger <[email protected]>
Signed-off-by Steven Rostedt (Google) <[email protected]>
--- Makefile | 3 +++ 1 file changed, 3 insertions(+)
Makefile +3 -0
@@ -350,6 +350,9 @@ export INCLUDES # Required CFLAGS override CFLAGS += -D_GNU_SOURCE +# Make sure 32 bit stat() works on large file systems +override CFLAGS += -D_FILE_OFFSET_BITS=64 + ifndef NO_PTRACE ifneq ($(call try-cc,$(SOURCE_PTRACE),),y) NO_PTRACE = 1
Signature · 1 line
2.35.1
Quoted 8 lines · Steven Rostedt
From: "Steven Rostedt (Google)" <[email protected]>
As
stat()can overflow if a 32 bit user space reads a file on a file system that has inodes greater thanMAX_INT. Compile with _FILE_OFFSET_BITS=64 that mitigates this problem on 32 bit user space.Reported-by Mike Frysinger <[email protected]>Signed-off-by Steven Rostedt (Google) <[email protected]>
Tested-by Ross Zwisler <[email protected]>