Re: CVS commit: src/sys/arch
Le 20/06/2018 à 21:26, Jaromír Doleček a écrit : 2018-06-20 18:03 GMT+02:00 Maxime Villard : I haven't tested but looking at the code it seems to me that this part of your change breaks DAZ on native, and I don't see how it can help xsave on xen by the way Thanks, I'll change the conditional to avoid any potential change of behaviour for native. Your change was still wrong, and I've reverted it. It made no sense: no-xsave can't disable fxsave, because even if you don't call it in fpuinit_mxcsr_mask, it still gets called in the rest of the fpu code. I see on current-users@ that xen machines are crashing now; as I said already, there was a stack alignment problem there several months ago. Looking at the crash report, it's still the same problem it seems. No point adding nonsensical conditionals there, you just broke both native and xen. Also, your changes in XSAVE are still wrong to me, so please fix that correctly - as I said in my first email, the detection logic should be done in identcpu.c (unless there is a good reason for not doing so, which there doesn't seem to be), and you shouldn't enable FXSAVE if XSAVE is not supported because it may be that *neither* is supported. Maxime
Re: CVS commit: src/sys/arch/x86/x86
Le 22/06/2018 à 03:40, matthew green a écrit : "Maxime Villard" writes: Module Name:src Committed By: maxv Date: Tue Jun 19 09:25:13 UTC 2018 Modified Files: src/sys/arch/x86/x86: fpu.c Log Message: When using EagerFPU, create the fpu state in execve at IPL_HIGH. why splhigh instead of kpreempt_disable()? Nick Hudson asked me the same question yesterday, here's the relevant part of my answer (quoting his mail, I guess he doesn't mind). The fpu code already runs at splhigh, and this disables preemption. So I used splhigh too. Message transféré Sujet : Re: Fwd: CVS commit: src/sys/arch/x86/x86 Date : Thu, 21 Jun 2018 07:23:33 +0100 De : Nick Hudson Pour : Maxime Villard On 21/06/2018 07:21, Maxime Villard wrote: Le 21/06/2018 à 08:11, Nick Hudson a écrit : On 21/06/2018 06:42, Maxime Villard wrote: Le 21/06/2018 à 07:34, Maxime Villard a écrit : Le 21/06/2018 à 07:21, Nick Hudson a écrit : Surely, kpreempt_{disable,enable}() is what you really mean? Nick No, I mean splhigh. splhigh does prevent preemption, is that incorrect? If you want to disable preemption then kpreempt_disable() is what you want. If you want to disable interrupts (and as a consequence pre-emption) then splhigh is what you want. I firmly believe you want the former. Why disable interupts unnecessarily? This is "bad practice" and shouldn't be left for others to cargo cult copy. There is a KASSERT in fpusave_cpu(), which I didn't introduce. We want IPL_HIGH, unconditionally. So no, I don't want the former, the FPU code wants the latter. Then we can say that maybe splhigh is not needed after all in fpusave_cpu; I won't risk introducing random races. In the commit I said "disable preemption" because I had in mind the problem where a context switch occurs as a result of preemption. Up to you... really don't know why FPU code needs interrupts disabled.
re: CVS commit: src/share/mk
"Maya Rashish" writes: > Module Name: src > Committed By: maya > Date: Wed Jun 20 02:15:13 UTC 2018 > > Modified Files: > src/share/mk: sys.mk > > Log Message: > Strip -Wsystem-headers from CXXFLAGS. > > GCC's C++ headers are not clean (yet). They are trying, but haven't got there > yet. > > Necessary for including which uses . can you add a comment about this? the stripping is normally about stuff that c++ frontend does not support, vs stuff that breaks because of other issues. ie, the rest of them should always stay, but this one will hopefully go away in the future. thanks. .mrg.
re: CVS commit: src/sys/arch/x86/x86
"Maxime Villard" writes: > Module Name: src > Committed By: maxv > Date: Tue Jun 19 09:25:13 UTC 2018 > > Modified Files: > src/sys/arch/x86/x86: fpu.c > > Log Message: > When using EagerFPU, create the fpu state in execve at IPL_HIGH. why splhigh instead of kpreempt_disable()? .mrg.
Re: CVS commit: src/sys/arch/i386/include
On Sun, Jun 17, 2018 at 03:46:39PM +, Maxime Villard wrote: > Module Name: src > Committed By: maxv > Date: Sun Jun 17 15:46:39 UTC 2018 > > Modified Files: > src/sys/arch/i386/include: frameasm.h > > Log Message: > i586 and below don't have this 3-byte nop, so use three 1-byte nops, > reported by Nathanial Sloss Can't we use 0x66 0x89 0xc0 for this purpose, i.e. movw %ax, %ax? Joerg
Re: CVS commit: src/external/mpl/dhcp
On 21/06/2018 12:09, Paul Goyette wrote: On Thu, 21 Jun 2018, Kamil Rytarowski wrote: Module Name: src Committed By: kamil Date: Thu Jun 21 11:02:48 UTC 2018 Modified Files: src/external/mpl/dhcp: Makefile.inc Log Message: Make building of dhcp compatible with MKSANITIZER Disable LD flags (-Wl,-Bstatic and -Wl,-Bdynamic) with enabled MKSANITIZER. These options are incompatible with the current design of sanitizers, because they cause duplication of symbols into programs and thus symbols from the interceptors from sanitizers cannot be linked. This change makes effectively mounting /usr required for dhcp programs like dhclient(8). This could be difficult if /usr is nfs-mount and requires dhcp and friends for setting up the network. It's not that hard to use dhcpcd instead of dhclient. Roy
Re: CVS commit: src/external/mpl/dhcp
On 21.06.2018 13:09, Paul Goyette wrote: > On Thu, 21 Jun 2018, Kamil Rytarowski wrote: > >> Module Name: src >> Committed By: kamil >> Date: Thu Jun 21 11:02:48 UTC 2018 >> >> Modified Files: >> src/external/mpl/dhcp: Makefile.inc >> >> Log Message: >> Make building of dhcp compatible with MKSANITIZER >> >> Disable LD flags (-Wl,-Bstatic and -Wl,-Bdynamic) with enabled >> MKSANITIZER. >> These options are incompatible with the current design of sanitizers, >> because they cause duplication of symbols into programs and thus symbols >> from the interceptors from sanitizers cannot be linked. >> >> This change makes effectively mounting /usr required for dhcp programs >> like >> dhclient(8). > > This could be difficult if /usr is nfs-mount and requires dhcp and > friends for setting up the network. > > There is no functional change for MKSANITIZER=no users (the default ones). For MKSANITIZER=yes ones it's a tradeoff. signature.asc Description: OpenPGP digital signature
Re: CVS commit: src/external/mpl/dhcp
On Thu, 21 Jun 2018, Kamil Rytarowski wrote: Module Name:src Committed By: kamil Date: Thu Jun 21 11:02:48 UTC 2018 Modified Files: src/external/mpl/dhcp: Makefile.inc Log Message: Make building of dhcp compatible with MKSANITIZER Disable LD flags (-Wl,-Bstatic and -Wl,-Bdynamic) with enabled MKSANITIZER. These options are incompatible with the current design of sanitizers, because they cause duplication of symbols into programs and thus symbols from the interceptors from sanitizers cannot be linked. This change makes effectively mounting /usr required for dhcp programs like dhclient(8). This could be difficult if /usr is nfs-mount and requires dhcp and friends for setting up the network. +--+--++ | Paul Goyette | PGP Key fingerprint: | E-mail addresses: | | (Retired)| FA29 0E3B 35AF E8AE 6651 | paul at whooppee dot com | | Kernel Developer | 0786 F758 55DE 53BA 7731 | pgoyette at netbsd dot org | +--+--++