Re: [x86] BUG: unable to handle kernel paging request at 00740060
From: Linus Torvalds
Date: Tue Oct 08 2013 - 15:09:04 EST
On Tue, Oct 8, 2013 at 11:51 AM, Oleg Nesterov <oleg@xxxxxxxxxx> wrote:
>
> I do not really understand inline assembly constraints, but I'll ask
> anyway.
>
> +#define __GEN_RMWcc(fullop, var, cc, ...) \
> +do { \
> + asm volatile goto (fullop "; j" cc " %l[cc_label]" \
> + : : "m" (var), ## __VA_ARGS__ \
> ^^^^^^^^^
>
> don't we need
>
> "+m" (var)
We have a memory clobber instead. So the memory is marked as input and
clobbered.
And we'd love to mark it "+m", but "ask goto" cannot have outputs.
For the serializing ones, the memory clobber is ok - they have barrier
semantics anyway. But we'd actually *want* to use "asm goto" for some
cases where the memory clobber is too big of a hammer, so if we ever
get input/output constraints to "asm goto" we'll be happy.
Of course, right now it looks like we shouldn't be in a rush to use
"asm goto" at all...
Linus
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/