[PATCH] ARM: Add SWP/SWPB emulation for ARMv7 processors

Catalin Marinas catalin.marinas at arm.com
Fri Dec 18 05:00:02 EST 2009


On Thu, 2009-12-17 at 19:32 +0000, Jamie Lokier wrote:
> Leif Lindholm wrote:
> > +     printk(KERN_INFO "SWP{B} emulation: access caused memory abort!\n");
> > +     arm_notify_die("Illegal memory access", regs, &info, 0, 0);
> 
> > +     if (address & 0x3) {
> > +             /* SWP to unaligned address not permitted */
> > +             printk(KERN_INFO "SWP instruction on unaligned pointer!\n");
> > +             return -EFAULT;
> > +     }
> 
> These printks look like an easy local denial of service.  They should
> be rate limited.

pr_debug() may be a better choice.

-- 
Catalin




More information about the linux-arm-kernel mailing list