Re: CVS commit: src/external/gpl2/diffutils/dist/src

2020-12-12 Thread Joerg Sonnenberger
On Sun, Dec 13, 2020 at 12:04:40AM +, Roy Marples wrote:
> Module Name:  src
> Committed By: roy
> Date: Sun Dec 13 00:04:40 UTC 2020
> 
> Modified Files:
>   src/external/gpl2/diffutils/dist/src: util.c
> 
> Log Message:
> diffutils: execl requires a NULL sentinel

Strictly speaking, this needs a cast to work properly. It really needs
to be a pointer and NULL isn't necessarily one.

Joerg


Re: CVS commit: src

2020-11-12 Thread Joerg Sonnenberger
On Sun, Nov 08, 2020 at 09:56:48PM +, Nia Alarie wrote:
> Module Name:  src
> Committed By: nia
> Date: Sun Nov  8 21:56:48 UTC 2020
> 
> Modified Files:
>   src/external/bsd/kyua-cli: Makefile.inc
>   src/external/ibm-public/postfix: Makefile.inc
>   src/external/public-domain/sqlite: Makefile.inc
>   src/external/public-domain/sqlite/bin: Makefile
>   src/external/public-domain/sqlite/lib: Makefile sqlite3.pc.in
>   src/usr.sbin/makemandb: Makefile
> 
> Log Message:
> sqlite: do not build without multithreading support

So the core issue here is that it actually does two separate things. It
does not only enable threadsafety (which is good), but also enables the
worker thread support (which is bad). There is little reason for wanting
the latter in a general build, at least the way it is implemented right
now. Just doing the former is a lot less intrusive...

Joerg
diff -r 2bb2635be785 external/public-domain/sqlite/Makefile.inc
--- a/external/public-domain/sqlite/Makefile.incThu Nov 12 23:24:18 
2020 +0100
+++ b/external/public-domain/sqlite/Makefile.incThu Nov 12 23:28:36 
2020 +0100
@@ -15,6 +15,7 @@
-DHAVE_STRERROR_R=1 \
-DHAVE_USLEEP=1 \
-DHAVE_SYS_ENDIAN_H=1 \
+   -DSQLITE_THREADSAFE \
-DSQLITE_MAX_WORKER_THREADS=0 \
-DSQLITE_ENABLE_COLUMN_METADATA \
-DSQLITE_ENABLE_FTS3_PARENTHESIS \


Re: CVS commit: src/external/gpl3/gcc/dist/gcc/config/aarch64

2020-10-20 Thread Joerg Sonnenberger
On Wed, Oct 21, 2020 at 08:58:36AM +0900, Rin Okuyama wrote:
> I'm also one who feels hesitate to import Linux'ism into our basic
> components. However, for this problem in particular, I still think
> it is not a good choice to keep NetBSD support in driver-aarch64.c:
> 
> (a) Our sysctl(3)-based interface is not compliant to any standards,
> just like Linux's /proc/cpuinfo. But the latter is, unfortunately
> for us, the de facto standard.

It works properly in a chroot etc without needing new files. I would
call that a big plus.

Joerg


Re: CVS commit: src/external/gpl3/gcc

2020-09-12 Thread Joerg Sonnenberger
On Sat, Sep 12, 2020 at 10:24:16PM +0200, Kamil Rytarowski wrote:
> On 12.09.2020 22:06, Joerg Sonnenberger wrote:
> > On Fri, Sep 11, 2020 at 11:45:42PM +0200, Kamil Rytarowski wrote:
> >> On 11.09.2020 23:38, Joerg Sonnenberger wrote:
> >>> On Fri, Sep 11, 2020 at 04:07:24PM +0200, Kamil Rytarowski wrote:
> >>>> The current code is confusing, as it attempts to use unimplemented
> >>>> _PTHREAD_GETTCB_EXT() and in one place uses _lwp_getprivate_fast() in
> >>>> other _lwp_getprivate(). This caused my confusion... as I assumed that
> >>>> _lwp_getprivate_fast() is internal and _lwp_getprivate() for public
> >>>> consumption.
> >>>
> >>> _PTHREAD_GETTCB_EXT is a rump hack. There is no _lwp_getprivate_fast.
> >>> There is __lwp_getprivate_fast, which originally wasn't implemented on
> >>> architectures without a fast path (like VAX). Nowadays, all functional
> >>> ports provide either __lwp_getprivate_fast (potentially with a fall-back
> >>> to the system call) or __lwp_gettcb_fast. The difference is whether the
> >>> TLS register is biased or not.
> >>>
> >>
> >> Do you agree with this patch:
> >>
> >> http://netbsd.org/~kamil/patch-00278-_rtld_tls_self.txt
> > 
> > No, I don't see the point.
> > 
> 
> What's the alternative to use in 3rd party code?

Why do you need an alternative?

Joerg


Re: CVS commit: src/external/gpl3/gcc

2020-09-12 Thread Joerg Sonnenberger
On Fri, Sep 11, 2020 at 11:45:42PM +0200, Kamil Rytarowski wrote:
> On 11.09.2020 23:38, Joerg Sonnenberger wrote:
> > On Fri, Sep 11, 2020 at 04:07:24PM +0200, Kamil Rytarowski wrote:
> >> The current code is confusing, as it attempts to use unimplemented
> >> _PTHREAD_GETTCB_EXT() and in one place uses _lwp_getprivate_fast() in
> >> other _lwp_getprivate(). This caused my confusion... as I assumed that
> >> _lwp_getprivate_fast() is internal and _lwp_getprivate() for public
> >> consumption.
> > 
> > _PTHREAD_GETTCB_EXT is a rump hack. There is no _lwp_getprivate_fast.
> > There is __lwp_getprivate_fast, which originally wasn't implemented on
> > architectures without a fast path (like VAX). Nowadays, all functional
> > ports provide either __lwp_getprivate_fast (potentially with a fall-back
> > to the system call) or __lwp_gettcb_fast. The difference is whether the
> > TLS register is biased or not.
> > 
> 
> Do you agree with this patch:
> 
> http://netbsd.org/~kamil/patch-00278-_rtld_tls_self.txt

No, I don't see the point.

Joerg


Re: CVS commit: src/external/gpl3/gcc

2020-09-11 Thread Joerg Sonnenberger
On Fri, Sep 11, 2020 at 04:07:24PM +0200, Kamil Rytarowski wrote:
> The current code is confusing, as it attempts to use unimplemented
> _PTHREAD_GETTCB_EXT() and in one place uses _lwp_getprivate_fast() in
> other _lwp_getprivate(). This caused my confusion... as I assumed that
> _lwp_getprivate_fast() is internal and _lwp_getprivate() for public
> consumption.

_PTHREAD_GETTCB_EXT is a rump hack. There is no _lwp_getprivate_fast.
There is __lwp_getprivate_fast, which originally wasn't implemented on
architectures without a fast path (like VAX). Nowadays, all functional
ports provide either __lwp_getprivate_fast (potentially with a fall-back
to the system call) or __lwp_gettcb_fast. The difference is whether the
TLS register is biased or not.

Joerg


Re: CVS commit: src/sys/kern

2020-08-02 Thread Joerg Sonnenberger
On Sun, Aug 02, 2020 at 01:57:11PM +, Taylor R Campbell wrote:
> But it sounds like the original motivation is that it triggered
> -Wvla...which frankly strikes me as a compiler bug since there's
> obviously no actual VLA created in sizeof; as far as I can tell
> there's no semantic difference between sizeof(device_t[n]) and
> sizeof(device_t) * n.

Yes, it seems strange to trigger a VLA warning in code that it is
required to be compile-time evaluated.

Joerg


Re: CVS commit: src/share/mk

2020-07-13 Thread Joerg Sonnenberger
On Mon, Jul 13, 2020 at 07:22:51AM +, matthew green wrote:
> Module Name:  src
> Committed By: mrg
> Date: Mon Jul 13 07:22:51 UTC 2020
> 
> Modified Files:
>   src/share/mk: bsd.README
> 
> Log Message:
> MKLLVMRT is automatically enabled on x86 and arm64, not mesa18+.

It is both.

Joerg


Re: CVS commit: src/usr.bin/make

2020-07-04 Thread Joerg Sonnenberger
On Sat, Jul 04, 2020 at 03:44:07PM +, Roland Illig wrote:
> Module Name:  src
> Committed By: rillig
> Date: Sat Jul  4 15:44:07 UTC 2020
> 
> Modified Files:
>   src/usr.bin/make: var.c
> 
> Log Message:
> make(1): fix :hash modifier on 16-bit platforms
> 
> On platforms where int has only 16 bits the shifts would have been in
> 16-bit arithmetic, which would invoke undefined behavior for "ustr[3] <<
> 24" as well as "ustr[2] << 16" (C99, 6.5.7p3).

WTF should we care? This is just making things more complicated without
adding any value.

Joerg


Re: CVS commit: src/sys/arch/x86/x86

2020-06-24 Thread Joerg Sonnenberger
On Wed, Jun 24, 2020 at 10:28:08PM +, Jaromir Dolecek wrote:
> Module Name:  src
> Committed By: jdolecek
> Date: Wed Jun 24 22:28:08 UTC 2020
> 
> Modified Files:
>   src/sys/arch/x86/x86: multiboot2.c
> 
> Log Message:
> don't try allocating 16KB of scratch space on stack
> 
> it's too early for kmem_alloc(), so use static variable in BSS; it's used
> post reloc, so don't need to use the RELOC() macros

Why? This is the initial early stack, not the normal LWP stack.

Joerg


Re: CVS commit: src/sys/arch/powerpc

2020-06-22 Thread Joerg Sonnenberger
On Mon, Jun 22, 2020 at 05:34:57AM +, Rin Okuyama wrote:
> Module Name:  src
> Committed By: rin
> Date: Mon Jun 22 05:34:57 UTC 2020
> 
> Modified Files:
>   src/sys/arch/powerpc/include: mcontext.h types.h
>   src/sys/arch/powerpc/powerpc: sig_machdep.c
> 
> Log Message:
> Fix previous; hide userland ABI details for kernel as suggested by joerg:

Thanks!

Joerg


Re: CVS commit: src/sys/arch/powerpc

2020-06-21 Thread Joerg Sonnenberger
On Sun, Jun 21, 2020 at 12:40:00AM +, Rin Okuyama wrote:
> - Obsolete __lwp_settcb() in order to let kernel know new TLS address via
>   _lwp_setprivate(2). Alternatively, we can call _lwp_setprivate(2) within
>   __lwp_settcb() like mips, but it is just double handling; we adjust %r2
>   appropriately in _lwp_setprivate(2) via cpu_lwp_setprivate().

If an architecture stores the TCB at an offset, it should provide
__lwp_settcb to do the necessary adjust and then invoke _lwp_setprivate
as appropiate. The MIPS variant is correct. This should *not* be done in
the kernel, as it is an ABI detail of the userland TLS API.

Joerg


Re: CVS commit: src/common/lib/libprop

2020-06-11 Thread Joerg Sonnenberger
On Fri, Jun 12, 2020 at 02:59:40AM +0200, Kamil Rytarowski wrote:
> On 12.06.2020 02:07, Joerg Sonnenberger wrote:
> > On Fri, Jun 12, 2020 at 01:28:15AM +0200, Kamil Rytarowski wrote:
> >> Please list legitimate false positives. There is practically nothing
> >> like that possible for using deprecated APIs (at least kept longer
> >> term). Besides that, the report shall be lowered to warning (like it
> >> used to be for Clang).
> > 
> > Build a random KDE package and see warnings about XHR symbols?
> > 
> > Joerg
> > 
> 
> XDR?
> 
> $ grep -ir xdr .|grep warn
> ./libc/yp/xdryp.c:__warn_references(xdr_domainname,
> ./libc/yp/xdryp.c:"warning: this program uses xdr_domainname(),
> which is deprecated and buggy.")
> ./libc/yp/xdryp.c:__warn_references(xdr_peername,
> ./libc/yp/xdryp.c:"warning: this program uses xdr_peername(), which
> is deprecated and buggy.")
> ./libc/yp/xdryp.c:__warn_references(xdr_mapname,
> ./libc/yp/xdryp.c:"warning: this program uses xdr_mapname(), which
> is deprecated and buggy.")
> 
> KDE4?

No, KDE5.

> 
> After grepping, I don't see relevant users of these APIs. There is
> something around Python that has a NIS/YP module.

Exactly, nothing in Qt uses it, but it *still* triggers the warning.

Joerg


Re: CVS commit: src/common/lib/libprop

2020-06-11 Thread Joerg Sonnenberger
On Fri, Jun 12, 2020 at 01:28:15AM +0200, Kamil Rytarowski wrote:
> Please list legitimate false positives. There is practically nothing
> like that possible for using deprecated APIs (at least kept longer
> term). Besides that, the report shall be lowered to warning (like it
> used to be for Clang).

Build a random KDE package and see warnings about XHR symbols?

Joerg


Re: CVS commit: src/common/lib/libprop

2020-06-11 Thread Joerg Sonnenberger
On Fri, Jun 12, 2020 at 12:58:45AM +0200, Kamil Rytarowski wrote:
> On 12.06.2020 00:55, Christos Zoulas wrote:
> > In article <20200611222544.6d3a6f...@cvs.netbsd.org>,
> > Joerg Sonnenberger  wrote:
> >> -=-=-=-=-=-
> >>
> >> Module Name:   src
> >> Committed By:  joerg
> >> Date:  Thu Jun 11 22:25:44 UTC 2020
> >>
> >> Modified Files:
> >>src/common/lib/libprop: prop_object_impl.h
> >>
> >> Log Message:
> >> Unbreak clang builds by removing questionable linker warning sections
> >> trggered all over the place.
> > 
> > Why don't you do this just for clang, so that we can use gcc to track the
> > remaining ones down and finish the job? Now we can't easily find them.
> > 
> > christos
> > 
> 
> Can we please revert this and fix clang?
> 
> I'm strongly for linker warnings as they catch real issues.

Repeating that statement doesn't make it true. The amount of legit
problems found by them is dwarfed by far by the number of false
positives seen. That's complete ignoring basic QoI issues like "where is
this actually triggered" and no "I know, shut up".

Joerg


Re: CVS commit: src/common/lib/libprop

2020-06-11 Thread Joerg Sonnenberger
On Thu, Jun 11, 2020 at 10:55:16PM -, Christos Zoulas wrote:
> In article <20200611222544.6d3a6f...@cvs.netbsd.org>,
> Joerg Sonnenberger  wrote:
> >-=-=-=-=-=-
> >
> >Module Name: src
> >Committed By:joerg
> >Date:Thu Jun 11 22:25:44 UTC 2020
> >
> >Modified Files:
> > src/common/lib/libprop: prop_object_impl.h
> >
> >Log Message:
> >Unbreak clang builds by removing questionable linker warning sections
> >trggered all over the place.
> 
> Why don't you do this just for clang, so that we can use gcc to track the
> remaining ones down and finish the job? Now we can't easily find them.

Make them use the deprecation attribution and fix the fallout. But don't
leave the build broken for days. I said it before, but the linker
warning flags are a terrible way for handling deprecation. Look at many
KDE builds for nice examples...

Joerg


Re: CVS commit: src

2020-06-07 Thread Joerg Sonnenberger
On Sun, Jun 07, 2020 at 02:43:06PM -0700, Jason Thorpe wrote:
> 
> > On Jun 7, 2020, at 1:57 PM, Joerg Sonnenberger  wrote:
> > 
> >> Example?
> > 
> > https://gcc.gnu.org/onlinedocs/gcc-4.7.0/gcc/Function-Attributes.html#index-g_t_0040code_007bdeprecated_007d-attribute_002e-2502
> 
> I meant an example in our tree.  We use __warn_reference() in several places 
> already.  I also don't want to introduce compiler warnings just yet.

Yes, we do use it in a number of places. Most of them are ancient, some
of the modern cases like in XHR are exactly what I am talking about in
triggering bugs. The compiler warnings are strictly superior.

Joerg


Re: CVS commit: src

2020-06-07 Thread Joerg Sonnenberger
On Sun, Jun 07, 2020 at 01:27:48PM -0700, Jason Thorpe wrote:
> 
> > On Jun 7, 2020, at 1:22 PM, Joerg Sonnenberger  wrote:
> > 
> > On Sat, Jun 06, 2020 at 09:26:00PM +, Jason R Thorpe wrote:
> >> ==> Deprecate mutable prop_data(3) and prop_string(3) objects.  The old
> >>APIs that support them still exist, but will now produce link-time
> >>warnings when used.
> > 
> > Please replace them with proper deprecration annotation in the headers.
> 
> Example?

https://gcc.gnu.org/onlinedocs/gcc-4.7.0/gcc/Function-Attributes.html#index-g_t_0040code_007bdeprecated_007d-attribute_002e-2502

Joerg


Re: CVS commit: src

2020-06-07 Thread Joerg Sonnenberger
On Sat, Jun 06, 2020 at 09:26:00PM +, Jason R Thorpe wrote:
> ==> Deprecate mutable prop_data(3) and prop_string(3) objects.  The old
> APIs that support them still exist, but will now produce link-time
> warnings when used.

Please replace them with proper deprecration annotation in the headers.
The link-time warnings are obnoxious due to both various ld bugs and any
precision in disabling them.

Joerg


Re: CVS commit: src/sys/kern

2020-06-01 Thread Joerg Sonnenberger
On Sun, May 31, 2020 at 11:24:20PM +, Rin Okuyama wrote:
> Module Name:  src
> Committed By: rin
> Date: Sun May 31 23:24:20 UTC 2020
> 
> Modified Files:
>   src/sys/kern: kern_timeout.c
> 
> Log Message:
> Stop allocating buffers dynamically in a DDB session, in order not to
> disturb on-going debugged state of kernel datastructures.

This breaks the build with clang as it uses a declared-but-not-defined
type callout_cpu.

Joerg


Re: CVS commit: src

2020-05-30 Thread Joerg Sonnenberger
On Sat, May 30, 2020 at 04:48:00PM -0400, Christos Zoulas wrote:
> Module Name:  src
> Committed By: christos
> Date: Sat May 30 20:47:59 UTC 2020
> 
> Modified Files:
>   src/distrib/sets/lists/base: mi shl.mi
>   src/distrib/sets/lists/comp: mi shl.mi
>   src/distrib/sets/lists/debug: mi shl.mi
>   src/etc/mtree: NetBSD.dist.base
>   src/external/mit/libuv/lib: Makefile
>   src/external/mpl/bind: Makefile.inc
>   src/external/mpl/bind/lib/libisc: Makefile
>   src/external/mpl/dhcp: Makefile.inc
>   src/share/mk: bsd.README bsd.prog.mk
> Added Files:
>   src/external/mpl/bind/lib/libisc: isc.map
> 
> Log Message:
> Make libuv private, requested by joerg@

Thanks!

Joerg


Re: CVS commit: src/external/bsd/ntp/bin/ntpd

2020-05-29 Thread Joerg Sonnenberger
On Fri, May 29, 2020 at 10:53:02AM +, Kamil Rytarowski wrote:
> Module Name:  src
> Committed By: kamil
> Date: Fri May 29 10:53:02 UTC 2020
> 
> Modified Files:
>   src/external/bsd/ntp/bin/ntpd: Makefile
> 
> Log Message:
> Fix the ntpd build with Clang/LLVM
> 
> Set -Wno-format-nonliteral for ntp_refclock.c

Please fix this properly by adding the appropiate format string
annotation.

Joerg


Re: CVS commit: src/sys/arch

2020-05-21 Thread Joerg Sonnenberger
On Thu, May 21, 2020 at 09:12:31PM +, Andrew Doran wrote:
> Module Name:  src
> Committed By: ad
> Date: Thu May 21 21:12:31 UTC 2020
> 
> Modified Files:
>   src/sys/arch/x86/acpi: acpi_wakeup.c
>   src/sys/arch/x86/include: i82489var.h
>   src/sys/arch/x86/x86: cpu.c lapic.c x86_machdep.c
>   src/sys/arch/xen/x86: cpu.c
>   src/sys/arch/xen/xen: hypervisor.c xen_clock.c
> 
> Log Message:
> - Recalibrate the APIC timer using the TSC, once the TSC has in turn been
>   recalibrated using the HPET.  This gets the clock interrupt firing more
>   closely to HZ.

Why using the TSC and not the HPET directly? For systems with HPET, same
question with the ACPI / PCI timer.

Joerg


Re: CVS commit: src/tests/lib/libc/sys

2020-05-14 Thread Joerg Sonnenberger
On Thu, May 14, 2020 at 11:36:28PM +0200, Kamil Rytarowski wrote:
> On 14.05.2020 23:02, Joerg Sonnenberger wrote:
> > On Thu, May 14, 2020 at 07:21:35PM +, Kamil Rytarowski wrote:
> >> Module Name:   src
> >> Committed By:  kamil
> >> Date:  Thu May 14 19:21:35 UTC 2020
> >>
> >> Modified Files:
> >>src/tests/lib/libc/sys: t_ptrace_fork_wait.h
> >>
> >> Log Message:
> >> Ignore interception of the SIGCHLD signals.
> >>
> >> SIGCHLD once blocked is discarded by the kernel as it has the
> >> SA_IGNORE property. During the fork(2) operation all signals can be
> >> shortly blocked and missed (unless there is a registered signal
> >> handler in the traced child). This leads to a race in this test if
> >> there would be an intention to catch SIGCHLD.
> > 
> > This doesn't sound right. sigprocmask and pthread_sigmask shouldn't
> > affect whether the signal handler is called, only when. Temporarily
> > masking a signal is different from setting it to SIG_IGN.
> > 
> > Joerg
> > 
> 
> I was looking into it and as there is no signal handler for SIGCHLD, the
> signal is discarded.

Sure, but that doesn't really have anything to do with signal blocking.
That's the part that is confusing.

Joerg


Re: CVS commit: src/tests/lib/libc/sys

2020-05-14 Thread Joerg Sonnenberger
On Thu, May 14, 2020 at 07:21:35PM +, Kamil Rytarowski wrote:
> Module Name:  src
> Committed By: kamil
> Date: Thu May 14 19:21:35 UTC 2020
> 
> Modified Files:
>   src/tests/lib/libc/sys: t_ptrace_fork_wait.h
> 
> Log Message:
> Ignore interception of the SIGCHLD signals.
> 
> SIGCHLD once blocked is discarded by the kernel as it has the
> SA_IGNORE property. During the fork(2) operation all signals can be
> shortly blocked and missed (unless there is a registered signal
> handler in the traced child). This leads to a race in this test if
> there would be an intention to catch SIGCHLD.

This doesn't sound right. sigprocmask and pthread_sigmask shouldn't
affect whether the signal handler is called, only when. Temporarily
masking a signal is different from setting it to SIG_IGN.

Joerg


Re: CVS commit: src

2020-05-12 Thread Joerg Sonnenberger
On Tue, May 12, 2020 at 10:51:51AM +0200, Kamil Rytarowski wrote:
> On 12.05.2020 02:59, Joerg Sonnenberger wrote:
> > On Mon, May 11, 2020 at 11:07:02PM +0200, Kamil Rytarowski wrote:
> >> On 19.04.2020 03:06, Joerg Sonnenberger wrote:
> >>> Module Name:  src
> >>> Committed By: joerg
> >>> Date: Sun Apr 19 01:06:16 UTC 2020
> >>>
> >>> Modified Files:
> >>>   src/lib/libc/gen: pthread_atfork.c
> >>>   src/libexec/ld.elf_so: rtld.c rtld.h symbols.map
> >>>
> >>> Log Message:
> >>> Rename __atomic_fork to __locked_fork and give it  as argument.
> >>> rtld and libc use different storage, so the initial version would
> >>> incorrectly report the failure reason for fork().
> >>>
> >>> There is still a small race condition inside ld.elf_so as it doesn't use
> >>> thread-safe errno internally, but that's a more contained internal
> >>> issue.
> >>>
> >>>
> >>
> >>
> >> Should we add the same logic for clone(2)?
> > 
> > clone only exists for Linux compat. I see no reason to support any fork
> > emulation for it.
> > 
> > Joerg
> > 
> 
> This Linux compat is on the source code level and inside the kernel
> clone() shares the same code with fork().
> 
> clone(2) is a regular syscall available in the NetBSD native ABI syscall
> layers. There are also users (I have got one).
> 
> All problems for fork() can be reproduced for clone(). But if we want to
> just mitigate some issues of fork() users and fix/ignore promptly
> clone() ones, it is fine.

clone(2) already has a huge set of race conditions it will hit in
various parts of libc, libpthread etc when it is used to emulate fork.
It is a non-standard interface too with no mechanisms for resolving any
of those races. I see no reason for pretending that it is anywhere
usable.

Joerg


Re: CVS commit: src

2020-05-11 Thread Joerg Sonnenberger
On Mon, May 11, 2020 at 11:07:02PM +0200, Kamil Rytarowski wrote:
> On 19.04.2020 03:06, Joerg Sonnenberger wrote:
> > Module Name:src
> > Committed By:   joerg
> > Date:   Sun Apr 19 01:06:16 UTC 2020
> > 
> > Modified Files:
> > src/lib/libc/gen: pthread_atfork.c
> > src/libexec/ld.elf_so: rtld.c rtld.h symbols.map
> > 
> > Log Message:
> > Rename __atomic_fork to __locked_fork and give it  as argument.
> > rtld and libc use different storage, so the initial version would
> > incorrectly report the failure reason for fork().
> > 
> > There is still a small race condition inside ld.elf_so as it doesn't use
> > thread-safe errno internally, but that's a more contained internal
> > issue.
> > 
> > 
> 
> 
> Should we add the same logic for clone(2)?

clone only exists for Linux compat. I see no reason to support any fork
emulation for it.

Joerg


Re: CVS commit: src/sys/uvm

2020-05-11 Thread Joerg Sonnenberger
On Sun, May 10, 2020 at 11:53:00PM +0100, Alexander Nasonov wrote:
> Taylor R Campbell wrote:
> > Log Message:
> > Implement swap encryption.
> > 
> > Enabled by sysctl -w vm.swap_encrypt=1.
> 
> If secmodel_securelevel(9) is still a thing, locking down this sysctl
> at high securelevel may improve our security. Prior to this change,
> swap devices were readable (even if enrypted with cgd).  With this
> sysctl set to 1, all new swap devices will be encrypted, the only
> thing to worry about is if it's set back to 0 on a compromised host.

Well, the ability to turn it off should be locked down. Enabling it for
securelevel>0 seems fine?

Joerg


Re: CVS commit: src/sys

2020-04-27 Thread Joerg Sonnenberger
On Mon, Apr 27, 2020 at 06:19:18PM +0900, Tetsuya Isaki wrote:
> As a result of some discussion here, adding 60+ one-line header
> files like  is troublesome or annoying.
> And I have no good idea to generate a suitable border line from
> existing parameters or something.
> 
> Then how about this?
> (thanks tsutsui@ for comment about choosing archs)
> This #ifdefs may not look elegance, but I think it's simple and
> realistic.

I'd just move it the whole block into audio.c, but otherwise this sounds
like a good step forward.

Joerg


Re: CVS commit: src/include

2020-04-17 Thread Joerg Sonnenberger
On Fri, Apr 17, 2020 at 03:22:35PM +, Kamil Rytarowski wrote:
> Module Name:  src
> Committed By: kamil
> Date: Fri Apr 17 15:22:35 UTC 2020
> 
> Modified Files:
>   src/include: assert.h
> 
> Log Message:
> Remove the static_assert() fallback for pre-C11 and pre-C++11
> 
> C++ without real static_assert() can be incompatible with the C fallback
> as presented in openjdk.
> 
> A pre-C11 compiler can be picky on the implementation.

So did you actually test that the tree compiles with this? Just asking,
since your own ptrace tests depend on static_assert...

Joerg


Re: CVS commit: src/sys

2020-04-16 Thread Joerg Sonnenberger
On Fri, Apr 17, 2020 at 07:31:51AM +0900, Rin Okuyama wrote:
> On 2020/04/17 6:56, Rin Okuyama wrote:
> > Module Name:src
> > Committed By:   rin
> > Date:   Thu Apr 16 21:56:43 UTC 2020
> > 
> > Modified Files:
> > src/sys/arch/arm/omap: omap3_sdmareg.h omap3_sdmavar.h omapfbreg.h
> > src/sys/arch/arm/ti: omap3_dssreg.h
> > src/sys/arch/macppc/dev: batteryvar.h cudavar.h deqvar.h obiovar.h
> > platinumfbreg.h pmuvar.h valkyriefbreg.h videopllvar.h
> > src/sys/arch/mips/adm5120/dev: if_admswvar.h
> > src/sys/arch/powerpc/include: intr.h
> > src/sys/arch/powerpc/pic: ipivar.h picvar.h
> > src/sys/dev/acpi/wmi: wmi_acpivar.h
> > src/sys/dev/adb: adbvar.h
> > src/sys/dev/i2c: adm1026reg.h dbcool_reg.h dbcool_var.h sgsmixvar.h
> > src/sys/dev/ic: i128reg.h i128var.h
> > src/sys/dev/pci: gffbreg.h ppbvar.h voyagervar.h
> > src/sys/dev/qbus: rlvar.h
> > src/sys/external/bsd/ena-com: ena_plat.h
> > src/sys/lib/libkern: crc16.h
> > src/sys/ufs/ext2fs: ext2fs_xattr.h
> > 
> > Log Message:
> > Stop using __KERNEL_RCSID() in header files; it confuses ident(1) by
> > overwriting RCSID in main source files.
> > 
> > XXX
> > The first argument of __KERNEL_RCSID() is neglected for ELF. If we wish
> > to have RCSID of header files in kernel binary, we need something like
> > __FBSDID() macro in FreeBSD.
> 
> Oops, this description is not correct. __KERNEL_RCSID() in header files
> does *not* overwrite RCSID in main source files. The problem is that it
> inserts its own RCSID in *every* object files.
> 
> As a result, ident(1) shows more than 1000 duplicated lines for GENERIC
> kernel of macppc, for example.

That can be fixed generically? .ident needs the SHF_MERGE|SHF_STRINGS as
section flags and then the linker should do the rest by itself.

Joerg


Re: CVS commit: src/sys

2020-04-09 Thread Joerg Sonnenberger
On Thu, Apr 09, 2020 at 09:52:37PM +0900, Tetsuya Isaki wrote:
> At Fri, 3 Apr 2020 17:51:21 +0200,
> Joerg Sonnenberger wrote:
> > It seems perfectly
> > sensible to me that the final output device can provide a lower limit as
> > well as having one derived from HZ and using whatever is higher.
> 
> Sorry, I could not translate well and I didn't understand.
> Could you write that in another way?

There are two possible reasons for a lower limit for the buffer size:
(1) The device requires a certain amount.
(2) The system wants to ensure the interrupt rate doesn't go over a
certain rate.

The real value shouldn't be a constant, but the maximum of the two?

Joerg


Re: CVS commit: src/sys

2020-04-03 Thread Joerg Sonnenberger
On Fri, Apr 03, 2020 at 09:45:20PM +0900, Tetsuya Isaki wrote:
>  [*] On my alpha (500MHz), wss(4)/ISA works even on blk_ms=1.
>  But I was not able to set 1msec on yds(4) PCI sound card on
>  the same machine.  Its lower limit was 5msec (due to driver's
>  or hardware's restriction, I don't know details though).

It sounds wrong to hold users hostage to the restrictions of some
devices. Why does this have to be a constant anyway? It seems perfectly
sensible to me that the final output device can provide a lower limit as
well as having one derived from HZ and using whatever is higher.

Joerg


Re: CVS commit: src/sys

2020-03-29 Thread Joerg Sonnenberger
On Sun, Mar 29, 2020 at 07:26:26AM -0700, Jason Thorpe wrote:
> 
> > On Mar 29, 2020, at 6:11 AM, Joerg Sonnenberger  wrote:
> > 
> > I would allow at least 1/HZ as baseline.
> 
> Be careful, some platforms have a relatively high HZ (e.g. Alpha HZ=1024).

Yes and I see no fundamental reason for not allowing buffering with 1ms
frames in that case. I expect Alpha to be fast enough to do that with
little overhead.

Joerg


Re: CVS commit: src/sys

2020-03-29 Thread Joerg Sonnenberger
On Sun, Mar 29, 2020 at 01:11:47PM +0900, Tetsuya Isaki wrote:
> > I would prefer if blk_ms were kept below 5ms on amd64 and aarch64.
> > We don't have to worry about the CPU load of playing audio on these 
> > platforms.
> 
> CPU load or performance is not subject.  I know that my
> implementation will work on the most modern real hardware.
> But I feel that at least 4msec is too rush to be default.
> A default should not be for one game application.

I would allow at least 1/HZ as baseline.

Joerg


Re: CVS commit: src/lib/libc/string

2020-03-26 Thread Joerg Sonnenberger
On Thu, Mar 26, 2020 at 10:54:21AM +0700, Robert Elz wrote:
> Date:Wed, 25 Mar 2020 20:51:25 +
> From:David Holland 
> Message-ID:  <20200325205125.ga11...@netbsd.org>
> 
>   | I don't agree -- because applications shouldn't attempt to modify the
>   | result, it should be const.
> 
> The only reason apps shouldn't modify the string is in case of porting
> the app to an (well, some) ancient implementation.  Because of the NLS
> requirements, the message these days (any modern implementation) must be
> read from some external file - which means the storage for it must be
> writable. 

Actually, the only reason why we really need writable space is the
unknown error case. NLS could in principle be using mmaped data as well,
modulo not being able to unmap it again.

Joerg


Re: CVS commit: src/lib/libc/compiler_rt

2020-03-08 Thread Joerg Sonnenberger
On Sun, Mar 08, 2020 at 06:30:06AM +, Rin Okuyama wrote:
> Module Name:  src
> Committed By: rin
> Date: Sun Mar  8 06:30:06 UTC 2020
> 
> Modified Files:
>   src/lib/libc/compiler_rt: Makefile.inc
> 
> Log Message:
> Fix broken printf(3) %d output for numbers more than two digits, e.g.,
> 
>   printf("%d\n", 42) ---> "::" instead of "42"
> 
> Our __{,u}modsi3 codes assume that __udivsi3 returns remainder to
> %d1 (volatile register). __udivsi3 in libgcc does not, and therefore
> mixing them up results in mess.

This looks like the wrong fix to me. This is not about libgcc at all.
The depency in the src/common code should be fixed IMO. If __{,u}modsi3
wants to make assumptions about the remainder being implicitly computed,
it really should be using the divmod primitive instead.

Joerg


Re: CVS commit: src/include

2020-03-01 Thread Joerg Sonnenberger
On Sun, Mar 01, 2020 at 10:26:08PM +0100, Kamil Rytarowski wrote:
> On 01.03.2020 19:31, Joerg Sonnenberger wrote:
> > On Sun, Mar 01, 2020 at 03:08:16PM +, Kamil Rytarowski wrote:
> >> Module Name:   src
> >> Committed By:  kamil
> >> Date:  Sun Mar  1 15:08:16 UTC 2020
> >>
> >> Modified Files:
> >>src/include: stddef.h
> >>
> >> Log Message:
> >> Expose max_align_t to C99/C++
> > 
> > Please revert this immediately. It is just wrong.
> > 
> 
> Rationale? libc++ does not work and I perceive insisting it as a losing
> battle and and zero gain.

As you do know, there is a patch for libc++ under review to fix this
properly. It is even generally agreed that the current behavior is a
bug. Your patch broke well defined C++03 programs.

> >> This problem does not exist on OSs like Linux as they get this namespace
> >> visibility defined inside LLVM or GNU toolchain headers. NetBSD ships with
> >> its own stddef.h, rather than relying on a toolchain and its internal
> >> extensions.
> > 
> > This is incorrect as well.
> > 
> 
> No stddef.h in GLIBC is a matter of fact.

$ printf '#include \nmax_align_t foo;' | clang++ -std=c++03 -x c++ -
:2:1: error: unknown type name 'max_align_t'
$ printf '#include \nmax_align_t foo;' | g++ -std=c++03 -x c++ -
:2:1: error: ‘max_align_t’ does not name a type

Joerg


Re: CVS commit: src/doc

2020-03-01 Thread Joerg Sonnenberger
On Sun, Mar 01, 2020 at 10:20:44PM +0100, Kamil Rytarowski wrote:
> If that will nor realize, I will request to enable GNU_HASH for NetBSD-11.

You have so far demonstrated no justification at all beyond handwaving
for why it should be included in first place. Seriously, stop rushing
code without doing your homework to demonstrate that it is (1) correct
(2) an actual improvement (3) understanding concerns raised in the past.
I have limited ressources and having to deal with crap like the
max_align_t commit just costs a lot of time for no good reason.

> GNU_HASH is industry standard for all modern Linux and any other
> mainstream BSD distribution already for around a decade.

If you want an industry standard, please use the GNU/Linux distribution
of your choice. Arguing based on industry standards is a non sequitur.

Joerg


Re: CVS commit: src/include

2020-03-01 Thread Joerg Sonnenberger
On Sun, Mar 01, 2020 at 03:08:16PM +, Kamil Rytarowski wrote:
> Module Name:  src
> Committed By: kamil
> Date: Sun Mar  1 15:08:16 UTC 2020
> 
> Modified Files:
>   src/include: stddef.h
> 
> Log Message:
> Expose max_align_t to C99/C++

Please revert this immediately. It is just wrong.

> This problem does not exist on OSs like Linux as they get this namespace
> visibility defined inside LLVM or GNU toolchain headers. NetBSD ships with
> its own stddef.h, rather than relying on a toolchain and its internal
> extensions.

This is incorrect as well.

Joerg


Re: CVS commit: src/doc

2020-02-29 Thread Joerg Sonnenberger
On Sat, Feb 29, 2020 at 10:29:02PM +0100, Kamil Rytarowski wrote:
> On 29.02.2020 21:58, Joerg Sonnenberger wrote:
> > On Sat, Feb 29, 2020 at 07:36:00PM +0100, Kamil Rytarowski wrote:
> >> On 29.02.2020 19:00, Taylor R Campbell wrote:
> >>>> Module Name:src
> >>>> Committed By:   kamil
> >>>> Date:   Sat Feb 29 04:27:01 UTC 2020
> >>>>
> >>>> Modified Files:
> >>>> src/doc: CHANGES
> >>>>
> >>>> Log Message:
> >>>> ld.elf_so(1): Implement DT_GNU_HASH
> >>>
> >>> Was this discussed anywhere?
> >>
> >> In the toolchain circles, for some time now (2+ years).
> >>
> >> It was one of the pending task to modernize our ELF loader on par with
> >> at least FreeBSD.
> > 
> > Can we please stop with this "we must need XXX to be on par with YYY"
> > nonsense without actually looking at the details first and discuss them?
> > Practically speaking, there was moderately little discussion about the
> > actual design choices of DT_GNU_HASH, especially some of its deficits.
> > Especially because we already have some important improvements in our
> > tree *without breaking compatibility*. Especially the size claims are
> > questionable at best as justification are weak at best. It also ignores
> > that by design DT_GNU_HASH conflicts with at least one platform ABI.
> > 
> > Joerg
> > 
> 
> Just keeping DT_GNU_HASH support around does not break compat. Full
> replacement of HASH algorithm would break compat but nobody wants to do
> it (at least in NetBSD).

Can you please stop speaking for the NetBSD community? Seriously, that
alone makes me want to just /dev/null all messages. "Keeping DT_GNU_HASH
around" is funny, given that it just got added without any discussion.

Joerg


Re: CVS commit: src/doc

2020-02-29 Thread Joerg Sonnenberger
On Sat, Feb 29, 2020 at 07:36:00PM +0100, Kamil Rytarowski wrote:
> On 29.02.2020 19:00, Taylor R Campbell wrote:
> >> Module Name:src
> >> Committed By:   kamil
> >> Date:   Sat Feb 29 04:27:01 UTC 2020
> >>
> >> Modified Files:
> >> src/doc: CHANGES
> >>
> >> Log Message:
> >> ld.elf_so(1): Implement DT_GNU_HASH
> > 
> > Was this discussed anywhere?
> 
> In the toolchain circles, for some time now (2+ years).
> 
> It was one of the pending task to modernize our ELF loader on par with
> at least FreeBSD.

Can we please stop with this "we must need XXX to be on par with YYY"
nonsense without actually looking at the details first and discuss them?
Practically speaking, there was moderately little discussion about the
actual design choices of DT_GNU_HASH, especially some of its deficits.
Especially because we already have some important improvements in our
tree *without breaking compatibility*. Especially the size claims are
questionable at best as justification are weak at best. It also ignores
that by design DT_GNU_HASH conflicts with at least one platform ABI.

Joerg


Re: CVS commit: src/external/apache2/llvm/config/llvm/Config

2020-02-21 Thread Joerg Sonnenberger
On Fri, Feb 21, 2020 at 11:13:24AM +0100, Kamil Rytarowski wrote:
> On 21.02.2020 07:20, Martin Husemann wrote:
> > On Fri, Feb 21, 2020 at 03:01:45AM +0100, Kamil Rytarowski wrote:
> >> I consider calling ncurses-dev essential as a bug.
> > 
> > My knee jerk reaction was: if a unix compiler needs terminfo (especially
> > when it only does that to create coloured unreadable messages) it needs
> > to be moved to pkgsrc. Same goes for a command line debugger.
> > 
> > But if I understood Joerg's (extremely terse) objection:
> > there should be logic in the tools build dealing with missing terminfo
> > libs and this case needs more analyzis to understand why it fails.
> > 
> > Martin
> > 
> 
> This patch changes cryptic failure in linking to a verbose message:
> 
> http://netbsd.org/~kamil/patch-00231-llvm-terminfo-tools.txt
> 
> Does it look to commit?

No, absolutely not. This is just making the problem a 100 times worse.

Joerg


Re: CVS commit: src/external/apache2/llvm/config/llvm/Config

2020-02-19 Thread Joerg Sonnenberger
On Wed, Feb 19, 2020 at 11:29:09PM +0100, Kamil Rytarowski wrote:
> On 19.02.2020 23:03, Joerg Sonnenberger wrote:
> > On Wed, Feb 19, 2020 at 04:10:17PM +0100, Kamil Rytarowski wrote:
> >> On 19.02.2020 14:32, Joerg Sonnenberger wrote:
> >>> Module Name:  src
> >>> Committed By: joerg
> >>> Date: Wed Feb 19 13:32:40 UTC 2020
> >>>
> >>> Modified Files:
> >>>   src/external/apache2/llvm/config/llvm/Config: config.h.in
> >>>
> >>> Log Message:
> >>> Revert last. It was objected to pre-commit, there is no actual error
> >>> analysis or report and there is existing logic supposed to handle this.
> >>>
> >>>
> >>> To generate a diff of this commit:
> >>> cvs rdiff -u -r1.2 -r1.3 \
> >>> src/external/apache2/llvm/config/llvm/Config/config.h.in
> >>>
> >>> Please note that diffs are not public domain; they are subject to the
> >>> copyright notices on the relevant files.
> >>>
> >>
> >> Objected pre-commit? Nothing reached me and I see nothing in logs.
> >>
> >> No report? It was discussed in public syzkaller ML and semipublic IRC
> >> channel with 5 people involved.
> >>
> >> https://syzkaller.appspot.com/text?tag=CrashLog=11aafc09e0
> >>
> >> No analysis? There is analysis in the commit message that we remove
> >> optional features.
> >>
> >> I request either to reintroduce it now or land another fix.
> > 
> > While I am on many mailing lists, I'm certainly not on all lists. I
> > answered in the only forum where I saw the message. I am strongly
> > objecting here because you make the tools compiler a lot less usable.
> > You haven't acutally shown *why* the existing logic doesn't work.
> > 
> 
> The existing logic does not work as it is breaking bootstrap on
> Linux/Ubuntu as presented here:
> 
> https://syzkaller.appspot.com/text?tag=CrashLog=11aafc09e0

Yes and that is completely useless for figuring out the why.

Joerg


Re: CVS commit: src/external/apache2/llvm/config/llvm/Config

2020-02-19 Thread Joerg Sonnenberger
On Wed, Feb 19, 2020 at 04:10:17PM +0100, Kamil Rytarowski wrote:
> On 19.02.2020 14:32, Joerg Sonnenberger wrote:
> > Module Name:src
> > Committed By:   joerg
> > Date:   Wed Feb 19 13:32:40 UTC 2020
> > 
> > Modified Files:
> > src/external/apache2/llvm/config/llvm/Config: config.h.in
> > 
> > Log Message:
> > Revert last. It was objected to pre-commit, there is no actual error
> > analysis or report and there is existing logic supposed to handle this.
> > 
> > 
> > To generate a diff of this commit:
> > cvs rdiff -u -r1.2 -r1.3 \
> > src/external/apache2/llvm/config/llvm/Config/config.h.in
> > 
> > Please note that diffs are not public domain; they are subject to the
> > copyright notices on the relevant files.
> > 
> 
> Objected pre-commit? Nothing reached me and I see nothing in logs.
> 
> No report? It was discussed in public syzkaller ML and semipublic IRC
> channel with 5 people involved.
> 
> https://syzkaller.appspot.com/text?tag=CrashLog=11aafc09e0
> 
> No analysis? There is analysis in the commit message that we remove
> optional features.
> 
> I request either to reintroduce it now or land another fix.

While I am on many mailing lists, I'm certainly not on all lists. I
answered in the only forum where I saw the message. I am strongly
objecting here because you make the tools compiler a lot less usable.
You haven't acutally shown *why* the existing logic doesn't work.

Joerg


Re: CVS commit: src/external/bsd/dhcpcd/dist/src

2020-02-13 Thread Joerg Sonnenberger
On Thu, Feb 13, 2020 at 02:05:12PM +0100, Kamil Rytarowski wrote:
> On 13.02.2020 00:58, Joerg Sonnenberger wrote:
> > On Mon, Feb 10, 2020 at 04:45:35PM +, Roy Marples wrote:
> >> On 09/02/2020 19:21, Joerg Sonnenberger wrote:
> >>> On Sat, Feb 08, 2020 at 12:17:16PM +, Santhosh Raju wrote:
> >>>> Module Name: src
> >>>> Committed By:fox
> >>>> Date:Sat Feb  8 12:17:16 UTC 2020
> >>>>
> >>>> Modified Files:
> >>>>  src/external/bsd/dhcpcd/dist/src: dhcp.c
> >>>>
> >>>> Log Message:
> >>>> external/bsd/dhcpcd: Fix a -Wconversion warning.
> >>>>
> >>>> Type cast uint16_t to size_t to prevent implicit type conversion.
> >>>
> >>> Seriously? That should not warn and no cast should be used either.
> >>
> >> What fix would you recommend then?
> > 
> > Disable the warning in GCC and fill an upstream PR against it. A
> > conversion from uint16_t to size_t is value preserving by definition of
> > the ISO C platform limits. It should never create a warning.
> > 
> > Joerg
> > 
> 
> If we disable warnings in our core software in non-trivial source file
> for over 4000 lines we will mute more serious issues in a pretty
> sensitive file. We fixed this warning in upstream dhcpcd.

The fix is IMO significantly worse as it actually creates technical
debt. Frankly, I would go so far and say that this should be reverted.
This warning seems to be pretty fundamentally broken by design if the
analysis so far is correct.

Joerg


Re: CVS commit: src/tests/lib/libc/sys

2020-02-13 Thread Joerg Sonnenberger
On Thu, Feb 13, 2020 at 10:50:19AM +0100, Joerg Sonnenberger wrote:
> On Wed, Feb 12, 2020 at 09:53:46PM -0500, Christos Zoulas wrote:
> > Module Name:src
> > Committed By:   christos
> > Date:   Thu Feb 13 02:53:46 UTC 2020
> > 
> > Modified Files:
> > src/tests/lib/libc/sys: t_ptrace_x86_wait.h
> > 
> > Log Message:
> > Turn off optimization on a function which contains constant labels.
> > The optimizer splits it and we end up with 2 copies and duplicate symbols.
> 
> Why not just turn them into local labels instead?

Alternatively, suffixing them with %= would create unique labels.

Joerg


Re: CVS commit: src/tests/lib/libc/sys

2020-02-13 Thread Joerg Sonnenberger
On Wed, Feb 12, 2020 at 09:53:46PM -0500, Christos Zoulas wrote:
> Module Name:  src
> Committed By: christos
> Date: Thu Feb 13 02:53:46 UTC 2020
> 
> Modified Files:
>   src/tests/lib/libc/sys: t_ptrace_x86_wait.h
> 
> Log Message:
> Turn off optimization on a function which contains constant labels.
> The optimizer splits it and we end up with 2 copies and duplicate symbols.

Why not just turn them into local labels instead?

Joerg


Re: CVS commit: src/external/bsd/dhcpcd/dist/src

2020-02-12 Thread Joerg Sonnenberger
On Thu, Feb 13, 2020 at 02:07:23AM +, Roy Marples wrote:
> On 12/02/2020 23:58, Joerg Sonnenberger wrote:
> > On Mon, Feb 10, 2020 at 04:45:35PM +, Roy Marples wrote:
> > > On 09/02/2020 19:21, Joerg Sonnenberger wrote:
> > > > On Sat, Feb 08, 2020 at 12:17:16PM +, Santhosh Raju wrote:
> > > > > Module Name:  src
> > > > > Committed By: fox
> > > > > Date: Sat Feb  8 12:17:16 UTC 2020
> > > > > 
> > > > > Modified Files:
> > > > >   src/external/bsd/dhcpcd/dist/src: dhcp.c
> > > > > 
> > > > > Log Message:
> > > > > external/bsd/dhcpcd: Fix a -Wconversion warning.
> > > > > 
> > > > > Type cast uint16_t to size_t to prevent implicit type conversion.
> > > > 
> > > > Seriously? That should not warn and no cast should be used either.
> > > 
> > > What fix would you recommend then?
> > 
> > Disable the warning in GCC and fill an upstream PR against it. A
> > conversion from uint16_t to size_t is value preserving by definition of
> > the ISO C platform limits. It should never create a warning.
> 
> I thought this fell under int promotion and thus became signed vs unsigned?

size_t is guaranteed to be at least 16bit. If INT_MAX == 32767, an
implicit cast of uint16_t would go to unsigned anyway and in all other
cases, any implicit cast must be value preserving.

Joerg


Re: CVS commit: src/external/bsd/dhcpcd/dist/src

2020-02-12 Thread Joerg Sonnenberger
On Mon, Feb 10, 2020 at 04:45:35PM +, Roy Marples wrote:
> On 09/02/2020 19:21, Joerg Sonnenberger wrote:
> > On Sat, Feb 08, 2020 at 12:17:16PM +, Santhosh Raju wrote:
> > > Module Name:  src
> > > Committed By: fox
> > > Date: Sat Feb  8 12:17:16 UTC 2020
> > > 
> > > Modified Files:
> > >   src/external/bsd/dhcpcd/dist/src: dhcp.c
> > > 
> > > Log Message:
> > > external/bsd/dhcpcd: Fix a -Wconversion warning.
> > > 
> > > Type cast uint16_t to size_t to prevent implicit type conversion.
> > 
> > Seriously? That should not warn and no cast should be used either.
> 
> What fix would you recommend then?

Disable the warning in GCC and fill an upstream PR against it. A
conversion from uint16_t to size_t is value preserving by definition of
the ISO C platform limits. It should never create a warning.

Joerg


Re: CVS commit: src/external/bsd/dhcpcd/dist/src

2020-02-09 Thread Joerg Sonnenberger
On Sat, Feb 08, 2020 at 12:17:16PM +, Santhosh Raju wrote:
> Module Name:  src
> Committed By: fox
> Date: Sat Feb  8 12:17:16 UTC 2020
> 
> Modified Files:
>   src/external/bsd/dhcpcd/dist/src: dhcp.c
> 
> Log Message:
> external/bsd/dhcpcd: Fix a -Wconversion warning.
> 
> Type cast uint16_t to size_t to prevent implicit type conversion.

Seriously? That should not warn and no cast should be used either.

Joerg


Re: CVS commit: src/games/battlestar

2020-02-05 Thread Joerg Sonnenberger
On Wed, Feb 05, 2020 at 08:11:54PM +, Santhosh Raju wrote:
> Module Name:  src
> Committed By: fox
> Date: Wed Feb  5 20:11:54 UTC 2020
> 
> Modified Files:
>   src/games/battlestar: parse.c
> 
> Log Message:
> games/battlestar: Fix the -Werror=restrict warning.
> 
> Replace strcpy(1) with the safer snprintf(3) which guarantees NULL
> termination of strings.
> 
> Error was reported when build.sh was run with MKLIBCSANITIZER=yes flag.

This can all use plain memcpy?

Joerg


Re: CVS commit: src/lib/libc/gen

2020-02-03 Thread Joerg Sonnenberger
On Sat, Feb 01, 2020 at 03:38:46PM +, Kamil Rytarowski wrote:
> Module Name:  src
> Committed By: kamil
> Date: Sat Feb  1 15:38:46 UTC 2020
> 
> Modified Files:
>   src/lib/libc/gen: pthread_atfork.c
> 
> Log Message:
> Switch atform allocations from malloc()+free() to mmap()+munmap()
> 
> This avoid bootstrapping malloc too early when libc+libpthread are not
> ready. It is called through pthread__init() -> _pthread_atfork().
> 
> This also helps LLVM Leak Sanitizer to pacify false positive reports.

Can we please stop adding more and more hacks for the still questionable
"new" jemalloc and sit down for a sane init model first please? I'm
still at the point to ask to just revert to the known-to-be-working
version and therefore would also strongly prefer this change to be
reverted.

Joerg


Re: CVS commit: src/external/mit/xorg/lib/gallium

2020-02-03 Thread Joerg Sonnenberger
On Fri, Jan 31, 2020 at 09:13:40PM +, Jared D. McNeill wrote:
> Module Name:  src
> Committed By: jmcneill
> Date: Fri Jan 31 21:13:40 UTC 2020
> 
> Modified Files:
>   src/external/mit/xorg/lib/gallium: Makefile
> 
> Log Message:
> Bump MESA_LLVM_VERSION_STRING

Directly use ${LLVM_VERSION}?

Joerg


Re: CVS commit: src/external/mit/xorg/lib

2020-02-03 Thread Joerg Sonnenberger
On Fri, Jan 31, 2020 at 08:58:18PM +, Jared D. McNeill wrote:
> Module Name:  src
> Committed By: jmcneill
> Date: Fri Jan 31 20:58:18 UTC 2020
> 
> Modified Files:
>   src/external/mit/xorg/lib: libmesa.mk
>   src/external/mit/xorg/lib/libglapi: Makefile
> 
> Log Message:
> Change HAVE_LLVM from 0x0700 to 0x0900.

Can we change this to something like:

NUMERIC_LLVM_VERSION!=  ${LLVM_VERSION:R:R} * 256
-DHAVE_LLVM=${NUMERIC_LLVM_VERSION}

(not bothering with the minor, since it will be 0 anyway).

Joerg


Re: CVS commit: src/sys/arch/x86

2020-01-12 Thread Joerg Sonnenberger
On Sun, Jan 12, 2020 at 01:01:12PM +, Andrew Doran wrote:
> Module Name:  src
> Committed By: ad
> Date: Sun Jan 12 13:01:12 UTC 2020
> 
> Modified Files:
>   src/sys/arch/x86/include: pmap.h pmap_pv.h
>   src/sys/arch/x86/x86: pmap.c vm_machdep.c x86_tlb.c
> 
> Log Message:
> x86 pmap:
> 
> - It turns out that every page the pmap frees is necessarily zeroed.  Tell
>   the VM system about this and use the pmap as a source of pre-zeroed pages.

Would it make sense to actually verify this under DEBUG? I fear the
debugging we have to do if a chance ever violates this assumption.

Joerg


Re: CVS commit: src/usr.bin/crunch/crunchgen

2019-12-23 Thread Joerg Sonnenberger
On Mon, Dec 23, 2019 at 06:54:47PM -, Christos Zoulas wrote:
> Here is a patch that:
> 
> 1. removes all the special handling of variables (-d -p -P -s -S) that
>were dealing with DBG (-d) LDSTATIC/NOPIE (-p), and the rest with
>disabling/enabling sanitizers.
> 2. uses emalloc/estrdup for all the allocators instead of only some cases.
> 3. adds -V varspec which passes variables on the command line (as DBG
>and LDSTATIC used to be passed before) instead of appending them
>to the on-the-fly Makefile using -v varspec.
> 
> The motivation of this is to make variable handling consistent, less magical,
> and remove the need for changing crunchgen each time we want to add disabling
> an option by default.

I like this in principle, but I haven't double checked everything.

Joerg


Re: CVS commit: src/sys

2019-12-21 Thread Joerg Sonnenberger
On Fri, Dec 20, 2019 at 09:05:34PM +, Andrew Doran wrote:
> Module Name:  src
> Committed By: ad
> Date: Fri Dec 20 21:05:34 UTC 2019
> 
> Modified Files:
>   src/sys/arch/aarch64/aarch64: cpu.c cpufunc.c
>   src/sys/arch/arm/arm32: arm32_boot.c cpu.c
>   src/sys/arch/macppc/macppc: cpu.c
>   src/sys/arch/mips/mips: cpu_subr.c
>   src/sys/arch/x86/x86: cpu.c cpu_topology.c identcpu.c
>   src/sys/kern: kern_cpu.c
>   src/sys/sys: cpu.h cpu_data.h sched.h
> 
> Log Message:
> Some more CPU topology stuff:
> 
> - Use cegger@'s ACPI SRAT parsing code to figure out NUMA node ID for each
>   CPU as it is attached.

My build system panics on boot with this due to zero sized allocations
in acpisrat_refresh.

Joerg


Re: CVS commit: src/share/mk

2019-12-19 Thread Joerg Sonnenberger
On Mon, Jan 21, 2019 at 04:11:55PM -0500, Christos Zoulas wrote:
> Module Name:  src
> Committed By: christos
> Date: Mon Jan 21 21:11:55 UTC 2019
> 
> Modified Files:
>   src/share/mk: bsd.dep.mk bsd.hostprog.mk bsd.info.mk bsd.kmodule.mk
>   bsd.lib.mk bsd.man.mk bsd.prog.mk bsd.sys.mk bsd.test.mk bsd.x11.mk
>   sys.mk
> 
> Log Message:
> Most of the mv operations are to move temporary files to their final place.
> Some use -f, others don't. This can lead to spurious build failures when
> the user performing the build changes. Centralize, and always use -f.

At least the sys.mk part of this breaks standalone Makefiles, because MV
is not defined.

Joerg


Re: CVS commit: src/usr.bin/crunch/crunchgen

2019-12-19 Thread Joerg Sonnenberger
On Thu, Dec 19, 2019 at 12:27:23PM -0500, Christos Zoulas wrote:
> On Dec 19,  4:19pm, jo...@bec.de (Joerg Sonnenberger) wrote:
> -- Subject: Re: CVS commit: src/usr.bin/crunch/crunchgen
> 
> | > I think that there are two uses: install media and rescue. I can reinstate
> | > it for rescue. Is that ok? Note that by default both ssp and fortify are
> | > off for most things, so my change was mostly a no-op for the default 
> settings.
> | 
> | We seem to default to off for more things, PIE too for example.
> 
> Indeed, I also dislike the alphabet soup of flags for disabling
> things.  I propose that instead we provide a way to add a preamble
> to the generated Makefile via -f  file, default to a
> either a built-in configuration file, or one installed in the tree.
> It is inappropriate for crunchgen to have knowledge of variables
> specific to our build system that change over time.
> 
> So I propose:
> 
> 1. to make that change [configuration file]
> 2. leave the defaults as they are for the installation binaries
> 3. change the defaults to turn nothing off for the rescue binaries

With the exception of the default, I agree. IMO crunchgen is a general
purpose tool. It is used in different circumstances and shouldn't
dictate whether "normal" use is space constrained or not.

Joerg


Re: CVS commit: src/usr.bin/crunch/crunchgen

2019-12-19 Thread Joerg Sonnenberger
On Thu, Dec 19, 2019 at 01:46:43PM -, Christos Zoulas wrote:
> In article <20191218222723.ga17...@bec.de>,
> Joerg Sonnenberger   wrote:
> >On Wed, Dec 18, 2019 at 03:51:21PM -, Christos Zoulas wrote:
> >> In article <20191218152113.ga7...@bec.de>,
> >> Joerg Sonnenberger   wrote:
> >> >On Tue, Dec 17, 2019 at 09:16:04PM -0500, Christos Zoulas wrote:
> >> >> Module Name:src
> >> >> Committed By:   christos
> >> >> Date:   Wed Dec 18 02:16:04 UTC 2019
> >> >> 
> >> >> Modified Files:
> >> >> src/usr.bin/crunch/crunchgen: crunchgen.1 crunchgen.c
> >> >> 
> >> >> Log Message:
> >> >> Also disable ssp and fortify by default.
> >> >
> >> >Why?
> >> 
> >> Size reduction on install media. There are flags to turn it on.
> >
> >Not all users of crunchgen are space constrained, so this seems like a
> >bad default to me.
> 
> I think that there are two uses: install media and rescue. I can reinstate
> it for rescue. Is that ok? Note that by default both ssp and fortify are
> off for most things, so my change was mostly a no-op for the default settings.

We seem to default to off for more things, PIE too for example.

Joerg


Re: CVS commit: src/usr.bin/crunch/crunchgen

2019-12-18 Thread Joerg Sonnenberger
On Wed, Dec 18, 2019 at 03:51:21PM -, Christos Zoulas wrote:
> In article <20191218152113.ga7...@bec.de>,
> Joerg Sonnenberger   wrote:
> >On Tue, Dec 17, 2019 at 09:16:04PM -0500, Christos Zoulas wrote:
> >> Module Name:   src
> >> Committed By:  christos
> >> Date:  Wed Dec 18 02:16:04 UTC 2019
> >> 
> >> Modified Files:
> >>src/usr.bin/crunch/crunchgen: crunchgen.1 crunchgen.c
> >> 
> >> Log Message:
> >> Also disable ssp and fortify by default.
> >
> >Why?
> 
> Size reduction on install media. There are flags to turn it on.

Not all users of crunchgen are space constrained, so this seems like a
bad default to me.

Joerg


Re: CVS commit: src/usr.bin/crunch/crunchgen

2019-12-18 Thread Joerg Sonnenberger
On Tue, Dec 17, 2019 at 09:16:04PM -0500, Christos Zoulas wrote:
> Module Name:  src
> Committed By: christos
> Date: Wed Dec 18 02:16:04 UTC 2019
> 
> Modified Files:
>   src/usr.bin/crunch/crunchgen: crunchgen.1 crunchgen.c
> 
> Log Message:
> Also disable ssp and fortify by default.

Why?

Joerg


Re: CVS commit: src/external/apache2/llvm

2019-11-29 Thread Joerg Sonnenberger
On Fri, Nov 29, 2019 at 11:28:31AM +, m...@netbsd.org wrote:
> On Thu, Nov 28, 2019 at 11:01:22PM +0000, Joerg Sonnenberger wrote:
> > Log Message:
> > Use -fno-strict-aliasing unconditionally for the cross compiler.
> 
> What's the context for that?

This was meant to be part of the earlier change to build clang and
associated things with it when using GCC. The same problem applies for
the cross-compiler when the host compiler is a new enough GCC.

Joerg


CVS commit: src/external/apache2/llvm

2019-11-28 Thread Joerg Sonnenberger
Module Name:src
Committed By:   joerg
Date:   Thu Nov 28 23:01:22 UTC 2019

Modified Files:
src/external/apache2/llvm: Makefile.inc

Log Message:
Use -fno-strict-aliasing unconditionally for the cross compiler.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/external/apache2/llvm/Makefile.inc

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/external/apache2/llvm

2019-11-28 Thread Joerg Sonnenberger
Module Name:src
Committed By:   joerg
Date:   Thu Nov 28 23:01:22 UTC 2019

Modified Files:
src/external/apache2/llvm: Makefile.inc

Log Message:
Use -fno-strict-aliasing unconditionally for the cross compiler.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/external/apache2/llvm/Makefile.inc

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/apache2/llvm/Makefile.inc
diff -u src/external/apache2/llvm/Makefile.inc:1.3 src/external/apache2/llvm/Makefile.inc:1.4
--- src/external/apache2/llvm/Makefile.inc:1.3	Mon Nov 18 19:54:23 2019
+++ src/external/apache2/llvm/Makefile.inc	Thu Nov 28 23:01:22 2019
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile.inc,v 1.3 2019/11/18 19:54:23 joerg Exp $
+#	$NetBSD: Makefile.inc,v 1.4 2019/11/28 23:01:22 joerg Exp $
 
 .if !defined(LLVM_TOPLEVEL_MK)
 LLVM_TOPLEVEL_MK=
@@ -28,7 +28,7 @@ CLANG_INCLUDE_CONFIG=	${LLVM_TOOLCONF_OB
 LLVM_INCLUDE_OBJDIR!=	cd ${NETBSDSRCDIR}/tools/llvm-include && ${PRINTOBJDIR}
 LLVM_TOOLCONF_OBJDIR!=	cd ${NETBSDSRCDIR}/tools/llvm && ${PRINTOBJDIR}
 HOST_CPPFLAGS+=	${CPPFLAGS}
-HOST_CXXFLAGS+=	-O2 -fno-rtti -fno-exceptions 
+HOST_CXXFLAGS+=	-O2 -fno-rtti -fno-exceptions -fno-strict-aliasing
 HOST_CPPFLAGS+=	-std=c++14
 LLVM_TARGETS=	x86,powerpc,sparc,aarch64,arm,mips
 .else



CVS commit: src/sys/arch/powerpc/oea

2019-11-27 Thread Joerg Sonnenberger
Module Name:src
Committed By:   joerg
Date:   Wed Nov 27 21:07:32 UTC 2019

Modified Files:
src/sys/arch/powerpc/oea: ofw_autoconf.c

Log Message:
Add a hack for qemu/macppc. OF_finddevice calls will crash depending on
the boot loader and kernel being used. This patch allows using
-prom-env qemu_boot_hack=y to disable the lookup.


To generate a diff of this commit:
cvs rdiff -u -r1.23 -r1.24 src/sys/arch/powerpc/oea/ofw_autoconf.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/arch/powerpc/oea

2019-11-27 Thread Joerg Sonnenberger
Module Name:src
Committed By:   joerg
Date:   Wed Nov 27 21:07:32 UTC 2019

Modified Files:
src/sys/arch/powerpc/oea: ofw_autoconf.c

Log Message:
Add a hack for qemu/macppc. OF_finddevice calls will crash depending on
the boot loader and kernel being used. This patch allows using
-prom-env qemu_boot_hack=y to disable the lookup.


To generate a diff of this commit:
cvs rdiff -u -r1.23 -r1.24 src/sys/arch/powerpc/oea/ofw_autoconf.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/powerpc/oea/ofw_autoconf.c
diff -u src/sys/arch/powerpc/oea/ofw_autoconf.c:1.23 src/sys/arch/powerpc/oea/ofw_autoconf.c:1.24
--- src/sys/arch/powerpc/oea/ofw_autoconf.c:1.23	Wed Nov 21 17:54:42 2018
+++ src/sys/arch/powerpc/oea/ofw_autoconf.c	Wed Nov 27 21:07:32 2019
@@ -1,4 +1,4 @@
-/* $NetBSD: ofw_autoconf.c,v 1.23 2018/11/21 17:54:42 scole Exp $ */
+/* $NetBSD: ofw_autoconf.c,v 1.24 2019/11/27 21:07:32 joerg Exp $ */
 /*
  * Copyright (C) 1995, 1996 Wolfgang Solfrank.
  * Copyright (C) 1995, 1996 TooLs GmbH.
@@ -31,7 +31,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: ofw_autoconf.c,v 1.23 2018/11/21 17:54:42 scole Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ofw_autoconf.c,v 1.24 2019/11/27 21:07:32 joerg Exp $");
 
 #ifdef ofppc
 #include "gtpci.h"
@@ -137,10 +137,17 @@ canonicalize_bootpath(void)
 	 *   /pci/mac-io/ata-3@2000/disk@0:0/netbsd.new		(OF-3.x)
 	 */
 	strcpy(cbootpath, bootpath);
-	while ((node = OF_finddevice(cbootpath)) == -1) {
-		if ((p = strrchr(cbootpath, '/')) == NULL)
-			break;
-		*p = '\0';
+
+	if ((node = OF_finddevice("/options")) == -1 ||
+	OF_getprop(node, "qemu_boot_hack", type, sizeof(type) - 1) == -1 ||
+	type[0] != 'y') {
+		while ((node = OF_finddevice(cbootpath)) == -1) {
+			if ((p = strrchr(cbootpath, '/')) == NULL)
+break;
+			*p = '\0';
+		}
+	} else {
+		node = -1;
 	}
 
 	printf("bootpath: %s\n", bootpath);



Re: CVS commit: src/lib/libc/tls

2019-11-22 Thread Joerg Sonnenberger
On Fri, Nov 22, 2019 at 08:53:25AM +0900, Takeshi Nakayama wrote:
> >>> Takeshi Nakayama  wrote
> 
> > >>> Joerg Sonnenberger  wrote
> > 
> > > On Thu, Nov 21, 2019 at 11:06:16PM +, Takeshi Nakayama wrote:
> > > > Module Name:src
> > > > Committed By:   nakayama
> > > > Date:   Thu Nov 21 23:06:16 UTC 2019
> > > > 
> > > > Modified Files:
> > > > src/lib/libc/tls: tls.c
> > > > 
> > > > Log Message:
> > > > Fix PR/54074 and PR/54093 completely.
> > > > 
> > > > More similar to the ld.elf_so logic, it is necessary to align with
> > > > p_align first.  Also, invert the #ifdef condition for consistency.
> > > 
> > > This commit just wastes space without reason.
> > 
> > No, without this commit the TLS offset calculation is mismatch if
> > alignof(max_align_t)) != p_align.
> 
> Ah, this is wrong.
> Correctly, the TLS offset calculation is mismatch with what ld(1)
> expected if p_memsz is not aligned with p_align.

For TLS variant I, it literally just adds padding at the end of the
allocation. For TLS variant II, it is redundant, because the rounding is
already done in with max_align_t. We do not support p_align > malloc
alignment and the patch is certainly nowhere near enough to change that.
It is actively harmful in that it can make people believe that it could
ever work.

Joerg


Re: CVS commit: src/lib/libc/tls

2019-11-21 Thread Joerg Sonnenberger
On Thu, Nov 21, 2019 at 11:06:16PM +, Takeshi Nakayama wrote:
> Module Name:  src
> Committed By: nakayama
> Date: Thu Nov 21 23:06:16 UTC 2019
> 
> Modified Files:
>   src/lib/libc/tls: tls.c
> 
> Log Message:
> Fix PR/54074 and PR/54093 completely.
> 
> More similar to the ld.elf_so logic, it is necessary to align with
> p_align first.  Also, invert the #ifdef condition for consistency.

This commit just wastes space without reason.

Joerg


CVS commit: src/distrib

2019-11-21 Thread Joerg Sonnenberger
Module Name:src
Committed By:   joerg
Date:   Thu Nov 21 22:29:03 UTC 2019

Modified Files:
src/distrib/amd64/uefi-installimage: Makefile Makefile.bootimage
Makefile.installimage
src/distrib/common/bootimage: Makefile.bootimage Makefile.installimage

Log Message:
Merge amd64's UEFI logic back into the generic bootimage handling.


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/distrib/amd64/uefi-installimage/Makefile
cvs rdiff -u -r1.12 -r1.13 \
src/distrib/amd64/uefi-installimage/Makefile.bootimage
cvs rdiff -u -r1.2 -r1.3 \
src/distrib/amd64/uefi-installimage/Makefile.installimage
cvs rdiff -u -r1.22 -r1.23 src/distrib/common/bootimage/Makefile.bootimage
cvs rdiff -u -r1.5 -r1.6 src/distrib/common/bootimage/Makefile.installimage

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/distrib

2019-11-21 Thread Joerg Sonnenberger
Module Name:src
Committed By:   joerg
Date:   Thu Nov 21 22:29:03 UTC 2019

Modified Files:
src/distrib/amd64/uefi-installimage: Makefile Makefile.bootimage
Makefile.installimage
src/distrib/common/bootimage: Makefile.bootimage Makefile.installimage

Log Message:
Merge amd64's UEFI logic back into the generic bootimage handling.


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/distrib/amd64/uefi-installimage/Makefile
cvs rdiff -u -r1.12 -r1.13 \
src/distrib/amd64/uefi-installimage/Makefile.bootimage
cvs rdiff -u -r1.2 -r1.3 \
src/distrib/amd64/uefi-installimage/Makefile.installimage
cvs rdiff -u -r1.22 -r1.23 src/distrib/common/bootimage/Makefile.bootimage
cvs rdiff -u -r1.5 -r1.6 src/distrib/common/bootimage/Makefile.installimage

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/distrib/amd64/uefi-installimage/Makefile
diff -u src/distrib/amd64/uefi-installimage/Makefile:1.6 src/distrib/amd64/uefi-installimage/Makefile:1.7
--- src/distrib/amd64/uefi-installimage/Makefile:1.6	Sat Dec 15 18:03:17 2018
+++ src/distrib/amd64/uefi-installimage/Makefile	Thu Nov 21 22:29:03 2019
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.6 2018/12/15 18:03:17 gson Exp $
+#	$NetBSD: Makefile,v 1.7 2019/11/21 22:29:03 joerg Exp $
 
 .include 
 
@@ -40,4 +40,4 @@ IMGFILE_EXTRA=\
 	${SYSINSTDIR}/sysinstmsgs.pl	.\
 	${SYSINSTDIR}/sysinst		.
 
-.include "${.CURDIR}/Makefile.installimage"
+.include "${NETBSDSRCDIR}/distrib/common/bootimage//Makefile.installimage"

Index: src/distrib/amd64/uefi-installimage/Makefile.bootimage
diff -u src/distrib/amd64/uefi-installimage/Makefile.bootimage:1.12 src/distrib/amd64/uefi-installimage/Makefile.bootimage:1.13
--- src/distrib/amd64/uefi-installimage/Makefile.bootimage:1.12	Wed Oct  2 11:15:59 2019
+++ src/distrib/amd64/uefi-installimage/Makefile.bootimage	Thu Nov 21 22:29:03 2019
@@ -1,500 +0,0 @@
-#	$NetBSD: Makefile.bootimage,v 1.12 2019/10/02 11:15:59 maya Exp $
-#
-# Copyright (c) 2009, 2010, 2011 Izumi Tsutsui.  All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions
-# are met:
-# 1. Redistributions of source code must retain the above copyright
-#notice, this list of conditions and the following disclaimer.
-# 2. Redistributions in binary form must reproduce the above copyright
-#notice, this list of conditions and the following disclaimer in the
-#documentation and/or other materials provided with the distribution.
-#
-# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
-# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
-# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
-# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
-# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
-# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
-# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-#
-# Makefile to create a bootable FS image for USB flash or emulators
-#
-
-#
-# Required variables:
-#	RELEASEDIR
-#		Should be defined in nbmake-${MACHINE}
-#	IMGBASE
-#		Basename of the image
-#
-# Optional variables:
-#	USE_MBR
-#		set yes if target disk image requires MBR partition
-#		(default: no)
-#	USE_GPT
-#		set yes if target disk image requires GPT partition
-#		(default: no)
-#	MBR_BOOTCODE
-#		optional MBR bootcode which should be installed by fdisk(8)
-#		(default: empty)
-#		- specified MBR_BOOTCODE must exist in ${DESTDIR}/usr/mdec
-#		- if MBR_BOOTCODE is not specified,
-#		  MBR_DEFAULT_BOOTCODE (default: mbr) will be used
-#		  if the target ${MACHINE} has the one in /usr/mdec
-#	USE_SUNLABEL
-#		set yes if target disk image requires Sun's label
-#		(default: no)
-#	INSTALLBOOT_AFTER_DISKLABEL (untested)
-#		set yes if the target ${MACHINE} requires disklabel
-#		to run installboot(8), like hp300
-#		(default: empty)
-#	IMAGEMB
-#		target image size in MB
-#		(default: 2048)
-#	SWAPMB
-#		swap size in target image in MB
-#		(default: 128)
-#	EFIMB
-#		EFI partition size in target image in MB
-#		(default: 128)
-#	KERN_SET
-#		kernel set name which should be extracted into image
-#		(default: kern-GENERIC)
-#	SETS
-#		binary sets that should be extracted into image
-#		(default: modules base etc comp games man misc rescue tests
-#			  text xbase xcomp xetc xfont xserver)
-#	SETS_DIR
-#		directory path where binary sets are stored
-#		(default: ${RELEASEDIR}/${RELEASEMACHINEDIR}/binary/sets)
-#	IMGFILE_EXTRA
-#		list of additional files to be copied 

CVS commit: src/external

2019-11-18 Thread Joerg Sonnenberger
Module Name:src
Committed By:   joerg
Date:   Mon Nov 18 22:26:15 UTC 2019

Modified Files:
src/external/apache2/llvm/librt: Makefile
src/external/mit/xorg/lib/gallium: Makefile
Added Files:
src/external/apache2/llvm/librt/libLLVMBitstreamReader: Makefile
src/external/apache2/llvm/librt/libLLVMDebugInfoDWARF: Makefile
src/external/apache2/llvm/librt/libLLVMDemangle: Makefile
src/external/apache2/llvm/librt/libLLVMMIRParser: Makefile
src/external/apache2/llvm/librt/libLLVMRemarks: Makefile
src/external/apache2/llvm/librt/libLLVMTextAPI: Makefile
src/external/apache2/llvm/librt/libLLVMTransformsCFGuard: Makefile

Log Message:
Build some more LLVM components for Gallium. Switch it to -Wl,-z,defs


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/external/apache2/llvm/librt/Makefile
cvs rdiff -u -r0 -r1.1 \
src/external/apache2/llvm/librt/libLLVMBitstreamReader/Makefile
cvs rdiff -u -r0 -r1.1 \
src/external/apache2/llvm/librt/libLLVMDebugInfoDWARF/Makefile
cvs rdiff -u -r0 -r1.1 \
src/external/apache2/llvm/librt/libLLVMDemangle/Makefile
cvs rdiff -u -r0 -r1.1 \
src/external/apache2/llvm/librt/libLLVMMIRParser/Makefile
cvs rdiff -u -r0 -r1.1 \
src/external/apache2/llvm/librt/libLLVMRemarks/Makefile
cvs rdiff -u -r0 -r1.1 \
src/external/apache2/llvm/librt/libLLVMTextAPI/Makefile
cvs rdiff -u -r0 -r1.1 \
src/external/apache2/llvm/librt/libLLVMTransformsCFGuard/Makefile
cvs rdiff -u -r1.37 -r1.38 src/external/mit/xorg/lib/gallium/Makefile

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/external

2019-11-18 Thread Joerg Sonnenberger
Module Name:src
Committed By:   joerg
Date:   Mon Nov 18 22:26:15 UTC 2019

Modified Files:
src/external/apache2/llvm/librt: Makefile
src/external/mit/xorg/lib/gallium: Makefile
Added Files:
src/external/apache2/llvm/librt/libLLVMBitstreamReader: Makefile
src/external/apache2/llvm/librt/libLLVMDebugInfoDWARF: Makefile
src/external/apache2/llvm/librt/libLLVMDemangle: Makefile
src/external/apache2/llvm/librt/libLLVMMIRParser: Makefile
src/external/apache2/llvm/librt/libLLVMRemarks: Makefile
src/external/apache2/llvm/librt/libLLVMTextAPI: Makefile
src/external/apache2/llvm/librt/libLLVMTransformsCFGuard: Makefile

Log Message:
Build some more LLVM components for Gallium. Switch it to -Wl,-z,defs


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/external/apache2/llvm/librt/Makefile
cvs rdiff -u -r0 -r1.1 \
src/external/apache2/llvm/librt/libLLVMBitstreamReader/Makefile
cvs rdiff -u -r0 -r1.1 \
src/external/apache2/llvm/librt/libLLVMDebugInfoDWARF/Makefile
cvs rdiff -u -r0 -r1.1 \
src/external/apache2/llvm/librt/libLLVMDemangle/Makefile
cvs rdiff -u -r0 -r1.1 \
src/external/apache2/llvm/librt/libLLVMMIRParser/Makefile
cvs rdiff -u -r0 -r1.1 \
src/external/apache2/llvm/librt/libLLVMRemarks/Makefile
cvs rdiff -u -r0 -r1.1 \
src/external/apache2/llvm/librt/libLLVMTextAPI/Makefile
cvs rdiff -u -r0 -r1.1 \
src/external/apache2/llvm/librt/libLLVMTransformsCFGuard/Makefile
cvs rdiff -u -r1.37 -r1.38 src/external/mit/xorg/lib/gallium/Makefile

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/apache2/llvm/librt/Makefile
diff -u src/external/apache2/llvm/librt/Makefile:1.1 src/external/apache2/llvm/librt/Makefile:1.2
--- src/external/apache2/llvm/librt/Makefile:1.1	Mon Nov 11 22:45:18 2019
+++ src/external/apache2/llvm/librt/Makefile	Mon Nov 18 22:26:14 2019
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.1 2019/11/11 22:45:18 joerg Exp $
+#	$NetBSD: Makefile,v 1.2 2019/11/18 22:26:14 joerg Exp $
 
 .include 
 
@@ -12,8 +12,11 @@ SUBDIR=	libLLVMAnalysis \
 	libLLVMAsmPrinter \
 	libLLVMBinaryFormat \
 	libLLVMBitReader \
+	libLLVMBitstreamReader \
 	libLLVMCodeGen \
+	libLLVMDemangle \
 	libLLVMDebugInfoCodeView \
+	libLLVMDebugInfoDWARF \
 	libLLVMExecutionEngine \
 	libLLVMGlobalISel \
 	libLLVMInstCombine \
@@ -26,15 +29,19 @@ SUBDIR=	libLLVMAnalysis \
 	libLLVMMCDisassembler \
 	libLLVMMCJIT \
 	libLLVMMCParser \
+	libLLVMMIRParser \
 	libLLVMObject \
 	libLLVMPasses \
 	libLLVMProfileData \
+	libLLVMRemarks \
 	libLLVMRuntimeDyld \
 	libLLVMScalarOpts \
 	libLLVMSelectionDAG \
 	libLLVMSupport \
 	libLLVMTarget \
+	libLLVMTextAPI \
 	libLLVMTransformsAggressiveInstCombine \
+	libLLVMTransformsCFGuard \
 	libLLVMTransformsCoroutines \
 	libLLVMTransformsUtils \
 	libLLVMVectorize

Index: src/external/mit/xorg/lib/gallium/Makefile
diff -u src/external/mit/xorg/lib/gallium/Makefile:1.37 src/external/mit/xorg/lib/gallium/Makefile:1.38
--- src/external/mit/xorg/lib/gallium/Makefile:1.37	Mon Nov 11 22:45:26 2019
+++ src/external/mit/xorg/lib/gallium/Makefile	Mon Nov 18 22:26:15 2019
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.37 2019/11/11 22:45:26 joerg Exp $
+# $NetBSD: Makefile,v 1.38 2019/11/18 22:26:15 joerg Exp $
 
 # Link the gallium mega driver.
 
@@ -1049,12 +1049,16 @@ LLVMRT_LIBS+=	\
 		SelectionDAG \
 		AsmPrinter \
 		CodeGen \
+		TransformsCFGuard \
 		Target \
 		InstCombine \
 		ScalarOpts \
 		DebugInfoCodeView \
+		DebugInfoDWARF \
 		Object \
 		BitReader \
+		TextAPI \
+		MIRParser \
 		MCParser \
 		MC \
 		ipo \
@@ -1066,16 +1070,19 @@ LLVMRT_LIBS+=	\
 		ProfileData \
 		Analysis \
 		IR \
+		Remarks \
+		BitstreamReader \
 		Linker \
 		BinaryFormat \
 		TransformsUtils \
-		Support
+		Support \
+		Demangle
 
 .include "${NETBSDSRCDIR}/external/apache2/llvm/link.mk"
 
 .endif  # ${BUILD_LLVM_PIPE} == 1 || ${BUILD_RADEON} == 1
 
-LDFLAGS+=	-Wl,--version-script=${X11SRCDIR.Mesa}/src/gallium/targets/dri/dri.sym
+LDFLAGS+=	-Wl,--version-script=${X11SRCDIR.Mesa}/src/gallium/targets/dri/dri.sym -Wl,-z,defs
 
 ##  build mesagallium parts
 MESA_SRC_MODULES=  main math vbo state_tracker program asm_s

Added files:

Index: src/external/apache2/llvm/librt/libLLVMBitstreamReader/Makefile
diff -u /dev/null src/external/apache2/llvm/librt/libLLVMBitstreamReader/Makefile:1.1
--- /dev/null	Mon Nov 18 22:26:15 2019
+++ src/external/apache2/llvm/librt/libLLVMBitstreamReader/Makefile	Mon Nov 18 22:26:14 2019
@@ -0,0 +1,3 @@
+#	$NetBSD: Makefile,v 1.1 2019/11/18 22:26:14 joerg Exp $
+
+.include 

Index: src/external/apache2/llvm/librt/libLLVMDebugInfoDWARF/Makefile
diff -u /dev/null src/external/apache2/llvm/librt/libLLVMDebugInfoDWARF/Makefile:1.1
--- /dev/null	Mon Nov 18 22:26:15 2019
+++ src/external/apache2/llvm/librt/libLLVMDebugInfoDWARF/Makefile	Mon Nov 18 22:26:14 2019
@@ -0,0 +1,3 @@
+#	$NetBSD: 

CVS commit: src/external/apache2/llvm

2019-11-18 Thread Joerg Sonnenberger
Module Name:src
Committed By:   joerg
Date:   Mon Nov 18 19:54:24 UTC 2019

Modified Files:
src/external/apache2/llvm: Makefile.inc
src/external/apache2/llvm/lib/libclangAST: Makefile

Log Message:
Use a big hammer and disabling strict aliasing for the tools build or
when using GCC.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/external/apache2/llvm/Makefile.inc
cvs rdiff -u -r1.2 -r1.3 src/external/apache2/llvm/lib/libclangAST/Makefile

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/apache2/llvm/Makefile.inc
diff -u src/external/apache2/llvm/Makefile.inc:1.2 src/external/apache2/llvm/Makefile.inc:1.3
--- src/external/apache2/llvm/Makefile.inc:1.2	Thu Nov 14 13:16:35 2019
+++ src/external/apache2/llvm/Makefile.inc	Mon Nov 18 19:54:23 2019
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile.inc,v 1.2 2019/11/14 13:16:35 martin Exp $
+#	$NetBSD: Makefile.inc,v 1.3 2019/11/18 19:54:23 joerg Exp $
 
 .if !defined(LLVM_TOPLEVEL_MK)
 LLVM_TOPLEVEL_MK=
@@ -28,7 +28,7 @@ CLANG_INCLUDE_CONFIG=	${LLVM_TOOLCONF_OB
 LLVM_INCLUDE_OBJDIR!=	cd ${NETBSDSRCDIR}/tools/llvm-include && ${PRINTOBJDIR}
 LLVM_TOOLCONF_OBJDIR!=	cd ${NETBSDSRCDIR}/tools/llvm && ${PRINTOBJDIR}
 HOST_CPPFLAGS+=	${CPPFLAGS}
-HOST_CXXFLAGS+=	-O2 -fno-rtti -fno-exceptions
+HOST_CXXFLAGS+=	-O2 -fno-rtti -fno-exceptions 
 HOST_CPPFLAGS+=	-std=c++14
 LLVM_TARGETS=	x86,powerpc,sparc,aarch64,arm,mips
 .else
@@ -38,7 +38,7 @@ LLVM_INCLUDE_OBJDIR!=	cd ${LLVM_TOPLEVEL
 LLVM_TARGETS=	x86,powerpc,sparc,aarch64,arm,mips,amdgpu
 
 CXXFLAGS+=	-std=c++14
-CXXFLAGS+=	-fno-rtti -fno-exceptions
+CXXFLAGS+=	-fno-rtti -fno-exceptions ${${ACTIVE_CC} == "gcc" :? -fno-strict-aliasing :}
 CXXFLAGS+=	-ffunction-sections -fdata-sections
 LDFLAGS+=	-Wl,--gc-sections
 DPADD+=		${LIBEXECINFO}

Index: src/external/apache2/llvm/lib/libclangAST/Makefile
diff -u src/external/apache2/llvm/lib/libclangAST/Makefile:1.2 src/external/apache2/llvm/lib/libclangAST/Makefile:1.3
--- src/external/apache2/llvm/lib/libclangAST/Makefile:1.2	Sat Nov 16 15:51:26 2019
+++ src/external/apache2/llvm/lib/libclangAST/Makefile	Mon Nov 18 19:54:23 2019
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.2 2019/11/16 15:51:26 joerg Exp $
+#	$NetBSD: Makefile,v 1.3 2019/11/18 19:54:23 joerg Exp $
 
 LIB=	clangAST
 
@@ -112,10 +112,6 @@ CLANG_TABLEGEN_OUTPUT= \
 
 .if defined(HOSTLIB)
 .include 
-BAD_GCC_VERSION!=	case `${HOST_CXX} --version 2> /dev/null` in [cg]++*7.4*) echo yes ;; *) echo no ;; esac
-.  if ${BAD_GCC_VERSION} == "yes"
-HOST_CXXFLAGS+=	-O0
-.  endif
 .else
 .include 
 .endif



CVS commit: src/external/apache2/llvm

2019-11-18 Thread Joerg Sonnenberger
Module Name:src
Committed By:   joerg
Date:   Mon Nov 18 19:54:24 UTC 2019

Modified Files:
src/external/apache2/llvm: Makefile.inc
src/external/apache2/llvm/lib/libclangAST: Makefile

Log Message:
Use a big hammer and disabling strict aliasing for the tools build or
when using GCC.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/external/apache2/llvm/Makefile.inc
cvs rdiff -u -r1.2 -r1.3 src/external/apache2/llvm/lib/libclangAST/Makefile

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/external/apache2/llvm/lib/libclangAST

2019-11-16 Thread Joerg Sonnenberger
Module Name:src
Committed By:   joerg
Date:   Sat Nov 16 15:51:26 UTC 2019

Modified Files:
src/external/apache2/llvm/lib/libclangAST: Makefile

Log Message:
Build libclangAST with -O1 when the host compiler is GCC 7 to avoid
miscompiles.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/external/apache2/llvm/lib/libclangAST/Makefile

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/external/apache2/llvm/lib/libclangAST

2019-11-16 Thread Joerg Sonnenberger
Module Name:src
Committed By:   joerg
Date:   Sat Nov 16 15:51:26 UTC 2019

Modified Files:
src/external/apache2/llvm/lib/libclangAST: Makefile

Log Message:
Build libclangAST with -O1 when the host compiler is GCC 7 to avoid
miscompiles.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/external/apache2/llvm/lib/libclangAST/Makefile

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/apache2/llvm/lib/libclangAST/Makefile
diff -u src/external/apache2/llvm/lib/libclangAST/Makefile:1.1 src/external/apache2/llvm/lib/libclangAST/Makefile:1.2
--- src/external/apache2/llvm/lib/libclangAST/Makefile:1.1	Mon Nov 11 22:45:14 2019
+++ src/external/apache2/llvm/lib/libclangAST/Makefile	Sat Nov 16 15:51:26 2019
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.1 2019/11/11 22:45:14 joerg Exp $
+#	$NetBSD: Makefile,v 1.2 2019/11/16 15:51:26 joerg Exp $
 
 LIB=	clangAST
 
@@ -112,6 +112,10 @@ CLANG_TABLEGEN_OUTPUT= \
 
 .if defined(HOSTLIB)
 .include 
+BAD_GCC_VERSION!=	case `${HOST_CXX} --version 2> /dev/null` in [cg]++*7.4*) echo yes ;; *) echo no ;; esac
+.  if ${BAD_GCC_VERSION} == "yes"
+HOST_CXXFLAGS+=	-O0
+.  endif
 .else
 .include 
 .endif



CVS commit: src/usr.sbin/sysinst

2019-11-16 Thread Joerg Sonnenberger
Module Name:src
Committed By:   joerg
Date:   Sat Nov 16 15:50:46 UTC 2019

Modified Files:
src/usr.sbin/sysinst: part_edit.c

Log Message:
Drop unused variable.


To generate a diff of this commit:
cvs rdiff -u -r1.12 -r1.13 src/usr.sbin/sysinst/part_edit.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/usr.sbin/sysinst/part_edit.c
diff -u src/usr.sbin/sysinst/part_edit.c:1.12 src/usr.sbin/sysinst/part_edit.c:1.13
--- src/usr.sbin/sysinst/part_edit.c:1.12	Wed Nov 13 18:57:26 2019
+++ src/usr.sbin/sysinst/part_edit.c	Sat Nov 16 15:50:45 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: part_edit.c,v 1.12 2019/11/13 18:57:26 martin Exp $ */
+/*	$NetBSD: part_edit.c,v 1.13 2019/11/16 15:50:45 joerg Exp $ */
 
 /*
  * Copyright (c) 2019 The NetBSD Foundation, Inc.
@@ -462,7 +462,7 @@ add_part_clone(menudesc *menu, void *arg
 	struct disk_partitions *csrc;
 	struct disk_part_free_space space;
 	daddr_t offset, align;
-	size_t s, clone_cnt;
+	size_t s;
 	part_id cid;
 	struct selected_partitions selected;
 	struct single_clone_data *new_clones;
@@ -543,7 +543,6 @@ add_part_clone(menudesc *menu, void *arg
 		if (cid == NO_PART)
 			continue;
 		parts->pscheme->get_part_info(parts, cid, );
-			clone_cnt++;
 		offset = rounddown(cinfo.start+cinfo.size+align, align);
 	}
 



CVS commit: src/usr.sbin/sysinst

2019-11-16 Thread Joerg Sonnenberger
Module Name:src
Committed By:   joerg
Date:   Sat Nov 16 15:50:46 UTC 2019

Modified Files:
src/usr.sbin/sysinst: part_edit.c

Log Message:
Drop unused variable.


To generate a diff of this commit:
cvs rdiff -u -r1.12 -r1.13 src/usr.sbin/sysinst/part_edit.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: [LLVM] src/external/bsd/llvm/dist/clang

2019-11-13 Thread Joerg Sonnenberger
Module Name:src
Committed By:   joerg
Date:   Wed Nov 13 22:34:11 UTC 2019

Removed Files:
src/external/bsd/llvm/dist/clang/test/ARCMT/Inputs/with space [LLVM]:
test.h test.h.result test1.m.in test1.m.in.result test2.m.in
test2.m.in.result

src/external/bsd/llvm/dist/clang/test/Driver/Inputs/CUDA-windows/Program 
Files/NVIDIA GPU Computing Toolkit/CUDA/v8.0/bin [LLVM]:
.keep

src/external/bsd/llvm/dist/clang/test/Driver/Inputs/CUDA-windows/Program 
Files/NVIDIA GPU Computing Toolkit/CUDA/v8.0/include [LLVM]:
.keep

src/external/bsd/llvm/dist/clang/test/Driver/Inputs/CUDA-windows/Program 
Files/NVIDIA GPU Computing Toolkit/CUDA/v8.0/lib [LLVM]:
.keep

src/external/bsd/llvm/dist/clang/test/Driver/Inputs/CUDA-windows/Program 
Files/NVIDIA GPU Computing Toolkit/CUDA/v8.0/nvvm/libdevice [LLVM]:
libdevice.compute_30.10.bc libdevice.compute_35.10.bc
src/external/bsd/llvm/dist/clang/www/demo [LLVM]:
what is this directory.txt

Log Message:
Mark old LLVM instance as dead.


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.1 -r0 \
src/external/bsd/llvm/dist/clang/test/ARCMT/Inputs/with\ space/test.h \
src/external/bsd/llvm/dist/clang/test/ARCMT/Inputs/with\ 
space/test.h.result \
src/external/bsd/llvm/dist/clang/test/ARCMT/Inputs/with\ space/test1.m.in \
src/external/bsd/llvm/dist/clang/test/ARCMT/Inputs/with\ 
space/test1.m.in.result \
src/external/bsd/llvm/dist/clang/test/ARCMT/Inputs/with\ space/test2.m.in \
src/external/bsd/llvm/dist/clang/test/ARCMT/Inputs/with\ 
space/test2.m.in.result
cvs rdiff -u -r1.1.1.1 -r0 \
src/external/bsd/llvm/dist/clang/test/Driver/Inputs/CUDA-windows/Program\ 
Files/NVIDIA\ GPU\ Computing\ Toolkit/CUDA/v8.0/bin/.keep
cvs rdiff -u -r1.1.1.1 -r0 \
src/external/bsd/llvm/dist/clang/test/Driver/Inputs/CUDA-windows/Program\ 
Files/NVIDIA\ GPU\ Computing\ Toolkit/CUDA/v8.0/include/.keep
cvs rdiff -u -r1.1.1.1 -r0 \
src/external/bsd/llvm/dist/clang/test/Driver/Inputs/CUDA-windows/Program\ 
Files/NVIDIA\ GPU\ Computing\ Toolkit/CUDA/v8.0/lib/.keep
cvs rdiff -u -r1.1.1.1 -r0 \
src/external/bsd/llvm/dist/clang/test/Driver/Inputs/CUDA-windows/Program\ 
Files/NVIDIA\ GPU\ Computing\ 
Toolkit/CUDA/v8.0/nvvm/libdevice/libdevice.compute_30.10.bc \
src/external/bsd/llvm/dist/clang/test/Driver/Inputs/CUDA-windows/Program\ 
Files/NVIDIA\ GPU\ Computing\ 
Toolkit/CUDA/v8.0/nvvm/libdevice/libdevice.compute_35.10.bc
cvs rdiff -u -r1.1.1.1 -r0 \
src/external/bsd/llvm/dist/clang/www/demo/what\ is\ this\ directory.txt

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/share/mk

2019-11-13 Thread Joerg Sonnenberger
Module Name:src
Committed By:   joerg
Date:   Wed Nov 13 22:32:16 UTC 2019

Modified Files:
src/share/mk: bsd.own.mk

Log Message:
Restore pax-as-tar.


To generate a diff of this commit:
cvs rdiff -u -r1.1159 -r1.1160 src/share/mk/bsd.own.mk

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/share/mk/bsd.own.mk
diff -u src/share/mk/bsd.own.mk:1.1159 src/share/mk/bsd.own.mk:1.1160
--- src/share/mk/bsd.own.mk:1.1159	Thu Oct 31 06:43:19 2019
+++ src/share/mk/bsd.own.mk	Wed Nov 13 22:32:16 2019
@@ -1,4 +1,4 @@
-#	$NetBSD: bsd.own.mk,v 1.1159 2019/10/31 06:43:19 martin Exp $
+#	$NetBSD: bsd.own.mk,v 1.1160 2019/11/13 22:32:16 joerg Exp $
 
 # This needs to be before bsd.init.mk
 .if defined(BSD_MK_COMPAT_FILE)
@@ -1073,7 +1073,6 @@ MKSTATICPIE?=	no
 _MKVARS.yes= \
 	MKATF \
 	MKBINUTILS \
-	MKBSDTAR \
 	MKCOMPLEX MKCVS MKCXX \
 	MKDOC MKDTC \
 	MKDYNAMICROOT \
@@ -1197,6 +1196,7 @@ _MKVARS.no= \
 	MKARGON2 \
 	MKARZERO \
 	MKBSDGREP \
+	MKBSDTAR \
 	MKCATPAGES MKCOMPATTESTS MKCOMPATX11 MKCTF \
 	MKDEBUG MKDEBUGLIB MKDTRACE \
 	MKEXTSRC \



CVS commit: src/external/bsd/llvm/dist/llvm-configure

2019-11-13 Thread Joerg Sonnenberger
Module Name:src
Committed By:   joerg
Date:   Wed Nov 13 22:34:50 UTC 2019

Removed Files:
src/external/bsd/llvm/dist/llvm-configure: configure run-autoconf
src/external/bsd/llvm/dist/llvm-configure/autoconf: AutoRegen.sh
ExportMap.map LICENSE.TXT README.TXT aclocal.m4 config.guess
config.sub configure.ac install-sh missing mkinstalldirs
src/external/bsd/llvm/dist/llvm-configure/autoconf/m4: build_exeext.m4
c_printf_a.m4 check_gnu_make.m4 config_makefile.m4
config_project.m4 cxx_flag_check.m4 define_subst.m4
find_std_program.m4 func_mmap_file.m4 header_mmap_anonymous.m4
huge_val.m4 link_options.m4 linux_mixed_64_32.m4
need_dev_zero_for_mmap.m4 sanity_check.m4 single_cxx_check.m4
visibility_inlines_hidden.m4
src/external/bsd/llvm/dist/llvm-configure/include/clang/Config:
config.h.in
src/external/bsd/llvm/dist/llvm-configure/include/llvm/Config:
AsmParsers.def.in AsmPrinters.def.in Disassemblers.def.in
Targets.def.in abi-breaking.h.in config.h.in llvm-config.h.in
src/external/bsd/llvm/dist/llvm-configure/include/llvm/Support:
DataTypes.h.in

Log Message:
Mark old LLVM instance as dead.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r0 src/external/bsd/llvm/dist/llvm-configure/configure
cvs rdiff -u -r1.1 -r0 src/external/bsd/llvm/dist/llvm-configure/run-autoconf
cvs rdiff -u -r1.1 -r0 \
src/external/bsd/llvm/dist/llvm-configure/autoconf/AutoRegen.sh \
src/external/bsd/llvm/dist/llvm-configure/autoconf/ExportMap.map \
src/external/bsd/llvm/dist/llvm-configure/autoconf/LICENSE.TXT \
src/external/bsd/llvm/dist/llvm-configure/autoconf/README.TXT \
src/external/bsd/llvm/dist/llvm-configure/autoconf/aclocal.m4 \
src/external/bsd/llvm/dist/llvm-configure/autoconf/config.guess \
src/external/bsd/llvm/dist/llvm-configure/autoconf/config.sub \
src/external/bsd/llvm/dist/llvm-configure/autoconf/install-sh \
src/external/bsd/llvm/dist/llvm-configure/autoconf/missing \
src/external/bsd/llvm/dist/llvm-configure/autoconf/mkinstalldirs
cvs rdiff -u -r1.2 -r0 \
src/external/bsd/llvm/dist/llvm-configure/autoconf/configure.ac
cvs rdiff -u -r1.1 -r0 \
src/external/bsd/llvm/dist/llvm-configure/autoconf/m4/build_exeext.m4 \
src/external/bsd/llvm/dist/llvm-configure/autoconf/m4/c_printf_a.m4 \
src/external/bsd/llvm/dist/llvm-configure/autoconf/m4/check_gnu_make.m4 \
src/external/bsd/llvm/dist/llvm-configure/autoconf/m4/config_makefile.m4 \
src/external/bsd/llvm/dist/llvm-configure/autoconf/m4/config_project.m4 \
src/external/bsd/llvm/dist/llvm-configure/autoconf/m4/cxx_flag_check.m4 \
src/external/bsd/llvm/dist/llvm-configure/autoconf/m4/define_subst.m4 \
src/external/bsd/llvm/dist/llvm-configure/autoconf/m4/find_std_program.m4 \
src/external/bsd/llvm/dist/llvm-configure/autoconf/m4/func_mmap_file.m4 \

src/external/bsd/llvm/dist/llvm-configure/autoconf/m4/header_mmap_anonymous.m4 \
src/external/bsd/llvm/dist/llvm-configure/autoconf/m4/huge_val.m4 \
src/external/bsd/llvm/dist/llvm-configure/autoconf/m4/link_options.m4 \
src/external/bsd/llvm/dist/llvm-configure/autoconf/m4/linux_mixed_64_32.m4 \

src/external/bsd/llvm/dist/llvm-configure/autoconf/m4/need_dev_zero_for_mmap.m4 
\
src/external/bsd/llvm/dist/llvm-configure/autoconf/m4/sanity_check.m4 \
src/external/bsd/llvm/dist/llvm-configure/autoconf/m4/single_cxx_check.m4 \

src/external/bsd/llvm/dist/llvm-configure/autoconf/m4/visibility_inlines_hidden.m4
cvs rdiff -u -r1.1 -r0 \
src/external/bsd/llvm/dist/llvm-configure/include/clang/Config/config.h.in
cvs rdiff -u -r1.1 -r0 \

src/external/bsd/llvm/dist/llvm-configure/include/llvm/Config/AsmParsers.def.in 
\

src/external/bsd/llvm/dist/llvm-configure/include/llvm/Config/AsmPrinters.def.in
 \

src/external/bsd/llvm/dist/llvm-configure/include/llvm/Config/Disassemblers.def.in
 \

src/external/bsd/llvm/dist/llvm-configure/include/llvm/Config/Targets.def.in \

src/external/bsd/llvm/dist/llvm-configure/include/llvm/Config/abi-breaking.h.in 
\

src/external/bsd/llvm/dist/llvm-configure/include/llvm/Config/llvm-config.h.in
cvs rdiff -u -r1.2 -r0 \
src/external/bsd/llvm/dist/llvm-configure/include/llvm/Config/config.h.in
cvs rdiff -u -r1.1 -r0 \

src/external/bsd/llvm/dist/llvm-configure/include/llvm/Support/DataTypes.h.in

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/external/bsd/llvm/dist/llvm-configure

2019-11-13 Thread Joerg Sonnenberger
Module Name:src
Committed By:   joerg
Date:   Wed Nov 13 22:34:50 UTC 2019

Removed Files:
src/external/bsd/llvm/dist/llvm-configure: configure run-autoconf
src/external/bsd/llvm/dist/llvm-configure/autoconf: AutoRegen.sh
ExportMap.map LICENSE.TXT README.TXT aclocal.m4 config.guess
config.sub configure.ac install-sh missing mkinstalldirs
src/external/bsd/llvm/dist/llvm-configure/autoconf/m4: build_exeext.m4
c_printf_a.m4 check_gnu_make.m4 config_makefile.m4
config_project.m4 cxx_flag_check.m4 define_subst.m4
find_std_program.m4 func_mmap_file.m4 header_mmap_anonymous.m4
huge_val.m4 link_options.m4 linux_mixed_64_32.m4
need_dev_zero_for_mmap.m4 sanity_check.m4 single_cxx_check.m4
visibility_inlines_hidden.m4
src/external/bsd/llvm/dist/llvm-configure/include/clang/Config:
config.h.in
src/external/bsd/llvm/dist/llvm-configure/include/llvm/Config:
AsmParsers.def.in AsmPrinters.def.in Disassemblers.def.in
Targets.def.in abi-breaking.h.in config.h.in llvm-config.h.in
src/external/bsd/llvm/dist/llvm-configure/include/llvm/Support:
DataTypes.h.in

Log Message:
Mark old LLVM instance as dead.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r0 src/external/bsd/llvm/dist/llvm-configure/configure
cvs rdiff -u -r1.1 -r0 src/external/bsd/llvm/dist/llvm-configure/run-autoconf
cvs rdiff -u -r1.1 -r0 \
src/external/bsd/llvm/dist/llvm-configure/autoconf/AutoRegen.sh \
src/external/bsd/llvm/dist/llvm-configure/autoconf/ExportMap.map \
src/external/bsd/llvm/dist/llvm-configure/autoconf/LICENSE.TXT \
src/external/bsd/llvm/dist/llvm-configure/autoconf/README.TXT \
src/external/bsd/llvm/dist/llvm-configure/autoconf/aclocal.m4 \
src/external/bsd/llvm/dist/llvm-configure/autoconf/config.guess \
src/external/bsd/llvm/dist/llvm-configure/autoconf/config.sub \
src/external/bsd/llvm/dist/llvm-configure/autoconf/install-sh \
src/external/bsd/llvm/dist/llvm-configure/autoconf/missing \
src/external/bsd/llvm/dist/llvm-configure/autoconf/mkinstalldirs
cvs rdiff -u -r1.2 -r0 \
src/external/bsd/llvm/dist/llvm-configure/autoconf/configure.ac
cvs rdiff -u -r1.1 -r0 \
src/external/bsd/llvm/dist/llvm-configure/autoconf/m4/build_exeext.m4 \
src/external/bsd/llvm/dist/llvm-configure/autoconf/m4/c_printf_a.m4 \
src/external/bsd/llvm/dist/llvm-configure/autoconf/m4/check_gnu_make.m4 \
src/external/bsd/llvm/dist/llvm-configure/autoconf/m4/config_makefile.m4 \
src/external/bsd/llvm/dist/llvm-configure/autoconf/m4/config_project.m4 \
src/external/bsd/llvm/dist/llvm-configure/autoconf/m4/cxx_flag_check.m4 \
src/external/bsd/llvm/dist/llvm-configure/autoconf/m4/define_subst.m4 \
src/external/bsd/llvm/dist/llvm-configure/autoconf/m4/find_std_program.m4 \
src/external/bsd/llvm/dist/llvm-configure/autoconf/m4/func_mmap_file.m4 \

src/external/bsd/llvm/dist/llvm-configure/autoconf/m4/header_mmap_anonymous.m4 \
src/external/bsd/llvm/dist/llvm-configure/autoconf/m4/huge_val.m4 \
src/external/bsd/llvm/dist/llvm-configure/autoconf/m4/link_options.m4 \
src/external/bsd/llvm/dist/llvm-configure/autoconf/m4/linux_mixed_64_32.m4 \

src/external/bsd/llvm/dist/llvm-configure/autoconf/m4/need_dev_zero_for_mmap.m4 
\
src/external/bsd/llvm/dist/llvm-configure/autoconf/m4/sanity_check.m4 \
src/external/bsd/llvm/dist/llvm-configure/autoconf/m4/single_cxx_check.m4 \

src/external/bsd/llvm/dist/llvm-configure/autoconf/m4/visibility_inlines_hidden.m4
cvs rdiff -u -r1.1 -r0 \
src/external/bsd/llvm/dist/llvm-configure/include/clang/Config/config.h.in
cvs rdiff -u -r1.1 -r0 \

src/external/bsd/llvm/dist/llvm-configure/include/llvm/Config/AsmParsers.def.in 
\

src/external/bsd/llvm/dist/llvm-configure/include/llvm/Config/AsmPrinters.def.in
 \

src/external/bsd/llvm/dist/llvm-configure/include/llvm/Config/Disassemblers.def.in
 \

src/external/bsd/llvm/dist/llvm-configure/include/llvm/Config/Targets.def.in \

src/external/bsd/llvm/dist/llvm-configure/include/llvm/Config/abi-breaking.h.in 
\

src/external/bsd/llvm/dist/llvm-configure/include/llvm/Config/llvm-config.h.in
cvs rdiff -u -r1.2 -r0 \
src/external/bsd/llvm/dist/llvm-configure/include/llvm/Config/config.h.in
cvs rdiff -u -r1.1 -r0 \

src/external/bsd/llvm/dist/llvm-configure/include/llvm/Support/DataTypes.h.in

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/share/mk

2019-11-13 Thread Joerg Sonnenberger
Module Name:src
Committed By:   joerg
Date:   Wed Nov 13 22:32:16 UTC 2019

Modified Files:
src/share/mk: bsd.own.mk

Log Message:
Restore pax-as-tar.


To generate a diff of this commit:
cvs rdiff -u -r1.1159 -r1.1160 src/share/mk/bsd.own.mk

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/external/bsd/llvm

2019-11-13 Thread Joerg Sonnenberger
Module Name:src
Committed By:   joerg
Date:   Wed Nov 13 22:04:10 UTC 2019

Removed Files:
src/external/bsd/llvm: Makefile Makefile.inc link.mk tablegen.mk
src/external/bsd/llvm/bin: Makefile Makefile.inc
src/external/bsd/llvm/bin/bugpoint: Makefile
src/external/bsd/llvm/bin/clang: Makefile
src/external/bsd/llvm/bin/clang-format: Makefile
src/external/bsd/llvm/bin/clang-rename: Makefile
src/external/bsd/llvm/bin/clang-tblgen: Makefile
src/external/bsd/llvm/bin/llc: Makefile
src/external/bsd/llvm/bin/lld: Makefile
src/external/bsd/llvm/bin/lldb: Makefile
src/external/bsd/llvm/bin/lli: Makefile
src/external/bsd/llvm/bin/llvm-ar: Makefile
src/external/bsd/llvm/bin/llvm-as: Makefile
src/external/bsd/llvm/bin/llvm-bcanalyzer: Makefile
src/external/bsd/llvm/bin/llvm-cov: Makefile
src/external/bsd/llvm/bin/llvm-cxxdump: Makefile
src/external/bsd/llvm/bin/llvm-cxxfilt: Makefile
src/external/bsd/llvm/bin/llvm-diff: Makefile
src/external/bsd/llvm/bin/llvm-dis: Makefile
src/external/bsd/llvm/bin/llvm-dwarfdump: Makefile
src/external/bsd/llvm/bin/llvm-dwp: Makefile
src/external/bsd/llvm/bin/llvm-extract: Makefile
src/external/bsd/llvm/bin/llvm-link: Makefile
src/external/bsd/llvm/bin/llvm-mc: Makefile
src/external/bsd/llvm/bin/llvm-mcld: Makefile
src/external/bsd/llvm/bin/llvm-nm: Makefile
src/external/bsd/llvm/bin/llvm-objcopy: Makefile
src/external/bsd/llvm/bin/llvm-objdump: Makefile
src/external/bsd/llvm/bin/llvm-profdata: Makefile
src/external/bsd/llvm/bin/llvm-readobj: Makefile
src/external/bsd/llvm/bin/llvm-size: Makefile
src/external/bsd/llvm/bin/llvm-strings: Makefile
src/external/bsd/llvm/bin/llvm-symbolizer: Makefile
src/external/bsd/llvm/bin/llvm-xray: Makefile
src/external/bsd/llvm/bin/opt: Makefile
src/external/bsd/llvm/bin/sancov: Makefile
src/external/bsd/llvm/bin/sanstats: Makefile
src/external/bsd/llvm/bin/tblgen: Makefile
src/external/bsd/llvm/config/clang/Config: config.h
src/external/bsd/llvm/config/llvm/Config: AsmParsers.def
AsmPrinters.def Disassemblers.def Targets.def abi-breaking.h
config.h.in llvm-config.h.in
src/external/bsd/llvm/config/llvm/Support: DataTypes.h
src/external/bsd/llvm/config/mclinker/mcld/Config: Config.h Linkers.def
Targets.def
src/external/bsd/llvm/include: Makefile Makefile.inc
src/external/bsd/llvm/lib: Makefile Makefile.inc
src/external/bsd/llvm/lib/libLLVMAArch64AsmParser: Makefile
src/external/bsd/llvm/lib/libLLVMAArch64AsmPrinter: Makefile
src/external/bsd/llvm/lib/libLLVMAArch64CodeGen: Makefile
src/external/bsd/llvm/lib/libLLVMAArch64Disassembler: Makefile
src/external/bsd/llvm/lib/libLLVMAArch64MCTargetDesc: Makefile
src/external/bsd/llvm/lib/libLLVMAArch64TargetInfo: Makefile
src/external/bsd/llvm/lib/libLLVMAArch64Utils: Makefile
src/external/bsd/llvm/lib/libLLVMAMDGPUAsmParser: Makefile
src/external/bsd/llvm/lib/libLLVMAMDGPUAsmPrinter: Makefile
src/external/bsd/llvm/lib/libLLVMAMDGPUCodeGen: Makefile
src/external/bsd/llvm/lib/libLLVMAMDGPUDisassembler: Makefile
src/external/bsd/llvm/lib/libLLVMAMDGPUMCTargetDesc: Makefile
src/external/bsd/llvm/lib/libLLVMAMDGPUTargetInfo: Makefile
src/external/bsd/llvm/lib/libLLVMAMDGPUUtils: Makefile
src/external/bsd/llvm/lib/libLLVMARMAsmParser: Makefile
src/external/bsd/llvm/lib/libLLVMARMAsmPrinter: Makefile
src/external/bsd/llvm/lib/libLLVMARMCodeGen: Makefile
src/external/bsd/llvm/lib/libLLVMARMDisassembler: Makefile
src/external/bsd/llvm/lib/libLLVMARMMCTargetDesc: Makefile
src/external/bsd/llvm/lib/libLLVMARMTargetInfo: Makefile
src/external/bsd/llvm/lib/libLLVMARMUtils: Makefile
src/external/bsd/llvm/lib/libLLVMAnalysis: Makefile
src/external/bsd/llvm/lib/libLLVMArchive: Makefile
src/external/bsd/llvm/lib/libLLVMAsmParser: Makefile
src/external/bsd/llvm/lib/libLLVMAsmPrinter: Makefile
src/external/bsd/llvm/lib/libLLVMBinaryFormat: Makefile
src/external/bsd/llvm/lib/libLLVMBitReader: Makefile
src/external/bsd/llvm/lib/libLLVMBitWriter: Makefile
src/external/bsd/llvm/lib/libLLVMCodeGen: Makefile
src/external/bsd/llvm/lib/libLLVMDebugInfoCodeView: Makefile
src/external/bsd/llvm/lib/libLLVMDebugInfoDWARF: Makefile
src/external/bsd/llvm/lib/libLLVMDebugInfoMSF: Makefile
src/external/bsd/llvm/lib/libLLVMDebugInfoPDB: Makefile
src/external/bsd/llvm/lib/libLLVMDebugInfoPDBDIA: Makefile
src/external/bsd/llvm/lib/libLLVMDebugInfoPDBNative: Makefile

CVS commit: src/external/bsd/llvm

2019-11-13 Thread Joerg Sonnenberger
Module Name:src
Committed By:   joerg
Date:   Wed Nov 13 22:04:10 UTC 2019

Removed Files:
src/external/bsd/llvm: Makefile Makefile.inc link.mk tablegen.mk
src/external/bsd/llvm/bin: Makefile Makefile.inc
src/external/bsd/llvm/bin/bugpoint: Makefile
src/external/bsd/llvm/bin/clang: Makefile
src/external/bsd/llvm/bin/clang-format: Makefile
src/external/bsd/llvm/bin/clang-rename: Makefile
src/external/bsd/llvm/bin/clang-tblgen: Makefile
src/external/bsd/llvm/bin/llc: Makefile
src/external/bsd/llvm/bin/lld: Makefile
src/external/bsd/llvm/bin/lldb: Makefile
src/external/bsd/llvm/bin/lli: Makefile
src/external/bsd/llvm/bin/llvm-ar: Makefile
src/external/bsd/llvm/bin/llvm-as: Makefile
src/external/bsd/llvm/bin/llvm-bcanalyzer: Makefile
src/external/bsd/llvm/bin/llvm-cov: Makefile
src/external/bsd/llvm/bin/llvm-cxxdump: Makefile
src/external/bsd/llvm/bin/llvm-cxxfilt: Makefile
src/external/bsd/llvm/bin/llvm-diff: Makefile
src/external/bsd/llvm/bin/llvm-dis: Makefile
src/external/bsd/llvm/bin/llvm-dwarfdump: Makefile
src/external/bsd/llvm/bin/llvm-dwp: Makefile
src/external/bsd/llvm/bin/llvm-extract: Makefile
src/external/bsd/llvm/bin/llvm-link: Makefile
src/external/bsd/llvm/bin/llvm-mc: Makefile
src/external/bsd/llvm/bin/llvm-mcld: Makefile
src/external/bsd/llvm/bin/llvm-nm: Makefile
src/external/bsd/llvm/bin/llvm-objcopy: Makefile
src/external/bsd/llvm/bin/llvm-objdump: Makefile
src/external/bsd/llvm/bin/llvm-profdata: Makefile
src/external/bsd/llvm/bin/llvm-readobj: Makefile
src/external/bsd/llvm/bin/llvm-size: Makefile
src/external/bsd/llvm/bin/llvm-strings: Makefile
src/external/bsd/llvm/bin/llvm-symbolizer: Makefile
src/external/bsd/llvm/bin/llvm-xray: Makefile
src/external/bsd/llvm/bin/opt: Makefile
src/external/bsd/llvm/bin/sancov: Makefile
src/external/bsd/llvm/bin/sanstats: Makefile
src/external/bsd/llvm/bin/tblgen: Makefile
src/external/bsd/llvm/config/clang/Config: config.h
src/external/bsd/llvm/config/llvm/Config: AsmParsers.def
AsmPrinters.def Disassemblers.def Targets.def abi-breaking.h
config.h.in llvm-config.h.in
src/external/bsd/llvm/config/llvm/Support: DataTypes.h
src/external/bsd/llvm/config/mclinker/mcld/Config: Config.h Linkers.def
Targets.def
src/external/bsd/llvm/include: Makefile Makefile.inc
src/external/bsd/llvm/lib: Makefile Makefile.inc
src/external/bsd/llvm/lib/libLLVMAArch64AsmParser: Makefile
src/external/bsd/llvm/lib/libLLVMAArch64AsmPrinter: Makefile
src/external/bsd/llvm/lib/libLLVMAArch64CodeGen: Makefile
src/external/bsd/llvm/lib/libLLVMAArch64Disassembler: Makefile
src/external/bsd/llvm/lib/libLLVMAArch64MCTargetDesc: Makefile
src/external/bsd/llvm/lib/libLLVMAArch64TargetInfo: Makefile
src/external/bsd/llvm/lib/libLLVMAArch64Utils: Makefile
src/external/bsd/llvm/lib/libLLVMAMDGPUAsmParser: Makefile
src/external/bsd/llvm/lib/libLLVMAMDGPUAsmPrinter: Makefile
src/external/bsd/llvm/lib/libLLVMAMDGPUCodeGen: Makefile
src/external/bsd/llvm/lib/libLLVMAMDGPUDisassembler: Makefile
src/external/bsd/llvm/lib/libLLVMAMDGPUMCTargetDesc: Makefile
src/external/bsd/llvm/lib/libLLVMAMDGPUTargetInfo: Makefile
src/external/bsd/llvm/lib/libLLVMAMDGPUUtils: Makefile
src/external/bsd/llvm/lib/libLLVMARMAsmParser: Makefile
src/external/bsd/llvm/lib/libLLVMARMAsmPrinter: Makefile
src/external/bsd/llvm/lib/libLLVMARMCodeGen: Makefile
src/external/bsd/llvm/lib/libLLVMARMDisassembler: Makefile
src/external/bsd/llvm/lib/libLLVMARMMCTargetDesc: Makefile
src/external/bsd/llvm/lib/libLLVMARMTargetInfo: Makefile
src/external/bsd/llvm/lib/libLLVMARMUtils: Makefile
src/external/bsd/llvm/lib/libLLVMAnalysis: Makefile
src/external/bsd/llvm/lib/libLLVMArchive: Makefile
src/external/bsd/llvm/lib/libLLVMAsmParser: Makefile
src/external/bsd/llvm/lib/libLLVMAsmPrinter: Makefile
src/external/bsd/llvm/lib/libLLVMBinaryFormat: Makefile
src/external/bsd/llvm/lib/libLLVMBitReader: Makefile
src/external/bsd/llvm/lib/libLLVMBitWriter: Makefile
src/external/bsd/llvm/lib/libLLVMCodeGen: Makefile
src/external/bsd/llvm/lib/libLLVMDebugInfoCodeView: Makefile
src/external/bsd/llvm/lib/libLLVMDebugInfoDWARF: Makefile
src/external/bsd/llvm/lib/libLLVMDebugInfoMSF: Makefile
src/external/bsd/llvm/lib/libLLVMDebugInfoPDB: Makefile
src/external/bsd/llvm/lib/libLLVMDebugInfoPDBDIA: Makefile
src/external/bsd/llvm/lib/libLLVMDebugInfoPDBNative: Makefile

Re: CVS commit: src [llvm]

2019-11-13 Thread Joerg Sonnenberger
On Wed, Nov 13, 2019 at 01:25:19PM +0100, Thomas Klausner wrote:
> On Wed, Nov 13, 2019 at 12:30:52PM +0100, Tobias Nygren wrote:
> > On Wed, 13 Nov 2019 10:29:52 +0100
> > Maxime Villard  wrote:
> > 
> > > Am I the only one seeing this? It's hard to blame the configuration when 
> > > the
> > > failure is seen on several hardware and several OSes.
> > 
> > FWIW I'm typing this from an x86_64 machine running today's LLVM
> > userland and kernel. I have some local patches but none that should be
> > relevant.
> > 
> 
> I have a different build problem:

That's another bogus unspecific GCC warning. Most lovely is that it
doesn't even have a flag for disabling it.

Joerg


Re: CVS commit: src [llvm]

2019-11-13 Thread Joerg Sonnenberger
On Wed, Nov 13, 2019 at 10:29:52AM +0100, Maxime Villard wrote:
> Le 12/11/2019 à 23:10, Joerg Sonnenberger a écrit :
> > On Tue, Nov 12, 2019 at 04:31:00PM +0100, Maxime Villard wrote:
> > > Le 12/11/2019 à 16:06, Maxime Villard a écrit :
> > > > Le 12/11/2019 à 14:37, Joerg Sonnenberger a écrit :
> > > > > On Tue, Nov 12, 2019 at 11:39:09AM +0100, Maxime Villard wrote:
> > > > > > Le 11/11/2019 à 23:45, Joerg Sonnenberger a écrit :
> > > > > > > Module Name:    src
> > > > > > > Committed By:    joerg
> > > > > > > Date:    Mon Nov 11 22:45:32 UTC 2019
> > > > > > > 
> > > > > > > [...]
> > > > > > > Log Message:
> > > > > > > Update LLVM to 10.0.0git 
> > > > > > > (01f3a59fb3e2542fce74c768718f594d0debd0da)
> > > > > > 
> > > > > > Since this change, I cannot cross-compile GENERIC amd64 from Linux:
> > > > > 
> > > > > What non-standard settings are you using? amd64 is certainly on my 
> > > > > list
> > > > > of architectures to test.
> > > > 
> > > > No particular settings. Just the latest src/ compiled unchanged with
> > > > 
> > > > ./build.sh -j4 -U -O ../obj -V MKLLVM=yes -V MKGCC=no -V HAVE_LLVM=yes 
> > > > -m amd64 kernel=GENERIC
> > > 
> > > I'm also having the same issue on a NetBSD-amd64 host, with again an 
> > > unchanged
> > > src/ and the same command
> > 
> > Is that a clean build? I certainly do full release builds for all LLVM
> > architectures and I don't get this.
> 
> Yes, a clean build.
> 
> I've done two again just now, on different physical machines. One has NetBSD,
> the other has Linux.

At least on NetBSD 9-BETA, it is a miscompile by GCC 7.4.0. Don't know
what your Linux version has.

Joerg


Re: CVS commit: src [llvm]

2019-11-12 Thread Joerg Sonnenberger
On Tue, Nov 12, 2019 at 04:31:00PM +0100, Maxime Villard wrote:
> Le 12/11/2019 à 16:06, Maxime Villard a écrit :
> > Le 12/11/2019 à 14:37, Joerg Sonnenberger a écrit :
> > > On Tue, Nov 12, 2019 at 11:39:09AM +0100, Maxime Villard wrote:
> > > > Le 11/11/2019 à 23:45, Joerg Sonnenberger a écrit :
> > > > > Module Name:    src
> > > > > Committed By:    joerg
> > > > > Date:    Mon Nov 11 22:45:32 UTC 2019
> > > > > 
> > > > > [...]
> > > > > Log Message:
> > > > > Update LLVM to 10.0.0git (01f3a59fb3e2542fce74c768718f594d0debd0da)
> > > > 
> > > > Since this change, I cannot cross-compile GENERIC amd64 from Linux:
> > > 
> > > What non-standard settings are you using? amd64 is certainly on my list
> > > of architectures to test.
> > 
> > No particular settings. Just the latest src/ compiled unchanged with
> > 
> > ./build.sh -j4 -U -O ../obj -V MKLLVM=yes -V MKGCC=no -V HAVE_LLVM=yes -m 
> > amd64 kernel=GENERIC
> 
> I'm also having the same issue on a NetBSD-amd64 host, with again an unchanged
> src/ and the same command

Is that a clean build? I certainly do full release builds for all LLVM
architectures and I don't get this.

Joerg


Re: CVS commit: src [llvm]

2019-11-12 Thread Joerg Sonnenberger
On Tue, Nov 12, 2019 at 11:39:09AM +0100, Maxime Villard wrote:
> Le 11/11/2019 à 23:45, Joerg Sonnenberger a écrit :
> > Module Name:src
> > Committed By:   joerg
> > Date:   Mon Nov 11 22:45:32 UTC 2019
> > 
> > [...]
> > Log Message:
> > Update LLVM to 10.0.0git (01f3a59fb3e2542fce74c768718f594d0debd0da)
> 
> Since this change, I cannot cross-compile GENERIC amd64 from Linux:

What non-standard settings are you using? amd64 is certainly on my list
of architectures to test.

> Preprocessed source(s) and associated run script(s) are located at:
> x86_64--netbsd-clang: note: diagnostic msg: /tmp/assym-5fcf44.c
> x86_64--netbsd-clang: note: diagnostic msg: /tmp/assym-5fcf44.sh

Both files would otherwise be a starting point...

Joerg


CVS commit: src

2019-11-11 Thread Joerg Sonnenberger
Module Name:src
Committed By:   joerg
Date:   Mon Nov 11 22:45:32 UTC 2019

Modified Files:
src/crypto/external/bsd/openssh/lib: Makefile
src/crypto/external/bsd/openssl/lib/libcrypto: Makefile
src/distrib/sets/lists/base: mi
src/distrib/sets/lists/comp: ad.aarch64 ad.arm ad.mips ad.powerpc
md.amd64 md.i386 mi
src/doc: 3RDPARTY
src/etc/mtree: NetBSD.dist.base
src/external/apache2: Makefile
src/external/bsd: Makefile
src/external/gpl2/diffutils/bin/diff: Makefile
src/external/gpl2/diffutils/bin/diff3: Makefile
src/external/ibm-public/postfix: Makefile.inc
src/external/mit/lua/lib/liblua: Makefile
src/external/mit/xorg/bin/xedit/lisp: Makefile
src/external/mit/xorg/lib/dri: Makefile
src/external/mit/xorg/lib/gallium: Makefile
src/external/mpl/bind/lib/libdns: Makefile
src/external/public-domain/sqlite/lib: Makefile
src/lib: Makefile
src/lib/libm: Makefile
src/lib/libpthread: Makefile
src/sys/arch/arm/conf: Makefile.arm
src/sys/modules/lua: Makefile
src/sys/modules/radeondrm: Makefile
src/tools: Makefile
src/tools/llvm: Makefile.inc
src/tools/llvm-clang: Makefile
src/tools/llvm-clang-tblgen: Makefile
src/tools/llvm-tblgen: Makefile
src/usr.bin/xlint/lint1: Makefile
src/usr.sbin/timed/timed: Makefile
src/usr.sbin/zdump: Makefile
Added Files:
src/external/apache2/llvm: Makefile Makefile.inc link.mk tablegen.mk
src/external/apache2/llvm/autoconf: configure run-autoconf
src/external/apache2/llvm/autoconf/autoconf: AutoRegen.sh ExportMap.map
LICENSE.TXT README.TXT aclocal.m4 config.guess config.sub
configure.ac install-sh missing mkinstalldirs
src/external/apache2/llvm/autoconf/autoconf/m4: build_exeext.m4
c_printf_a.m4 check_gnu_make.m4 config_makefile.m4
config_project.m4 cxx_flag_check.m4 define_subst.m4
find_std_program.m4 func_mmap_file.m4 header_mmap_anonymous.m4
huge_val.m4 link_options.m4 linux_mixed_64_32.m4
need_dev_zero_for_mmap.m4 sanity_check.m4 single_cxx_check.m4
visibility_inlines_hidden.m4
src/external/apache2/llvm/autoconf/include/clang/Config: config.h.in
src/external/apache2/llvm/autoconf/include/llvm/Config:
AsmParsers.def.in AsmPrinters.def.in Disassemblers.def.in
Targets.def.in abi-breaking.h.in config.h.in llvm-config.h.in
src/external/apache2/llvm/autoconf/include/llvm/Support: DataTypes.h.in
src/external/apache2/llvm/bin: Makefile Makefile.inc
src/external/apache2/llvm/bin/bugpoint: Makefile
src/external/apache2/llvm/bin/clang: Makefile
src/external/apache2/llvm/bin/clang-format: Makefile
src/external/apache2/llvm/bin/clang-rename: Makefile
src/external/apache2/llvm/bin/clang-tblgen: Makefile
src/external/apache2/llvm/bin/llc: Makefile
src/external/apache2/llvm/bin/lli: Makefile
src/external/apache2/llvm/bin/llvm-ar: Makefile
src/external/apache2/llvm/bin/llvm-as: Makefile
src/external/apache2/llvm/bin/llvm-bcanalyzer: Makefile
src/external/apache2/llvm/bin/llvm-cov: Makefile
src/external/apache2/llvm/bin/llvm-cxxdump: Makefile
src/external/apache2/llvm/bin/llvm-cxxfilt: Makefile
src/external/apache2/llvm/bin/llvm-diff: Makefile
src/external/apache2/llvm/bin/llvm-dis: Makefile
src/external/apache2/llvm/bin/llvm-dwarfdump: Makefile
src/external/apache2/llvm/bin/llvm-dwp: Makefile
src/external/apache2/llvm/bin/llvm-extract: Makefile
src/external/apache2/llvm/bin/llvm-link: Makefile
src/external/apache2/llvm/bin/llvm-mc: Makefile
src/external/apache2/llvm/bin/llvm-nm: Makefile
src/external/apache2/llvm/bin/llvm-objcopy: Makefile
src/external/apache2/llvm/bin/llvm-objdump: Makefile
src/external/apache2/llvm/bin/llvm-profdata: Makefile
src/external/apache2/llvm/bin/llvm-readobj: Makefile
src/external/apache2/llvm/bin/llvm-size: Makefile
src/external/apache2/llvm/bin/llvm-strings: Makefile
src/external/apache2/llvm/bin/llvm-symbolizer: Makefile
src/external/apache2/llvm/bin/llvm-xray: Makefile
src/external/apache2/llvm/bin/opt: Makefile
src/external/apache2/llvm/bin/sancov: Makefile
src/external/apache2/llvm/bin/sanstats: Makefile
src/external/apache2/llvm/bin/tblgen: Makefile
src/external/apache2/llvm/config/clang/Config: config.h
src/external/apache2/llvm/config/llvm/Config: AsmParsers.def
AsmPrinters.def Disassemblers.def Targets.def abi-breaking.h
config.h.in llvm-config.h.in
src/external/apache2/llvm/config/llvm/Support: DataTypes.h
   

CVS commit: src/usr.bin/audio/play

2019-11-11 Thread Joerg Sonnenberger
Module Name:src
Committed By:   joerg
Date:   Mon Nov 11 15:40:42 UTC 2019

Modified Files:
src/usr.bin/audio/play: play.c

Log Message:
Spell the largest 32bit signed value as INT32_MAX. Explicitly cast to
float, because it is not precisely representable.


To generate a diff of this commit:
cvs rdiff -u -r1.59 -r1.60 src/usr.bin/audio/play/play.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/usr.bin/audio/play

2019-11-11 Thread Joerg Sonnenberger
Module Name:src
Committed By:   joerg
Date:   Mon Nov 11 15:40:42 UTC 2019

Modified Files:
src/usr.bin/audio/play: play.c

Log Message:
Spell the largest 32bit signed value as INT32_MAX. Explicitly cast to
float, because it is not precisely representable.


To generate a diff of this commit:
cvs rdiff -u -r1.59 -r1.60 src/usr.bin/audio/play/play.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/usr.bin/audio/play/play.c
diff -u src/usr.bin/audio/play/play.c:1.59 src/usr.bin/audio/play/play.c:1.60
--- src/usr.bin/audio/play/play.c:1.59	Sat Nov  9 12:54:34 2019
+++ src/usr.bin/audio/play/play.c	Mon Nov 11 15:40:42 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: play.c,v 1.59 2019/11/09 12:54:34 mrg Exp $	*/
+/*	$NetBSD: play.c,v 1.60 2019/11/11 15:40:42 joerg Exp $	*/
 
 /*
  * Copyright (c) 1999, 2000, 2001, 2002, 2010, 2015, 2019 Matthew R. Green
@@ -28,7 +28,7 @@
 #include 
 
 #ifndef lint
-__RCSID("$NetBSD: play.c,v 1.59 2019/11/09 12:54:34 mrg Exp $");
+__RCSID("$NetBSD: play.c,v 1.60 2019/11/11 15:40:42 joerg Exp $");
 #endif
 
 #include 
@@ -236,7 +236,7 @@ float32_to_linear32(void *inbuf, void *o
 			f = 1.0;
 
 		/* Convert -1.0 to +1.0 into a 32 bit signed value */
-		i = f * ((1u << 31) - 1);
+		i = f * (float)INT32_MAX;
 
 		memcpy(outbuf8, , sizeof i);
 



CVS commit: src/sys/kern

2019-11-10 Thread Joerg Sonnenberger
Module Name:src
Committed By:   joerg
Date:   Sun Nov 10 23:39:03 UTC 2019

Modified Files:
src/sys/kern: kern_lwp.c

Log Message:
Ensure that the second LWP of a new process uses a free LWP ID.
Document overflow behavior.


To generate a diff of this commit:
cvs rdiff -u -r1.206 -r1.207 src/sys/kern/kern_lwp.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/kern

2019-11-10 Thread Joerg Sonnenberger
Module Name:src
Committed By:   joerg
Date:   Sun Nov 10 23:39:03 UTC 2019

Modified Files:
src/sys/kern: kern_lwp.c

Log Message:
Ensure that the second LWP of a new process uses a free LWP ID.
Document overflow behavior.


To generate a diff of this commit:
cvs rdiff -u -r1.206 -r1.207 src/sys/kern/kern_lwp.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/kern/kern_lwp.c
diff -u src/sys/kern/kern_lwp.c:1.206 src/sys/kern/kern_lwp.c:1.207
--- src/sys/kern/kern_lwp.c:1.206	Thu Nov  7 19:45:18 2019
+++ src/sys/kern/kern_lwp.c	Sun Nov 10 23:39:03 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: kern_lwp.c,v 1.206 2019/11/07 19:45:18 joerg Exp $	*/
+/*	$NetBSD: kern_lwp.c,v 1.207 2019/11/10 23:39:03 joerg Exp $	*/
 
 /*-
  * Copyright (c) 2001, 2006, 2007, 2008, 2009 The NetBSD Foundation, Inc.
@@ -211,7 +211,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: kern_lwp.c,v 1.206 2019/11/07 19:45:18 joerg Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kern_lwp.c,v 1.207 2019/11/10 23:39:03 joerg Exp $");
 
 #include "opt_ddb.h"
 #include "opt_lockdebug.h"
@@ -904,6 +904,11 @@ lwp_create(lwp_t *l1, proc_t *p2, vaddr_
 		l2->l_pflag |= LP_PIDLID;
 	} else if (p2->p_nlwps == 0) {
 		lid = l1->l_lid;
+		/*
+		 * Update next LWP ID, too. If this overflows to LID_SCAN,
+		 * the slow path of scanning will be used for the next LWP.
+		 */
+		p2->p_nlwpid = lid + 1;
 	} else {
 		lid = 0;
 	}



CVS commit: src/lib/libc/tls

2019-11-07 Thread Joerg Sonnenberger
Module Name:src
Committed By:   joerg
Date:   Thu Nov  7 22:25:22 UTC 2019

Modified Files:
src/lib/libc/tls: tls.c

Log Message:
Mirror the ld.elf_so logic for handling aligning the TLS size.
Most noticable, recompute the start of the TLS area for variant I
relative to the TCB. This makes a difference when the segment size and
base alignment don't agree.


To generate a diff of this commit:
cvs rdiff -u -r1.11 -r1.12 src/lib/libc/tls/tls.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/lib/libc/tls/tls.c
diff -u src/lib/libc/tls/tls.c:1.11 src/lib/libc/tls/tls.c:1.12
--- src/lib/libc/tls/tls.c:1.11	Tue Nov  5 22:22:42 2019
+++ src/lib/libc/tls/tls.c	Thu Nov  7 22:25:21 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: tls.c,v 1.11 2019/11/05 22:22:42 joerg Exp $	*/
+/*	$NetBSD: tls.c,v 1.12 2019/11/07 22:25:21 joerg Exp $	*/
 
 /*-
  * Copyright (c) 2011 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include 
-__RCSID("$NetBSD: tls.c,v 1.11 2019/11/05 22:22:42 joerg Exp $");
+__RCSID("$NetBSD: tls.c,v 1.12 2019/11/07 22:25:21 joerg Exp $");
 
 #include "namespace.h"
 
@@ -86,14 +86,16 @@ _rtld_tls_allocate(void)
 
 	if (initial_thread_tcb == NULL) {
 #ifdef __HAVE_TLS_VARIANT_II
-		tls_size = roundup2(tls_size, alignof(max_align_t));
+		tls_allocation = roundup2(tls_size, alignof(max_align_t));
+#else
+		tls_allocation = tls_size;
 #endif
-		tls_allocation = tls_size + sizeof(*tcb);
 
-		initial_thread_tcb = p = mmap(NULL, tls_allocation,
-		PROT_READ | PROT_WRITE, MAP_ANON, -1, 0);
+		initial_thread_tcb = p = mmap(NULL,
+		tls_allocation + sizeof(*tcb), PROT_READ | PROT_WRITE,
+		MAP_ANON, -1, 0);
 	} else {
-		p = calloc(1, tls_allocation);
+		p = calloc(1, tls_allocation + sizeof(*tcb));
 	}
 	if (p == NULL) {
 		static const char msg[] =  "TLS allocation failed, terminating\n";
@@ -106,7 +108,8 @@ _rtld_tls_allocate(void)
 	p += sizeof(struct tls_tcb);
 #else
 	/* LINTED tls_size is rounded above */
-	tcb = (struct tls_tcb *)(p + tls_size);
+	tcb = (struct tls_tcb *)(p + tls_allocation);
+	p = (uint8_t *)tcb - tls_size;
 	tcb->tcb_self = tcb;
 #endif
 	memcpy(p, tls_initaddr, tls_initsize);
@@ -126,10 +129,10 @@ _rtld_tls_free(struct tls_tcb *tcb)
 	p = (uint8_t *)tcb;
 #else
 	/* LINTED */
-	p = (uint8_t *)tcb - tls_size;
+	p = (uint8_t *)tcb - tls_allocation;
 #endif
 	if (p == initial_thread_tcb)
-		munmap(p, tls_allocation);
+		munmap(p, tls_allocation + sizeof(*tcb));
 	else
 		free(p);
 }



CVS commit: src/lib/libc/tls

2019-11-07 Thread Joerg Sonnenberger
Module Name:src
Committed By:   joerg
Date:   Thu Nov  7 22:25:22 UTC 2019

Modified Files:
src/lib/libc/tls: tls.c

Log Message:
Mirror the ld.elf_so logic for handling aligning the TLS size.
Most noticable, recompute the start of the TLS area for variant I
relative to the TCB. This makes a difference when the segment size and
base alignment don't agree.


To generate a diff of this commit:
cvs rdiff -u -r1.11 -r1.12 src/lib/libc/tls/tls.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/kern

2019-11-07 Thread Joerg Sonnenberger
Module Name:src
Committed By:   joerg
Date:   Thu Nov  7 19:45:18 UTC 2019

Modified Files:
src/sys/kern: kern_lwp.c

Log Message:
Preserve the LWP ID of the calling thread on (v)fork. This ensures that
_lwp_self() remains invariant as necessary for the locking in the
dynamic linker. Otherwise if a process creates a thread and forks from
it, the main thread of the parent would share the LWP ID of the main
thread of the child, even though they have different origins.

Partial fix for pkg/54192.


To generate a diff of this commit:
cvs rdiff -u -r1.205 -r1.206 src/sys/kern/kern_lwp.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/kern

2019-11-07 Thread Joerg Sonnenberger
Module Name:src
Committed By:   joerg
Date:   Thu Nov  7 19:45:18 UTC 2019

Modified Files:
src/sys/kern: kern_lwp.c

Log Message:
Preserve the LWP ID of the calling thread on (v)fork. This ensures that
_lwp_self() remains invariant as necessary for the locking in the
dynamic linker. Otherwise if a process creates a thread and forks from
it, the main thread of the parent would share the LWP ID of the main
thread of the child, even though they have different origins.

Partial fix for pkg/54192.


To generate a diff of this commit:
cvs rdiff -u -r1.205 -r1.206 src/sys/kern/kern_lwp.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/kern/kern_lwp.c
diff -u src/sys/kern/kern_lwp.c:1.205 src/sys/kern/kern_lwp.c:1.206
--- src/sys/kern/kern_lwp.c:1.205	Sun Oct  6 15:11:17 2019
+++ src/sys/kern/kern_lwp.c	Thu Nov  7 19:45:18 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: kern_lwp.c,v 1.205 2019/10/06 15:11:17 uwe Exp $	*/
+/*	$NetBSD: kern_lwp.c,v 1.206 2019/11/07 19:45:18 joerg Exp $	*/
 
 /*-
  * Copyright (c) 2001, 2006, 2007, 2008, 2009 The NetBSD Foundation, Inc.
@@ -211,7 +211,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: kern_lwp.c,v 1.205 2019/10/06 15:11:17 uwe Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kern_lwp.c,v 1.206 2019/11/07 19:45:18 joerg Exp $");
 
 #include "opt_ddb.h"
 #include "opt_lockdebug.h"
@@ -902,6 +902,8 @@ lwp_create(lwp_t *l1, proc_t *p2, vaddr_
 	if ((flags & LWP_PIDLID) != 0) {
 		lid = proc_alloc_pid(p2);
 		l2->l_pflag |= LP_PIDLID;
+	} else if (p2->p_nlwps == 0) {
+		lid = l1->l_lid;
 	} else {
 		lid = 0;
 	}



  1   2   3   4   5   6   7   8   >