From owner-freebsd-standards@FreeBSD.ORG Thu Jul 29 16:39:00 2010 Return-Path: Delivered-To: standards@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 91541106564A; Thu, 29 Jul 2010 16:39:00 +0000 (UTC) (envelope-from yanegomi@gmail.com) Received: from mail-gw0-f54.google.com (mail-gw0-f54.google.com [74.125.83.54]) by mx1.freebsd.org (Postfix) with ESMTP id 38D178FC1B; Thu, 29 Jul 2010 16:38:59 +0000 (UTC) Received: by gwj23 with SMTP id 23so247790gwj.13 for ; Thu, 29 Jul 2010 09:38:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:in-reply-to :references:date:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=84bY5VOkL/baAUBsgTG5teiS+j+UEMfyd0Wj12HnMbQ=; b=Et6Fle8G1EBsXMyGlMZrCBDBob2xsTHOhjIqXqpTSvHSOLwiGMrTmT/yAC2oz9FvB4 neUryNqsJbbqbhSzHfzeGyQ/DmdfFuSBwRtXfHoyXx1dwUTC5RljTq33ACjf9jkQbBQ+ fWlYNRX/umzYwGRs32Y6yaimTgafjFg4Y8TxM= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=KQZCexAgbyHpuuTZXzsZuCbAjRfbcrlB2EobnFtfpnWvp5a6fgyuzodX81UOldI1qf rtNtySw1HgVCJLxBr8i/EIuQd3lsdN2wOucRHku6v7m8xl0hJC7R0kPyUBXkXIlNVsfF Fuzr3/QtR31h3ejT3FEXqTDiH6UA8O/ky/gSk= MIME-Version: 1.0 Received: by 10.101.143.38 with SMTP id v38mr464734ann.56.1280421539280; Thu, 29 Jul 2010 09:38:59 -0700 (PDT) Received: by 10.231.169.18 with HTTP; Thu, 29 Jul 2010 09:38:59 -0700 (PDT) In-Reply-To: <19537.40008.156802.846800@khavrinen.csail.mit.edu> References: <19537.40008.156802.846800@khavrinen.csail.mit.edu> Date: Thu, 29 Jul 2010 09:38:59 -0700 Message-ID: From: Garrett Cooper To: Garrett Wollman Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: alc@freebsd.org, standards@freebsd.org Subject: Re: POSIX compliance issue with mmap(2) X-BeenThere: freebsd-standards@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Standards compliance List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Jul 2010 16:39:00 -0000 On Thu, Jul 29, 2010 at 8:20 AM, Garrett Wollman wr= ote: > <= said: > >> =A0 =A0 According to the page noted below [1], mmap(2) should fail if th= e >> value isn't page-aligned: > >> [EINVAL] >> =A0 =A0 The addr argument (if MAP_FIXED was specified) or off is not a >> multiple of the page size as returned by sysconf(), or is considered >> invalid by the implementation. > > This may be a bug in the standard (since this is a "shall fail" > condition, and there's no reason it has to fail if the application > didn't specify MAP_FIXED). There are a number of opengroup manpages I've seen use the `shall fail' tort in the ERRORs sections -- some being connect(2), open(2), etc. I'll see if I can get clarification on whether or not there is any wiggle room if it states "shall fail if". Thanks, -Garrett