mirror of
https://github.com/adulau/aha.git
synced 2024-12-28 03:36:19 +00:00
sparc: Validate that kprobe address is 4-byte aligned.
Otherwise it isn't a valid instruction address.
This is the sparc equivalent of commit
b46b3d70c9
(kprobes: Checks probe
address is instruction boudary on x86)
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
08a036d583
commit
936cf25178
1 changed files with 3 additions and 0 deletions
|
@ -46,6 +46,9 @@ struct kretprobe_blackpoint kretprobe_blacklist[] = {{NULL, NULL}};
|
|||
|
||||
int __kprobes arch_prepare_kprobe(struct kprobe *p)
|
||||
{
|
||||
if ((unsigned long) p->addr & 0x3UL)
|
||||
return -EILSEQ;
|
||||
|
||||
p->ainsn.insn[0] = *p->addr;
|
||||
flushi(&p->ainsn.insn[0]);
|
||||
|
||||
|
|
Loading…
Reference in a new issue