CVS commit: src/sys/netinet6

2018-05-17 Thread Maxime Villard
Module Name:src Committed By: maxv Date: Thu May 17 12:07:48 UTC 2018 Modified Files: src/sys/netinet6: nd6_nbr.c Log Message: Fix the KASSERTs. It doesn't matter at all since the packet can't be this big anyway, and there are many other places that have this kind of typo;

CVS commit: src/sys/netinet

2018-05-18 Thread Maxime Villard
Module Name:src Committed By: maxv Date: Fri May 18 18:28:40 UTC 2018 Modified Files: src/sys/netinet: ip6.h Log Message: Remove IP6_EXTHDR_GET0, remove pointless XXXs, and style. To generate a diff of this commit: cvs rdiff -u -r1.23 -r1.24 src/sys/netinet/ip6.h Please

CVS commit: src/sys

2018-05-18 Thread Maxime Villard
Module Name:src Committed By: maxv Date: Fri May 18 18:52:17 UTC 2018 Modified Files: src/sys/netinet: ip6.h src/sys/sys: mbuf.h Log Message: IP6_EXTHDR_GET performs a basic mbuf operation, which has nothing to do with IPv6. So declare an IP-independent M_REGION_GE

CVS commit: src/sys/netinet

2018-05-18 Thread Maxime Villard
Module Name:src Committed By: maxv Date: Fri May 18 18:58:51 UTC 2018 Modified Files: src/sys/netinet: dccp_usrreq.c ip_carp.c tcp_input.c tcp_sack.c udp_usrreq.c Log Message: IP6_EXTHDR_GET -> M_REGION_GET, no functional change. To generate a diff of this co

CVS commit: src/sys/netipsec

2018-05-18 Thread Maxime Villard
Module Name:src Committed By: maxv Date: Fri May 18 19:02:49 UTC 2018 Modified Files: src/sys/netipsec: ipsec_input.c xform_ah.c xform_esp.c Log Message: IP6_EXTHDR_GET -> M_REGION_GET, no functional change. To generate a diff of this commit: cvs rdiff -u -r1.69 -r1.70 s

CVS commit: src/sys/netinet6

2018-05-18 Thread Maxime Villard
Module Name:src Committed By: maxv Date: Fri May 18 21:03:33 UTC 2018 Modified Files: src/sys/netinet6: nd6_rtr.c Log Message: Add missing m_put_rcvif_psref. To generate a diff of this commit: cvs rdiff -u -r1.141 -r1.142 src/sys/netinet6/nd6_rtr.c Please note that diff

CVS commit: src/sys/netinet6

2018-05-18 Thread Maxime Villard
Module Name:src Committed By: maxv Date: Sat May 19 06:44:08 UTC 2018 Modified Files: src/sys/netinet6: ip6_input.c Log Message: Remove misleading comment. To generate a diff of this commit: cvs rdiff -u -r1.203 -r1.204 src/sys/netinet6/ip6_input.c Please note that diff

CVS commit: src/sys/netinet6

2018-05-19 Thread Maxime Villard
Module Name:src Committed By: maxv Date: Sat May 19 08:22:58 UTC 2018 Modified Files: src/sys/netinet6: nd6_nbr.c nd6_rtr.c Log Message: Style. To generate a diff of this commit: cvs rdiff -u -r1.155 -r1.156 src/sys/netinet6/nd6_nbr.c cvs rdiff -u -r1.142 -r1.143 src/sys

CVS commit: src/crypto/dist/ipsec-tools/src/racoon

2018-05-19 Thread Maxime Villard
Module Name:src Committed By: maxv Date: Sat May 19 18:51:59 UTC 2018 Modified Files: src/crypto/dist/ipsec-tools/src/racoon: main.c nattraversal.c nattraversal.h Log Message: Style, a little... To generate a diff of this commit: cvs rdiff -u -r1.13 -r1.14 sr

CVS commit: src/crypto/dist/ipsec-tools/src/racoon

2018-05-19 Thread Maxime Villard
Module Name:src Committed By: maxv Date: Sat May 19 19:23:15 UTC 2018 Modified Files: src/crypto/dist/ipsec-tools/src/racoon: admin.c grabmyaddr.c ipsec_doi.c isakmp.c isakmp_agg.c isakmp_base.c isakmp_ident.c isakmp_inf.c main.c oakley.c privsep.c r

CVS commit: src/crypto/dist/ipsec-tools/src/racoon

2018-05-19 Thread Maxime Villard
Module Name:src Committed By: maxv Date: Sat May 19 19:32:16 UTC 2018 Modified Files: src/crypto/dist/ipsec-tools/src/racoon: cfparse.y isakmp_cfg.c isakmp_frag.c isakmp_xauth.c Log Message: More unused variables. To generate a diff of this commit: cvs rdiff

CVS commit: src/crypto/dist/ipsec-tools/src/racoon

2018-05-19 Thread Maxime Villard
Module Name:src Committed By: maxv Date: Sat May 19 19:47:47 UTC 2018 Modified Files: src/crypto/dist/ipsec-tools/src/racoon: backupsa.c isakmp_cfg.c isakmp_inf.c session.c Log Message: Remove unused labels, functions, and function prototypes. To generate a d

CVS commit: src/crypto/dist/ipsec-tools/src/racoon

2018-05-19 Thread Maxime Villard
Module Name:src Committed By: maxv Date: Sat May 19 20:14:56 UTC 2018 Modified Files: src/crypto/dist/ipsec-tools/src/racoon: admin.c cfparse.y evt.c grabmyaddr.c handler.c ipsec_doi.c isakmp.c isakmp_var.h isakmp_xauth.c localconf.c oakley.c pfkey.c

CVS commit: src/crypto/dist/ipsec-tools/src/racoon

2018-05-19 Thread Maxime Villard
Module Name:src Committed By: maxv Date: Sat May 19 20:21:23 UTC 2018 Modified Files: src/crypto/dist/ipsec-tools/src/racoon: oakley.c Log Message: Remove unused 'error' variables, it's obvious they should have no use. To generate a diff of this commit: cvs rdiff -u -r1.

CVS commit: src/crypto/dist/ipsec-tools/src/racoon

2018-05-19 Thread Maxime Villard
Module Name:src Committed By: maxv Date: Sat May 19 20:40:40 UTC 2018 Modified Files: src/crypto/dist/ipsec-tools/src/racoon: misc.c Log Message: Remove dead code, and style. To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.7 src/crypto/dist/ipsec-tools/src/raco

CVS commit: src/crypto/dist/ipsec-tools/src/racoon

2018-05-19 Thread Maxime Villard
Module Name:src Committed By: maxv Date: Sun May 20 06:15:45 UTC 2018 Modified Files: src/crypto/dist/ipsec-tools/src/racoon: vmbuf.c vmbuf.h Log Message: Style. To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/crypto/dist/ipsec-tools/src/racoon/vmbuf.c \

CVS commit: src/sys/netinet6

2018-05-19 Thread Maxime Villard
Module Name:src Committed By: maxv Date: Sun May 20 06:29:43 UTC 2018 Modified Files: src/sys/netinet6: ip6_mroute.c ip6_mroute.h Log Message: Remove notyet, we've never had this. To generate a diff of this commit: cvs rdiff -u -r1.127 -r1.128 src/sys/netinet6/ip6_mroute

CVS commit: src/crypto/dist/ipsec-tools

2018-05-20 Thread Maxime Villard
Module Name:src Committed By: maxv Date: Sun May 20 08:55:25 UTC 2018 Modified Files: src/crypto/dist/ipsec-tools: README Log Message: Update, after ten years. Importantly, add a "History" section, to explain what's going on. We have now become "upstream", and most of the

CVS commit: src/crypto/dist/ipsec-tools

2018-05-20 Thread Maxime Villard
Module Name:src Committed By: maxv Date: Sun May 20 09:14:18 UTC 2018 Modified Files: src/crypto/dist/ipsec-tools: README Log Message: Add a note about FreeBSD. To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/crypto/dist/ipsec-tools/README Please note th

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

2018-05-21 Thread Maxime Villard
Module Name:src Committed By: maxv Date: Tue May 22 06:31:05 UTC 2018 Modified Files: src/sys/arch/x86/x86: spectre.c x86_machdep.c Log Message: Reorder and rename, to make the code less SpectreV2-specific. To generate a diff of this commit: cvs rdiff -u -r1.10 -r1.11 sr

CVS commit: src/sys/arch/x86

2018-05-22 Thread Maxime Villard
Module Name:src Committed By: maxv Date: Tue May 22 07:11:54 UTC 2018 Modified Files: src/sys/arch/x86/include: specialreg.h src/sys/arch/x86/x86: spectre.c x86_machdep.c Log Message: Mitigation for SpectreV4, based on SSBD. The following sysctl branches are added:

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

2018-05-22 Thread Maxime Villard
Module Name:src Committed By: maxv Date: Tue May 22 07:24:08 UTC 2018 Modified Files: src/sys/arch/x86/include: specialreg.h Log Message: Add RSBA. When set, it indicates that the CPU is vulnerable to SpectreV2 via the RSB. To generate a diff of this commit: cvs rdiff -u

CVS commit: src/sys/arch

2018-05-22 Thread Maxime Villard
Module Name:src Committed By: maxv Date: Tue May 22 08:15:26 UTC 2018 Modified Files: src/sys/arch/amd64/conf: GENERIC src/sys/arch/i386/conf: GENERIC src/sys/arch/x86/x86: spectre.c x86_machdep.c Log Message: Clarify the parameters for the SpectreV2 mitiga

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

2018-05-22 Thread Maxime Villard
Module Name:src Committed By: maxv Date: Tue May 22 09:25:58 UTC 2018 Modified Files: src/sys/arch/x86/x86: spectre.c x86_machdep.c Log Message: Several changes: - Move the sysctl initialization code into spectre.c. This way each variable is local. Rename the variable

CVS commit: src/sys/arch/x86

2018-05-22 Thread Maxime Villard
Module Name:src Committed By: maxv Date: Tue May 22 10:20:05 UTC 2018 Modified Files: src/sys/arch/x86/include: specialreg.h src/sys/arch/x86/x86: spectre.c Log Message: Implement a mitigation for SpectreV4 on AMD families 15h and 16h. We use a non-architectural MS

CVS commit: src/sys/arch

2018-05-22 Thread Maxime Villard
Module Name:src Committed By: maxv Date: Tue May 22 11:09:57 UTC 2018 Modified Files: src/sys/arch/amd64/conf: files.amd64 src/sys/arch/i386/conf: files.i386 src/sys/arch/x86/conf: files.x86 Log Message: Mmh, don't compile spectre.c on Xen. To generate a

CVS commit: src/sys/dev/usb

2019-12-13 Thread Maxime Villard
Module Name:src Committed By: maxv Date: Fri Dec 13 14:10:32 UTC 2019 Modified Files: src/sys/dev/usb: if_urtwn.c Log Message: Fix gross use-after-free. Found by a custom query on LGTM. To generate a diff of this commit: cvs rdiff -u -r1.77 -r1.78 src/sys/dev/usb/if_urtw

CVS commit: src/sys/net

2019-12-13 Thread Maxime Villard
Module Name:src Committed By: maxv Date: Fri Dec 13 14:13:55 UTC 2019 Modified Files: src/sys/net: if_tun.c Log Message: Read the len before pushing the packet, otherwise possible use-after-free. Found by a custom query on LGTM. To generate a diff of this commit: cvs rdi

CVS commit: src/sys/arch/amd64/conf

2019-12-13 Thread Maxime Villard
Module Name:src Committed By: maxv Date: Sat Dec 14 07:45:20 UTC 2019 Modified Files: src/sys/arch/amd64/conf: GENERIC Log Message: Disable multiboot for now, too much breakage. To generate a diff of this commit: cvs rdiff -u -r1.550 -r1.551 src/sys/arch/amd64/conf/GENER

CVS commit: src

2019-12-17 Thread Maxime Villard
Module Name:src Committed By: maxv Date: Wed Dec 18 07:37:19 UTC 2019 Modified Files: src/distrib/sets/lists/base: mi src/distrib/sets/lists/comp: mi src/distrib/sets/lists/man: mi src/etc: MAKEDEV.tmpl src/etc/mtree: NetBSD.dist.base

CVS commit: src/usr.bin/make

2019-12-18 Thread Maxime Villard
Module Name:src Committed By: maxv Date: Thu Dec 19 07:14:07 UTC 2019 Modified Files: src/usr.bin/make: Makefile compat.c make.1 meta.c Log Message: Revert the filemon removal in bmake, as pointed out by maya we do care about not introducing divergence with FreeBSD, and th

CVS commit: src

2019-12-22 Thread Maxime Villard
Module Name:src Committed By: maxv Date: Mon Dec 23 06:45:38 UTC 2019 Modified Files: src/distrib/sets/lists/base: mi src/distrib/sets/lists/comp: mi src/distrib/sets/lists/man: mi src/etc: MAKEDEV.tmpl src/etc/mtree: NetBSD.dist.base

CVS commit: src/sys/kern

2019-12-27 Thread Maxime Villard
Module Name:src Committed By: maxv Date: Fri Dec 27 15:49:20 UTC 2019 Modified Files: src/sys/kern: subr_pool.c Log Message: Switch to panic, and make the message more useful. To generate a diff of this commit: cvs rdiff -u -r1.263 -r1.264 src/sys/kern/subr_pool.c Pleas

CVS commit: src/sys/dev/usb

2020-01-01 Thread Maxime Villard
Module Name:src Committed By: maxv Date: Wed Jan 1 09:03:00 UTC 2020 Modified Files: src/sys/dev/usb: uthum.c Log Message: Fix buffer overflows. sc_{o,f}len are controlled by the USB device. By crafting the former the device can leak stack data. By crafting the latter the

CVS commit: src/sys/dev/usb

2020-01-01 Thread Maxime Villard
Module Name:src Committed By: maxv Date: Wed Jan 1 09:05:03 UTC 2020 Modified Files: src/sys/dev/usb: uhid.c Log Message: Fix buffer overflows. Also add missing mutex_exit. To generate a diff of this commit: cvs rdiff -u -r1.110 -r1.111 src/sys/dev/usb/uhid.c Please no

CVS commit: src/sys/dev/usb

2020-01-01 Thread Maxime Villard
Module Name:src Committed By: maxv Date: Wed Jan 1 09:08:28 UTC 2020 Modified Files: src/sys/dev/usb: ucycom.c Log Message: Fix buffer overflows: validate the lengths at attach time, given that they are apparently not supposed to be variable. Drop sc_ilen since it is unus

CVS commit: src/sys/compat/netbsd32

2020-01-01 Thread Maxime Villard
Module Name:src Committed By: maxv Date: Wed Jan 1 09:17:45 UTC 2020 Modified Files: src/sys/compat/netbsd32: netbsd32_compat_43.c Log Message: Fix sizeof mismatch in copyin. This leads to a user-triggerable stack overflow. On my test build at least, by luck, the compiler

CVS commit: src/sys/dev/hid

2020-01-01 Thread Maxime Villard
Module Name:src Committed By: maxv Date: Wed Jan 1 09:40:17 UTC 2020 Modified Files: src/sys/dev/hid: hid.c Log Message: Fix small read overflows when parsing HID tables. Noticed by kASan the other day while I was playing with vHCI. To generate a diff of this commit: cv

CVS commit: src/sys/compat

2020-01-01 Thread Maxime Villard
Module Name:src Committed By: maxv Date: Wed Jan 1 14:52:38 UTC 2020 Modified Files: src/sys/compat/common: kern_sig_43.c src/sys/compat/netbsd32: netbsd32_compat_20.c netbsd32_compat_50.c Log Message: Fix three stack info leaks, found by kMSan when just invoking

CVS commit: src/sys/dev/usb

2020-01-02 Thread Maxime Villard
Module Name:src Committed By: maxv Date: Thu Jan 2 08:08:30 UTC 2020 Modified Files: src/sys/dev/usb: umidi.c Log Message: Remove the call to KERNEL_UNLOCK_ONE(), it was forgotten when the biglock was dropped in rev1.63. Found via vHCI. To generate a diff of this commit

CVS commit: src/sys/netinet6

2020-01-03 Thread Maxime Villard
Module Name:src Committed By: maxv Date: Fri Jan 3 08:53:14 UTC 2020 Modified Files: src/sys/netinet6: ip6_mroute.c Log Message: Don't forget to initialize 'sin6_len'. With kASan, from time to time the value will be bigger than the size of the source, and we get a read ov

CVS commit: src/sys/dev/raidframe

2020-01-06 Thread Maxime Villard
Module Name:src Committed By: maxv Date: Tue Jan 7 06:10:19 UTC 2020 Modified Files: src/sys/dev/raidframe: rf_compat32.c Log Message: Fix big bugs. To generate a diff of this commit: cvs rdiff -u -r1.7 -r1.8 src/sys/dev/raidframe/rf_compat32.c Please note that diffs a

CVS commit: src/sys/dev/ic

2020-01-06 Thread Maxime Villard
Module Name:src Committed By: maxv Date: Tue Jan 7 06:12:09 UTC 2020 Modified Files: src/sys/dev/ic: mfi.c Log Message: Set 'ld_sync' to NULL as part of 'again', to prevent use-after-free. To generate a diff of this commit: cvs rdiff -u -r1.62 -r1.63 src/sys/dev/ic/mfi.

CVS commit: src/sys/netsmb

2020-01-06 Thread Maxime Villard
Module Name:src Committed By: maxv Date: Tue Jan 7 06:14:43 UTC 2020 Modified Files: src/sys/netsmb: smb_smb.c Log Message: Set 'ntencpass' to NULL as part of 'again', to prevent use-after-free. To generate a diff of this commit: cvs rdiff -u -r1.34 -r1.35 src/sys/netsm

CVS commit: src/sys/dev/usb

2020-01-06 Thread Maxime Villard
Module Name:src Committed By: maxv Date: Tue Jan 7 06:42:26 UTC 2020 Modified Files: src/sys/dev/usb: if_aue.c if_axe.c if_axen.c if_cdce.c if_cue.c if_kue.c if_mos.c if_mue.c if_smsc.c if_udav.c if_upl.c if_ure.c if_url.c if_urndis.c u3g.c uark.c u

CVS commit: src/sys/dev/nvmm/x86

2020-01-09 Thread Maxime Villard
Module Name:src Committed By: maxv Date: Thu Jan 9 16:20:12 UTC 2020 Modified Files: src/sys/dev/nvmm/x86: nvmm_x86_vmx.c Log Message: Mmh, as noted in PR/54847, this should be uint64_t, not uint16_t. Harmless because we use only the two lowest bits anyway. I believe thi

CVS commit: src/sys/dev/nvmm/x86

2020-01-09 Thread Maxime Villard
Module Name:src Committed By: maxv Date: Thu Jan 9 16:27:57 UTC 2020 Modified Files: src/sys/dev/nvmm/x86: nvmm_x86_vmx.c Log Message: Registering the host's CR0 is done outside of the VCPU loop, so it must be cleared because it is also cleared inside the loop. Not clear

CVS commit: src/sys/kern

2020-01-25 Thread Maxime Villard
Module Name:src Committed By: maxv Date: Sat Jan 25 15:55:33 UTC 2020 Modified Files: src/sys/kern: subr_asan.c subr_msan.c Log Message: Actually, uio_vmspace is never NULL, the check should be against pmap_kernel. To generate a diff of this commit: cvs rdiff -u -r1.16 -

CVS commit: src/sys/dev/videomode

2020-01-25 Thread Maxime Villard
Module Name:src Committed By: maxv Date: Sat Jan 25 15:59:11 UTC 2020 Modified Files: src/sys/dev/videomode: edid.c Log Message: Fix uninitialized variable. There may not be a TYPE_ASCII block. Found by kMSan with nouveau. To generate a diff of this commit: cvs rdiff -u

CVS commit: src/sys/arch/aarch64/include

2020-01-28 Thread Maxime Villard
Module Name:src Committed By: maxv Date: Tue Jan 28 17:23:30 UTC 2020 Modified Files: src/sys/arch/aarch64/include: armreg.h Log Message: More definitions. To generate a diff of this commit: cvs rdiff -u -r1.30 -r1.31 src/sys/arch/aarch64/include/armreg.h Please note th

CVS commit: src/sys/arch/aarch64

2020-01-28 Thread Maxime Villard
Module Name:src Committed By: maxv Date: Tue Jan 28 17:33:07 UTC 2020 Modified Files: src/sys/arch/aarch64/aarch64: genassym.cf locore.S src/sys/arch/aarch64/include: armreg.h Log Message: Jazelle and T32EE are not part of ARMv8, fix the bits to their real meanings

CVS commit: src/usr.sbin/cpuctl/arch

2020-01-28 Thread Maxime Villard
Module Name:src Committed By: maxv Date: Tue Jan 28 17:36:42 UTC 2020 Modified Files: src/usr.sbin/cpuctl/arch: aarch64.c Log Message: More identification. To generate a diff of this commit: cvs rdiff -u -r1.7 -r1.8 src/usr.sbin/cpuctl/arch/aarch64.c Please note that di

CVS commit: src/sys/arch/aarch64

2020-01-28 Thread Maxime Villard
Module Name:src Committed By: maxv Date: Tue Jan 28 17:47:51 UTC 2020 Modified Files: src/sys/arch/aarch64/aarch64: cpu.c src/sys/arch/aarch64/include: armreg.h Log Message: Fetch ID_AA64MMFR2_EL1. Okayed by Nick the other day. To generate a diff of this commit:

CVS commit: src/sys/arch/aarch64/include

2020-01-28 Thread Maxime Villard
Module Name:src Committed By: maxv Date: Tue Jan 28 18:02:30 UTC 2020 Modified Files: src/sys/arch/aarch64/include: armreg.h Log Message: More SCTLR. To generate a diff of this commit: cvs rdiff -u -r1.33 -r1.34 src/sys/arch/aarch64/include/armreg.h Please note that dif

CVS commit: src/sys/arch/amd64/stand/prekern

2017-11-20 Thread Maxime Villard
Module Name:src Committed By: maxv Date: Tue Nov 21 07:56:05 UTC 2017 Modified Files: src/sys/arch/amd64/stand/prekern: elf.c mm.c prekern.h Log Message: Clean up and add some ASSERTs. To generate a diff of this commit: cvs rdiff -u -r1.16 -r1.17 src/sys/arch/amd64/stand

CVS commit: src/sys/arch/amd64/amd64

2017-11-21 Thread Maxime Villard
Module Name:src Committed By: maxv Date: Tue Nov 21 09:58:09 UTC 2017 Modified Files: src/sys/arch/amd64/amd64: locore.S Log Message: Remove unused symbol - it is aligned to 4096 and this reduces the number of possible locations for .bss in KASLR kernels. To generate a d

CVS commit: src/sys/arch/amd64/amd64

2017-11-21 Thread Maxime Villard
Module Name:src Committed By: maxv Date: Tue Nov 21 10:42:44 UTC 2017 Modified Files: src/sys/arch/amd64/amd64: machdep.c Log Message: Remove unused variables. To generate a diff of this commit: cvs rdiff -u -r1.276 -r1.277 src/sys/arch/amd64/amd64/machdep.c Please note

CVS commit: src/sys/compat/linux/common

2017-11-21 Thread Maxime Villard
Module Name:src Committed By: maxv Date: Tue Nov 21 10:45:12 UTC 2017 Modified Files: src/sys/compat/linux/common: linux_sg.c Log Message: This should be "linux_sg_version", not "version". To generate a diff of this commit: cvs rdiff -u -r1.13 -r1.14 src/sys/compat/linux

CVS commit: src/sys/dev/pci

2017-11-21 Thread Maxime Villard
Module Name:src Committed By: maxv Date: Tue Nov 21 10:55:23 UTC 2017 Modified Files: src/sys/dev/pci: mlyreg.h Log Message: Mmh, surprising bug. It's __packed, not __packed__. Here the structure is not packed for real, but instead a global __packed__ symbol is declared.

CVS commit: src/sys/arch/amd64/stand/prekern

2017-11-26 Thread Maxime Villard
Module Name:src Committed By: maxv Date: Sun Nov 26 10:21:20 UTC 2017 Modified Files: src/sys/arch/amd64/stand/prekern: locore.S prekern.h Log Message: Add rdrand. To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 src/sys/arch/amd64/stand/prekern/locore.S cvs r

CVS commit: src/sys/arch/amd64/stand/prekern

2017-11-26 Thread Maxime Villard
.c Sun Nov 26 11:01:09 2017 @@ -0,0 +1,212 @@ +/* $NetBSD: prng.c,v 1.1 2017/11/26 11:01:09 maxv Exp $ */ + +/* + * Copyright (c) 2017 The NetBSD Foundation, Inc. All rights reserved. + * + * This code is derived from software contributed to The NetBSD Foundation + * by Maxime Villard. + * + * Red

CVS commit: src/sys/arch/amd64/stand/prekern

2017-11-26 Thread Maxime Villard
Module Name:src Committed By: maxv Date: Sun Nov 26 11:08:35 UTC 2017 Modified Files: src/sys/arch/amd64/stand/prekern: prng.c Log Message: I forgot to say in my previous commit that the PRNG is inspired from a conversation with Taylor and Thor on tech-kern@. (just add a

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

2017-11-26 Thread Maxime Villard
Module Name:src Committed By: maxv Date: Sun Nov 26 11:37:10 UTC 2017 Modified Files: src/sys/arch/x86/x86: ioapic.c lapic.c Log Message: Remove unused variables. To generate a diff of this commit: cvs rdiff -u -r1.54 -r1.55 src/sys/arch/x86/x86/ioapic.c cvs rdiff -u -r1

CVS commit: src/sys/arch/amd64/stand/prekern

2017-11-26 Thread Maxime Villard
Module Name:src Committed By: maxv Date: Sun Nov 26 14:29:48 UTC 2017 Modified Files: src/sys/arch/amd64/stand/prekern: mm.c Log Message: Oh, damn. Obviously I forgot one case here: an already-mapped region could be contained entirely in the region we're trying to create.

CVS commit: src/sys/arch/amd64/amd64

2017-11-26 Thread Maxime Villard
Module Name:src Committed By: maxv Date: Sun Nov 26 14:54:43 UTC 2017 Modified Files: src/sys/arch/amd64/amd64: amd64_trap.S locore.S mptramp.S Log Message: Hide a bunch of raw symbols. To generate a diff of this commit: cvs rdiff -u -r1.12 -r1.13 src/sys/arch/amd64/amd6

CVS commit: src/sys/arch/amd64/amd64

2017-11-26 Thread Maxime Villard
Module Name:src Committed By: maxv Date: Sun Nov 26 15:00:16 UTC 2017 Modified Files: src/sys/arch/amd64/amd64: locore.S Log Message: Update a comment, and use testw instead. To generate a diff of this commit: cvs rdiff -u -r1.142 -r1.143 src/sys/arch/amd64/amd64/locore.

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

2017-11-27 Thread Maxime Villard
Module Name:src Committed By: maxv Date: Mon Nov 27 09:10:12 UTC 2017 Modified Files: src/sys/arch/x86/include: cpu.h Log Message: Remove unused fields, there is no alignment we need to enforce. To generate a diff of this commit: cvs rdiff -u -r1.81 -r1.82 src/sys/arch/x

CVS commit: src/sys/arch/amd64/amd64

2017-11-27 Thread Maxime Villard
Module Name:src Committed By: maxv Date: Mon Nov 27 09:18:01 UTC 2017 Modified Files: src/sys/arch/amd64/amd64: machdep.c process_machdep.c Log Message: Inline _FRAME_GREG, and mask only 16 bits of the segment registers, otherwise the upper 48 bits may contain stack garbag

CVS commit: src/sys/arch/amd64/amd64

2017-11-28 Thread Maxime Villard
Module Name:src Committed By: maxv Date: Tue Nov 28 08:43:49 UTC 2017 Modified Files: src/sys/arch/amd64/amd64: spl.S Log Message: style To generate a diff of this commit: cvs rdiff -u -r1.30 -r1.31 src/sys/arch/amd64/amd64/spl.S Please note that diffs are not public do

CVS commit: src/sys/kern

2017-11-30 Thread Maxime Villard
Module Name:src Committed By: maxv Date: Thu Nov 30 18:44:16 UTC 2017 Modified Files: src/sys/kern: kern_proc.c Log Message: If no auxv is present, don't kmem_alloc(0). Easy to panic the kernel by typing 'cat /proc/aout_pid/auxv' on whatever a.out binary you're running. Fo

CVS commit: src/sys/arch/amd64/amd64

2017-12-01 Thread Maxime Villard
Module Name:src Committed By: maxv Date: Fri Dec 1 21:22:45 UTC 2017 Modified Files: src/sys/arch/amd64/amd64: machdep.c process_machdep.c Log Message: Don't even bother with the trap frame, and force the default values. To generate a diff of this commit: cvs rdiff -u -

CVS commit: src/sys/arch/amd64/conf

2017-12-02 Thread Maxime Villard
Module Name:src Committed By: maxv Date: Sat Dec 2 09:59:02 UTC 2017 Modified Files: src/sys/arch/amd64/conf: ALL Log Message: Remove options that do not exist on amd64. To generate a diff of this commit: cvs rdiff -u -r1.72 -r1.73 src/sys/arch/amd64/conf/ALL Please no

CVS commit: src/sys/arch/amd64

2017-12-02 Thread Maxime Villard
Module Name:src Committed By: maxv Date: Sat Dec 2 12:40:03 UTC 2017 Modified Files: src/sys/arch/amd64/amd64: trap.c src/sys/arch/amd64/conf: ALL GENERIC Log Message: Drop COMPAT_10 on amd64. The support for it comes down to one ifdef in trap.c - code that is inc

CVS commit: src/sys/arch

2017-12-02 Thread Maxime Villard
Module Name:src Committed By: maxv Date: Sat Dec 2 13:03:15 UTC 2017 Modified Files: src/sys/arch/amd64/conf: GENERIC files.amd64 src/sys/arch/xen/conf: files.xen Removed Files: src/sys/arch/amd64/amd64: compat_13_machdep.c Log Message: Drop COMPAT_13 on a

CVS commit: src/sys/arch/amd64/amd64

2017-12-02 Thread Maxime Villard
Module Name:src Committed By: maxv Date: Sat Dec 2 15:36:24 UTC 2017 Modified Files: src/sys/arch/amd64/amd64: netbsd32_machdep.c Log Message: Remove a piece of COMPAT_13, that I mistakenly didn't commit three hours ago (in my change to drop COMPAT_13 on amd64). To gene

CVS commit: src/sys/compat/ultrix

2017-12-03 Thread Maxime Villard
Module Name:src Committed By: maxv Date: Sun Dec 3 12:53:52 UTC 2017 Modified Files: src/sys/compat/ultrix: ultrix_fs.c Log Message: Fix uninitialized pointer, found by Mootja. Not a surprise in untested code. To generate a diff of this commit: cvs rdiff -u -r1.57 -r1.5

CVS commit: src/sys

2017-12-08 Thread Maxime Villard
Module Name:src Committed By: maxv Date: Fri Dec 8 17:49:55 UTC 2017 Modified Files: src/sys/net: if_mpls.c src/sys/netmpls: mpls_ttl.c Log Message: Style, and fix several bugs: - ip4_check(), mpls_unlabel_inet() and mpls_unlabel_inet6() perform pullups, so we

CVS commit: src/sys/netatalk

2017-12-09 Thread Maxime Villard
Module Name:src Committed By: maxv Date: Sat Dec 9 10:14:04 UTC 2017 Modified Files: src/sys/netatalk: aarp.c Log Message: Mmh, pull up the packet to ether_aarp, otherwise we're reading past the end of the mbuf. To generate a diff of this commit: cvs rdiff -u -r1.39 -r1

CVS commit: src/sys/net

2017-12-09 Thread Maxime Villard
Module Name:src Committed By: maxv Date: Sat Dec 9 10:19:42 UTC 2017 Modified Files: src/sys/net: if_ethersubr.c Log Message: Make sure we have an llc structure in the packet, and don't read past the end of the mbuf if we don't. I'm wondering whether we should not pull up

CVS commit: src/sys/net

2017-12-09 Thread Maxime Villard
Module Name:src Committed By: maxv Date: Sat Dec 9 10:30:30 UTC 2017 Modified Files: src/sys/net: if_mpls.c Log Message: Kick MPLS packets earlier. To generate a diff of this commit: cvs rdiff -u -r1.31 -r1.32 src/sys/net/if_mpls.c Please note that diffs are not public

CVS commit: src/sys/net

2017-12-09 Thread Maxime Villard
Module Name:src Committed By: maxv Date: Sat Dec 9 10:51:30 UTC 2017 Modified Files: src/sys/net: if_ethersubr.c Log Message: style To generate a diff of this commit: cvs rdiff -u -r1.249 -r1.250 src/sys/net/if_ethersubr.c Please note that diffs are not public domain;

CVS commit: src/sys/net80211

2017-12-10 Thread Maxime Villard
Module Name:src Committed By: maxv Date: Sun Dec 10 08:48:15 UTC 2017 Modified Files: src/sys/net80211: ieee80211_input.c Log Message: Update the pointer after m_pullup, otherwise possible use-after-free. To generate a diff of this commit: cvs rdiff -u -r1.89 -r1.90 src/

CVS commit: src/sys/net80211

2017-12-10 Thread Maxime Villard
Module Name:src Committed By: maxv Date: Sun Dec 10 08:56:24 UTC 2017 Modified Files: src/sys/net80211: ieee80211_crypto.c ieee80211_crypto.h ieee80211_input.c Log Message: Fix use-after-free: ieee80211_crypto_decap does a pullup on the mbuf but the updated poi

CVS commit: src/sys/netinet6

2017-12-10 Thread Maxime Villard
Module Name:src Committed By: maxv Date: Sun Dec 10 09:06:47 UTC 2017 Modified Files: src/sys/netinet6: ip6_flow.c Log Message: Fix use-after-free: if m_pullup fails the (freed) mbuf is pushed on the ip6_pktq queue and re-processed later. Return 1 to say "processed and fre

CVS commit: src/sys/net/npf

2017-12-15 Thread Maxime Villard
Module Name:src Committed By: maxv Date: Fri Dec 15 21:00:26 UTC 2017 Modified Files: src/sys/net/npf: npf.h Log Message: Fix a vulnerability in NPF, that allows whatever incoming IPv6 packet to bypass a certain number of filtering rules. Basically there is an integer ove

CVS commit: src/sys/compat/common

2017-12-16 Thread Maxime Villard
Module Name:src Committed By: maxv Date: Sat Dec 16 08:31:36 UTC 2017 Modified Files: src/sys/compat/common: Makefile.inc Log Message: Build libcompat as an object, not as a library. We want all of its functions compiled in, because compat modules loaded from the filesyste

CVS commit: src/sys/compat/common

2017-12-16 Thread Maxime Villard
Module Name:src Committed By: maxv Date: Sat Dec 16 09:10:30 UTC 2017 Modified Files: src/sys/compat/common: rtsock_50.c rtsock_70.c Log Message: Build these functions regardless of whether COMPAT_50 or COMPAT_70 are enabled. They must be there, because they are needed in

CVS commit: src/sys/conf

2017-12-16 Thread Maxime Villard
Module Name:src Committed By: maxv Date: Sat Dec 16 09:34:18 UTC 2017 Modified Files: src/sys/conf: files Log Message: Fix the linux dependency. It does not depend on COMPAT_16, it just wants the compat functions (not really controlled by COMPAT_NETBSD, but for the princip

CVS commit: src/sys

2017-12-16 Thread Maxime Villard
Module Name:src Committed By: maxv Date: Sat Dec 16 10:15:12 UTC 2017 Modified Files: src/sys/compat/common: Makefile src/sys/kern: files.kern Log Message: compat_util.c must be compiled by default in the kernel. It is needed by generic non-compat code, so it must

CVS commit: src/sys/lib/libsa

2017-12-21 Thread Maxime Villard
Module Name:src Committed By: maxv Date: Thu Dec 21 14:28:39 UTC 2017 Modified Files: src/sys/lib/libsa: loadfile_elf32.c Log Message: Make sure we're loading a relocatable binary, to give the user a chance to correct the kernel name if he mistakenly typed pkboot on a stat

CVS commit: src/sys/arch/amd64/stand/prekern

2017-12-21 Thread Maxime Villard
Module Name:src Committed By: maxv Date: Thu Dec 21 14:32:06 UTC 2017 Modified Files: src/sys/arch/amd64/stand/prekern: mm.c Log Message: Remove unused macros. To generate a diff of this commit: cvs rdiff -u -r1.20 -r1.21 src/sys/arch/amd64/stand/prekern/mm.c Please not

CVS commit: src

2017-12-21 Thread Maxime Villard
Module Name:src Committed By: maxv Date: Fri Dec 22 07:19:02 UTC 2017 Modified Files: src/distrib/sets/lists/base: md.amd64 src/sys/arch/amd64: Makefile Log Message: Build and install the prekern by default. I didn't build a full distribution to test this change, b

CVS commit: src/sys/arch/amd64/stand/prekern

2017-12-21 Thread Maxime Villard
Module Name:src Committed By: maxv Date: Fri Dec 22 07:37:27 UTC 2017 Modified Files: src/sys/arch/amd64/stand/prekern: locore.S trap.S Log Message: Sync comments with reality. To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.7 src/sys/arch/amd64/stand/prekern/l

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

2017-12-28 Thread Maxime Villard
Module Name:src Committed By: maxv Date: Thu Dec 28 08:30:36 UTC 2017 Modified Files: src/sys/arch/x86/include: cpu.h Log Message: typos To generate a diff of this commit: cvs rdiff -u -r1.83 -r1.84 src/sys/arch/x86/include/cpu.h Please note that diffs are not public do

CVS commit: src/sys/dev/acpi

2017-12-28 Thread Maxime Villard
Module Name:src Committed By: maxv Date: Thu Dec 28 08:49:28 UTC 2017 Modified Files: src/sys/dev/acpi: acpi_srat.c acpi_srat.h Log Message: Style, export struct acpisrat_node, and add acpisrat_get_node. To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/sys

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

2017-12-28 Thread Maxime Villard
Module Name:src Committed By: maxv Date: Thu Dec 28 13:46:10 UTC 2017 Modified Files: src/sys/arch/x86/x86: pmap.c Log Message: Downgrade the direct map from 1GB superpages to 2MB large pages, and simplify. Then, map the "head" region and the kernel segments as RO instead

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

2017-12-28 Thread Maxime Villard
Module Name:src Committed By: maxv Date: Thu Dec 28 14:03:13 UTC 2017 Modified Files: src/sys/arch/x86/x86: pmap.c Log Message: Eliminate the assumption that the beginning of the direct map is aligned to NBPD_L4 and NBPD_L3. It won't be when we'll randomize its location.

CVS commit: src/sys/arch/x86

2017-12-28 Thread Maxime Villard
Module Name:src Committed By: maxv Date: Thu Dec 28 14:34:39 UTC 2017 Modified Files: src/sys/arch/x86/include: pmap.h src/sys/arch/x86/x86: pmap.c Log Message: Use variables in PMAP_DIRECT_*, so that the location of the direct map can change. To generate a diff

CVS commit: src/sys/kern

2017-12-30 Thread Maxime Villard
Module Name:src Committed By: maxv Date: Sun Dec 31 06:57:12 UTC 2017 Modified Files: src/sys/kern: uipc_mbuf.c Log Message: Check MT_FREE by default, and not just under DEBUG (or DIAGNOSTIC). This code is fast, with an nonexistent overhead - and we already take care of se

CVS commit: src/sys/arch/amd64/include

2017-12-30 Thread Maxime Villard
Module Name:src Committed By: maxv Date: Sun Dec 31 07:23:09 UTC 2017 Modified Files: src/sys/arch/amd64/include: pcb.h Log Message: gc unused To generate a diff of this commit: cvs rdiff -u -r1.27 -r1.28 src/sys/arch/amd64/include/pcb.h Please note that diffs are not p

<    4   5   6   7   8   9   10   11   12   13   >