From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753297Ab2H1QxI (ORCPT ); Tue, 28 Aug 2012 12:53:08 -0400 Received: from usmamail.tilera.com ([12.216.194.151]:61476 "EHLO USMAMAIL.TILERA.COM" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752219Ab2H1QxG (ORCPT ); Tue, 28 Aug 2012 12:53:06 -0400 Message-ID: <503CF76C.2010105@tilera.com> Date: Tue, 28 Aug 2012 12:53:00 -0400 From: Chris Metcalf User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:14.0) Gecko/20120713 Thunderbird/14.0 MIME-Version: 1.0 To: Arnd Bergmann CC: Andrew Morton , Jiri Kosina , Haavard Skinnemoen , Hans-Christian Egtvedt , Mike Frysinger , Mark Salter , Mikael Starvik , Jesper Nilsson , David Howells , Yoshinori Sato , Richard Kuo , Hirokazu Takata , Geert Uytterhoeven , Michal Simek , Koichi Yasutake , Jonas Bonn , Chen Liqin , Lennox Wu , Paul Mundt , "David S. Miller" , Chris Zankel , Subject: Re: [PATCH] [RFC] cross-arch: don't corrupt personality flags upon exec() References: <20120815154520.f9cf4e24.akpm@linux-foundation.org> <201208221927.28993.arnd@arndb.de> In-Reply-To: <201208221927.28993.arnd@arndb.de> X-Enigmail-Version: 1.4.3 Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 8/22/2012 3:27 PM, Arnd Bergmann wrote: > On tile, the PER_LINUX_32BIT is always set for 32 bit compat tasks in a > 64 bit kernel, which is harmless but wrong anyway. Also this, tile never > calls set_personality, which is also harmless because it just means that > exec_domain switching on tile is broken, but the only non-bogus > exec_domain besides the default one is an experimental support for Acorn > RISC OS binaries that was last updated in 2002 for for linux-2.5.49. Arnd, thanks for the drive-by code review. Is this change the correct fix for your observation? diff --git a/arch/tile/include/asm/elf.h b/arch/tile/include/asm/elf.h index d16d006..fd31920 100644 --- a/arch/tile/include/asm/elf.h +++ b/arch/tile/include/asm/elf.h @@ -156,12 +156,12 @@ extern int arch_setup_additional_pages(struct linux_binprm *bprm, #undef SET_PERSONALITY #define SET_PERSONALITY(ex) \ do { \ - current->personality = PER_LINUX; \ + set_personality(PER_LINUX); \ current_thread_info()->status &= ~TS_COMPAT; \ } while (0) #define COMPAT_SET_PERSONALITY(ex) \ do { \ - current->personality = PER_LINUX_32BIT; \ + set_personality(PER_LINUX); \ current_thread_info()->status |= TS_COMPAT; \ } while (0) -- Chris Metcalf, Tilera Corp. http://www.tilera.com