Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge tag 'trace-v6.0-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace

Pull tracing fixes from Steven Rostedt:

- Do not stop trace events in modules if TAINT_TEST is set

- Do not clobber mount options when tracefs is mounted a second time

- Prevent crash of kprobes in gate area

- Add static annotation to some non global functions

- Add some entries into the MAINTAINERS file

- Fix check of event_mutex held when accessing trigger list

- Add some __init/__exit annotations

- Fix reporting of what called hardirq_{enable,disable}_ip function

* tag 'trace-v6.0-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace:
tracefs: Only clobber mode/uid/gid on remount if asked
kprobes: Prohibit probes in gate area
rv/reactor: add __init/__exit annotations to module init/exit funcs
tracing: Fix to check event_mutex is held while accessing trigger list
tracing: hold caller_addr to hardirq_{enable,disable}_ip
tracepoint: Allow trace events in modules with TAINT_TEST
MAINTAINERS: add scripts/tracing/ to TRACING
MAINTAINERS: Add Runtime Verification (RV) entry
rv/monitors: Make monitor's automata definition static

+49 -19
+12
MAINTAINERS
··· 17745 17745 S: Maintained 17746 17746 F: drivers/infiniband/ulp/rtrs/ 17747 17747 17748 + RUNTIME VERIFICATION (RV) 17749 + M: Daniel Bristot de Oliveira <bristot@kernel.org> 17750 + M: Steven Rostedt <rostedt@goodmis.org> 17751 + L: linux-trace-devel@vger.kernel.org 17752 + S: Maintained 17753 + F: Documentation/trace/rv/ 17754 + F: include/linux/rv.h 17755 + F: include/rv/ 17756 + F: kernel/trace/rv/ 17757 + F: tools/verification/ 17758 + 17748 17759 RXRPC SOCKETS (AF_RXRPC) 17749 17760 M: David Howells <dhowells@redhat.com> 17750 17761 M: Marc Dionne <marc.dionne@auristor.com> ··· 20622 20611 F: include/linux/trace*.h 20623 20612 F: include/trace/ 20624 20613 F: kernel/trace/ 20614 + F: scripts/tracing/ 20625 20615 F: tools/testing/selftests/ftrace/ 20626 20616 20627 20617 TRACING MMIO ACCESSES (MMIOTRACE)
+23 -8
fs/tracefs/inode.c
··· 141 141 kuid_t uid; 142 142 kgid_t gid; 143 143 umode_t mode; 144 + /* Opt_* bitfield. */ 145 + unsigned int opts; 144 146 }; 145 147 146 148 enum { ··· 243 241 kgid_t gid; 244 242 char *p; 245 243 244 + opts->opts = 0; 246 245 opts->mode = TRACEFS_DEFAULT_MODE; 247 246 248 247 while ((p = strsep(&data, ",")) != NULL) { ··· 278 275 * but traditionally tracefs has ignored all mount options 279 276 */ 280 277 } 278 + 279 + opts->opts |= BIT(token); 281 280 } 282 281 283 282 return 0; 284 283 } 285 284 286 - static int tracefs_apply_options(struct super_block *sb) 285 + static int tracefs_apply_options(struct super_block *sb, bool remount) 287 286 { 288 287 struct tracefs_fs_info *fsi = sb->s_fs_info; 289 288 struct inode *inode = d_inode(sb->s_root); 290 289 struct tracefs_mount_opts *opts = &fsi->mount_opts; 291 290 292 - inode->i_mode &= ~S_IALLUGO; 293 - inode->i_mode |= opts->mode; 291 + /* 292 + * On remount, only reset mode/uid/gid if they were provided as mount 293 + * options. 294 + */ 294 295 295 - inode->i_uid = opts->uid; 296 + if (!remount || opts->opts & BIT(Opt_mode)) { 297 + inode->i_mode &= ~S_IALLUGO; 298 + inode->i_mode |= opts->mode; 299 + } 296 300 297 - /* Set all the group ids to the mount option */ 298 - set_gid(sb->s_root, opts->gid); 301 + if (!remount || opts->opts & BIT(Opt_uid)) 302 + inode->i_uid = opts->uid; 303 + 304 + if (!remount || opts->opts & BIT(Opt_gid)) { 305 + /* Set all the group ids to the mount option */ 306 + set_gid(sb->s_root, opts->gid); 307 + } 299 308 300 309 return 0; 301 310 } ··· 322 307 if (err) 323 308 goto fail; 324 309 325 - tracefs_apply_options(sb); 310 + tracefs_apply_options(sb, true); 326 311 327 312 fail: 328 313 return err; ··· 374 359 375 360 sb->s_op = &tracefs_super_operations; 376 361 377 - tracefs_apply_options(sb); 362 + tracefs_apply_options(sb, false); 378 363 379 364 return 0; 380 365
+1
kernel/kprobes.c
··· 1562 1562 /* Ensure it is not in reserved area nor out of text */ 1563 1563 if (!(core_kernel_text((unsigned long) p->addr) || 1564 1564 is_module_text_address((unsigned long) p->addr)) || 1565 + in_gate_area_no_mm((unsigned long) p->addr) || 1565 1566 within_kprobe_blacklist((unsigned long) p->addr) || 1566 1567 jump_label_text_reserved(p->addr, p->addr) || 1567 1568 static_call_text_reserved(p->addr, p->addr) ||
+1 -1
kernel/trace/rv/monitors/wip/wip.h
··· 27 27 bool final_states[state_max_wip]; 28 28 }; 29 29 30 - struct automaton_wip automaton_wip = { 30 + static struct automaton_wip automaton_wip = { 31 31 .state_names = { 32 32 "preemptive", 33 33 "non_preemptive"
+1 -1
kernel/trace/rv/monitors/wwnr/wwnr.h
··· 27 27 bool final_states[state_max_wwnr]; 28 28 }; 29 29 30 - struct automaton_wwnr automaton_wwnr = { 30 + static struct automaton_wwnr automaton_wwnr = { 31 31 .state_names = { 32 32 "not_running", 33 33 "running"
+2 -2
kernel/trace/rv/reactor_panic.c
··· 24 24 .react = rv_panic_reaction 25 25 }; 26 26 27 - static int register_react_panic(void) 27 + static int __init register_react_panic(void) 28 28 { 29 29 rv_register_reactor(&rv_panic); 30 30 return 0; 31 31 } 32 32 33 - static void unregister_react_panic(void) 33 + static void __exit unregister_react_panic(void) 34 34 { 35 35 rv_unregister_reactor(&rv_panic); 36 36 }
+2 -2
kernel/trace/rv/reactor_printk.c
··· 23 23 .react = rv_printk_reaction 24 24 }; 25 25 26 - static int register_react_printk(void) 26 + static int __init register_react_printk(void) 27 27 { 28 28 rv_register_reactor(&rv_printk); 29 29 return 0; 30 30 } 31 31 32 - static void unregister_react_printk(void) 32 + static void __exit unregister_react_printk(void) 33 33 { 34 34 rv_unregister_reactor(&rv_printk); 35 35 }
+2 -1
kernel/trace/trace_events_trigger.c
··· 142 142 { 143 143 struct event_trigger_data *data; 144 144 145 - list_for_each_entry_rcu(data, &file->triggers, list) { 145 + list_for_each_entry_rcu(data, &file->triggers, list, 146 + lockdep_is_held(&event_mutex)) { 146 147 if (data->flags & EVENT_TRIGGER_FL_PROBE) 147 148 continue; 148 149 return true;
+2 -2
kernel/trace/trace_preemptirq.c
··· 95 95 } 96 96 97 97 lockdep_hardirqs_on_prepare(); 98 - lockdep_hardirqs_on(CALLER_ADDR0); 98 + lockdep_hardirqs_on(caller_addr); 99 99 } 100 100 EXPORT_SYMBOL(trace_hardirqs_on_caller); 101 101 NOKPROBE_SYMBOL(trace_hardirqs_on_caller); 102 102 103 103 __visible void trace_hardirqs_off_caller(unsigned long caller_addr) 104 104 { 105 - lockdep_hardirqs_off(CALLER_ADDR0); 105 + lockdep_hardirqs_off(caller_addr); 106 106 107 107 if (!this_cpu_read(tracing_irq_cpu)) { 108 108 this_cpu_write(tracing_irq_cpu, 1);
+3 -2
kernel/tracepoint.c
··· 571 571 bool trace_module_has_bad_taint(struct module *mod) 572 572 { 573 573 return mod->taints & ~((1 << TAINT_OOT_MODULE) | (1 << TAINT_CRAP) | 574 - (1 << TAINT_UNSIGNED_MODULE)); 574 + (1 << TAINT_UNSIGNED_MODULE) | 575 + (1 << TAINT_TEST)); 575 576 } 576 577 577 578 static BLOCKING_NOTIFIER_HEAD(tracepoint_notify_list); ··· 648 647 /* 649 648 * We skip modules that taint the kernel, especially those with different 650 649 * module headers (for forced load), to make sure we don't cause a crash. 651 - * Staging, out-of-tree, and unsigned GPL modules are fine. 650 + * Staging, out-of-tree, unsigned GPL, and test modules are fine. 652 651 */ 653 652 if (trace_module_has_bad_taint(mod)) 654 653 return 0;