From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andy Lutomirski Subject: SPARC issue (Re: [PATCH] Rename is_compat_task to in_compat_syscall) Date: Tue, 19 Jan 2016 14:14:43 -0800 Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Return-path: Received: from mail-ob0-f181.google.com ([209.85.214.181]:34344 "EHLO mail-ob0-f181.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933295AbcASWPE (ORCPT ); Tue, 19 Jan 2016 17:15:04 -0500 Received: by mail-ob0-f181.google.com with SMTP id vt7so199582551obb.1 for ; Tue, 19 Jan 2016 14:15:03 -0800 (PST) Sender: linux-arch-owner@vger.kernel.org List-ID: To: Al Viro Cc: Andy Lutomirski , Linus Torvalds , Ingo Molnar , X86 ML , linux-arch , David Miller , "linux-s390@vger.kernel.org" , Kees Cook On Tue, Jan 19, 2016 at 1:55 PM, Al Viro wrote: > On Tue, Jan 19, 2016 at 01:47:24PM -0800, Andy Lutomirski wrote: >> Essentially all users of is_compat_task in the kernel are trying to >> determine whether they are executing in the context of a compat >> syscall. On at least x86_64 and sparc, these are not at all the >> same question. >> >> On x86_64 and sparc, therefore, is_compat_task doesn't return the >> overall compat state of the task; it returns true if the task is >> currently in a compat syscall. > > The hell it does. Andy, TIF_32BIT is *NOT* set on syscall entry; it is > set by execve(). And 64bit task (with that bit clear) can bloody well > issue 32bit syscalls. Really. It does on x86. It does not on sparc. But syscall_get_arch on sparc *also* doesn't appear to work right. davem, how can I check the current syscall bitness on sparc? It's not obvious to me that it's possible. Everyone should consider this patch withdrawn until I figure out what's going on with sparc. --Andy