From owner-svn-src-all@freebsd.org Fri Nov 13 16:26:41 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C6F5AA296A3; Fri, 13 Nov 2015 16:26:41 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail104.syd.optusnet.com.au (mail104.syd.optusnet.com.au [211.29.132.246]) by mx1.freebsd.org (Postfix) with ESMTP id 5BBE51EE7; Fri, 13 Nov 2015 16:26:40 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from c211-30-166-197.carlnfd1.nsw.optusnet.com.au (c211-30-166-197.carlnfd1.nsw.optusnet.com.au [211.30.166.197]) by mail104.syd.optusnet.com.au (Postfix) with ESMTPS id BEF154277FB; Sat, 14 Nov 2015 03:26:31 +1100 (AEDT) Date: Sat, 14 Nov 2015 03:26:30 +1100 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: David Chisnall cc: Konstantin Belousov , Hans Petter Selasky , cem@freebsd.org, src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r290711 - head/sys/ofed/drivers/infiniband/core In-Reply-To: <0330812D-2FB6-4490-BFB3-67F9E66975A7@FreeBSD.org> Message-ID: <20151114024315.Y1146@besplex.bde.org> References: <201511121012.tACACKTI075143@repo.freebsd.org> <56459CEE.4090007@selasky.org> <20151113083543.GV2257@kib.kiev.ua> <0330812D-2FB6-4490-BFB3-67F9E66975A7@FreeBSD.org> MIME-Version: 1.0 X-Optus-CM-Score: 0 X-Optus-CM-Analysis: v=2.1 cv=cK4dyQqN c=1 sm=1 tr=0 a=KA6XNC2GZCFrdESI5ZmdjQ==:117 a=PO7r1zJSAAAA:8 a=JzwRw_2MAAAA:8 a=nlC_4_pT8q9DhB4Ho9EA:9 a=pGLkceISAAAA:8 a=hA8DVohIdFcsYt2qD64A:9 a=45ClL6m2LaAA:10 Content-Type: TEXT/PLAIN; charset=X-UNKNOWN; format=flowed Content-Transfer-Encoding: QUOTED-PRINTABLE X-Content-Filtered-By: Mailman/MimeDel 2.1.20 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Nov 2015 16:26:42 -0000 On Fri, 13 Nov 2015, David Chisnall wrote: > On 13 Nov 2015, at 08:35, Konstantin Belousov wrote= : >> >> On Fri, Nov 13, 2015 at 09:18:54AM +0100, Hans Petter Selasky wrote: >>> Hi, >>> >>> On 11/12/15 18:17, Conrad Meyer wrote: >>>> These should cast through (u)intptr_t rather than unsigned long. >>> >>> This is Linux code, and they use "unsigned long" for pointer casts >>> everywhere, trying to not break their style. >>> >>> BTW: I added to linux_compat.c: >>> >>> CTASSERT(sizeof(unsigned long) =3D=3D sizeof(uintptr_t)); >>> >>> And it survived my "tinderbox" build and I was surprised! This is not surprising. "long" is broken on all supported systems since no 16-bit systems are supported and misimplementations with longs the same size as int or register_t are not unusable on 32+ bit systems. Longs should actually be long. That means that they should be longer than register_t, so they are also longer than pointers except on systems with large pointers like x86 with far pointers. >> FreeBSD (at least currently) runs on two kinds of ABIs: ILP32 and LP64. >> ILP32 means that sizeof(int) =3D=3D sizeof(long) =3D=3D sizeof(void *) = =3D=3D 4. >> For LP64, sizeof(long) =3D=3D sizeof(void *) =3D=3D 8, while sizeof(int)= =3D=3D 4. >> We do not support anything else. > > Note that this is not true of all downstreams. We currently have 128 and= 256-bit void*s with 64-bit longs on CHERI, and I believe that bde=E2=80=99= s version has 32-bit longs on all platforms. This kind of code *is* broken= for us and we=E2=80=99d greatly appreciate people not writing new code tha= t intentionally relies on undefined behaviour (round tripping a pointer via= any integer type other than intptr_t is undefined in C), when a well-defin= ed mechanism exists, just because Linux decides to do the wrong thing. Does CHERI have far pointers or fat pointers? Does it have newlines? 32-bit longs on all platforms is the last thing that I would have. I have them on 16-bit systems (but I last ran one of those in 2009 after getting it out of the attic). i386 with correctly-sized longs has 64-bit longs (IP32L64). I never finished that. The tiny amount of support for this needed in i386/include/_limits.h was removed in 2011 (r217128). gcc just needed to be configured with -DLONG_TYPE_SIZE=3D64. Other places mostly just need to use the correct type. Often the fix is simply to replace long by int or a typedefed type. i386/include/ _types.h was already correct or fixed (mostly by using fixed-width typedefed types). But sometimes there is an ABI problem. long in an API literally asks for pessimal double-width sizes, but sometimes what it needs is precisely 32 ot 64 bits. Bruce From owner-svn-src-all@freebsd.org Fri Nov 13 17:25:15 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 841BBA2E3CF; Fri, 13 Nov 2015 17:25:15 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 417BF1F95; Fri, 13 Nov 2015 17:25:15 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tADHPEv7051508; Fri, 13 Nov 2015 17:25:14 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tADHPEah051507; Fri, 13 Nov 2015 17:25:14 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201511131725.tADHPEah051507@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Fri, 13 Nov 2015 17:25:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r290771 - stable/10/release/tools X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Nov 2015 17:25:15 -0000 Author: gjb Date: Fri Nov 13 17:25:14 2015 New Revision: 290771 URL: https://svnweb.freebsd.org/changeset/base/290771 Log: MFC r290550, r290573: r290550: Use tmpfs(5) instead of md(4) for '/tmp' mount. r290573: Remove noatime from tmpfs(5) fstab(5) entry. Sponsored by: The FreeBSD Foundation Modified: stable/10/release/tools/arm.subr Directory Properties: stable/10/ (props changed) Modified: stable/10/release/tools/arm.subr ============================================================================== --- stable/10/release/tools/arm.subr Fri Nov 13 16:35:22 2015 (r290770) +++ stable/10/release/tools/arm.subr Fri Nov 13 17:25:14 2015 (r290771) @@ -110,7 +110,7 @@ arm_install_base() { >> ${CHROOTDIR}/${DESTDIR}/etc/fstab echo "/dev/msdosfs/MSDOSBOOT /boot/msdos msdosfs rw,noatime 0 0" \ >> ${CHROOTDIR}/${DESTDIR}/etc/fstab - echo "md /tmp mfs rw,noatime,-s30m 0 0" \ + echo "tmpfs /tmp tmpfs rw,mode=1777,size=30m 0 0" \ >> ${CHROOTDIR}/${DESTDIR}/etc/fstab local hostname