illegal instructions / irqs disabled warning

Johannes Berg johannes at sipsolutions.net
Thu Dec 15 01:49:33 EST 2005


On Wed, 2005-12-14 at 08:41 -0600, Kumar Gala wrote:

> Its highly likely, but not guaranteed on all systems.  In truth this  
> is most likely a bug.

Ok.

> > But here's the actual question:
> > static inline unsigned long __copy_from_user(void *to,
> >                 const void __user *from, unsigned long size)
> > {
> >         might_sleep();
> >         return __copy_from_user_inatomic(to, from, size);
> > }
> >
> > Does that mean __copy_from_user_inatomic isn't actually valid to  
> > call in
> > atomic context? Or is this only so that kernel developers that use
> > powerpc see the bugs their code would have on other platforms? The  
> > magic
> > in get_user_asm thoroughly confuses me.
> 
> What do you mean atomic context?  Not exactly sure what your asking  
> about.

Well, the above code loading the instruction that faulted is called from
the interrupt context where the kernel tries to fix it up. If that
instruction is not in memory for whatever reason, then it shouldn't try
to fix it up bug kill the program with SIGILL or SIGSEGV or whatever...
This is what I came from, and tried looking into how to implement that.
But then I ran across the code in __copy_from_user which just calls
__copy_from_user_inatomic so I'm wondering if it is actually possible to
safely copy data (the instruction) from user space in an interrupt.

Thanks,
johannes
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 832 bytes
Desc: This is a digitally signed message part
URL: <http://lists.ozlabs.org/pipermail/linuxppc-dev/attachments/20051214/258f9ebf/attachment.pgp>


More information about the Linuxppc-dev mailing list