# git rev-parse -q --verify fa4b851b4ad632dc673627f38a8a552547568a2c^{commit} fa4b851b4ad632dc673627f38a8a552547568a2c already have revision, skipping fetch # git checkout -q -f -B kisskb fa4b851b4ad632dc673627f38a8a552547568a2c # git clean -qxdf # < git log -1 # commit fa4b851b4ad632dc673627f38a8a552547568a2c # Merge: 210ee636c4ad e5d7c1916562 # Author: Linus Torvalds # Date: Sun Mar 10 11:53:21 2024 -0700 # # Merge tag 'trace-ring-buffer-v6.8-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace # # Pull tracing fixes from Steven Rostedt: # # - Do not allow large strings (> 4096) as single write to trace_marker # # The size of a string written into trace_marker was determined by the # size of the sub-buffer in the ring buffer. That size is dependent on # the PAGE_SIZE of the architecture as it can be mapped into user # space. But on PowerPC, where PAGE_SIZE is 64K, that made the limit of # the string of writing into trace_marker 64K. # # One of the selftests looks at the size of the ring buffer sub-buffers # and writes that plus more into the trace_marker. The write will take # what it can and report back what it consumed so that the user space # application (like echo) will write the rest of the string. The string # is stored in the ring buffer and can be read via the "trace" or # "trace_pipe" files. # # The reading of the ring buffer uses vsnprintf(), which uses a # precision "%.*s" to make sure it only reads what is stored in the # buffer, as a bug could cause the string to be non terminated. # # With the combination of the precision change and the PAGE_SIZE of 64K # allowing huge strings to be added into the ring buffer, plus the test # that would actually stress that limit, a bug was reported that the # precision used was too big for "%.*s" as the string was close to 64K # in size and the max precision of vsnprintf is 32K. # # Linus suggested not to have that precision as it could hide a bug if # the string was again stored without a nul byte. # # Another issue that was brought up is that the trace_seq buffer is # also based on PAGE_SIZE even though it is not tied to the # architecture limit like the ring buffer sub-buffer is. Having it be # 64K * 2 is simply just too big and wasting memory on systems with 64K # page sizes. It is now hardcoded to 8K which is what all other # architectures with 4K PAGE_SIZE has. # # Finally, the write to trace_marker is now limited to 4K as there is # no reason to write larger strings into trace_marker. # # - ring_buffer_wait() should not loop. # # The ring_buffer_wait() does not have the full context (yet) on if it # should loop or not. Just exit the loop as soon as its woken up and # let the callers decide to loop or not (they already do, so it's a bit # redundant). # # - Fix shortest_full field to be the smallest amount in the ring buffer # that a waiter is waiting for. The "shortest_full" field is updated # when a new waiter comes in and wants to wait for a smaller amount of # data in the ring buffer than other waiters. But after all waiters are # woken up, it's not reset, so if another waiter comes in wanting to # wait for more data, it will be woken up when the ring buffer has a # smaller amount from what the previous waiters were waiting for. # # - The wake up all waiters on close is incorrectly called frome # .release() and not from .flush() so it will never wake up any waiters # as the .release() will not get called until all .read() calls are # finished. And the wakeup is for the waiters in those .read() calls. # # * tag 'trace-ring-buffer-v6.8-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace: # tracing: Use .flush() call to wake up readers # ring-buffer: Fix resetting of shortest_full # ring-buffer: Fix waking up ring buffer readers # tracing: Limit trace_marker writes to just 4K # tracing: Limit trace_seq size to just 8K and not depend on architecture PAGE_SIZE # tracing: Remove precision vsnprintf() check from print event # < /opt/cross/kisskb/korg/gcc-5.5.0-nolibc/sparc64-linux/bin/sparc64-linux-gcc --version # < /opt/cross/kisskb/korg/gcc-5.5.0-nolibc/sparc64-linux/bin/sparc64-linux-ld --version # < git log --format=%s --max-count=1 fa4b851b4ad632dc673627f38a8a552547568a2c # make -s -j 160 ARCH=sparc64 O=/kisskb/build/linus_allmodconfig_sparc64-gcc5 CROSS_COMPILE=/opt/cross/kisskb/korg/gcc-5.5.0-nolibc/sparc64-linux/bin/sparc64-linux- allmodconfig # Added to kconfig CONFIG_BUILD_DOCSRC=n # Added to kconfig CONFIG_HAVE_FTRACE_MCOUNT_RECORD=n # Added to kconfig CONFIG_SAMPLES=n # Added to kconfig CONFIG_MODULE_SIG=n # < make -s -j 160 ARCH=sparc64 O=/kisskb/build/linus_allmodconfig_sparc64-gcc5 CROSS_COMPILE=/opt/cross/kisskb/korg/gcc-5.5.0-nolibc/sparc64-linux/bin/sparc64-linux- help # make -s -j 160 ARCH=sparc64 O=/kisskb/build/linus_allmodconfig_sparc64-gcc5 CROSS_COMPILE=/opt/cross/kisskb/korg/gcc-5.5.0-nolibc/sparc64-linux/bin/sparc64-linux- olddefconfig # make -s -j 160 ARCH=sparc64 O=/kisskb/build/linus_allmodconfig_sparc64-gcc5 CROSS_COMPILE=/opt/cross/kisskb/korg/gcc-5.5.0-nolibc/sparc64-linux/bin/sparc64-linux- :1519:2: warning: #warning syscall clone3 not implemented [-Wcpp] cc1: warning: unrecognized command line option '-Wno-shift-negative-value' cc1: warning: unrecognized command line option '-Wno-stringop-overflow' /kisskb/src/arch/sparc/prom/p1275.c:52:6: error: no previous prototype for 'prom_cif_init' [-Werror=missing-prototypes] void prom_cif_init(void *cif_handler, void *cif_stack) ^ /kisskb/src/arch/sparc/prom/misc_64.c:165:5: error: no previous prototype for 'prom_get_mmu_ihandle' [-Werror=missing-prototypes] int prom_get_mmu_ihandle(void) ^ cc1: error: unrecognized command line option '-Wno-shift-negative-value' [-Werror] cc1: error: unrecognized command line option '-Wno-stringop-overflow' [-Werror] cc1: all warnings being treated as errors make[4]: *** [/kisskb/src/scripts/Makefile.build:243: arch/sparc/prom/p1275.o] Error 1 make[4]: *** Waiting for unfinished jobs.... /kisskb/src/arch/sparc/power/hibernate.c:22:5: error: no previous prototype for 'pfn_is_nosave' [-Werror=missing-prototypes] int pfn_is_nosave(unsigned long pfn) ^ /kisskb/src/arch/sparc/power/hibernate.c:30:6: error: no previous prototype for 'save_processor_state' [-Werror=missing-prototypes] void save_processor_state(void) ^ /kisskb/src/arch/sparc/power/hibernate.c:35:6: error: no previous prototype for 'restore_processor_state' [-Werror=missing-prototypes] void restore_processor_state(void) ^ cc1: error: unrecognized command line option '-Wno-shift-negative-value' [-Werror] cc1: error: unrecognized command line option '-Wno-stringop-overflow' [-Werror] cc1: all warnings being treated as errors make[4]: *** [/kisskb/src/scripts/Makefile.build:243: arch/sparc/power/hibernate.o] Error 1 make[3]: *** [/kisskb/src/scripts/Makefile.build:481: arch/sparc/power] Error 2 make[3]: *** Waiting for unfinished jobs.... cc1: error: unrecognized command line option '-Wno-shift-negative-value' [-Werror] cc1: error: unrecognized command line option '-Wno-stringop-overflow' [-Werror] cc1: all warnings being treated as errors make[4]: *** [/kisskb/src/scripts/Makefile.build:243: arch/sparc/prom/misc_64.o] Error 1 /kisskb/src/arch/sparc/vdso/vma.c:246:12: error: no previous prototype for 'init_vdso_image' [-Werror=missing-prototypes] int __init init_vdso_image(const struct vdso_image *image, ^ make[3]: *** [/kisskb/src/scripts/Makefile.build:481: arch/sparc/prom] Error 2 cc1: error: unrecognized command line option '-Wno-shift-negative-value' [-Werror] cc1: error: unrecognized command line option '-Wno-stringop-overflow' [-Werror] cc1: all warnings being treated as errors make[5]: *** [/kisskb/src/scripts/Makefile.build:243: arch/sparc/vdso/vma.o] Error 1 make[4]: *** [/kisskb/src/scripts/Makefile.build:481: arch/sparc/vdso] Error 2 make[4]: *** Waiting for unfinished jobs.... /kisskb/src/arch/sparc/kernel/traps_64.c:253:6: error: no previous prototype for 'is_no_fault_exception' [-Werror=missing-prototypes] bool is_no_fault_exception(struct pt_regs *regs) ^ /kisskb/src/arch/sparc/kernel/traps_64.c:2035:6: error: no previous prototype for 'do_mcd_err' [-Werror=missing-prototypes] void do_mcd_err(struct pt_regs *regs, struct sun4v_error_entry ent) ^ /kisskb/src/arch/sparc/kernel/traps_64.c:2153:6: error: no previous prototype for 'sun4v_nonresum_error_user_handled' [-Werror=missing-prototypes] bool sun4v_nonresum_error_user_handled(struct pt_regs *regs, ^ /kisskb/src/arch/sparc/mm/init_64.c:2644:6: error: no previous prototype for 'vmemmap_free' [-Werror=missing-prototypes] void vmemmap_free(unsigned long start, unsigned long end, ^ cc1: error: unrecognized command line option '-Wno-shift-negative-value' [-Werror] cc1: error: unrecognized command line option '-Wno-stringop-overflow' [-Werror] cc1: all warnings being treated as errors make[5]: *** [/kisskb/src/scripts/Makefile.build:243: arch/sparc/kernel/traps_64.o] Error 1 make[4]: *** [/kisskb/src/scripts/Makefile.build:481: arch/sparc/kernel] Error 2 cc1: error: unrecognized command line option '-Wno-shift-negative-value' [-Werror] cc1: error: unrecognized command line option '-Wno-stringop-overflow' [-Werror] cc1: all warnings being treated as errors make[5]: *** [/kisskb/src/scripts/Makefile.build:243: arch/sparc/mm/init_64.o] Error 1 make[4]: *** [/kisskb/src/scripts/Makefile.build:481: arch/sparc/mm] Error 2 make[3]: *** [/kisskb/src/scripts/Makefile.build:481: arch/sparc] Error 2 In file included from /kisskb/src/arch/sparc/include/asm/floppy.h:5:0, from /kisskb/src/drivers/block/floppy.c:250: /kisskb/src/arch/sparc/include/asm/floppy_64.h:200:13: error: no previous prototype for 'sparc_floppy_irq' [-Werror=missing-prototypes] irqreturn_t sparc_floppy_irq(int irq, void *dev_cookie) ^ In file included from /kisskb/src/arch/sparc/include/asm/floppy.h:5:0, from /kisskb/src/drivers/block/floppy.c:250: /kisskb/src/arch/sparc/include/asm/floppy_64.h:437:6: error: no previous prototype for 'sun_pci_fd_dma_callback' [-Werror=missing-prototypes] void sun_pci_fd_dma_callback(struct ebus_dma_info *p, int event, void *cookie) ^ cc1: error: unrecognized command line option '-Wno-shift-negative-value' [-Werror] cc1: error: unrecognized command line option '-Wno-stringop-overflow' [-Werror] cc1: all warnings being treated as errors make[5]: *** [/kisskb/src/scripts/Makefile.build:243: drivers/block/floppy.o] Error 1 make[5]: *** Waiting for unfinished jobs.... /kisskb/src/drivers/sbus/char/bbc_envctrl.c:566:5: error: no previous prototype for 'bbc_envctrl_init' [-Werror=missing-prototypes] int bbc_envctrl_init(struct bbc_i2c_bus *bp) ^ /kisskb/src/drivers/sbus/char/bbc_envctrl.c:594:6: error: no previous prototype for 'bbc_envctrl_cleanup' [-Werror=missing-prototypes] void bbc_envctrl_cleanup(struct bbc_i2c_bus *bp) ^ cc1: error: unrecognized command line option '-Wno-shift-negative-value' [-Werror] cc1: error: unrecognized command line option '-Wno-stringop-overflow' [-Werror] cc1: all warnings being treated as errors make[6]: *** [/kisskb/src/scripts/Makefile.build:243: drivers/sbus/char/bbc_envctrl.o] Error 1 make[6]: *** Waiting for unfinished jobs.... make[4]: *** [/kisskb/src/scripts/Makefile.build:481: drivers/block] Error 2 make[4]: *** Waiting for unfinished jobs.... make[5]: *** [/kisskb/src/scripts/Makefile.build:481: drivers/sbus/char] Error 2 make[4]: *** [/kisskb/src/scripts/Makefile.build:481: drivers/sbus] Error 2 make[3]: *** [/kisskb/src/scripts/Makefile.build:481: drivers] Error 2 make[2]: *** [/kisskb/src/Makefile:1921: .] Error 2 make[1]: *** [/kisskb/src/Makefile:240: __sub-make] Error 2 make: *** [Makefile:240: __sub-make] Error 2 Command 'make -s -j 160 ARCH=sparc64 O=/kisskb/build/linus_allmodconfig_sparc64-gcc5 CROSS_COMPILE=/opt/cross/kisskb/korg/gcc-5.5.0-nolibc/sparc64-linux/bin/sparc64-linux- ' returned non-zero exit status 2. # rm -rf /kisskb/build/linus_allmodconfig_sparc64-gcc5 # Build took: 0:08:16.371998