Commit f4ac7302 authored by Eric W. Biederman's avatar Eric W. Biederman

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/m18s4zs7nu.fsf_-_@fess.ebiederm.org
v2: https://lkml.kernel.org/r/20210505141101.11519-9-ebiederm@xmission.com
Link: https://lkml.kernel.org/r/87zgumw8cc.fsf_-_@disp2133Acked-by: default avatarMarco Elver <elver@google.com>
Signed-off-by: default avatarEric W. Biederman <ebiederm@xmission.com>
parent 50ae8130
...@@ -114,10 +114,10 @@ static int signalfd_copyinfo(struct signalfd_siginfo __user *uinfo, ...@@ -114,10 +114,10 @@ static int signalfd_copyinfo(struct signalfd_siginfo __user *uinfo,
break; break;
case SIL_FAULT_BNDERR: case SIL_FAULT_BNDERR:
case SIL_FAULT_PKUERR: case SIL_FAULT_PKUERR:
case SIL_PERF_EVENT: case SIL_FAULT_PERF_EVENT:
/* /*
* Fall through to the SIL_FAULT case. SIL_FAULT_BNDERR, * Fall through to the SIL_FAULT case. SIL_FAULT_BNDERR,
* SIL_FAULT_PKUERR, and SIL_PERF_EVENT are only * SIL_FAULT_PKUERR, and SIL_FAULT_PERF_EVENT are only
* generated by faults that deliver them synchronously to * generated by faults that deliver them synchronously to
* userspace. In case someone injects one of these signals * userspace. In case someone injects one of these signals
* and signalfd catches it treat it as SIL_FAULT. * and signalfd catches it treat it as SIL_FAULT.
......
...@@ -44,7 +44,7 @@ enum siginfo_layout { ...@@ -44,7 +44,7 @@ enum siginfo_layout {
SIL_FAULT_MCEERR, SIL_FAULT_MCEERR,
SIL_FAULT_BNDERR, SIL_FAULT_BNDERR,
SIL_FAULT_PKUERR, SIL_FAULT_PKUERR,
SIL_PERF_EVENT, SIL_FAULT_PERF_EVENT,
SIL_CHLD, SIL_CHLD,
SIL_RT, SIL_RT,
SIL_SYS, SIL_SYS,
......
...@@ -1213,7 +1213,7 @@ static inline bool has_si_pid_and_uid(struct kernel_siginfo *info) ...@@ -1213,7 +1213,7 @@ static inline bool has_si_pid_and_uid(struct kernel_siginfo *info)
case SIL_FAULT_MCEERR: case SIL_FAULT_MCEERR:
case SIL_FAULT_BNDERR: case SIL_FAULT_BNDERR:
case SIL_FAULT_PKUERR: case SIL_FAULT_PKUERR:
case SIL_PERF_EVENT: case SIL_FAULT_PERF_EVENT:
case SIL_SYS: case SIL_SYS:
ret = false; ret = false;
break; break;
...@@ -2580,7 +2580,7 @@ static void hide_si_addr_tag_bits(struct ksignal *ksig) ...@@ -2580,7 +2580,7 @@ static void hide_si_addr_tag_bits(struct ksignal *ksig)
case SIL_FAULT_MCEERR: case SIL_FAULT_MCEERR:
case SIL_FAULT_BNDERR: case SIL_FAULT_BNDERR:
case SIL_FAULT_PKUERR: case SIL_FAULT_PKUERR:
case SIL_PERF_EVENT: case SIL_FAULT_PERF_EVENT:
ksig->info.si_addr = arch_untagged_si_addr( ksig->info.si_addr = arch_untagged_si_addr(
ksig->info.si_addr, ksig->sig, ksig->info.si_code); ksig->info.si_addr, ksig->sig, ksig->info.si_code);
break; break;
...@@ -3265,7 +3265,7 @@ enum siginfo_layout siginfo_layout(unsigned sig, int si_code) ...@@ -3265,7 +3265,7 @@ enum siginfo_layout siginfo_layout(unsigned sig, int si_code)
layout = SIL_FAULT_PKUERR; layout = SIL_FAULT_PKUERR;
#endif #endif
else if ((sig == SIGTRAP) && (si_code == TRAP_PERF)) else if ((sig == SIGTRAP) && (si_code == TRAP_PERF))
layout = SIL_PERF_EVENT; layout = SIL_FAULT_PERF_EVENT;
else if (IS_ENABLED(CONFIG_SPARC) && else if (IS_ENABLED(CONFIG_SPARC) &&
(sig == SIGILL) && (si_code == ILL_ILLTRP)) (sig == SIGILL) && (si_code == ILL_ILLTRP))
layout = SIL_FAULT_TRAPNO; layout = SIL_FAULT_TRAPNO;
...@@ -3394,7 +3394,7 @@ void copy_siginfo_to_external32(struct compat_siginfo *to, ...@@ -3394,7 +3394,7 @@ void copy_siginfo_to_external32(struct compat_siginfo *to,
to->si_addr = ptr_to_compat(from->si_addr); to->si_addr = ptr_to_compat(from->si_addr);
to->si_pkey = from->si_pkey; to->si_pkey = from->si_pkey;
break; break;
case SIL_PERF_EVENT: case SIL_FAULT_PERF_EVENT:
to->si_addr = ptr_to_compat(from->si_addr); to->si_addr = ptr_to_compat(from->si_addr);
to->si_perf_data = from->si_perf_data; to->si_perf_data = from->si_perf_data;
to->si_perf_type = from->si_perf_type; to->si_perf_type = from->si_perf_type;
...@@ -3471,7 +3471,7 @@ static int post_copy_siginfo_from_user32(kernel_siginfo_t *to, ...@@ -3471,7 +3471,7 @@ static int post_copy_siginfo_from_user32(kernel_siginfo_t *to,
to->si_addr = compat_ptr(from->si_addr); to->si_addr = compat_ptr(from->si_addr);
to->si_pkey = from->si_pkey; to->si_pkey = from->si_pkey;
break; break;
case SIL_PERF_EVENT: case SIL_FAULT_PERF_EVENT:
to->si_addr = compat_ptr(from->si_addr); to->si_addr = compat_ptr(from->si_addr);
to->si_perf_data = from->si_perf_data; to->si_perf_data = from->si_perf_data;
to->si_perf_type = from->si_perf_type; to->si_perf_type = from->si_perf_type;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment