On Thu, Jul 8, 2021 at 5:57 AM Christoph Hellwig <hch@xxxxxx> wrote:
I've force pushed a new version to the branch, can you give it a spin?
Please stop playing broken games with __constant_copy_to_user(). Now you didn't just break the return value, you broke the actual copy too. When it is supposed to do a 4-byte copy, the code now does *two* 4-byte copies, because that's the way __constant_copy_to_user_asm() works - it always does at least two accesses, and then the third one is conditional. So that "6, l, l, )" in case 4: __constant_copy_to_user_asm(res, to, from, tmp, 6, l, l,); break; literally means "try to do 2x 'l' sized moves (but not a third one), and return 6 if it fails". All of which is very wrong indeed. So commit d36105c942e0 ("m68k: simplify the __constant_copy_to_user implementation") is very very broken. But the rest looks good to me. Of course, I entirely missed the fact that Andreas pointed out - "instr" was inside a string - so who knows what I missed this time. Linus