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 branch 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip

Pull perf fix from Ingo Molnar:
"One more fix for a recently discovered bug"

* 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
perf: Disable monitoring on setuid processes for regular users

+9 -7
+9 -7
fs/exec.c
··· 1135 1135 set_dumpable(current->mm, suid_dumpable); 1136 1136 } 1137 1137 1138 - /* 1139 - * Flush performance counters when crossing a 1140 - * security domain: 1141 - */ 1142 - if (!get_dumpable(current->mm)) 1143 - perf_event_exit_task(current); 1144 - 1145 1138 /* An exec changes our domain. We are no longer part of the thread 1146 1139 group */ 1147 1140 ··· 1198 1205 1199 1206 commit_creds(bprm->cred); 1200 1207 bprm->cred = NULL; 1208 + 1209 + /* 1210 + * Disable monitoring for regular users 1211 + * when executing setuid binaries. Must 1212 + * wait until new credentials are committed 1213 + * by commit_creds() above 1214 + */ 1215 + if (get_dumpable(current->mm) != SUID_DUMP_USER) 1216 + perf_event_exit_task(current); 1201 1217 /* 1202 1218 * cred_guard_mutex must be held at least to this point to prevent 1203 1219 * ptrace_attach() from altering our determination of the task's