From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1762891AbZCNAvo (ORCPT ); Fri, 13 Mar 2009 20:51:44 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1754323AbZCNAUX (ORCPT ); Fri, 13 Mar 2009 20:20:23 -0400 Received: from kroah.org ([198.145.64.141]:35117 "EHLO coco.kroah.org" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1753025AbZCNAT4 (ORCPT ); Fri, 13 Mar 2009 20:19:56 -0400 X-Mailbox-Line: From gregkh@mini.kroah.org Fri Mar 13 17:07:53 2009 Message-Id: <20090314000753.621377363@mini.kroah.org> User-Agent: quilt/0.48-1 Date: Fri, 13 Mar 2009 17:06:43 -0700 From: Greg KH To: linux-kernel@vger.kernel.org, stable@kernel.org Cc: Justin Forbes , Zwane Mwaikambo , "Theodore Ts'o" , Randy Dunlap , Dave Jones , Chuck Wolber , Chris Wedgwood , Michael Krufky , Chuck Ebbert , Domenico Andreoli , Willy Tarreau , Rodrigo Rubira Branco , Jake Edge , Eugene Teo , torvalds@linux-foundation.org, akpm@linux-foundation.org, alan@lxorguk.ukuu.org.uk, Ralf Baechle Subject: [patch 95/96] MIPS: compat: Implement is_compat_task. References: <20090314000508.803142980@mini.kroah.org> Content-Disposition: inline; filename=mips-compat-implement-is_compat_task.patch In-Reply-To: <20090314001449.GA4485@kroah.com> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 2.6.27-stable review patch. If anyone has any objections, please let us know. ------------------ From: Ralf Baechle commit 4302e5d53b9166d45317e3ddf0a7a9dab3efd43b upstream. This is a build fix required after "x86-64: seccomp: fix 32/64 syscall hole" (commit 5b1017404aea6d2e552e991b3fd814d839e9cd67). MIPS doesn't have the issue that was fixed for x86-64 by that patch. This also doesn't solve the N32 issue which is that N32 seccomp processes will be treated as non-compat processes thus only have access to N64 syscalls. Signed-off-by: Ralf Baechle Signed-off-by: Linus Torvalds Signed-off-by: Greg Kroah-Hartman --- include/asm-mips/compat.h | 7 +++++++ 1 file changed, 7 insertions(+) --- a/include/asm-mips/compat.h +++ b/include/asm-mips/compat.h @@ -3,6 +3,8 @@ /* * Architecture specific compatibility types */ +#include +#include #include #include #include @@ -218,4 +220,9 @@ struct compat_shmid64_ds { compat_ulong_t __unused2; }; +static inline int is_compat_task(void) +{ + return test_thread_flag(TIF_32BIT); +} + #endif /* _ASM_COMPAT_H */