Re: Deorbiting i386

2018-05-26 Thread David Chisnall
On 26 May 2018, at 00:41, Maxim Sobolev wrote: > > If you've seen any of the atom bay trail systems in action you may understand > what I mean. You get full blown x64 system with four cores and it takes only > 2W of power. Which is pretty much my point - if you want a

Re: Deorbiting i386

2018-05-25 Thread David Chisnall
On 25 May 2018, at 05:27, Maxim Sobolev wrote: > > The idea looks very inmature and short-sighted to me. i386 is here to stay > not as a server/desktop platform but as an embedded/low power/low cost > platform for at least 5-10 years to come. There are plenty of

Re: svn commit: r328159 - head/sys/modules

2018-01-19 Thread David Chisnall
On 19 Jan 2018, at 05:07, Conrad Meyer wrote: > > The spec says the behavior is undefined; not that the compiler has to > produce a warning or error message. The compiler *does* get to > arbitrarily decide what it wants to do when it encounters UB. It is > wholly free to

Re: svn commit: r326758 - in head/sys/i386: conf include

2017-12-20 Thread David Chisnall
On 16 Dec 2017, at 18:05, John Baldwin wrote: > > When I build a FreeBSD/mips64 kernel with clang, > _any_ simple NFS op triggers a kernel stack overflow. Kernels compiled > with GCC do not. That is not my experience. I haven’t tried a MIPS64 kernel built with clang, but

Re: svn commit: r323329 - head/sys/sys

2017-09-09 Thread David Chisnall
On 8 Sep 2017, at 21:09, Mateusz Guzik wrote: > > Author: mjg > Date: Fri Sep 8 20:09:14 2017 > New Revision: 323329 > URL: https://svnweb.freebsd.org/changeset/base/323329 > > Log: > Allow __builtin_memset instead of bzero for small buffers of known size This change seems

svn commit: r323277 - head/lib/libc/locale

2017-09-07 Thread David Chisnall
Author: theraven Date: Thu Sep 7 17:51:35 2017 New Revision: 323277 URL: https://svnweb.freebsd.org/changeset/base/323277 Log: Document some invariants for the XLC_ enum. These can't be reordered without breaking other code. Document that and add some static asserts to ensure that

Re: svn commit: r322875 - head/sys/dev/nvme

2017-08-25 Thread David Chisnall
On 25 Aug 2017, at 07:32, Mark Millard wrote: > > As I remember _Static_assert is from C11, not > the older C99. In pre-C11 dialects of C, _Static_assert is an identifier reserved for the implementation. sys/cdefs.h defines it to generate a zero-length array if the

Re: svn commit: r313040 - head/sys/mips/include

2017-02-01 Thread David Chisnall
On 1 Feb 2017, at 08:13, Konstantin Belousov wrote: > > On Wed, Feb 01, 2017 at 10:38:42AM -0500, Alexander Kabaev wrote: >> On Wed, 1 Feb 2017 16:17:21 +0200 >> Konstantin Belousov wrote: >> >>> Please do not retry on sc failure, return the error to

Re: svn commit: r310138 - head/lib/libc/stdio

2016-12-23 Thread David Chisnall
On 22 Dec 2016, at 23:02, Baptiste Daroussin wrote: > > I think it is pretty clear that there are too many people requesting the > revert > for the revert not to be done. Even if this feature is desired, the implementation in the patch is broken and should be reverted until

Re: svn commit: r310138 - head/lib/libc/stdio

2016-12-17 Thread David Chisnall
On 16 Dec 2016, at 19:31, Baptiste Daroussin wrote: > > Other than that, it makes more difficult to use vanilla gcc with out userland. > and it is adding more complexity to be able to build freebsd from a non > freebsd > system which some people are working on. Why? You’ll

Re: svn commit: r302252 - head/sys/kern

2016-07-05 Thread David Chisnall
On 4 Jul 2016, at 21:09, Adrian Chadd wrote: > > Right, so if we're not careful, we could leak bits of kernel memory, > and it can also screw up key cache comparisons. > > (I asked this question because I've been screwed by it recentlyish, > and it looks like the latest

Re: svn commit: r295768 - head/usr.sbin/iostat

2016-02-22 Thread David Chisnall
On 22 Feb 2016, at 10:15, Kubilay Kocak wrote: > > For the lay persons among us (I'm genuinely interested), what are the > the downsides to requiring initialization of all fields? Explicit initialisation, or initialisation in general? Being able to initialise the entire

Re: svn commit: r295768 - head/usr.sbin/iostat

2016-02-22 Thread David Chisnall
On 19 Feb 2016, at 23:23, Dimitry Andric wrote: > > This warning is only produced when you use -Wall -W, and then initialize > structs partially, i.e. you initialize some fields but not others. I > think this is a quite reasonable warning for a high warning level. The warning

svn commit: r292876 - head/usr.bin/dtc

2015-12-29 Thread David Chisnall
Author: theraven Date: Tue Dec 29 16:29:42 2015 New Revision: 292876 URL: https://svnweb.freebsd.org/changeset/base/292876 Log: Improvements to BSD-licensed DTC. - Added an expression parser so that expressions from headers are now working - Fixed missing null terminators on cross

Re: svn commit: r292809 - head/lib/libc/stdio

2015-12-29 Thread David Chisnall
On 30 Dec 2015, at 00:48, Bruce Evans wrote: > > - C++ apparently spells this as both _Alignof() and alignof() after 2011/03 This is not correct. C++ spells it alignof. C spells it _Alignof, unless you include , in which case C spells it alignof and defines _

Re: svn commit: r290711 - head/sys/ofed/drivers/infiniband/core

2015-11-13 Thread David Chisnall
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

Re: svn commit: r289995 - head/usr.bin/dtc

2015-10-26 Thread David Chisnall
On 26 Oct 2015, at 10:48, Baptiste Daroussin wrote: > > Just jumping on that one, you should probably revisit de HACKING files :) Ah, good point. I’ll update them. David ___ svn-src-head@freebsd.org mailing list

svn commit: r289996 - head/usr.bin/dtc

2015-10-26 Thread David Chisnall
Author: theraven Date: Mon Oct 26 11:02:57 2015 New Revision: 289996 URL: https://svnweb.freebsd.org/changeset/base/289996 Log: Update some obsolete information in the HACKING document. Reported by: bapt Modified: head/usr.bin/dtc/HACKING Modified: head/usr.bin/dtc/HACKING

svn commit: r289995 - head/usr.bin/dtc

2015-10-26 Thread David Chisnall
Author: theraven Date: Mon Oct 26 10:37:17 2015 New Revision: 289995 URL: https://svnweb.freebsd.org/changeset/base/289995 Log: Ensure that dtc is built in C++11 mode. Reported by: George Abdelmalik Modified: head/usr.bin/dtc/Makefile Modified: head/usr.bin/dtc/Makefile

svn commit: r289935 - in head/usr.bin: . dtc

2015-10-25 Thread David Chisnall
Author: theraven Date: Sun Oct 25 14:52:16 2015 New Revision: 289935 URL: https://svnweb.freebsd.org/changeset/base/289935 Log: Lots of improvements to the BSD-licensed dtc - Various fixes to includes (including recursive includes) - Lots of testing that the output exactly matches GPL'd

Re: svn commit: r289027 - head/contrib/tzcode/stdtime

2015-10-08 Thread David Chisnall
On 8 Oct 2015, at 13:51, Andriy Gapon wrote: > > What if one day github disappears but FreeBSD is still going? > The full commit message would be lost. That’s not the only thing that is bad about this commit message. Why ‘Assume C89?’ We compile libc as C99 + GNU extensions

Re: svn commit: r287780 - in head: share/man/man9 sys/kern sys/sys

2015-09-17 Thread David Chisnall
On 17 Sep 2015, at 08:20, Hans Petter Selasky wrote: > > On 09/17/15 00:05, Gleb Smirnoff wrote: >> Weren't you explicitly asked not to touch this system without a proper >> review and discussion? > > Adding a new function is not touching code. Adding a new interface to an

Re: svn commit: r286715 - head/lib/libc/string

2015-08-13 Thread David Chisnall
On 13 Aug 2015, at 08:56, Marcelo Araujo araujobsdp...@gmail.com wrote: So it means, this commit here was right already: https://svnweb.freebsd.org/base?view=revisionrevision=286651 Although I made a mistake with the date. More or less. I partly agree with Bruce that suggesting memcpy is

Re: svn commit: r286715 - head/lib/libc/string

2015-08-13 Thread David Chisnall
On 13 Aug 2015, at 08:11, Marcelo Araujo araujobsdp...@gmail.com wrote: The bcopy() was removed in IEEE Std 1003.1-2008 and it is marked as LEGACY in IEEE Std 1003.1-2004. However, BSD has its implementation before IEEE Std 1003.1-2001. In my understood it is obsolete on POSIX, but not

Re: svn commit: r286168 - head/sys/net

2015-08-02 Thread David Chisnall
On 2 Aug 2015, at 17:34, Ian Lepore i...@freebsd.org wrote: It generates a compiler error, so the output is going to contain file-and-line like any other compiler error, as well as the message from the source code. It will, of course, vary between compilers, but this is what clang generates:

Re: svn commit: r285552 - head/usr.bin/xargs

2015-07-15 Thread David Chisnall
On 15 Jul 2015, at 01:02, Xin Li delp...@delphij.net wrote: My only concern with strtonum() is that it's English only. Given that strtonum() wraps strtoll, it ought to support whatever the current locale is (assuming that the program calls setlocale() before calling strtonum(), otherwise it

Re: svn commit: r285404 - head/sys/compat/cloudabi

2015-07-12 Thread David Chisnall
On 11 Jul 2015, at 21:56, Konstantin Belousov kostik...@gmail.com wrote: Bucket 2: The system call could also just fail and return an error (MSG_NOSIGPIPE). SIGPIPE exists to ensure that naive programs do something reasonable when their stdout suddenly goes away. Or, transposing the PoV, it

Re: svn commit: r285284 - head/lib/liblzma

2015-07-09 Thread David Chisnall
On 9 Jul 2015, at 03:53, NGie Cooper yaneurab...@gmail.com wrote: $ cat ~/has_immintrin.c #include sys/cdefs.h #if __has_include(immintrin.h) #error I have immintrin.h #else #error I don't have immintrin.h #endif $ clang -c ~/has_immintrin.c /home/ngie/has_immintrin.c:4:2: error: I

Re: svn commit: r285284 - head/lib/liblzma

2015-07-09 Thread David Chisnall
On 9 Jul 2015, at 10:19, NGie Cooper yaneurab...@gmail.com wrote: Yes, but this case will fail for gcc 4.3 ~ 4.4 through 5.x if you use my recommended method... I think that’s probably fine. We basically have four cases that we care about: - People who are using clang because it’s the

Re: svn commit: r268137 - head/sys/sys

2015-06-19 Thread David Chisnall
On 19 Jun 2015, at 14:41, Hans Petter Selasky h...@selasky.org wrote: On 06/19/15 14:54, David Chisnall wrote: I definitely know of people building out-of-ports programs on FreeBSD whose code you have just broken (including myself, though I do Objective-C stuff on 10, so haven’t yet

Re: svn commit: r268137 - head/sys/sys

2015-06-19 Thread David Chisnall
On 19 Jun 2015, at 12:57, Hans Petter Selasky h...@selasky.org wrote: Hi, Then they will get a compile error no matter what GNUstep’s Foundation.h does. It can’t prevent cdefs.h from redefining __weak to be something different. Except #undef __weak” Please read the example that I

Re: svn commit: r268137 - head/sys/sys

2015-06-19 Thread David Chisnall
I only just caught this (having seen the fallout from NetBSD doing the same thing in a shipping release and the pain that it’s caused): __weak is a reserved keyword in Objective-C, please pick another name for this. This in cdefs.h makes it impossible to include any FreeBSD standard headers in

Re: svn commit: r268137 - head/sys/sys

2015-06-19 Thread David Chisnall
On 19 Jun 2015, at 11:45, Hans Petter Selasky h...@selasky.org wrote: Appearently this will be fixed in GNUSTEP base: http://cvsweb.netbsd.org/bsdweb.cgi/src/sys/sys/cdefs_elf.h?only_with_tag=MAIN Is this still an issue? It is impossible to fix it in GNUstep Base, because we can’t

Re: svn commit: r268137 - head/sys/sys

2015-06-19 Thread David Chisnall
On 19 Jun 2015, at 15:32, Marcelo Araujo araujobsdp...@gmail.com wrote: Maybe would be a good idea run an 'exp run' with this patch? Just to double check if any port will break, although after you rename, I don't believe it will conflict anymore, however an 'exp run' would show you it.

Re: svn commit: r284198 - head/bin/ls

2015-06-13 Thread David Chisnall
On 13 Jun 2015, at 11:17, Ian Lepore i...@freebsd.org wrote: If you would have told me a year ago that you had a simple scheme that could make 30 years of experience maintaining code for unix-like systems completely worthless I would have been skeptical, but it seems we're well on our way.

svn commit: r281925 - head/lib/libc/locale

2015-04-24 Thread David Chisnall
Author: theraven Date: Fri Apr 24 10:17:55 2015 New Revision: 281925 URL: https://svnweb.freebsd.org/changeset/base/281925 Log: Small changes to locale-related man pages. Fix a missing .h and change the recommended include for the POSIX2008 functions from xlocale.h to locale.h. Including

svn commit: r281927 - head/lib/libc/locale

2015-04-24 Thread David Chisnall
Author: theraven Date: Fri Apr 24 10:21:20 2015 New Revision: 281927 URL: https://svnweb.freebsd.org/changeset/base/281927 Log: __xlocale_C_ctype should not be const. It contains a reference count that is modified by newlocale / duplocale / freelocale. MFC after:1 week Modified:

Re: svn commit: r281721 - head/sys/sys

2015-04-21 Thread David Chisnall
On 20 Apr 2015, at 17:19, Bruce Evans b...@optusnet.com.au wrote: Enums should never be used in ABIs, since their size can be anything large enough. The rules for the size of enums also differ between C and C++, though clang (and, I think, gcc) support an attribute for specifying the enum

Re: svn commit: r280955 - in head/sys: modules/notrandom dev/notrandom

2015-04-02 Thread David Chisnall
On 2 Apr 2015, at 11:22, Mateusz Guzik mjgu...@gmail.com wrote: Now one has to wonder how obnoxious one has to get so that people think this can't be real. I tried really hard. :) Not sure about your locale, but here (where the tradition originated) if you fool someone in the morning then

Re: svn commit: r280955 - in head/sys: modules/notrandom dev/notrandom

2015-04-01 Thread David Chisnall
On 1 Apr 2015, at 18:41, Mateusz Guzik mjgu...@gmail.com wrote: I guess you were right, this was bad. I moved the implementation to null.c, I hope this makes everyone happy. https://lists.freebsd.org/pipermail/svn-src-all/2015-April/101876.html This almost certainly does not make people

Re: svn commit: r279764 - head/sys/vm

2015-03-10 Thread David Chisnall
On 10 Mar 2015, at 10:18, Konstantin Belousov kostik...@gmail.com wrote: Because you cannot grep for the panic string when __func__ is used. The userspace assert uses __func__, __FILE__ and __LINE__, which means that you never need to grep the source code to find out where the assert came

Re: svn commit: r279603 - in head: bin/rcp usr.bin/rlogin usr.bin/rsh

2015-03-05 Thread David Chisnall
On 5 Mar 2015, at 14:04, Dmitry Sivachenko de...@freebsd.org wrote: It is so nice to have most useful stuff out of the box. The question is whether a tool for logging into remote machines without encryption is 'the most useful stuff'. The tool is also [ab]used for network testing, but we

Re: svn commit: r279603 - in head: bin/rcp usr.bin/rlogin usr.bin/rsh

2015-03-05 Thread David Chisnall
On 5 Mar 2015, at 12:30, Slawa Olhovchenkov s...@zxy.spb.ru wrote: Yes, if ships before (don't break if working). Some Linux distro remove telnet from default install. Do you like to remove telnet also? Absolutely, now that netcat is part of the default install. For anything that a sane

Re: svn commit: r279603 - in head: bin/rcp usr.bin/rlogin usr.bin/rsh

2015-03-05 Thread David Chisnall
On 5 Mar 2015, at 12:33, Slawa Olhovchenkov s...@zxy.spb.ru wrote: And how to test open/listing ports/sockets?! netcat - nc(1) - which can also work in the other direction and is designed specifically for this purpose. How to connect to mpd control socket?! mpdcon from the command line,

Re: svn commit: r279603 - in head: bin/rcp usr.bin/rlogin usr.bin/rsh

2015-03-05 Thread David Chisnall
On 5 Mar 2015, at 12:21, Slawa Olhovchenkov s...@zxy.spb.ru wrote: I guess when they are going to be not precious enough to be removed? :) In modern world of ssh and https, does any OS require them in base? yes. Some telecom equipment require rlogin. 'Some relatively obscure use case

Re: svn commit: r279603 - in head: bin/rcp usr.bin/rlogin usr.bin/rsh

2015-03-05 Thread David Chisnall
On 5 Mar 2015, at 14:13, Slawa Olhovchenkov s...@zxy.spb.ru wrote: Not better, no. Does telnet support creating server sockets? No. Does telnet support IPsec? No. Does telnet let you specify the tcp window size? No. Does telnet come with a massive selection of options for insecure login /

Re: svn commit: r279603 - in head: bin/rcp usr.bin/rlogin usr.bin/rsh

2015-03-05 Thread David Chisnall
On 5 Mar 2015, at 13:14, Slawa Olhovchenkov s...@zxy.spb.ru wrote: In previos message -- silently return when telnet speak about used IP address and diagnostic messages. One simple command do many diagnostic information. Okay, so check the return code. Or pass -v if you want more verbose

Re: svn commit: r279603 - in head: bin/rcp usr.bin/rlogin usr.bin/rsh

2015-03-05 Thread David Chisnall
On 5 Mar 2015, at 12:42, Slawa Olhovchenkov s...@zxy.spb.ru wrote: netcat - nc(1) - which can also work in the other direction and is designed specifically for this purpose. nc(1) don't correctly work. It works for me for everything that I used to use telnet for (connection testing,

Re: svn commit: r278479 - in head: etc sys/kern

2015-02-10 Thread David Chisnall
On 10 Feb 2015, at 18:30, Rui Paulo rpa...@me.com wrote: Another thing I had in mind (which is more work) was to abstract the devctl kernel code in an API which could make it easy to fan out the notifications to multiple /dev devices. However, that may be overkill. This kind of

Re: svn commit: r274489 - in head/sys/amd64: amd64 include

2014-11-23 Thread David Chisnall
On 21 Nov 2014, at 23:26, Scott Long scott4l...@yahoo.com wrote: That’s a good question to look further into. I didn’t see any measurable differences with this change. I think that the cost of the function call itself masks the cost of a few extra instructions, but I didn’t test with

Re: svn commit: r274340 - in head/sys: crypto/rijndael dev/random geom/bde

2014-11-11 Thread David Chisnall
On 11 Nov 2014, at 16:31, Brooks Davis bro...@freebsd.org wrote: In general, we need to fix the C/C++ standard to us express the things we actually mean when we use const (for example see strchr()'s use of const). I believe the last issue now being tracked on Google's internal list of

Re: svn commit: r273382 - head/contrib/libcxxrt

2014-11-06 Thread David Chisnall
On 6 Nov 2014, at 01:04, Rui Paulo rpa...@me.com wrote: I don't think the non-temporary fix was ever committed. What's the problem? Is something else defining these methods? Yes, they're defined by libc++ too. The problem is that gcc 4.9 wants to be able to throw bad_array_new_length

Re: svn commit: r274086 - head/sbin/route

2014-11-04 Thread David Chisnall
On 4 Nov 2014, at 10:28, Stefan Farfeleder stef...@freebsd.org wrote: Shouldn't Coverity understand that err doesn't return? err() is marked as __dead2, which expands to __attribute__((__noreturn__)). If Coverity doesn't know that __attribute__((__noreturn__)) functions don't return, then

Re: svn commit: r273274 - head/sys/netpfil/ipfw

2014-10-21 Thread David Chisnall
On 19 Oct 2014, at 13:02, Andriy Gapon a...@freebsd.org wrote: I think that on platforms where an optimized version of fls() is available that would work faster than this cool piece of bit magic. If you're lucky, the compiler's idiom recogniser will spot this. You're generally better off

Re: svn commit: r273135 - in head/sys: contrib/rdma/krping dev/cxgbe/iw_cxgbe ofed/drivers/infiniband/core ofed/drivers/infiniband/hw/mlx4 ofed/drivers/infiniband/hw/mthca ofed/drivers/infiniband/ulp/

2014-10-16 Thread David Chisnall
On 16 Oct 2014, at 14:41, Mateusz Guzik mjgu...@gmail.com wrote: Well, atomic_set can be as simple as v-counter = i; (which btw will make it look identical to linux version). This should not give any measureable effect unless atomic_set on given var is abused quite a lot. v-counter = i does

svn commit: r268566 - head/usr.bin/users

2014-07-12 Thread David Chisnall
Author: theraven Date: Sat Jul 12 07:47:50 2014 New Revision: 268566 URL: http://svnweb.freebsd.org/changeset/base/268566 Log: Turn off exceptions and rtti when building the c++ version of users. Neither is used in the program and this saves us 10KB (around 40%) in binary size. Modified:

Re: svn commit: r268491 - head/usr.bin/users

2014-07-12 Thread David Chisnall
On 10 Jul 2014, at 16:29, Ed Schouten e...@80386.nl wrote: With the patch above, the binary shrinks to 15640 bytes, so my concerns are somewhat addressed. :-) I wasn't seeing that saving, but I've now committed a tweak to the Makefile that turns off exceptions and RTTI. This shrinks the

Re: svn commit: r268491 - head/usr.bin/users

2014-07-10 Thread David Chisnall
On 10 Jul 2014, at 18:13, Adrian Chadd adr...@freebsd.org wrote: ... I think this particular commit highlights our almost complete lack of useful data types in our C libraries. I think it's about time we grew a similar list of basic DSAs. I had to reimplement hash tables, trees and

Re: svn commit: r266974 - in head/sys: dev/dc dev/fxp dev/mii dev/netmap kern net

2014-06-03 Thread David Chisnall
On 3 Jun 2014, at 06:01, Adrian Chadd adr...@freebsd.org wrote: I wonder if in the short term we should just use inlines for now, at least so the methodization can get done without hurting people on ARM/MIPS. It's probably worth thinking a bit more carefully about the KPI, since it's

Re: svn commit: r266865 - in head: include include/xlocale lib/libc/string

2014-05-30 Thread David Chisnall
On 30 May 2014, at 06:18, Rui Paulo rpa...@felyko.com wrote: Is this going to cause any ports fallout? It shouldn't do. Any code that compiles on OS X will expect these to be in the correct place, and since DragonFly applied the fix first we'd hopefully have found any fallout via dports.

Re: svn commit: r266423 - in head/sys: conf dev/i40e modules/i40e

2014-05-21 Thread David Chisnall
On 20 May 2014, at 18:16, Gleb Smirnoff gleb...@freebsd.org wrote: Would be cool if most of tools (netstat, systat, etc...) could determine size of terminal and dynamically widen all their fields. Thus, tool can run w/o any abbreviations when run in a script mode, run abbreviated on a small

Re: svn commit: r265861 - in head/sys: arm/include modules

2014-05-11 Thread David Chisnall
On 11 May 2014, at 13:53, Ian Lepore i...@freebsd.org wrote: Ooops, indeed, thanks. Although... it's a good change in terms of speeding up the build, I just didn't intend to commit it until it got tested with -j levels higher than I can test with my little 6-core machine. I'd be happy to

Re: svn commit: r265861 - in head/sys: arm/include modules

2014-05-11 Thread David Chisnall
On 11 May 2014, at 14:05, Ian Lepore i...@freebsd.org wrote: On Sun, 2014-05-11 at 13:58 +0100, David Chisnall wrote: On 11 May 2014, at 13:53, Ian Lepore i...@freebsd.org wrote: Ooops, indeed, thanks. Although... it's a good change in terms of speeding up the build, I just didn't intend

Re: svn commit: r265367 - head/lib/libc/regex

2014-05-06 Thread David Chisnall
Bruce, On 6 May 2014, at 05:46, Bruce Evans b...@optusnet.com.au wrote: The standard behaviour is undefined. It cannot be relied on. From C99 (n869.txt): %7.20.3.1 The calloc function % %Synopsis % %[#1] % %#include stdlib.h %

Re: svn commit: r265367 - head/lib/libc/regex

2014-05-05 Thread David Chisnall
On 5 May 2014, at 18:42, Andrey Chernov a...@freebsd.org wrote: Please don't commit OpenBSD errors. Now you mix calloc() with the realloc() for the same variable later which makes calloc() zeroing pointless and waste of CPU. The purpose of calloc() here is not (primarily) to get the zero'd

Re: svn commit: r265367 - head/lib/libc/regex

2014-05-05 Thread David Chisnall
On 5 May 2014, at 20:49, Pedro Giffuni p...@freebsd.org wrote: Yes, but I reverted it because there are other ways to check for overflows without the performance hit. Do we have a good reusable routine for doing this somewhere? Clang and gcc both have some idiom recognisers that try to spot

Re: svn commit: r265367 - head/lib/libc/regex

2014-05-05 Thread David Chisnall
On 5 May 2014, at 22:33, Warner Losh i...@bsdimp.com wrote: reallocf(): The reallocf() function is identical to the realloc() function, except that it will free the passed pointer when the requested memory cannot be allocated. This is a FreeBSD specific API designed to ease the

Re: svn commit: r265367 - head/lib/libc/regex

2014-05-05 Thread David Chisnall
On 5 May 2014, at 22:40, Andrey Chernov a...@freebsd.org wrote: On 05.05.2014 22:28, David Chisnall wrote: On 5 May 2014, at 18:42, Andrey Chernov a...@freebsd.org wrote: Please don't commit OpenBSD errors. Now you mix calloc() with the realloc() for the same variable later which makes

Re: svn commit: r265367 - head/lib/libc/regex

2014-05-05 Thread David Chisnall
On 5 May 2014, at 22:51, Andrey Chernov a...@freebsd.org wrote: For standard malloc/realloc interface it is up to the caller to check n*size not overflows. You must trust caller already does such check. Do a search of the CVE database sometime to see how well placed that trust generally is.

Re: svn commit: r264265 - in head: crypto/openssl/crypto/bn crypto/openssl/crypto/ec crypto/openssl/ssl sys/fs/nfsserver

2014-04-09 Thread David Chisnall
On 9 Apr 2014, at 15:19, Kubilay Kocak koobs.free...@gmail.com wrote: That expectation is orthogonal to whether we or other projects do it one way or another. RHEL users may well be as confused as ours (whether of not ours are). It may be relevant as a data point, but not for decision making.

svn commit: r264196 - head/lib/libc/rpc

2014-04-06 Thread David Chisnall
Author: theraven Date: Sun Apr 6 17:06:27 2014 New Revision: 264196 URL: http://svnweb.freebsd.org/changeset/base/264196 Log: Move definitions out of rpc_com so that the linker doesn't complain about multiple definitions. Reported by: sbruno Modified: head/lib/libc/rpc/rpc_com.h

svn commit: r264143 - head/lib/libc/stdlib

2014-04-05 Thread David Chisnall
Author: theraven Date: Sat Apr 5 08:17:48 2014 New Revision: 264143 URL: http://svnweb.freebsd.org/changeset/base/264143 Log: Silence a warning with GCC that was breaking the build with Juniper's GCC. Reviewed by: marcel Modified: head/lib/libc/stdlib/atexit.c

Re: svn commit: r264042 - in head: include lib/libc/gen lib/libc/include lib/libc/stdlib

2014-04-04 Thread David Chisnall
On 4 Apr 2014, at 12:52, Baptiste Daroussin b...@freebsd.org wrote: On Wed, Apr 02, 2014 at 04:07:48PM +, David Chisnall wrote: Author: theraven Date: Wed Apr 2 16:07:48 2014 New Revision: 264042 URL: http://svnweb.freebsd.org/changeset/base/264042 Log: Add support for some block

Re: svn commit: r264042 - in head: include lib/libc/gen lib/libc/include lib/libc/stdlib

2014-04-04 Thread David Chisnall
On 4 Apr 2014, at 12:52, Baptiste Daroussin b...@freebsd.org wrote: This breaks a couple of ports starting with cups, those ports do expect libdispatch to be available if _BLOCK_ exists. Do you plan to import libdispatch soon? I've just tried building the print/cups-client port and it builds

Re: svn commit: r264042 - in head: include lib/libc/gen lib/libc/include lib/libc/stdlib

2014-04-04 Thread David Chisnall
On 4 Apr 2014, at 13:14, Baptiste Daroussin b...@freebsd.org wrote: On Fri, Apr 04, 2014 at 01:10:24PM +0100, David Chisnall wrote: On 4 Apr 2014, at 12:52, Baptiste Daroussin b...@freebsd.org wrote: This breaks a couple of ports starting with cups, those ports do expect libdispatch

Re: svn commit: r264042 - in head: include lib/libc/gen lib/libc/include lib/libc/stdlib

2014-04-04 Thread David Chisnall
On 4 Apr 2014, at 13:23, Jordan Hubbard j...@ixsystems.com wrote: On Apr 4, 2014, at 4:59 PM, David Chisnall thera...@freebsd.org wrote: I believe that libdispatch most likely won't be imported until there is an in-tree consumer, but it's in ports and there's nothing stopping ports

Re: svn commit: r264042 - in head: include lib/libc/gen lib/libc/include lib/libc/stdlib

2014-04-04 Thread David Chisnall
On 4 Apr 2014, at 13:44, Jordan Hubbard j...@ixsystems.com wrote: On Apr 4, 2014, at 5:33 PM, David Chisnall thera...@freebsd.org wrote: The slight problem, however, is that we would still like to be able to build the base system with a more or less standard C compiler. Blocks

Re: svn commit: r264042 - in head: include lib/libc/gen lib/libc/include lib/libc/stdlib

2014-04-04 Thread David Chisnall
On 4 Apr 2014, at 14:44, Jordan Hubbard j...@ixsystems.com wrote: Ah, OK. And I’m guessing there’s been no interest in forward-porting the blocks support to 4.7? That’s kind of… a bummer. I don't think so. Warner has been forward-porting some of the FreeBSD binutils changes, but even

svn commit: r264069 - head/lib/libc/include

2014-04-03 Thread David Chisnall
Author: theraven Date: Thu Apr 3 08:08:36 2014 New Revision: 264069 URL: http://svnweb.freebsd.org/changeset/base/264069 Log: Add an extra void* cast to work around a bug in FreeBSD-gcc inherited from Apple. Modified: head/lib/libc/include/block_abi.h Modified:

svn commit: r264070 - in head/lib/libc: . gen stdlib

2014-04-03 Thread David Chisnall
Author: theraven Date: Thu Apr 3 08:16:45 2014 New Revision: 264070 URL: http://svnweb.freebsd.org/changeset/base/264070 Log: Move _b functions into the 11.x symbol version namespace. Modified: head/lib/libc/Versions.def head/lib/libc/gen/Symbol.map head/lib/libc/stdlib/Symbol.map

svn commit: r264082 - head/lib/libc

2014-04-03 Thread David Chisnall
Author: theraven Date: Thu Apr 3 17:31:38 2014 New Revision: 264082 URL: http://svnweb.freebsd.org/changeset/base/264082 Log: Fix the inheritance of the FBSDprivate_1.0 namespace. Modified: head/lib/libc/Versions.def Modified: head/lib/libc/Versions.def

svn commit: r264038 - head/lib/libc/locale

2014-04-02 Thread David Chisnall
Author: theraven Date: Wed Apr 2 11:10:46 2014 New Revision: 264038 URL: http://svnweb.freebsd.org/changeset/base/264038 Log: Fix an issue where the locale and rune locale could become out of sync, causing mb* functions (and similar) to be called with the wrong data (possibly a null

svn commit: r264042 - in head: include lib/libc/gen lib/libc/include lib/libc/stdlib

2014-04-02 Thread David Chisnall
== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/libc/gen/scandir_b.c Wed Apr 2 16:07:48 2014 (r264042) @@ -0,0 +1,29 @@ +/*- + * Copyright (c) 2014 David Chisnall + * All rights reserved

Re: svn commit: r264042 - in head: include lib/libc/gen lib/libc/include lib/libc/stdlib

2014-04-02 Thread David Chisnall
On 2 Apr 2014, at 17:18, Konstantin Belousov kostik...@gmail.com wrote: This is completely wrong. You cannot modify FreeBSD 8.x namespace in 11.x HEAD time. That was an error, however we are using symbol versioning completely wrongly in FreeBSD anyway (see the last two DevSummit discussions

svn commit: r264043 - head/lib/libc/gen

2014-04-02 Thread David Chisnall
Author: theraven Date: Wed Apr 2 16:29:29 2014 New Revision: 264043 URL: http://svnweb.freebsd.org/changeset/base/264043 Log: Move scandir_b to a later symbol version. Modified: head/lib/libc/gen/Symbol.map Modified: head/lib/libc/gen/Symbol.map

Re: svn commit: r264042 - in head: include lib/libc/gen lib/libc/include lib/libc/stdlib

2014-04-02 Thread David Chisnall
On 2 Apr 2014, at 18:24, Konstantin Belousov kostik...@gmail.com wrote: It does, I read it. Read the code again. Or even just read the comments. In particular the blocks_abi.h file contains a detailed description of why the rest of what you say is wrong. Now libc depends on the

Re: svn commit: r263778 - in head: bin lib lib/clang sbin share/mk usr.bin usr.sbin

2014-03-27 Thread David Chisnall
On 26 Mar 2014, at 22:30, Dimitry Andric d...@freebsd.org wrote: Add a SUBDIR_PARALLEL option to bsd.subdir.mk, to allow make to process all the SUBDIR entries in parallel, instead of serially. Apply this option to a selected number of Makefiles, which can greatly speed up the build on

Re: svn commit: r262810 - in head: release release/arm release/tools share/man/man7

2014-03-06 Thread David Chisnall
On 5 Mar 2014, at 23:17, Glen Barber g...@freebsd.org wrote: After several months of testing and fixing (and breaking) various parts of release/release.sh changes, it is now possible to build FreeBSD/arm images as part of the release process. That's great! How much effort would it be to

Re: svn commit: r262810 - in head: release release/arm release/tools share/man/man7

2014-03-06 Thread David Chisnall
On 6 Mar 2014, at 17:47, Glen Barber g...@freebsd.org wrote: On Thu, Mar 06, 2014 at 04:37:11PM +, David Chisnall wrote: On 5 Mar 2014, at 23:17, Glen Barber g...@freebsd.org wrote: After several months of testing and fixing (and breaking) various parts of release/release.sh changes

Re: svn commit: r262282 - in head: contrib/dma contrib/dma/debian contrib/dma/debian/migrate contrib/dma/debian/source contrib/dma/test etc/mtree libexec libexec/dma share/mk tools/build/mk tools/buil

2014-02-25 Thread David Chisnall
On 25 Feb 2014, at 07:52, Baptiste Daroussin b...@freebsd.org wrote: On Tue, Feb 25, 2014 at 05:22:22PM +1100, Peter Jeremy wrote: On 2014-Feb-22 13:14:38 +0100, Baptiste Daroussin b...@freebsd.org wrote: On Sat, Feb 22, 2014 at 07:23:50PM +1100, Peter Jeremy wrote: I'd also query the reason

svn commit: r262394 - head/usr.bin/dtc

2014-02-23 Thread David Chisnall
Author: theraven Date: Sun Feb 23 21:13:07 2014 New Revision: 262394 URL: http://svnweb.freebsd.org/changeset/base/262394 Log: Fix parsing multiple roots with whitespace between them. Patch by: Patrick Wildt Modified: head/usr.bin/dtc/fdt.cc Modified: head/usr.bin/dtc/fdt.cc

Re: svn commit: r261916 - head/sys/dev/xen/console

2014-02-16 Thread David Chisnall
On 16 Feb 2014, at 04:09, Bruce Evans b...@optusnet.com.au wrote: [a long list of corner cases where the warning may not be correct] Fortunately, the goal of compiler warnings is not to address every possible case, but rather to minimise false positives while still giving useful results. The

Re: svn commit: r261916 - head/sys/dev/xen/console

2014-02-15 Thread David Chisnall
On 15 Feb 2014, at 17:02, Bruce Evans b...@optusnet.com.au wrote: Why? There are hundreds if not thousands of static inline functions in headers, and most of these functions are not always used, so there would be [hundreds if not thousands] * [number of #includes] compiler warnings if

Re: svn commit: r261801 - head/contrib/libc++/include

2014-02-13 Thread David Chisnall
On 13 Feb 2014, at 01:04, Alexander Kabaev kab...@gmail.com wrote: The refusal to use tools that are there precisely to help to help with the binary compatibility in favor of mindless library bumps is just sad. Perhaps you could share with the class. What is the correct way of solving this

Re: svn commit: r261801 - head/contrib/libc++/include

2014-02-12 Thread David Chisnall
On 12 Feb 2014, at 18:42, Jung-uk Kim j...@freebsd.org wrote: It seems Apple removed it later. http://lists.cs.uiuc.edu/pipermail/cfe-commits/Week-of-Mon-20131125/094181.html Do you know what they did? They decided to break ABI compatibility with the version of XCode that ships with the

Re: svn commit: r261283 - in head: contrib/libc++ contrib/libc++/include contrib/libc++/include/experimental contrib/libc++/include/ext contrib/libc++/src etc/mtree lib/libc++ sys/sys tools/build/mk

2014-02-04 Thread David Chisnall
On 3 Feb 2014, at 22:00, Alexander Kabaev kab...@gmail.com wrote: At the very least, new library did remove _ZNKSt3__111__libcpp_db12__comparableEPKvS2_ which was public before. This symbol is part of the debugging infrastructure and is used when you build your code with aggressive debug

Re: svn commit: r261283 - in head: contrib/libc++ contrib/libc++/include contrib/libc++/include/experimental contrib/libc++/include/ext contrib/libc++/src etc/mtree lib/libc++ sys/sys tools/build/mk

2014-02-03 Thread David Chisnall
On 3 Feb 2014, at 18:32, Alexander Kabaev kab...@gmail.com wrote: More than likely. It does appear libc++ does not go through same pains to maintain ABI stable as libstdc++ does. The lack of all and any symbol versions in shared library binary strongly suggests that not only they do not

Re: svn commit: r261031 - in head: . etc usr.sbin/etcupdate usr.sbin/mergemaster

2014-01-23 Thread David Chisnall
On 22 Jan 2014, at 22:36, Glen Barber g...@freebsd.org wrote: It needs to use the build host version, because using (for example) powerpc resulting binary won't work on and amd64 system. If it's used as part of the build, then it should be part of the toolchain target and we should be using

svn commit: r260553 - head/lib/libcxxrt

2014-01-11 Thread David Chisnall
Author: theraven Date: Sat Jan 11 19:02:17 2014 New Revision: 260553 URL: http://svnweb.freebsd.org/changeset/base/260553 Log: Add missing C++11 typeinfos to the libcxxrt version script. PR: 185663 MFC after:1 week Modified: head/lib/libcxxrt/Version.map Modified:

svn commit: r259249 - head/usr.bin/dtc

2013-12-12 Thread David Chisnall
Author: theraven Date: Thu Dec 12 08:48:45 2013 New Revision: 259249 URL: http://svnweb.freebsd.org/changeset/base/259249 Log: Fix the version string in dts emission. Reported by: Patrick Wildt MFC after:1 week Modified: head/usr.bin/dtc/fdt.cc Modified: head/usr.bin/dtc/fdt.cc

  1   2   3   >