From owner-freebsd-standards@FreeBSD.ORG Mon Nov 12 11:07:06 2007 Return-Path: Delivered-To: freebsd-standards@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8FEA016A49E for ; Mon, 12 Nov 2007 11:07:06 +0000 (UTC) (envelope-from owner-bugmaster@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 7BF3813C49D for ; Mon, 12 Nov 2007 11:07:06 +0000 (UTC) (envelope-from owner-bugmaster@FreeBSD.org) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.1/8.14.1) with ESMTP id lACB76Ox089835 for ; Mon, 12 Nov 2007 11:07:06 GMT (envelope-from owner-bugmaster@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.1/8.14.1/Submit) id lACB75xn089831 for freebsd-standards@FreeBSD.org; Mon, 12 Nov 2007 11:07:05 GMT (envelope-from owner-bugmaster@FreeBSD.org) Date: Mon, 12 Nov 2007 11:07:05 GMT Message-Id: <200711121107.lACB75xn089831@freefall.freebsd.org> X-Authentication-Warning: freefall.freebsd.org: gnats set sender to owner-bugmaster@FreeBSD.org using -f From: FreeBSD bugmaster To: freebsd-standards@FreeBSD.org Cc: Subject: Current problem reports assigned to freebsd-standards@FreeBSD.org 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: Mon, 12 Nov 2007 11:07:06 -0000 Current FreeBSD problem reports Critical problems Serious problems S Tracker Resp. Description -------------------------------------------------------------------------------- o bin/25542 standards /bin/sh: null char in quoted string o kern/46239 standards posix semaphore implementation errors o stand/54410 standards one-true-awk not POSIX compliant (no extended REs) o stand/82654 standards C99 long double math functions are missing o stand/94729 standards [libc] fcntl() throws undocumented ENOTTY 5 problems total. Non-critical problems S Tracker Resp. Description -------------------------------------------------------------------------------- o bin/21519 standards sys/dir.h should be deprecated some more o bin/24390 standards Replacing old dir-symlinks when using /bin/ln s stand/24590 standards timezone function not compatible witn Single Unix Spec s kern/28260 standards UIO_MAXIOV needs to be made public s stand/36076 standards Implementation of POSIX fuser command o stand/39256 standards snprintf/vsnprintf aren't POSIX-conformant for strings p stand/41576 standards POSIX compliance of ln(1) o stand/44425 standards getcwd() succeeds even if current dir has perm 000. o stand/46119 standards Priority problems for SCHED_OTHER using pthreads o stand/54833 standards [pcvt] more pcvt deficits o stand/54839 standards [pcvt] pcvt deficits p stand/55112 standards glob.h, glob_t's gl_pathc should be "size_t", not "int o stand/56476 standards cd9660 unicode support simple hack o stand/58676 standards grantpt(3) alters storage used by ptsname(3) s stand/62858 standards malloc(0) not C99 compliant s kern/64875 standards [libc] [patch] [feature request] add a system call: fd o stand/66357 standards make POSIX conformance problem ('sh -e' & '+' command- o stand/66531 standards _gettemp uses a far smaller set of filenames than docu o stand/70813 standards [PATCH] ls(1) not Posix compliant o stand/72006 standards floating point formating in non-C locales o stand/79056 standards regex(3) regression tests a stand/80293 standards sysconf() does not support well-defined unistd values o stand/81287 standards [PATCH]: fingerd(8) might send a line not ending in CR o stand/83845 standards [libm] [patch] add log2() and log2f() support for libm o stand/85080 standards output of long double subnormals (with printf) is wron o stand/92360 standards [headers] [patch] Missing TAB3 in kernel headers o stand/92362 standards [headers] [patch] Missing SIGPOLL in kernel headers o kern/93705 standards [headers] [patch] ENODATA and EGREGIOUS (for glibc com o stand/96016 standards [headers] clock_getres et al should be in o stand/96236 standards [PATCH] [POSIX] sed.1 incorrectly describes a function p stand/99517 standards Missing SIGRTMIN and SIGRTMAX signals o stand/99960 standards [Patch] make(1): Add -p flag o stand/100017 standards [Patch] Add fuser(1) functionality to fstat(1) o stand/104743 standards [headers] [patch] Wrong values for _POSIX_ minimal lim o stand/104841 standards [libm] [patch] C99 long double square root. o stand/107561 standards [patch] Missing SUS function tcgetsid() o kern/114578 standards [libc] wide character printing using swprintf(dst, n, o stand/114633 standards /etc/rc.subr: line 511: omits a quotation mark: "force o stand/116081 standards make does not work with the directive sinclude o stand/116221 standards SUS issue -- FreeBSD has not flag WNOWAIT for wait*() o stand/116826 standards [PATCH] sh support for POSIX character classes 41 problems total. From owner-freebsd-standards@FreeBSD.ORG Wed Nov 14 17:00:02 2007 Return-Path: Delivered-To: freebsd-standards@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AB72516A46C for ; Wed, 14 Nov 2007 17:00:02 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 8295B13C458 for ; Wed, 14 Nov 2007 17:00:02 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.14.1/8.14.1) with ESMTP id lAEH02mU059171 for ; Wed, 14 Nov 2007 17:00:02 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.1/8.14.1/Submit) id lAEH02Q9059170; Wed, 14 Nov 2007 17:00:02 GMT (envelope-from gnats) Resent-Date: Wed, 14 Nov 2007 17:00:02 GMT Resent-Message-Id: <200711141700.lAEH02Q9059170@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-standards@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Joseph S Atkinson Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 475CF16A421 for ; Wed, 14 Nov 2007 16:52:58 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from www.freebsd.org (www.freebsd.org [IPv6:2001:4f8:fff6::21]) by mx1.freebsd.org (Postfix) with ESMTP id 2C2B513C4C6 for ; Wed, 14 Nov 2007 16:52:58 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from www.freebsd.org (localhost [127.0.0.1]) by www.freebsd.org (8.14.1/8.14.1) with ESMTP id lAEGqR86090528 for ; Wed, 14 Nov 2007 16:52:27 GMT (envelope-from nobody@www.freebsd.org) Received: (from nobody@localhost) by www.freebsd.org (8.14.1/8.14.1/Submit) id lAEGqRNt090527; Wed, 14 Nov 2007 16:52:27 GMT (envelope-from nobody) Message-Id: <200711141652.lAEGqRNt090527@www.freebsd.org> Date: Wed, 14 Nov 2007 16:52:27 GMT From: Joseph S Atkinson To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-3.1 Cc: Subject: standards/118047: SUGGESTION: /etc/printcap vs mergemaster 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: Wed, 14 Nov 2007 17:00:02 -0000 >Number: 118047 >Category: standards >Synopsis: SUGGESTION: /etc/printcap vs mergemaster >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-standards >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Wed Nov 14 17:00:02 UTC 2007 >Closed-Date: >Last-Modified: >Originator: Joseph S Atkinson >Release: 7.0-BETA2 >Organization: >Environment: >Description: The default file /etc/printcap is an example file that does not provide any working functionality to the process it configures (lpr) in it's default state. A working configuration must be either manually set up or is automatically generated by ports, such as CUPS, to function. When invoking mergemaster, it will detect changes to /etc/printcap and ask for user input. This seems to be rather fruitless since any changes made to the file are (theoretically) intended, or will be overwritten automatically by a ports based print spooler on next daemon restart. I am suggesting that the example /etc/printcap be moved into /usr/share/examples/printing/printcap where it would seem more at home and be less likely to cause confusion and/or collision with local configurations. >How-To-Repeat: >Fix: >Release-Note: >Audit-Trail: >Unformatted: From owner-freebsd-standards@FreeBSD.ORG Thu Nov 15 20:17:19 2007 Return-Path: Delivered-To: freebsd-standards@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2721516A417 for ; Thu, 15 Nov 2007 20:17:19 +0000 (UTC) (envelope-from sgk@troutmask.apl.washington.edu) Received: from troutmask.apl.washington.edu (troutmask.apl.washington.edu [128.208.78.105]) by mx1.freebsd.org (Postfix) with ESMTP id 02DCA13C478 for ; Thu, 15 Nov 2007 20:17:18 +0000 (UTC) (envelope-from sgk@troutmask.apl.washington.edu) Received: from troutmask.apl.washington.edu (localhost.apl.washington.edu [127.0.0.1]) by troutmask.apl.washington.edu (8.14.1/8.14.1) with ESMTP id lAFKGQGp018897; Thu, 15 Nov 2007 12:16:26 -0800 (PST) (envelope-from sgk@troutmask.apl.washington.edu) Received: (from sgk@localhost) by troutmask.apl.washington.edu (8.14.1/8.14.1/Submit) id lAFKGPjW018896; Thu, 15 Nov 2007 12:16:25 -0800 (PST) (envelope-from sgk) Date: Thu, 15 Nov 2007 12:16:25 -0800 From: Steve Kargl To: Bruce Evans Message-ID: <20071115201625.GA18739@troutmask.apl.washington.edu> References: <20070928152227.GA39233@troutmask.apl.washington.edu> <20071001173736.U1985@besplex.bde.org> <20071002001154.GA3782@troutmask.apl.washington.edu> <20071002172317.GA95181@VARK.MIT.EDU> <20071002173237.GA12586@troutmask.apl.washington.edu> <20071003103519.X14175@delplex.bde.org> <20071010204249.GA7446@troutmask.apl.washington.edu> <20071103144151.U671@besplex.bde.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20071103144151.U671@besplex.bde.org> User-Agent: Mutt/1.4.2.3i Cc: freebsd-standards@freebsd.org Subject: Re: long double broken on i386? 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, 15 Nov 2007 20:17:19 -0000 On Sat, Nov 03, 2007 at 03:53:19PM +1100, Bruce Evans wrote: > This thread is old, so I quoted too much. I quote very little, but it remains an old thread. I'm sure I have attributions wrong. > % Index: msun/src/s_cosl.c > % ... > % +/* > % + * Table of constants for 2/pi, 396 Hex digits (476 decimal) of 2/pi. > % + * The table was taken from e_rem_pio2.c. > % + */ > % +static const int32_t two_over_pi[] = { > % +0xA2F983, 0x6E4E44, 0x1529FC, 0x2757D1, 0xF534DD, 0xC0DB62, > % +0x95993C, 0x439041, 0xFE5163, 0xABDEBB, 0xC561B7, 0x246E3A, > > This gives far too many copies of this table (instead of just too many). > The float and double versions avoid having a copy for each of cos/sin/tan > by doing arg reduction in e_rem_pio2[f].c. The extra layer for this file > is a pessimization but seems to be worth it to avoid the duplication. > > Are 396 hex digits enough? It can't be right for all of the float, double > and long double cases. I hope it is enough for 128-bit long doubles, and > the float case is just sloppy in using the same table as the double case. > If 396 hex digits is enough for all cases, then the table should be in > k_rem_pio2.c. I started to rework my sinl(), cosl(), and tanl() (and __kernel_*) routines. In doing so, I've taken, for example, __kernel_cos() and changed it to __kernel_cosl() keeping the "extra precision" algorithm. For reference, see code below. Testing shows that I have ULPs exceeding 38 for cosl() with this algorithm. If the "extra precision" algorithm is correct, then perhaps your question "Are 396 hex digits enough?" is relevant. So, I poked around and found http://docs.sun.com/app/docs/doc/801-7639/6i1ucu1uh?a=view which contains the statement: libm and libsunmath trigonometric functions use an "infinitely" precise pi for argument reduction. The value 2/pi is computed to 916 hexadecimal digits and stored in a lookup table to use during argument reduction. I'm looking into this now. -- Steve static const long double xxx[10] = { -0x8.000000000000000p-4L, /* The - here, changes the sign of hz. */ 0xa.aaaaaaaaaaaaaabp-8L, -0x5.b05b05b05b05b05p-12L, 0x1.a01a01a01a019dbp-16L, -0x4.9f93edde27cbed7p-24L, 0x8.f76c77fc4bbff37p-32L, -0xc.9cba54236b4e97fp-40L, 0xd.73f9aa92060766ap-48L, -0xb.4105ba69deeed1ap-56L, 0x7.7e10d7644cea922p-64L, }; #define C xxx long double __kernel_cosl(long double x, long double y) { long double hz, r, z, w; #if 1 /* * XXX - Although y supposely carries extra precision to allow * better accuracy, the following lines are needed to get <= 1 ULP. * Note, very simply testing with arg in [-2000:2000] shows ULPs * that exceed 38 without this. */ x += y; y = 0; #endif z = x * x; r = z * (C[1] + z * (C[2] + z * (C[3] + z * (C[4] + z * (C[5] + z * (C[6] + z * (C[7] + z * (C[8] + z * C[9])))))))); hz = (float)C[0] * z; w = 1 + hz; return (w + (((1 - w) + hz) + (z * r - x * y))); } From owner-freebsd-standards@FreeBSD.ORG Thu Nov 15 21:51:13 2007 Return-Path: Delivered-To: freebsd-standards@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3541816A41A for ; Thu, 15 Nov 2007 21:51:13 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail09.syd.optusnet.com.au (mail09.syd.optusnet.com.au [211.29.132.190]) by mx1.freebsd.org (Postfix) with ESMTP id C462413C44B for ; Thu, 15 Nov 2007 21:51:12 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from besplex.bde.org (c211-30-219-213.carlnfd3.nsw.optusnet.com.au [211.30.219.213]) by mail09.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id lAFLp7GM001258 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 16 Nov 2007 08:51:10 +1100 Date: Fri, 16 Nov 2007 08:51:06 +1100 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Steve Kargl In-Reply-To: <20071115201625.GA18739@troutmask.apl.washington.edu> Message-ID: <20071116080356.S10107@besplex.bde.org> References: <20070928152227.GA39233@troutmask.apl.washington.edu> <20071001173736.U1985@besplex.bde.org> <20071002001154.GA3782@troutmask.apl.washington.edu> <20071002172317.GA95181@VARK.MIT.EDU> <20071002173237.GA12586@troutmask.apl.washington.edu> <20071003103519.X14175@delplex.bde.org> <20071010204249.GA7446@troutmask.apl.washington.edu> <20071103144151.U671@besplex.bde.org> <20071115201625.GA18739@troutmask.apl.washington.edu> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: freebsd-standards@FreeBSD.org Subject: Re: long double broken on i386? 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, 15 Nov 2007 21:51:13 -0000 On Thu, 15 Nov 2007, Steve Kargl wrote: > On Sat, Nov 03, 2007 at 03:53:19PM +1100, Bruce Evans wrote: >> Are 396 hex digits enough? It can't be right for all of the float, double >> and long double cases. I hope it is enough for 128-bit long doubles, and > ... > So, I poked around and found > > http://docs.sun.com/app/docs/doc/801-7639/6i1ucu1uh?a=view > > which contains the statement: > > libm and libsunmath trigonometric functions use an "infinitely" precise > pi for argument reduction. The value 2/pi is computed to 916 hexadecimal > digits and stored in a lookup table to use during argument reduction. That is a lot. Try looking at www.validgh.com for more references. There is a program for calculating the number of digits needed somewhere there or pointed to there. > static const long double xxx[10] = { > -0x8.000000000000000p-4L, /* The - here, changes the sign of hz. */ Why put the minus here? ... > long double > __kernel_cosl(long double x, long double y) > { > long double hz, r, z, w; > > #if 1 > /* > * XXX - Although y supposely carries extra precision to allow > * better accuracy, the following lines are needed to get <= 1 ULP. > * Note, very simply testing with arg in [-2000:2000] shows ULPs > * that exceed 38 without this. > */ > x += y; > y = 0; > #endif y should adjust x by at most 1 ULP (maybe < 0.5 ULPs) so this change should have little (maybe no) effect. The bug is probably in the caller, in adding up the doubles to form a long double. For double precision, y[0] gives the double x directly, and it is up to __ieee754_rem_pio2() to keep y[1] (y here) small. For amd and i386 long double precision, x here must be calculated from y[0] and y[1]: x = (double)(y[0] + y[1]); and y here is the residue (somthing like (double)(x - y[0]) + y[1]). Here it is essential to avoid the gcc bug of casts and assignments not discarding extra precision on i386's. With this calculation of x and y, x += y always has no effect, since the sum has already been calculated as accurately as possible in x. > z = x * x; > > r = z * (C[1] + z * (C[2] + z * (C[3] + z * (C[4] + z * (C[5] + > z * (C[6] + z * (C[7] + z * (C[8] + z * C[9])))))))); > > hz = (float)C[0] * z; Oops, this float cast is a copy of the one in k_cos.c, which is only there due to mismerging the k_cosf.c to k_cos.c. This should make no difference. > w = 1 + hz; > > return (w + (((1 - w) + hz) + (z * r - x * y))); ... hz means half of z. Why change it to mean minus half of z? C[1] etc vs C1 etc in k_cos.c is a regression. C1 is easier to type in debuggers. My program for determining the best polynomials prints the coefficients in a standard form, and I decided to not use the array form and have had second thoughts about the hex values (I now prefer decimal values in code and hex values in comments, as in fdlibm, partly because the C99 hex values are too different from the raw MD hex values to be useful for debugging). Bruce From owner-freebsd-standards@FreeBSD.ORG Thu Nov 15 22:05:18 2007 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 830D116A417 for ; Thu, 15 Nov 2007 22:05:18 +0000 (UTC) (envelope-from kris@FreeBSD.org) Received: from weak.local (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 0834813C468 for ; Thu, 15 Nov 2007 22:05:17 +0000 (UTC) (envelope-from kris@FreeBSD.org) Message-ID: <473CC2A0.8020603@FreeBSD.org> Date: Thu, 15 Nov 2007 23:05:20 +0100 From: Kris Kennaway User-Agent: Thunderbird 2.0.0.6 (Macintosh/20070728) MIME-Version: 1.0 To: standards@FreeBSD.org Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: Subject: Variant behaviour from truncate over NFS and UFS 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, 15 Nov 2007 22:05:18 -0000 I came across the following variant behaviour. On NFS: hydra1# cd /nfs hydra1# touch foo hydra1# chmod a-w foo hydra1# ls -l foo -r--r--r-- 1 4294967294 wheel 0 Nov 15 21:57 foo hydra1# truncate -s 0 foo truncate: foo: Permission denied hydra1# chmod u+w foo hydra1# truncate -s 0 foo Compare to UFS: hydra1# cd /tmp hydra1# touch foo hydra1# chmod a-w foo hydra1# truncate -s 0 foo hydra1# ls -l foo -r--r--r-- 1 root wheel 0 Nov 15 21:57 foo Which is correct? Kris From owner-freebsd-standards@FreeBSD.ORG Fri Nov 16 00:27:50 2007 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 2F96A16A419 for ; Fri, 16 Nov 2007 00:27:50 +0000 (UTC) (envelope-from kris@FreeBSD.org) Received: from weak.local (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 880A313C4C5; Fri, 16 Nov 2007 00:27:49 +0000 (UTC) (envelope-from kris@FreeBSD.org) Message-ID: <473CE408.1030901@FreeBSD.org> Date: Fri, 16 Nov 2007 01:27:52 +0100 From: Kris Kennaway User-Agent: Thunderbird 2.0.0.6 (Macintosh/20070728) MIME-Version: 1.0 To: Bruce Evans References: <473CC2A0.8020603@FreeBSD.org> <20071116110621.U10808@besplex.bde.org> In-Reply-To: <20071116110621.U10808@besplex.bde.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: standards@FreeBSD.org Subject: Re: Variant behaviour from truncate over NFS and UFS 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: Fri, 16 Nov 2007 00:27:50 -0000 Bruce Evans wrote: > On Thu, 15 Nov 2007, Kris Kennaway wrote: > >> I came across the following variant behaviour. On NFS: >> >> hydra1# cd /nfs >> hydra1# touch foo >> hydra1# chmod a-w foo >> hydra1# ls -l foo >> -r--r--r-- 1 4294967294 wheel 0 Nov 15 21:57 foo >> hydra1# truncate -s 0 foo >> truncate: foo: Permission denied >> hydra1# chmod u+w foo >> hydra1# truncate -s 0 foo >> >> Compare to UFS: >> >> hydra1# cd /tmp >> hydra1# touch foo >> hydra1# chmod a-w foo >> hydra1# truncate -s 0 foo >> hydra1# ls -l foo >> -r--r--r-- 1 root wheel 0 Nov 15 21:57 foo >> >> Which is correct? > > Both, I think. truncate(2) requires write permission, and root always > has write permission, but root isn't really root for the nfs case. > > Anyway, the default of maproot=-2 gives much more annoying nonstandard > behaviour than this -- it often prevents root doing things that normal > users can do. Ah yes, thanks for clarifying. Kris From owner-freebsd-standards@FreeBSD.ORG Fri Nov 16 08:56:20 2007 Return-Path: Delivered-To: freebsd-standards@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 78FB916A46E; Fri, 16 Nov 2007 08:56:20 +0000 (UTC) (envelope-from kmacy@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 54C7C13C474; Fri, 16 Nov 2007 08:56:20 +0000 (UTC) (envelope-from kmacy@FreeBSD.org) Received: from freefall.freebsd.org (kmacy@localhost [127.0.0.1]) by freefall.freebsd.org (8.14.1/8.14.1) with ESMTP id lAG8uKXG095445; Fri, 16 Nov 2007 08:56:20 GMT (envelope-from kmacy@freefall.freebsd.org) Received: (from kmacy@localhost) by freefall.freebsd.org (8.14.1/8.14.1/Submit) id lAG8uKnd095441; Fri, 16 Nov 2007 08:56:20 GMT (envelope-from kmacy) Date: Fri, 16 Nov 2007 08:56:20 GMT Message-Id: <200711160856.lAG8uKnd095441@freefall.freebsd.org> To: rec@RCousins.com, kmacy@FreeBSD.org, freebsd-standards@FreeBSD.org From: kmacy@FreeBSD.org Cc: Subject: Re: kern/28260: UIO_MAXIOV needs to be made public 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: Fri, 16 Nov 2007 08:56:20 -0000 Synopsis: UIO_MAXIOV needs to be made public State-Changed-From-To: suspended->closed State-Changed-By: kmacy State-Changed-When: Fri Nov 16 08:56:04 UTC 2007 State-Changed-Why: 4.x is EOL. http://www.freebsd.org/cgi/query-pr.cgi?pr=28260 From owner-freebsd-standards@FreeBSD.ORG Fri Nov 16 13:38:20 2007 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 546D716A420 for ; Fri, 16 Nov 2007 13:38:20 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from fallbackmx03.syd.optusnet.com.au (fallbackmx03.syd.optusnet.com.au [211.29.133.136]) by mx1.freebsd.org (Postfix) with ESMTP id CB20213C43E for ; Fri, 16 Nov 2007 13:38:19 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail10.syd.optusnet.com.au (mail10.syd.optusnet.com.au [211.29.132.191]) by fallbackmx03.syd.optusnet.com.au (8.12.11.20060308/8.12.11) with ESMTP id lAG0DEPS017553 for ; Fri, 16 Nov 2007 11:13:15 +1100 Received: from besplex.bde.org (c211-30-219-213.carlnfd3.nsw.optusnet.com.au [211.30.219.213]) by mail10.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id lAG0D48N022397 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 16 Nov 2007 11:13:06 +1100 Date: Fri, 16 Nov 2007 11:13:04 +1100 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Kris Kennaway In-Reply-To: <473CC2A0.8020603@FreeBSD.org> Message-ID: <20071116110621.U10808@besplex.bde.org> References: <473CC2A0.8020603@FreeBSD.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: standards@FreeBSD.org Subject: Re: Variant behaviour from truncate over NFS and UFS 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: Fri, 16 Nov 2007 13:38:20 -0000 On Thu, 15 Nov 2007, Kris Kennaway wrote: > I came across the following variant behaviour. On NFS: > > hydra1# cd /nfs > hydra1# touch foo > hydra1# chmod a-w foo > hydra1# ls -l foo > -r--r--r-- 1 4294967294 wheel 0 Nov 15 21:57 foo > hydra1# truncate -s 0 foo > truncate: foo: Permission denied > hydra1# chmod u+w foo > hydra1# truncate -s 0 foo > > Compare to UFS: > > hydra1# cd /tmp > hydra1# touch foo > hydra1# chmod a-w foo > hydra1# truncate -s 0 foo > hydra1# ls -l foo > -r--r--r-- 1 root wheel 0 Nov 15 21:57 foo > > Which is correct? Both, I think. truncate(2) requires write permission, and root always has write permission, but root isn't really root for the nfs case. Anyway, the default of maproot=-2 gives much more annoying nonstandard behaviour than this -- it often prevents root doing things that normal users can do. Bruce From owner-freebsd-standards@FreeBSD.ORG Sat Nov 17 07:04:00 2007 Return-Path: Delivered-To: freebsd-standards@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7DECC16A419; Sat, 17 Nov 2007 07:04:00 +0000 (UTC) (envelope-from kmacy@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 5257313C461; Sat, 17 Nov 2007 07:04:00 +0000 (UTC) (envelope-from kmacy@FreeBSD.org) Received: from freefall.freebsd.org (kmacy@localhost [127.0.0.1]) by freefall.freebsd.org (8.14.1/8.14.1) with ESMTP id lAH73xhu080895; Sat, 17 Nov 2007 07:03:59 GMT (envelope-from kmacy@freefall.freebsd.org) Received: (from kmacy@localhost) by freefall.freebsd.org (8.14.1/8.14.1/Submit) id lAH73xWS080891; Sat, 17 Nov 2007 07:03:59 GMT (envelope-from kmacy) Date: Sat, 17 Nov 2007 07:03:59 GMT Message-Id: <200711170703.lAH73xWS080891@freefall.freebsd.org> To: joek@zircon.staff.flyingcroc.net, kmacy@FreeBSD.org, freebsd-standards@FreeBSD.org From: kmacy@FreeBSD.org Cc: Subject: Re: kern/46239: posix semaphore implementation errors 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: Sat, 17 Nov 2007 07:04:00 -0000 Synopsis: posix semaphore implementation errors State-Changed-From-To: open->feedback State-Changed-By: kmacy State-Changed-When: Sat Nov 17 07:03:47 UTC 2007 State-Changed-Why: Is this issue still present? http://www.freebsd.org/cgi/query-pr.cgi?pr=46239 From owner-freebsd-standards@FreeBSD.ORG Sat Nov 17 07:05:11 2007 Return-Path: Delivered-To: freebsd-standards@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0342916A419; Sat, 17 Nov 2007 07:05:11 +0000 (UTC) (envelope-from kmacy@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id CDB0B13C459; Sat, 17 Nov 2007 07:05:10 +0000 (UTC) (envelope-from kmacy@FreeBSD.org) Received: from freefall.freebsd.org (kmacy@localhost [127.0.0.1]) by freefall.freebsd.org (8.14.1/8.14.1) with ESMTP id lAH75Ar7080946; Sat, 17 Nov 2007 07:05:10 GMT (envelope-from kmacy@freefall.freebsd.org) Received: (from kmacy@localhost) by freefall.freebsd.org (8.14.1/8.14.1/Submit) id lAH75AaD080942; Sat, 17 Nov 2007 07:05:10 GMT (envelope-from kmacy) Date: Sat, 17 Nov 2007 07:05:10 GMT Message-Id: <200711170705.lAH75AaD080942@freefall.freebsd.org> To: joek@zircon.staff.flyingcroc.net, kmacy@FreeBSD.org, freebsd-standards@FreeBSD.org From: kmacy@FreeBSD.org Cc: Subject: Re: kern/46239: posix semaphore implementation errors 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: Sat, 17 Nov 2007 07:05:11 -0000 Synopsis: posix semaphore implementation errors State-Changed-From-To: feedback->closed State-Changed-By: kmacy State-Changed-When: Sat Nov 17 07:04:37 UTC 2007 State-Changed-Why: Closed due to age, changes to the underlying code, and submitter mail bounces. http://www.freebsd.org/cgi/query-pr.cgi?pr=46239