Commit 307d522
committed
signal/seccomp: Refactor seccomp signal and coredump generation
Factor out force_sig_seccomp from the seccomp signal generation and
place it in kernel/signal.c. The function force_sig_seccomp takes a
parameter force_coredump to indicate that the sigaction field should
be reset to SIGDFL so that a coredump will be generated when the
signal is delivered.
force_sig_seccomp is then used to replace both seccomp_send_sigsys
and seccomp_init_siginfo.
force_sig_info_to_task gains an extra parameter to force using
the default signal action.
With this change seccomp is no longer a special case and there
becomes exactly one place do_coredump is called from.
Further it no longer becomes necessary for __seccomp_filter
to call do_group_exit.
Acked-by: Kees Cook <keescook@chromium.org>
Link: https://lkml.kernel.org/r/87r1gr6qc4.fsf_-_@disp2133
Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>1 parent a3616a3 commit 307d522
3 files changed
Lines changed: 33 additions & 38 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
329 | 329 | | |
330 | 330 | | |
331 | 331 | | |
| 332 | + | |
332 | 333 | | |
333 | 334 | | |
334 | 335 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
922 | 922 | | |
923 | 923 | | |
924 | 924 | | |
925 | | - | |
926 | | - | |
927 | | - | |
928 | | - | |
929 | | - | |
930 | | - | |
931 | | - | |
932 | | - | |
933 | | - | |
934 | | - | |
935 | | - | |
936 | | - | |
937 | | - | |
938 | | - | |
939 | | - | |
940 | | - | |
941 | | - | |
942 | | - | |
943 | | - | |
944 | | - | |
945 | | - | |
946 | | - | |
947 | | - | |
948 | | - | |
949 | 925 | | |
950 | 926 | | |
951 | 927 | | |
| |||
1218 | 1194 | | |
1219 | 1195 | | |
1220 | 1196 | | |
1221 | | - | |
| 1197 | + | |
1222 | 1198 | | |
1223 | 1199 | | |
1224 | 1200 | | |
| |||
1289 | 1265 | | |
1290 | 1266 | | |
1291 | 1267 | | |
1292 | | - | |
1293 | | - | |
1294 | 1268 | | |
1295 | 1269 | | |
1296 | | - | |
1297 | | - | |
1298 | | - | |
1299 | | - | |
1300 | | - | |
| 1270 | + | |
| 1271 | + | |
| 1272 | + | |
1301 | 1273 | | |
1302 | | - | |
1303 | | - | |
| 1274 | + | |
| 1275 | + | |
1304 | 1276 | | |
1305 | 1277 | | |
1306 | 1278 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
54 | 54 | | |
55 | 55 | | |
56 | 56 | | |
| 57 | + | |
57 | 58 | | |
58 | 59 | | |
59 | 60 | | |
| |||
1322 | 1323 | | |
1323 | 1324 | | |
1324 | 1325 | | |
1325 | | - | |
| 1326 | + | |
1326 | 1327 | | |
1327 | 1328 | | |
1328 | 1329 | | |
| |||
1333 | 1334 | | |
1334 | 1335 | | |
1335 | 1336 | | |
1336 | | - | |
| 1337 | + | |
1337 | 1338 | | |
1338 | 1339 | | |
1339 | 1340 | | |
| |||
1354 | 1355 | | |
1355 | 1356 | | |
1356 | 1357 | | |
1357 | | - | |
| 1358 | + | |
1358 | 1359 | | |
1359 | 1360 | | |
1360 | 1361 | | |
| |||
1685 | 1686 | | |
1686 | 1687 | | |
1687 | 1688 | | |
1688 | | - | |
| 1689 | + | |
1689 | 1690 | | |
1690 | 1691 | | |
1691 | 1692 | | |
| |||
1793 | 1794 | | |
1794 | 1795 | | |
1795 | 1796 | | |
| 1797 | + | |
| 1798 | + | |
| 1799 | + | |
| 1800 | + | |
| 1801 | + | |
| 1802 | + | |
| 1803 | + | |
| 1804 | + | |
| 1805 | + | |
| 1806 | + | |
| 1807 | + | |
| 1808 | + | |
| 1809 | + | |
| 1810 | + | |
| 1811 | + | |
| 1812 | + | |
| 1813 | + | |
| 1814 | + | |
| 1815 | + | |
| 1816 | + | |
| 1817 | + | |
1796 | 1818 | | |
1797 | 1819 | | |
1798 | 1820 | | |
| |||
0 commit comments