Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 129648
b: refs/heads/master
c: 88fc241
h: refs/heads/master
v: v3
  • Loading branch information
Doug Chapman authored and Tony Luck committed Jan 15, 2009
1 parent 970ef4b commit 6e733e7
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 0773a6cf673316440999752e23f8c3d4f85e48b9
refs/heads/master: 88fc241f54459ac3d86c5e13b449730199f66061
6 changes: 5 additions & 1 deletion trunk/arch/ia64/kernel/unaligned.c
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ dump (const char *str, void *vp, size_t len)
* (i.e. don't allow attacker to fill up logs with unaligned accesses).
*/
int no_unaligned_warning;
int unaligned_dump_stack;
static int noprint_warning;

/*
Expand Down Expand Up @@ -1371,9 +1372,12 @@ ia64_handle_unaligned (unsigned long ifa, struct pt_regs *regs)
}
}
} else {
if (within_logging_rate_limit())
if (within_logging_rate_limit()) {
printk(KERN_WARNING "kernel unaligned access to 0x%016lx, ip=0x%016lx\n",
ifa, regs->cr_iip + ipsr->ri);
if (unaligned_dump_stack)
dump_stack();
}
set_fs(KERNEL_DS);
}

Expand Down
9 changes: 9 additions & 0 deletions trunk/kernel/sysctl.c
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,7 @@ extern int acct_parm[];

#ifdef CONFIG_IA64
extern int no_unaligned_warning;
extern int unaligned_dump_stack;
#endif

#ifdef CONFIG_RT_MUTEXES
Expand Down Expand Up @@ -781,6 +782,14 @@ static struct ctl_table kern_table[] = {
.mode = 0644,
.proc_handler = &proc_dointvec,
},
{
.ctl_name = CTL_UNNUMBERED,
.procname = "unaligned-dump-stack",
.data = &unaligned_dump_stack,
.maxlen = sizeof (int),
.mode = 0644,
.proc_handler = &proc_dointvec,
},
#endif
#ifdef CONFIG_DETECT_SOFTLOCKUP
{
Expand Down

0 comments on commit 6e733e7

Please sign in to comment.