Skip to content

Commit f4ac730

Browse files
committed
signal: Rename SIL_PERF_EVENT SIL_FAULT_PERF_EVENT for consistency
It helps to know which part of the siginfo structure the siginfo_layout value is talking about. v1: https://lkml.kernel.org/r/[email protected] v2: https://lkml.kernel.org/r/[email protected] Link: https://lkml.kernel.org/r/87zgumw8cc.fsf_-_@disp2133 Acked-by: Marco Elver <[email protected]> Signed-off-by: Eric W. Biederman <[email protected]>
1 parent 50ae813 commit f4ac730

File tree

3 files changed

+8
-8
lines changed

3 files changed

+8
-8
lines changed

fs/signalfd.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -114,10 +114,10 @@ static int signalfd_copyinfo(struct signalfd_siginfo __user *uinfo,
114114
break;
115115
case SIL_FAULT_BNDERR:
116116
case SIL_FAULT_PKUERR:
117-
case SIL_PERF_EVENT:
117+
case SIL_FAULT_PERF_EVENT:
118118
/*
119119
* Fall through to the SIL_FAULT case. SIL_FAULT_BNDERR,
120-
* SIL_FAULT_PKUERR, and SIL_PERF_EVENT are only
120+
* SIL_FAULT_PKUERR, and SIL_FAULT_PERF_EVENT are only
121121
* generated by faults that deliver them synchronously to
122122
* userspace. In case someone injects one of these signals
123123
* and signalfd catches it treat it as SIL_FAULT.

include/linux/signal.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ enum siginfo_layout {
4444
SIL_FAULT_MCEERR,
4545
SIL_FAULT_BNDERR,
4646
SIL_FAULT_PKUERR,
47-
SIL_PERF_EVENT,
47+
SIL_FAULT_PERF_EVENT,
4848
SIL_CHLD,
4949
SIL_RT,
5050
SIL_SYS,

kernel/signal.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1213,7 +1213,7 @@ static inline bool has_si_pid_and_uid(struct kernel_siginfo *info)
12131213
case SIL_FAULT_MCEERR:
12141214
case SIL_FAULT_BNDERR:
12151215
case SIL_FAULT_PKUERR:
1216-
case SIL_PERF_EVENT:
1216+
case SIL_FAULT_PERF_EVENT:
12171217
case SIL_SYS:
12181218
ret = false;
12191219
break;
@@ -2580,7 +2580,7 @@ static void hide_si_addr_tag_bits(struct ksignal *ksig)
25802580
case SIL_FAULT_MCEERR:
25812581
case SIL_FAULT_BNDERR:
25822582
case SIL_FAULT_PKUERR:
2583-
case SIL_PERF_EVENT:
2583+
case SIL_FAULT_PERF_EVENT:
25842584
ksig->info.si_addr = arch_untagged_si_addr(
25852585
ksig->info.si_addr, ksig->sig, ksig->info.si_code);
25862586
break;
@@ -3265,7 +3265,7 @@ enum siginfo_layout siginfo_layout(unsigned sig, int si_code)
32653265
layout = SIL_FAULT_PKUERR;
32663266
#endif
32673267
else if ((sig == SIGTRAP) && (si_code == TRAP_PERF))
3268-
layout = SIL_PERF_EVENT;
3268+
layout = SIL_FAULT_PERF_EVENT;
32693269
else if (IS_ENABLED(CONFIG_SPARC) &&
32703270
(sig == SIGILL) && (si_code == ILL_ILLTRP))
32713271
layout = SIL_FAULT_TRAPNO;
@@ -3394,7 +3394,7 @@ void copy_siginfo_to_external32(struct compat_siginfo *to,
33943394
to->si_addr = ptr_to_compat(from->si_addr);
33953395
to->si_pkey = from->si_pkey;
33963396
break;
3397-
case SIL_PERF_EVENT:
3397+
case SIL_FAULT_PERF_EVENT:
33983398
to->si_addr = ptr_to_compat(from->si_addr);
33993399
to->si_perf_data = from->si_perf_data;
34003400
to->si_perf_type = from->si_perf_type;
@@ -3471,7 +3471,7 @@ static int post_copy_siginfo_from_user32(kernel_siginfo_t *to,
34713471
to->si_addr = compat_ptr(from->si_addr);
34723472
to->si_pkey = from->si_pkey;
34733473
break;
3474-
case SIL_PERF_EVENT:
3474+
case SIL_FAULT_PERF_EVENT:
34753475
to->si_addr = compat_ptr(from->si_addr);
34763476
to->si_perf_data = from->si_perf_data;
34773477
to->si_perf_type = from->si_perf_type;

0 commit comments

Comments
 (0)