diff options
Diffstat (limited to 'fs')
-rw-r--r-- | fs/binfmt_aout.c | 2 | ||||
-rw-r--r-- | fs/binfmt_elf.c | 14 | ||||
-rw-r--r-- | fs/binfmt_elf_fdpic.c | 6 | ||||
-rw-r--r-- | fs/binfmt_flat.c | 2 | ||||
-rw-r--r-- | fs/coredump.c | 10 |
5 files changed, 17 insertions, 17 deletions
diff --git a/fs/binfmt_aout.c b/fs/binfmt_aout.c index 4b5b5117f00a..0e7a6f81ae36 100644 --- a/fs/binfmt_aout.c +++ b/fs/binfmt_aout.c | |||
@@ -65,7 +65,7 @@ static int aout_core_dump(struct coredump_params *cprm) | |||
65 | current->flags |= PF_DUMPCORE; | 65 | current->flags |= PF_DUMPCORE; |
66 | strncpy(dump.u_comm, current->comm, sizeof(dump.u_comm)); | 66 | strncpy(dump.u_comm, current->comm, sizeof(dump.u_comm)); |
67 | dump.u_ar0 = offsetof(struct user, regs); | 67 | dump.u_ar0 = offsetof(struct user, regs); |
68 | dump.signal = cprm->signr; | 68 | dump.signal = cprm->siginfo->si_signo; |
69 | aout_dump_thread(cprm->regs, &dump); | 69 | aout_dump_thread(cprm->regs, &dump); |
70 | 70 | ||
71 | /* If the size of the dump file exceeds the rlimit, then see what would happen | 71 | /* If the size of the dump file exceeds the rlimit, then see what would happen |
diff --git a/fs/binfmt_elf.c b/fs/binfmt_elf.c index 7ef5f9fe2729..4450e82a05aa 100644 --- a/fs/binfmt_elf.c +++ b/fs/binfmt_elf.c | |||
@@ -1480,7 +1480,7 @@ static int fill_thread_core_info(struct elf_thread_core_info *t, | |||
1480 | 1480 | ||
1481 | static int fill_note_info(struct elfhdr *elf, int phdrs, | 1481 | static int fill_note_info(struct elfhdr *elf, int phdrs, |
1482 | struct elf_note_info *info, | 1482 | struct elf_note_info *info, |
1483 | long signr, struct pt_regs *regs) | 1483 | siginfo_t *siginfo, struct pt_regs *regs) |
1484 | { | 1484 | { |
1485 | struct task_struct *dump_task = current; | 1485 | struct task_struct *dump_task = current; |
1486 | const struct user_regset_view *view = task_user_regset_view(dump_task); | 1486 | const struct user_regset_view *view = task_user_regset_view(dump_task); |
@@ -1550,7 +1550,7 @@ static int fill_note_info(struct elfhdr *elf, int phdrs, | |||
1550 | * Now fill in each thread's information. | 1550 | * Now fill in each thread's information. |
1551 | */ | 1551 | */ |
1552 | for (t = info->thread; t != NULL; t = t->next) | 1552 | for (t = info->thread; t != NULL; t = t->next) |
1553 | if (!fill_thread_core_info(t, view, signr, &info->size)) | 1553 | if (!fill_thread_core_info(t, view, siginfo->si_signo, &info->size)) |
1554 | return 0; | 1554 | return 0; |
1555 | 1555 | ||
1556 | /* | 1556 | /* |
@@ -1713,14 +1713,14 @@ static int elf_note_info_init(struct elf_note_info *info) | |||
1713 | 1713 | ||
1714 | static int fill_note_info(struct elfhdr *elf, int phdrs, | 1714 | static int fill_note_info(struct elfhdr *elf, int phdrs, |
1715 | struct elf_note_info *info, | 1715 | struct elf_note_info *info, |
1716 | long signr, struct pt_regs *regs) | 1716 | siginfo_t *siginfo, struct pt_regs *regs) |
1717 | { | 1717 | { |
1718 | struct list_head *t; | 1718 | struct list_head *t; |
1719 | 1719 | ||
1720 | if (!elf_note_info_init(info)) | 1720 | if (!elf_note_info_init(info)) |
1721 | return 0; | 1721 | return 0; |
1722 | 1722 | ||
1723 | if (signr) { | 1723 | if (siginfo->si_signo) { |
1724 | struct core_thread *ct; | 1724 | struct core_thread *ct; |
1725 | struct elf_thread_status *ets; | 1725 | struct elf_thread_status *ets; |
1726 | 1726 | ||
@@ -1738,13 +1738,13 @@ static int fill_note_info(struct elfhdr *elf, int phdrs, | |||
1738 | int sz; | 1738 | int sz; |
1739 | 1739 | ||
1740 | ets = list_entry(t, struct elf_thread_status, list); | 1740 | ets = list_entry(t, struct elf_thread_status, list); |
1741 | sz = elf_dump_thread_status(signr, ets); | 1741 | sz = elf_dump_thread_status(siginfo->si_signo, ets); |
1742 | info->thread_status_size += sz; | 1742 | info->thread_status_size += sz; |
1743 | } | 1743 | } |
1744 | } | 1744 | } |
1745 | /* now collect the dump for the current */ | 1745 | /* now collect the dump for the current */ |
1746 | memset(info->prstatus, 0, sizeof(*info->prstatus)); | 1746 | memset(info->prstatus, 0, sizeof(*info->prstatus)); |
1747 | fill_prstatus(info->prstatus, current, signr); | 1747 | fill_prstatus(info->prstatus, current, siginfo->si_signo); |
1748 | elf_core_copy_regs(&info->prstatus->pr_reg, regs); | 1748 | elf_core_copy_regs(&info->prstatus->pr_reg, regs); |
1749 | 1749 | ||
1750 | /* Set up header */ | 1750 | /* Set up header */ |
@@ -1951,7 +1951,7 @@ static int elf_core_dump(struct coredump_params *cprm) | |||
1951 | * Collect all the non-memory information about the process for the | 1951 | * Collect all the non-memory information about the process for the |
1952 | * notes. This also sets up the file header. | 1952 | * notes. This also sets up the file header. |
1953 | */ | 1953 | */ |
1954 | if (!fill_note_info(elf, e_phnum, &info, cprm->signr, cprm->regs)) | 1954 | if (!fill_note_info(elf, e_phnum, &info, cprm->siginfo, cprm->regs)) |
1955 | goto cleanup; | 1955 | goto cleanup; |
1956 | 1956 | ||
1957 | has_dumped = 1; | 1957 | has_dumped = 1; |
diff --git a/fs/binfmt_elf_fdpic.c b/fs/binfmt_elf_fdpic.c index 3d77cf81ba3c..08d812b32282 100644 --- a/fs/binfmt_elf_fdpic.c +++ b/fs/binfmt_elf_fdpic.c | |||
@@ -1642,7 +1642,7 @@ static int elf_fdpic_core_dump(struct coredump_params *cprm) | |||
1642 | goto cleanup; | 1642 | goto cleanup; |
1643 | #endif | 1643 | #endif |
1644 | 1644 | ||
1645 | if (cprm->signr) { | 1645 | if (cprm->siginfo->si_signo) { |
1646 | struct core_thread *ct; | 1646 | struct core_thread *ct; |
1647 | struct elf_thread_status *tmp; | 1647 | struct elf_thread_status *tmp; |
1648 | 1648 | ||
@@ -1661,13 +1661,13 @@ static int elf_fdpic_core_dump(struct coredump_params *cprm) | |||
1661 | int sz; | 1661 | int sz; |
1662 | 1662 | ||
1663 | tmp = list_entry(t, struct elf_thread_status, list); | 1663 | tmp = list_entry(t, struct elf_thread_status, list); |
1664 | sz = elf_dump_thread_status(cprm->signr, tmp); | 1664 | sz = elf_dump_thread_status(cprm->siginfo->si_signo, tmp); |
1665 | thread_status_size += sz; | 1665 | thread_status_size += sz; |
1666 | } | 1666 | } |
1667 | } | 1667 | } |
1668 | 1668 | ||
1669 | /* now collect the dump for the current */ | 1669 | /* now collect the dump for the current */ |
1670 | fill_prstatus(prstatus, current, cprm->signr); | 1670 | fill_prstatus(prstatus, current, cprm->siginfo->si_signo); |
1671 | elf_core_copy_regs(&prstatus->pr_reg, cprm->regs); | 1671 | elf_core_copy_regs(&prstatus->pr_reg, cprm->regs); |
1672 | 1672 | ||
1673 | segs = current->mm->map_count; | 1673 | segs = current->mm->map_count; |
diff --git a/fs/binfmt_flat.c b/fs/binfmt_flat.c index 178cb70acc26..e280352b28f9 100644 --- a/fs/binfmt_flat.c +++ b/fs/binfmt_flat.c | |||
@@ -107,7 +107,7 @@ static struct linux_binfmt flat_format = { | |||
107 | static int flat_core_dump(struct coredump_params *cprm) | 107 | static int flat_core_dump(struct coredump_params *cprm) |
108 | { | 108 | { |
109 | printk("Process %s:%d received signr %d and should have core dumped\n", | 109 | printk("Process %s:%d received signr %d and should have core dumped\n", |
110 | current->comm, current->pid, (int) cprm->signr); | 110 | current->comm, current->pid, (int) cprm->siginfo->si_signo); |
111 | return(1); | 111 | return(1); |
112 | } | 112 | } |
113 | 113 | ||
diff --git a/fs/coredump.c b/fs/coredump.c index 4fce06fc3b56..fd37facac8dc 100644 --- a/fs/coredump.c +++ b/fs/coredump.c | |||
@@ -200,7 +200,7 @@ static int format_corename(struct core_name *cn, struct coredump_params *cprm) | |||
200 | break; | 200 | break; |
201 | /* signal that caused the coredump */ | 201 | /* signal that caused the coredump */ |
202 | case 's': | 202 | case 's': |
203 | err = cn_printf(cn, "%ld", cprm->signr); | 203 | err = cn_printf(cn, "%ld", cprm->siginfo->si_signo); |
204 | break; | 204 | break; |
205 | /* UNIX time of coredump */ | 205 | /* UNIX time of coredump */ |
206 | case 't': { | 206 | case 't': { |
@@ -457,7 +457,7 @@ static int umh_pipe_setup(struct subprocess_info *info, struct cred *new) | |||
457 | return 0; | 457 | return 0; |
458 | } | 458 | } |
459 | 459 | ||
460 | void do_coredump(long signr, int exit_code, struct pt_regs *regs) | 460 | void do_coredump(siginfo_t *siginfo, struct pt_regs *regs) |
461 | { | 461 | { |
462 | struct core_state core_state; | 462 | struct core_state core_state; |
463 | struct core_name cn; | 463 | struct core_name cn; |
@@ -472,7 +472,7 @@ void do_coredump(long signr, int exit_code, struct pt_regs *regs) | |||
472 | bool need_nonrelative = false; | 472 | bool need_nonrelative = false; |
473 | static atomic_t core_dump_count = ATOMIC_INIT(0); | 473 | static atomic_t core_dump_count = ATOMIC_INIT(0); |
474 | struct coredump_params cprm = { | 474 | struct coredump_params cprm = { |
475 | .signr = signr, | 475 | .siginfo = siginfo, |
476 | .regs = regs, | 476 | .regs = regs, |
477 | .limit = rlimit(RLIMIT_CORE), | 477 | .limit = rlimit(RLIMIT_CORE), |
478 | /* | 478 | /* |
@@ -483,7 +483,7 @@ void do_coredump(long signr, int exit_code, struct pt_regs *regs) | |||
483 | .mm_flags = mm->flags, | 483 | .mm_flags = mm->flags, |
484 | }; | 484 | }; |
485 | 485 | ||
486 | audit_core_dumps(signr); | 486 | audit_core_dumps(siginfo->si_signo); |
487 | 487 | ||
488 | binfmt = mm->binfmt; | 488 | binfmt = mm->binfmt; |
489 | if (!binfmt || !binfmt->core_dump) | 489 | if (!binfmt || !binfmt->core_dump) |
@@ -507,7 +507,7 @@ void do_coredump(long signr, int exit_code, struct pt_regs *regs) | |||
507 | need_nonrelative = true; | 507 | need_nonrelative = true; |
508 | } | 508 | } |
509 | 509 | ||
510 | retval = coredump_wait(exit_code, &core_state); | 510 | retval = coredump_wait(siginfo->si_signo, &core_state); |
511 | if (retval < 0) | 511 | if (retval < 0) |
512 | goto fail_creds; | 512 | goto fail_creds; |
513 | 513 | ||