aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sparc64/kernel/ptrace.c
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2008-09-12 18:01:31 -0400
committerDavid S. Miller <davem@davemloft.net>2008-09-12 18:01:31 -0400
commit3c503701038ac161c269ea43cd67805a3c5669fb (patch)
treeb9e9d9da60460c028971498f78a3667c89c2b378 /arch/sparc64/kernel/ptrace.c
parent3ab5827eb0fefbfa7234f3f91f78b50f2dfcf8e4 (diff)
sparc: Fix user_regset 'n' field values.
As noticed by Russell King, we were not setting this properly to the number of entries, but rather the total size. This results in the core dumping code allocating waayyyy too much memory. Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'arch/sparc64/kernel/ptrace.c')
-rw-r--r--arch/sparc64/kernel/ptrace.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/arch/sparc64/kernel/ptrace.c b/arch/sparc64/kernel/ptrace.c
index db2ddf2e829e..f43adbc773ca 100644
--- a/arch/sparc64/kernel/ptrace.c
+++ b/arch/sparc64/kernel/ptrace.c
@@ -443,7 +443,7 @@ static const struct user_regset sparc64_regsets[] = {
443 */ 443 */
444 [REGSET_GENERAL] = { 444 [REGSET_GENERAL] = {
445 .core_note_type = NT_PRSTATUS, 445 .core_note_type = NT_PRSTATUS,
446 .n = 36 * sizeof(u64), 446 .n = 36,
447 .size = sizeof(u64), .align = sizeof(u64), 447 .size = sizeof(u64), .align = sizeof(u64),
448 .get = genregs64_get, .set = genregs64_set 448 .get = genregs64_get, .set = genregs64_set
449 }, 449 },
@@ -455,7 +455,7 @@ static const struct user_regset sparc64_regsets[] = {
455 */ 455 */
456 [REGSET_FP] = { 456 [REGSET_FP] = {
457 .core_note_type = NT_PRFPREG, 457 .core_note_type = NT_PRFPREG,
458 .n = 35 * sizeof(u64), 458 .n = 35,
459 .size = sizeof(u64), .align = sizeof(u64), 459 .size = sizeof(u64), .align = sizeof(u64),
460 .get = fpregs64_get, .set = fpregs64_set 460 .get = fpregs64_get, .set = fpregs64_set
461 }, 461 },
@@ -801,7 +801,7 @@ static const struct user_regset sparc32_regsets[] = {
801 */ 801 */
802 [REGSET_GENERAL] = { 802 [REGSET_GENERAL] = {
803 .core_note_type = NT_PRSTATUS, 803 .core_note_type = NT_PRSTATUS,
804 .n = 38 * sizeof(u32), 804 .n = 38,
805 .size = sizeof(u32), .align = sizeof(u32), 805 .size = sizeof(u32), .align = sizeof(u32),
806 .get = genregs32_get, .set = genregs32_set 806 .get = genregs32_get, .set = genregs32_set
807 }, 807 },
@@ -817,7 +817,7 @@ static const struct user_regset sparc32_regsets[] = {
817 */ 817 */
818 [REGSET_FP] = { 818 [REGSET_FP] = {
819 .core_note_type = NT_PRFPREG, 819 .core_note_type = NT_PRFPREG,
820 .n = 99 * sizeof(u32), 820 .n = 99,
821 .size = sizeof(u32), .align = sizeof(u32), 821 .size = sizeof(u32), .align = sizeof(u32),
822 .get = fpregs32_get, .set = fpregs32_set 822 .get = fpregs32_get, .set = fpregs32_set
823 }, 823 },