>There might be some way we can annotate the regular memcpy() >implementations with exception handling markers, like we do >for the user copy cases, such that they only trigger the >alternative return value handling when a special thread local >flag has been set. I thought about this, but it's ugly and creates (at least potential) problems with recursion / interrupts. (Not sure if these are possible in the Linux kernel organization, just "icky on general principles".) >First, if the %o7 or %i7 are inside of the function memcpy_user_stub, >then we are doing one of these in-kernel copies that are allowed to >fault. This elides the need for a special thread flag or anything >like that. This, on the other hand, seems quite promising: as with the exception table itself, we use the program counter (of the return address, in this case) as the flag. >Then the code in do_kernel_fault() can, if it sees a "fixup" value >with the low bit set, check %o7/%i7 for being inside range of >memcpy_user_stub. If so, we jump to the fixup. Otherwise we >behave as if we did not find a matching exception table entry. This should work really well. Chris -- To unsubscribe from this list: send the line "unsubscribe sparclinux" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html