Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 4f16d4e0 authored by Ingo Molnar's avatar Ingo Molnar
Browse files

Merge branch 'perf/core' into perf/urgent



Merge reason: Switch from pre-merge topical split to the post-merge urgent track

Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
parents 1e259e0a 66301254
Loading
Loading
Loading
Loading
+6 −6
Original line number Diff line number Diff line
@@ -20,7 +20,7 @@ Description:
			lsm:	[[subj_user=] [subj_role=] [subj_type=]
				 [obj_user=] [obj_role=] [obj_type=]]

		base: 	func:= [BPRM_CHECK][FILE_MMAP][INODE_PERMISSION]
		base: 	func:= [BPRM_CHECK][FILE_MMAP][FILE_CHECK]
			mask:= [MAY_READ] [MAY_WRITE] [MAY_APPEND] [MAY_EXEC]
			fsmagic:= hex value
			uid:= decimal value
@@ -40,11 +40,11 @@ Description:

			measure func=BPRM_CHECK
			measure func=FILE_MMAP mask=MAY_EXEC
			measure func=INODE_PERM mask=MAY_READ uid=0
			measure func=FILE_CHECK mask=MAY_READ uid=0

		The default policy measures all executables in bprm_check,
		all files mmapped executable in file_mmap, and all files
		open for read by root in inode_permission.
		open for read by root in do_filp_open.

		Examples of LSM specific definitions:

@@ -54,8 +54,8 @@ Description:

			dont_measure obj_type=var_log_t
			dont_measure obj_type=auditd_log_t
			measure subj_user=system_u func=INODE_PERM mask=MAY_READ
			measure subj_role=system_r func=INODE_PERM mask=MAY_READ
			measure subj_user=system_u func=FILE_CHECK mask=MAY_READ
			measure subj_role=system_r func=FILE_CHECK mask=MAY_READ

		Smack:
			measure subj_user=_ func=INODE_PERM mask=MAY_READ
			measure subj_user=_ func=FILE_CHECK mask=MAY_READ
+2 −2
Original line number Diff line number Diff line
@@ -145,8 +145,8 @@ show_sampling_rate_max: THIS INTERFACE IS DEPRECATED, DON'T USE IT.
up_threshold: defines what the average CPU usage between the samplings
of 'sampling_rate' needs to be for the kernel to make a decision on
whether it should increase the frequency.  For example when it is set
to its default value of '80' it means that between the checking
intervals the CPU needs to be on average more than 80% in use to then
to its default value of '95' it means that between the checking
intervals the CPU needs to be on average more than 95% in use to then
decide that the CPU frequency needs to be increased.  

ignore_nice_load: this parameter takes a value of '0' or '1'. When
+9 −0
Original line number Diff line number Diff line
@@ -199,6 +199,10 @@ and is between 256 and 4096 characters. It is defined in the file
			acpi_display_output=video
			See above.

	acpi_early_pdc_eval	[HW,ACPI] Evaluate processor _PDC methods
				early. Needed on some platforms to properly
				initialize the EC.

	acpi_irq_balance [HW,ACPI]
			ACPI will balance active IRQs
			default in APIC mode
@@ -311,6 +315,11 @@ and is between 256 and 4096 characters. It is defined in the file
	aic79xx=	[HW,SCSI]
			See Documentation/scsi/aic79xx.txt.

	alignment=	[KNL,ARM]
			Allow the default userspace alignment fault handler
			behaviour to be specified.  Bit 0 enables warnings,
			bit 1 enables fixups, and bit 2 sends a segfault.

	amd_iommu=	[HW,X86-84]
			Pass parameters to the AMD IOMMU driver in the system.
			Possible values are:
+4 −4
Original line number Diff line number Diff line
@@ -1074,10 +1074,10 @@ regen_max_retry - INTEGER
	Default: 5

max_addresses - INTEGER
	Number of maximum addresses per interface.  0 disables limitation.
	It is recommended not set too large value (or 0) because it would
	be too easy way to crash kernel to allow to create too much of
	autoconfigured addresses.
	Maximum number of autoconfigured addresses per interface.  Setting
	to zero disables the limitation.  It is not recommended to set this
	value too large (or to zero) because it would be an easy way to
	crash the kernel by allowing too many addresses to be created.
	Default: 16

disable_ipv6 - BOOLEAN
+32 −25
Original line number Diff line number Diff line
@@ -24,6 +24,7 @@ Synopsis of kprobe_events
-------------------------
  p[:[GRP/]EVENT] SYMBOL[+offs]|MEMADDR [FETCHARGS]	: Set a probe
  r[:[GRP/]EVENT] SYMBOL[+0] [FETCHARGS]		: Set a return probe
  -:[GRP/]EVENT						: Clear a probe

 GRP		: Group name. If omitted, use "kprobes" for it.
 EVENT		: Event name. If omitted, the event name is generated
@@ -37,15 +38,12 @@ Synopsis of kprobe_events
  @SYM[+|-offs]	: Fetch memory at SYM +|- offs (SYM should be a data symbol)
  $stackN	: Fetch Nth entry of stack (N >= 0)
  $stack	: Fetch stack address.
  $argN		: Fetch function argument. (N >= 0)(*)
  $retval	: Fetch return value.(**)
  +|-offs(FETCHARG) : Fetch memory at FETCHARG +|- offs address.(***)
  $retval	: Fetch return value.(*)
  +|-offs(FETCHARG) : Fetch memory at FETCHARG +|- offs address.(**)
  NAME=FETCHARG: Set NAME as the argument name of FETCHARG.

  (*) aN may not correct on asmlinkaged functions and at the middle of
      function body.
  (**) only for return probe.
  (***) this is useful for fetching a field of data structures.
  (*) only for return probe.
  (**) this is useful for fetching a field of data structures.


Per-Probe Event Filtering
@@ -82,13 +80,16 @@ Usage examples
To add a probe as a new event, write a new definition to kprobe_events
as below.

  echo p:myprobe do_sys_open dfd=$arg0 filename=$arg1 flags=$arg2 mode=$arg3 > /sys/kernel/debug/tracing/kprobe_events
  echo 'p:myprobe do_sys_open dfd=%ax filename=%dx flags=%cx mode=+4($stack)' > /sys/kernel/debug/tracing/kprobe_events

 This sets a kprobe on the top of do_sys_open() function with recording
1st to 4th arguments as "myprobe" event. As this example shows, users can
choose more familiar names for each arguments.
1st to 4th arguments as "myprobe" event. Note, which register/stack entry is
assigned to each function argument depends on arch-specific ABI. If you unsure
the ABI, please try to use probe subcommand of perf-tools (you can find it
under tools/perf/).
As this example shows, users can choose more familiar names for each arguments.

  echo r:myretprobe do_sys_open $retval >> /sys/kernel/debug/tracing/kprobe_events
  echo 'r:myretprobe do_sys_open $retval' >> /sys/kernel/debug/tracing/kprobe_events

 This sets a kretprobe on the return point of do_sys_open() function with
recording return value as "myretprobe" event.
@@ -97,23 +98,24 @@ recording return value as "myretprobe" event.

  cat /sys/kernel/debug/tracing/events/kprobes/myprobe/format
name: myprobe
ID: 75
ID: 780
format:
	field:unsigned short common_type;	offset:0;	size:2;
	field:unsigned char common_flags;	offset:2;	size:1;
	field:unsigned char common_preempt_count;	offset:3;	size:1;
	field:int common_pid;	offset:4;	size:4;
	field:int common_tgid;	offset:8;	size:4;
        field:unsigned short common_type;       offset:0;       size:2; signed:0;
        field:unsigned char common_flags;       offset:2;       size:1; signed:0;
        field:unsigned char common_preempt_count;       offset:3; size:1;signed:0;
        field:int common_pid;   offset:4;       size:4; signed:1;
        field:int common_lock_depth;    offset:8;       size:4; signed:1;

	field: unsigned long ip;	offset:16;tsize:8;
	field: int nargs;	offset:24;tsize:4;
	field: unsigned long dfd;	offset:32;tsize:8;
	field: unsigned long filename;	offset:40;tsize:8;
	field: unsigned long flags;	offset:48;tsize:8;
	field: unsigned long mode;	offset:56;tsize:8;
        field:unsigned long __probe_ip; offset:12;      size:4; signed:0;
        field:int __probe_nargs;        offset:16;      size:4; signed:1;
        field:unsigned long dfd;        offset:20;      size:4; signed:0;
        field:unsigned long filename;   offset:24;      size:4; signed:0;
        field:unsigned long flags;      offset:28;      size:4; signed:0;
        field:unsigned long mode;       offset:32;      size:4; signed:0;

print fmt: "(%lx) dfd=%lx filename=%lx flags=%lx mode=%lx", REC->ip, REC->dfd, REC->filename, REC->flags, REC->mode

print fmt: "(%lx) dfd=%lx filename=%lx flags=%lx mode=%lx", REC->__probe_ip,
REC->dfd, REC->filename, REC->flags, REC->mode

 You can see that the event has 4 arguments as in the expressions you specified.

@@ -121,6 +123,12 @@ print fmt: "(%lx) dfd=%lx filename=%lx flags=%lx mode=%lx", REC->ip, REC->dfd, R

 This clears all probe points.

 Or,

  echo -:myprobe >> kprobe_events

 This clears probe points selectively.

 Right after definition, each event is disabled by default. For tracing these
events, you need to enable it.

@@ -146,4 +154,3 @@ events, you need to enable it.
returns from SYMBOL(e.g. "sys_open+0x1b/0x1d <- do_sys_open" means kernel
returns from do_sys_open to sys_open+0x1b).
Loading