Commit 460a75a6 authored by Linus Torvalds's avatar Linus Torvalds
Browse files
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
parents f448dda8 47311db8
Loading
Loading
Loading
Loading
+12 −0
Original line number Diff line number Diff line
@@ -17745,6 +17745,17 @@ L: linux-rdma@vger.kernel.org
S:	Maintained
F:	drivers/infiniband/ulp/rtrs/
RUNTIME VERIFICATION (RV)
M:	Daniel Bristot de Oliveira <bristot@kernel.org>
M:	Steven Rostedt <rostedt@goodmis.org>
L:	linux-trace-devel@vger.kernel.org
S:	Maintained
F:	Documentation/trace/rv/
F:	include/linux/rv.h
F:	include/rv/
F:	kernel/trace/rv/
F:	tools/verification/
RXRPC SOCKETS (AF_RXRPC)
M:	David Howells <dhowells@redhat.com>
M:	Marc Dionne <marc.dionne@auristor.com>
@@ -20611,6 +20622,7 @@ F: include/*/ftrace.h
F:	include/linux/trace*.h
F:	include/trace/
F:	kernel/trace/
F:	scripts/tracing/
F:	tools/testing/selftests/ftrace/
TRACING MMIO ACCESSES (MMIOTRACE)
+23 −8
Original line number Diff line number Diff line
@@ -141,6 +141,8 @@ struct tracefs_mount_opts {
	kuid_t uid;
	kgid_t gid;
	umode_t mode;
	/* Opt_* bitfield. */
	unsigned int opts;
};

enum {
@@ -241,6 +243,7 @@ static int tracefs_parse_options(char *data, struct tracefs_mount_opts *opts)
	kgid_t gid;
	char *p;

	opts->opts = 0;
	opts->mode = TRACEFS_DEFAULT_MODE;

	while ((p = strsep(&data, ",")) != NULL) {
@@ -275,24 +278,36 @@ static int tracefs_parse_options(char *data, struct tracefs_mount_opts *opts)
		 * but traditionally tracefs has ignored all mount options
		 */
		}

		opts->opts |= BIT(token);
	}

	return 0;
}

static int tracefs_apply_options(struct super_block *sb)
static int tracefs_apply_options(struct super_block *sb, bool remount)
{
	struct tracefs_fs_info *fsi = sb->s_fs_info;
	struct inode *inode = d_inode(sb->s_root);
	struct tracefs_mount_opts *opts = &fsi->mount_opts;

	/*
	 * On remount, only reset mode/uid/gid if they were provided as mount
	 * options.
	 */

	if (!remount || opts->opts & BIT(Opt_mode)) {
		inode->i_mode &= ~S_IALLUGO;
		inode->i_mode |= opts->mode;
	}

	if (!remount || opts->opts & BIT(Opt_uid))
		inode->i_uid = opts->uid;

	if (!remount || opts->opts & BIT(Opt_gid)) {
		/* Set all the group ids to the mount option */
		set_gid(sb->s_root, opts->gid);
	}

	return 0;
}
@@ -307,7 +322,7 @@ static int tracefs_remount(struct super_block *sb, int *flags, char *data)
	if (err)
		goto fail;

	tracefs_apply_options(sb);
	tracefs_apply_options(sb, true);

fail:
	return err;
@@ -359,7 +374,7 @@ static int trace_fill_super(struct super_block *sb, void *data, int silent)

	sb->s_op = &tracefs_super_operations;

	tracefs_apply_options(sb);
	tracefs_apply_options(sb, false);

	return 0;

+1 −0
Original line number Diff line number Diff line
@@ -1562,6 +1562,7 @@ static int check_kprobe_address_safe(struct kprobe *p,
	/* Ensure it is not in reserved area nor out of text */
	if (!(core_kernel_text((unsigned long) p->addr) ||
	    is_module_text_address((unsigned long) p->addr)) ||
	    in_gate_area_no_mm((unsigned long) p->addr) ||
	    within_kprobe_blacklist((unsigned long) p->addr) ||
	    jump_label_text_reserved(p->addr, p->addr) ||
	    static_call_text_reserved(p->addr, p->addr) ||
+1 −1
Original line number Diff line number Diff line
@@ -27,7 +27,7 @@ struct automaton_wip {
	bool final_states[state_max_wip];
};

struct automaton_wip automaton_wip = {
static struct automaton_wip automaton_wip = {
	.state_names = {
		"preemptive",
		"non_preemptive"
+1 −1
Original line number Diff line number Diff line
@@ -27,7 +27,7 @@ struct automaton_wwnr {
	bool final_states[state_max_wwnr];
};

struct automaton_wwnr automaton_wwnr = {
static struct automaton_wwnr automaton_wwnr = {
	.state_names = {
		"not_running",
		"running"
Loading