illegal instructions / irqs disabled warning

Kumar Gala galak at kernel.crashing.org
Thu Dec 15 02:07:56 EST 2005


On Dec 14, 2005, at 8:49 AM, Johannes Berg wrote:

> 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.

It is, we just need to ensure that the user page we are copying from  
is in memory.

But, now that I go back and look at your log message, its odd. I  
didn't expect ProgramExceptions to be executed with the MSR[EE] = 0.  
Now, I'm wondering why that is.

- kumar



More information about the Linuxppc-dev mailing list