Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S262543AbVESPC7 (ORCPT ); Thu, 19 May 2005 11:02:59 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S262548AbVESPCj (ORCPT ); Thu, 19 May 2005 11:02:39 -0400 Received: from ms-smtp-03.nyroc.rr.com ([24.24.2.57]:64969 "EHLO ms-smtp-03.nyroc.rr.com") by vger.kernel.org with ESMTP id S262543AbVESPAQ (ORCPT ); Thu, 19 May 2005 11:00:16 -0400 Subject: Re: Illegal use of reserved word in system.h From: Steven Rostedt To: "Maciej W. Rozycki" Cc: Andreas Schwab , linux-kernel@vger.kernel.org, "Gilbert, John" , Kyle Moffett , Adrian Bunk , Arjan van de Ven , linux-os@analogic.com In-Reply-To: References: <2692A548B75777458914AC89297DD7DA08B0866F@bronze.dolby.net> <20050518195337.GX5112@stusta.de> <6EA08D88-7C67-48ED-A9EF-FEAAB92D8B8F@mac.com> <20050519112840.GE5112@stusta.de> <1116505655.6027.45.camel@laptopd505.fenrus.org> <1116512140.15866.42.camel@localhost.localdomain> Content-Type: text/plain Organization: Kihon Technologies Date: Thu, 19 May 2005 10:59:40 -0400 Message-Id: <1116514780.27471.8.camel@localhost.localdomain> Mime-Version: 1.0 X-Mailer: Evolution 2.2.2 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1618 Lines: 42 On Thu, 2005-05-19 at 15:43 +0100, Maciej W. Rozycki wrote: > On Thu, 19 May 2005, Steven Rostedt wrote: > > > > See create_elf_tables. The aux table comes after the environment. > > > > As I stated earlier, the page size passed in there is ELF_EXEC_PAGESIZE > > which may not be the same as PAGE_SIZE. > > Well, AT_PAGESZ is specified as "system page size". If we pass something > else, then it's asking for troubles. What comes from AT_PAGESZ is used by > userland for stuff like masking arguments for mmap() and mprotect() so > it'd better be the right value. Well, they probably are the same, but then what's the reason for the lines in binfmt_elf.c: #if ELF_EXEC_PAGESIZE > PAGE_SIZE # define ELF_MIN_ALIGN ELF_EXEC_PAGESIZE #else # define ELF_MIN_ALIGN PAGE_SIZE #endif This looks to me that ELF_EXEC_PAGESIZE and PAGE_SIZE may not be the same. And what's passed to AT_PAGESZ is ELF_EXEC_PAGESIZE. In mips (as your email address shows you are interested in) ELF_EXEC_PAGESIZE is simply defined as PAGE_SIZE. But in intel i386, it is defined as 4096, which coincidentally is the same as PAGE_SIZE but there's no guarantee that this will be the same, unless who ever changes PAGE_SIZE also remembers to change ELF_EXEC_PAGESIZE. In arm26 the PAGE_SIZE is configurable (16k or 32k) but the ELF_EXEC_PAGESIZE stays as 32k. So is this a bug? -- Steve - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/