CVS commit: src/sys/dev/iscsi
Module Name:src Committed By: mlelstv Date: Sun Mar 4 07:39:45 UTC 2018 Modified Files: src/sys/dev/iscsi: iscsi_send.c Log Message: Return temporary errors when the session is trying to recover the last connection. The scsipi layer will retry. To generate a diff of this commit: cvs rdiff -u -r1.36 -r1.37 src/sys/dev/iscsi/iscsi_send.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/dev/iscsi/iscsi_send.c diff -u src/sys/dev/iscsi/iscsi_send.c:1.36 src/sys/dev/iscsi/iscsi_send.c:1.37 --- src/sys/dev/iscsi/iscsi_send.c:1.36 Sun Dec 3 19:07:10 2017 +++ src/sys/dev/iscsi/iscsi_send.c Sun Mar 4 07:39:45 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: iscsi_send.c,v 1.36 2017/12/03 19:07:10 christos Exp $ */ +/* $NetBSD: iscsi_send.c,v 1.37 2018/03/04 07:39:45 mlelstv Exp $ */ /*- * Copyright (c) 2004,2005,2006,2011 The NetBSD Foundation, Inc. @@ -1485,7 +1485,10 @@ send_run_xfer(session_t *session, struct conn = assign_connection(session, waitok); if (conn == NULL || conn->c_terminating || conn->c_state != ST_FULL_FEATURE) { - xs->error = XS_SELTIMEOUT; + if (session->s_terminating) + xs->error = XS_SELTIMEOUT; + else + xs->error = XS_BUSY; DEBC(conn, 10, ("run_xfer on dead connection\n")); scsipi_done(xs); unref_session(session);
CVS commit: src/sys/dev/iscsi
Module Name:src Committed By: mlelstv Date: Sun Mar 4 07:37:43 UTC 2018 Modified Files: src/sys/dev/iscsi: iscsi_rcv.c Log Message: Add sanity check. To generate a diff of this commit: cvs rdiff -u -r1.24 -r1.25 src/sys/dev/iscsi/iscsi_rcv.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/dev/iscsi/iscsi_rcv.c diff -u src/sys/dev/iscsi/iscsi_rcv.c:1.24 src/sys/dev/iscsi/iscsi_rcv.c:1.25 --- src/sys/dev/iscsi/iscsi_rcv.c:1.24 Sun Dec 3 19:07:10 2017 +++ src/sys/dev/iscsi/iscsi_rcv.c Sun Mar 4 07:37:43 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: iscsi_rcv.c,v 1.24 2017/12/03 19:07:10 christos Exp $ */ +/* $NetBSD: iscsi_rcv.c,v 1.25 2018/03/04 07:37:43 mlelstv Exp $ */ /*- * Copyright (c) 2004,2005,2006,2011 The NetBSD Foundation, Inc. @@ -737,6 +737,11 @@ receive_command_response_pdu(connection_ return -1; } + if (req_ccb->ccb_flags & CCBF_COMPLETE) { + DEBOUT(("Possibly duplicate command response (tagged as COMPLETE)\n")); + return -1; + } + if (req_ccb->ccb_pdu_waiting != NULL) { ccb_timeout_start(req_ccb, COMMAND_TIMEOUT); req_ccb->ccb_num_timeouts = 0;
CVS commit: src/usr.sbin/crash
Module Name:src Committed By: mlelstv Date: Sun Mar 4 07:15:37 UTC 2018 Modified Files: src/usr.sbin/crash: Makefile Log Message: Align with DDB. To generate a diff of this commit: cvs rdiff -u -r1.38 -r1.39 src/usr.sbin/crash/Makefile 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/crash/Makefile diff -u src/usr.sbin/crash/Makefile:1.38 src/usr.sbin/crash/Makefile:1.39 --- src/usr.sbin/crash/Makefile:1.38 Wed Jan 24 09:04:46 2018 +++ src/usr.sbin/crash/Makefile Sun Mar 4 07:15:37 2018 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.38 2018/01/24 09:04:46 skrll Exp $ +# $NetBSD: Makefile,v 1.39 2018/03/04 07:15:37 mlelstv Exp $ PROG= crash MAN= crash.8 @@ -40,6 +40,7 @@ CPPFLAGS+= -UDB_MACHINE_COMMANDS # ddb files from kernel .PATH: $S/ddb SRCS+= db_command.c db_lwp.c db_proc.c db_xxx.c db_cpu.c +SRCS+= db_autoconf.c SRCS+= db_access.c db_elf.c db_examine.c SRCS+= db_expr.c db_lex.c db_output.c db_print.c SRCS+= db_sym.c db_variables.c db_write_cmd.c
CVS commit: src/sys/ddb
Module Name:src Committed By: mlelstv Date: Sun Mar 4 07:14:51 UTC 2018 Modified Files: src/sys/ddb: db_command.c db_interface.h ddb.h files.ddb Added Files: src/sys/ddb: db_autoconf.c db_autoconf.h Log Message: Add command to print device list. To generate a diff of this commit: cvs rdiff -u -r0 -r1.1 src/sys/ddb/db_autoconf.c src/sys/ddb/db_autoconf.h cvs rdiff -u -r1.148 -r1.149 src/sys/ddb/db_command.c cvs rdiff -u -r1.35 -r1.36 src/sys/ddb/db_interface.h cvs rdiff -u -r1.2 -r1.3 src/sys/ddb/ddb.h cvs rdiff -u -r1.11 -r1.12 src/sys/ddb/files.ddb Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/ddb/db_command.c diff -u src/sys/ddb/db_command.c:1.148 src/sys/ddb/db_command.c:1.149 --- src/sys/ddb/db_command.c:1.148 Wed Jan 11 12:17:34 2017 +++ src/sys/ddb/db_command.c Sun Mar 4 07:14:50 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: db_command.c,v 1.148 2017/01/11 12:17:34 joerg Exp $ */ +/* $NetBSD: db_command.c,v 1.149 2018/03/04 07:14:50 mlelstv Exp $ */ /* * Copyright (c) 1996, 1997, 1998, 1999, 2002, 2009 The NetBSD Foundation, Inc. @@ -60,7 +60,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: db_command.c,v 1.148 2017/01/11 12:17:34 joerg Exp $"); +__KERNEL_RCSID(0, "$NetBSD: db_command.c,v 1.149 2018/03/04 07:14:50 mlelstv Exp $"); #ifdef _KERNEL_OPT #include "opt_aio.h" @@ -241,6 +241,7 @@ static const struct db_command db_show_c #endif { DDB_ADD_CMD("buf", db_buf_print_cmd, 0, "Print the struct buf at address.", "[/f] address",NULL) }, + { DDB_ADD_CMD("devices", db_show_all_devices, 0,NULL,NULL,NULL) }, { DDB_ADD_CMD("event", db_event_print_cmd, 0, "Print all the non-zero evcnt(9) event counters.", "[/fitm]",NULL) }, { DDB_ADD_CMD("files", db_show_files_cmd, 0, Index: src/sys/ddb/db_interface.h diff -u src/sys/ddb/db_interface.h:1.35 src/sys/ddb/db_interface.h:1.36 --- src/sys/ddb/db_interface.h:1.35 Fri Oct 27 12:25:15 2017 +++ src/sys/ddb/db_interface.h Sun Mar 4 07:14:50 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: db_interface.h,v 1.35 2017/10/27 12:25:15 joerg Exp $ */ +/* $NetBSD: db_interface.h,v 1.36 2018/03/04 07:14:50 mlelstv Exp $ */ /*- * Copyright (c) 1995 The NetBSD Foundation, Inc. @@ -73,6 +73,13 @@ void db_show_module_cmd(db_expr_t, bool /* kern/subr_vmem.c */ void db_show_all_vmems(db_expr_t, bool, db_expr_t, const char *); +/* kern/subr_autoconf.c */ +void db_show_all_devices(db_expr_t, bool, db_expr_t, const char *); +void db_show_all_device(db_expr_t, bool, db_expr_t, const char *); + +/* kern/subr_disk.c, dev/dksubr.c */ +void db_show_disk(db_expr_t, bool, db_expr_t, const char *); + #define db_stacktrace() \ db_stack_trace_print((db_expr_t)(intptr_t)__builtin_frame_address(0), \ true, 65535, "", printf) Index: src/sys/ddb/ddb.h diff -u src/sys/ddb/ddb.h:1.2 src/sys/ddb/ddb.h:1.3 --- src/sys/ddb/ddb.h:1.2 Fri Apr 10 22:29:30 2009 +++ src/sys/ddb/ddb.h Sun Mar 4 07:14:50 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: ddb.h,v 1.2 2009/04/10 22:29:30 ad Exp $ */ +/* $NetBSD: ddb.h,v 1.3 2018/03/04 07:14:50 mlelstv Exp $ */ /*- * Copyright (c) 2009 The NetBSD Foundation, Inc. @@ -49,5 +49,6 @@ #include #include #include +#include #endif /* _DDB_DDB_H_ */ Index: src/sys/ddb/files.ddb diff -u src/sys/ddb/files.ddb:1.11 src/sys/ddb/files.ddb:1.12 --- src/sys/ddb/files.ddb:1.11 Thu Dec 28 17:51:19 2017 +++ src/sys/ddb/files.ddb Sun Mar 4 07:14:50 2018 @@ -1,4 +1,4 @@ -# $NetBSD: files.ddb,v 1.11 2017/12/28 17:51:19 christos Exp $ +# $NetBSD: files.ddb,v 1.12 2018/03/04 07:14:50 mlelstv Exp $ # # DDB options @@ -10,6 +10,7 @@ defparam opt_ddbparam.h DDB_FROMCONSOLE define ddb file ddb/db_access.c ddb | kgdb +file ddb/db_autoconf.c ddb file ddb/db_break.c ddb file ddb/db_command.c ddb file ddb/db_cpu.c ddb Added files: Index: src/sys/ddb/db_autoconf.c diff -u /dev/null src/sys/ddb/db_autoconf.c:1.1 --- /dev/null Sun Mar 4 07:14:51 2018 +++ src/sys/ddb/db_autoconf.c Sun Mar 4 07:14:50 2018 @@ -0,0 +1,89 @@ +/* $NetBSD: db_autoconf.c,v 1.1 2018/03/04 07:14:50 mlelstv Exp $ */ + +/*- + * Copyright (c) 2016 The NetBSD Foundation, Inc. + * 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 NETBSD FOUNDATION, INC. AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
CVS commit: src/sys/sys
Module Name:src Committed By: mlelstv Date: Sun Mar 4 07:13:11 UTC 2018 Modified Files: src/sys/sys: device.h Log Message: Expose device structures to _KMEMUSER To generate a diff of this commit: cvs rdiff -u -r1.150 -r1.151 src/sys/sys/device.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/sys/device.h diff -u src/sys/sys/device.h:1.150 src/sys/sys/device.h:1.151 --- src/sys/sys/device.h:1.150 Thu Nov 9 01:02:55 2017 +++ src/sys/sys/device.h Sun Mar 4 07:13:11 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: device.h,v 1.150 2017/11/09 01:02:55 christos Exp $ */ +/* $NetBSD: device.h,v 1.151 2018/03/04 07:13:11 mlelstv Exp $ */ /* * Copyright (c) 1996, 2000 Christopher G. Demetriou @@ -81,7 +81,7 @@ #include #include -#ifdef _KERNEL +#if defined(_KERNEL) || defined(_KMEMUSER) #include #include #include @@ -122,7 +122,7 @@ typedef struct cfdata *cfdata_t; typedef struct cfdriver *cfdriver_t; typedef struct cfattach *cfattach_t; -#ifdef _KERNEL +#if defined(_KERNEL) || defined(_KMEMUSER) struct device_lock { int dvl_nwait; int dvl_nlock; @@ -199,7 +199,9 @@ struct device { #define DVF_BUS_SUSPENDED 0x0020 /* device bus suspend was called */ #define DVF_DETACH_SHUTDOWN 0x0080 /* device detaches safely at shutdown */ +#ifdef _KERNEL TAILQ_HEAD(devicelist, device); +#endif enum deviter_flags { DEVITER_F_RW = 0x1 @@ -288,7 +290,9 @@ struct cftable { cfdata_t ct_cfdata; /* pointer to cfdata table */ TAILQ_ENTRY(cftable) ct_list; /* list linkage */ }; +#ifdef _KERNEL TAILQ_HEAD(cftablelist, cftable); +#endif typedef int (*cfsubmatch_t)(device_t, cfdata_t, const int *, void *);
CVS commit: src/sys/kern
Module Name:src Committed By: mlelstv Date: Sun Mar 4 07:12:18 UTC 2018 Modified Files: src/sys/kern: subr_autoconf.c Log Message: expose struct devicelist alldevs again. To generate a diff of this commit: cvs rdiff -u -r1.256 -r1.257 src/sys/kern/subr_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/kern/subr_autoconf.c diff -u src/sys/kern/subr_autoconf.c:1.256 src/sys/kern/subr_autoconf.c:1.257 --- src/sys/kern/subr_autoconf.c:1.256 Fri Jan 26 22:58:09 2018 +++ src/sys/kern/subr_autoconf.c Sun Mar 4 07:12:18 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: subr_autoconf.c,v 1.256 2018/01/26 22:58:09 pgoyette Exp $ */ +/* $NetBSD: subr_autoconf.c,v 1.257 2018/03/04 07:12:18 mlelstv Exp $ */ /* * Copyright (c) 1996, 2000 Christopher G. Demetriou @@ -77,7 +77,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: subr_autoconf.c,v 1.256 2018/01/26 22:58:09 pgoyette Exp $"); +__KERNEL_RCSID(0, "$NetBSD: subr_autoconf.c,v 1.257 2018/03/04 07:12:18 mlelstv Exp $"); #ifdef _KERNEL_OPT #include "opt_ddb.h" @@ -217,20 +217,12 @@ static TAILQ_HEAD(, finalize_hook) confi static int config_finalize_done; /* list of all devices */ -static struct { - kmutex_t lock; - struct devicelist list; - devgen_t gen; - int nread; - int nwrite; - bool garbage; -} alldevs __cacheline_aligned = { - .list = TAILQ_HEAD_INITIALIZER(alldevs.list), - .gen = 1, - .nread = 0, - .nwrite = 0, - .garbage = false, -}; +static struct devicelist alldevs = TAILQ_HEAD_INITIALIZER(alldevs); +static kmutex_t alldevs_lock __cacheline_aligned; +static devgen_t alldevs_gen = 1; +static int alldevs_nread = 0; +static int alldevs_nwrite = 0; +static bool alldevs_garbage = false; static int config_pending; /* semaphore for mountroot */ static kmutex_t config_misc_lock; @@ -349,7 +341,7 @@ config_init(void) KASSERT(config_initialized == false); - mutex_init(&alldevs.lock, MUTEX_DEFAULT, IPL_VM); + mutex_init(&alldevs_lock, MUTEX_DEFAULT, IPL_VM); mutex_init(&config_misc_lock, MUTEX_DEFAULT, IPL_NONE); cv_init(&config_misc_cv, "cfgmisc"); @@ -1163,9 +1155,9 @@ number(char *ep, int n) /* * Expand the size of the cd_devs array if necessary. * - * The caller must hold alldevs.lock. config_makeroom() may release and - * re-acquire alldevs.lock, so callers should re-check conditions such - * as alldevs.nwrite == 0 and alldevs.nread == 0 when config_makeroom() + * The caller must hold alldevs_lock. config_makeroom() may release and + * re-acquire alldevs_lock, so callers should re-check conditions such + * as alldevs_nwrite == 0 and alldevs_nread == 0 when config_makeroom() * returns. */ static void @@ -1174,8 +1166,8 @@ config_makeroom(int n, struct cfdriver * int ondevs, nndevs; device_t *osp, *nsp; - KASSERT(mutex_owned(&alldevs.lock)); - alldevs.nwrite++; + KASSERT(mutex_owned(&alldevs_lock)); + alldevs_nwrite++; for (nndevs = MAX(4, cd->cd_ndevs); nndevs <= n; nndevs += nndevs) ; @@ -1188,21 +1180,21 @@ config_makeroom(int n, struct cfdriver * osp = cd->cd_devs; /* - * Release alldevs.lock around allocation, which may + * Release alldevs_lock around allocation, which may * sleep. */ - mutex_exit(&alldevs.lock); + mutex_exit(&alldevs_lock); nsp = kmem_alloc(sizeof(device_t[nndevs]), KM_SLEEP); - mutex_enter(&alldevs.lock); + mutex_enter(&alldevs_lock); /* * If another thread moved the array while we did - * not hold alldevs.lock, try again. + * not hold alldevs_lock, try again. */ if (cd->cd_devs != osp) { - mutex_exit(&alldevs.lock); + mutex_exit(&alldevs_lock); kmem_free(nsp, sizeof(device_t[nndevs])); - mutex_enter(&alldevs.lock); + mutex_enter(&alldevs_lock); continue; } @@ -1213,13 +1205,13 @@ config_makeroom(int n, struct cfdriver * cd->cd_ndevs = nndevs; cd->cd_devs = nsp; if (ondevs != 0) { - mutex_exit(&alldevs.lock); + mutex_exit(&alldevs_lock); kmem_free(osp, sizeof(device_t[ondevs])); - mutex_enter(&alldevs.lock); + mutex_enter(&alldevs_lock); } } - KASSERT(mutex_owned(&alldevs.lock)); - alldevs.nwrite--; + KASSERT(mutex_owned(&alldevs_lock)); + alldevs_nwrite--; } /* @@ -1229,16 +1221,16 @@ static void config_devlink(device_t dev) { - mutex_enter(&alldevs.lock); + mutex_enter(&alldevs_lock); KASSERT(device_cfdriver(dev)->cd_devs[dev->dv_unit] == dev); - dev->dv_add_gen = alldevs.gen; + dev->dv_add_gen = alldevs_gen; /* It is safe to add a device to the tail of the list while * readers and writers are in the list. */ - TAILQ_INSERT_TAIL(&alldevs.list, dev, dv_list); - mutex_exit(&alldevs.lock); + TAILQ_INSERT_TAIL(&alldevs, dev, dv_list); + mutex_exit(&alldevs_lock); } static void @@ -1253,7 +1245,7 @@ config_devfree(device_t dev) } /* - * Caller must hold alldevs.lock. + * Caller must hold alldevs_lock. */ static void config_devunlink(device_
CVS commit: src/crypto/external/bsd/openssl/lib/libcrypto
Module Name:src Committed By: christos Date: Sun Mar 4 04:09:03 UTC 2018 Modified Files: src/crypto/external/bsd/openssl/lib/libcrypto: Makefile Log Message: hack for lint To generate a diff of this commit: cvs rdiff -u -r1.14 -r1.15 \ src/crypto/external/bsd/openssl/lib/libcrypto/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/crypto/external/bsd/openssl/lib/libcrypto/Makefile diff -u src/crypto/external/bsd/openssl/lib/libcrypto/Makefile:1.14 src/crypto/external/bsd/openssl/lib/libcrypto/Makefile:1.15 --- src/crypto/external/bsd/openssl/lib/libcrypto/Makefile:1.14 Thu Feb 8 17:48:55 2018 +++ src/crypto/external/bsd/openssl/lib/libcrypto/Makefile Sat Mar 3 23:09:03 2018 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.14 2018/02/08 22:48:55 christos Exp $ +# $NetBSD: Makefile,v 1.15 2018/03/04 04:09:03 christos Exp $ # RCSid: # Id: Makefile,v 1.33 1998/11/11 11:53:53 sjg Exp @@ -28,6 +28,9 @@ USE_FIPS= no WARNS=0 CWARNFLAGS.clang+= -Wno-empty-body -Wno-unused-value -Wno-parentheses +# XXX Not yet. +LINTFLAGS+=-D__int128='long long' + CPPFLAGS+= -Dlib${LIB} -I. -I${OPENSSLSRC}/crypto -I${OPENSSLSRC} CPPFLAGS+= -I${OPENSSLSRC}/include -I${OPENSSLSRC}/crypto/include CPPFLAGS+= -I${OPENSSLSRC}/crypto/asn1 -I${OPENSSLSRC}/crypto/evp
CVS commit: src/crypto/external/bsd/openssl/lib/libcrypto/arch/alpha
Module Name:src Committed By: christos Date: Sun Mar 4 04:00:45 UTC 2018 Added Files: src/crypto/external/bsd/openssl/lib/libcrypto/arch/alpha: Makefile alpha-mont.S alphacpuid.S asm.h crypto.inc ghash-alpha.S modes.inc regdef.h sha.inc sha1-alpha.S Log Message: Alpha Stuff To generate a diff of this commit: cvs rdiff -u -r0 -r1.1 \ src/crypto/external/bsd/openssl/lib/libcrypto/arch/alpha/Makefile \ src/crypto/external/bsd/openssl/lib/libcrypto/arch/alpha/alpha-mont.S \ src/crypto/external/bsd/openssl/lib/libcrypto/arch/alpha/alphacpuid.S \ src/crypto/external/bsd/openssl/lib/libcrypto/arch/alpha/asm.h \ src/crypto/external/bsd/openssl/lib/libcrypto/arch/alpha/crypto.inc \ src/crypto/external/bsd/openssl/lib/libcrypto/arch/alpha/ghash-alpha.S \ src/crypto/external/bsd/openssl/lib/libcrypto/arch/alpha/modes.inc \ src/crypto/external/bsd/openssl/lib/libcrypto/arch/alpha/regdef.h \ src/crypto/external/bsd/openssl/lib/libcrypto/arch/alpha/sha.inc \ src/crypto/external/bsd/openssl/lib/libcrypto/arch/alpha/sha1-alpha.S Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Added files: Index: src/crypto/external/bsd/openssl/lib/libcrypto/arch/alpha/Makefile diff -u /dev/null src/crypto/external/bsd/openssl/lib/libcrypto/arch/alpha/Makefile:1.1 --- /dev/null Sat Mar 3 23:00:45 2018 +++ src/crypto/external/bsd/openssl/lib/libcrypto/arch/alpha/Makefile Sat Mar 3 23:00:45 2018 @@ -0,0 +1,15 @@ +# $NetBSD: Makefile,v 1.1 2018/03/04 04:00:45 christos Exp $ + +.include "bsd.own.mk" + +CRYPTODIST=${NETBSDSRCDIR}/crypto +.include "${NETBSDSRCDIR}/crypto/Makefile.openssl" + +regen: + for i in $$(find ${OPENSSLSRC} -name \*alpha\*.pl); do \ + case $$i in \ + (*) perl -I${OPENSSLSRC}/crypto/perlasm \ + -I${OPENSSLSRC}/crypto/bn/asm $$i linux /dev/stdout \ + > $$(basename $$i .pl).S;; \ + esac; \ + done Index: src/crypto/external/bsd/openssl/lib/libcrypto/arch/alpha/alpha-mont.S diff -u /dev/null src/crypto/external/bsd/openssl/lib/libcrypto/arch/alpha/alpha-mont.S:1.1 --- /dev/null Sat Mar 3 23:00:45 2018 +++ src/crypto/external/bsd/openssl/lib/libcrypto/arch/alpha/alpha-mont.S Sat Mar 3 23:00:45 2018 @@ -0,0 +1,274 @@ +#ifdef __linux__ +#include +#else +#include +#include +#endif + +.text + +.set noat +.set noreorder + +.globl bn_mul_mont +.align 5 +.ent bn_mul_mont +bn_mul_mont: + lda sp,-48(sp) + stq ra,0(sp) + stq s3,8(sp) + stq s4,16(sp) + stq s5,24(sp) + stq fp,32(sp) + mov sp,fp + .mask 0x0400f000,-48 + .frame fp,48,ra + .prologue 0 + + .align 4 + .set reorder + sextl a5,a5 + mov 0,v0 + cmplt a5,4,AT + bne AT,.Lexit + + ldq t1,0(a1) # ap[0] + s8addq a5,16,AT + ldq t4,8(a1) + subq sp,AT,sp + ldq t5,0(a2) # bp[0] + lda AT,-4096(zero) # mov -4096,AT + ldq a4,0(a4) + and sp,AT,sp + + mulq t1,t5,t0 + ldq t3,0(a3) # np[0] + umulh t1,t5,t1 + ldq t6,8(a3) + + mulq t0,a4,s5 + + mulq t3,s5,t2 + umulh t3,s5,t3 + + addq t2,t0,t2 + cmpult t2,t0,AT + addq t3,AT,t3 + + mulq t4,t5,t8 + mov 2,s4 + umulh t4,t5,t9 + mov sp,t7 + + mulq t6,s5,t10 + s8addq s4,a1,t4 + umulh t6,s5,t11 + s8addq s4,a3,t6 +.align 4 +.L1st: + .set noreorder + ldq t4,0(t4) + addl s4,1,s4 + ldq t6,0(t6) + lda t7,8(t7) + + addq t8,t1,t0 + mulq t4,t5,t8 + cmpult t0,t1,AT + addq t10,t3,t2 + + mulq t6,s5,t10 + addq t9,AT,t1 + cmpult t2,t3,v0 + cmplt s4,a5,t12 + + umulh t4,t5,t9 + addq t11,v0,t3 + addq t2,t0,t2 + s8addq s4,a1,t4 + + umulh t6,s5,t11 + cmpult t2,t0,v0 + addq t3,v0,t3 + s8addq s4,a3,t6 + + stq t2,-8(t7) + nop + unop + bne t12,.L1st + .set reorder + + addq t8,t1,t0 + addq t10,t3,t2 + cmpult t0,t1,AT + cmpult t2,t3,v0 + addq t9,AT,t1 + addq t11,v0,t3 + + addq t2,t0,t2 + cmpult t2,t0,v0 + addq t3,v0,t3 + + stq t2,0(t7) + + addq t3,t1,t3 + cmpult t3,t1,AT + stq t3,8(t7) + stq AT,16(t7) + + mov 1,s3 +.align 4 +.Louter: + s8addq s3,a2,t5 + ldq t1,0(a1) + ldq t4,8(a1) + ldq t5,0(t5) + ldq t3,0(a3) + ldq t6,8(a3) + ldq t12,0(sp) + + mulq t1,t5,t0 + umulh t1,t5,t1 + + addq t0,t12,t0 + cmpult t0,t12,AT + addq t1,AT,t1 + + mulq t0,a4,s5 + + mulq t3,s5,t2 + umulh t3,s5,t3 + + addq t2,t0,t2 + cmpult t2,t0,AT + mov 2,s4 + addq t3,AT,t3 + + mulq t4,t5,t8 + mov sp,t7 + umulh t4,t5,t9 + + mulq t6,s5,t10 + s8addq s4,a1,t4 + umulh t6,s5,t11 +.align 4 +.Linner: + .set noreorder + ldq t12,8(t7) #L0 + nop #U1 + ldq t4,0(t4) #L1 + s8addq s4,a3,t6 #U0 + + ldq t6,0(t6) #L0 + nop #U1 + addq t8,t1,t0 #L1 + lda t7,8(t7) + + mulq t4,t5,t8 #U1 + cmpult t0,t1,AT #L0 + addq t10,t3,t2 #L1 + addl s4,1,s4 + + mulq t6,s5,t10 #U1 + addq t9,AT,t1 #L0 + addq t0,t12,t0 #L1 + cmpult t2,t3,v0 #U0 + + umulh t4,t5,t9 #U1 + cmpult t0,t12,AT #L0 + addq t2,t0,t2 #L1 + addq t11,v0,t3 #U0 + + umulh t6,s5,t11 #U1 + s8addq s4,a1,t4 #L0 + cmpult t2,t0,v0 #L1 + cmplt s4,a5,t12 #U0 # borrow t12 + + addq t1,AT,t1 #L0 + addq t3,v0,t3 #U1 + stq t2,-8(t7) #L1 + bne t12,.Linner #U0 + .set reorder + + ldq t12,8(t7) + addq t8,t1,t0 + addq t10,t3,t2
CVS commit: src/crypto/external/bsd/openssl/lib/libcrypto/arch/powerpc
Module Name:src Committed By: christos Date: Sun Mar 4 03:25:18 UTC 2018 Modified Files: src/crypto/external/bsd/openssl/lib/libcrypto/arch/powerpc: aesp8-ppc.S ghashp8-ppc.S ppccpuid.S Added Files: src/crypto/external/bsd/openssl/lib/libcrypto/arch/powerpc: chacha-ppc.S chacha.inc poly1305-ppc.S poly1305-ppcfp.S poly1305.inc Log Message: regen. To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 \ src/crypto/external/bsd/openssl/lib/libcrypto/arch/powerpc/aesp8-ppc.S \ src/crypto/external/bsd/openssl/lib/libcrypto/arch/powerpc/ghashp8-ppc.S cvs rdiff -u -r0 -r1.1 \ src/crypto/external/bsd/openssl/lib/libcrypto/arch/powerpc/chacha-ppc.S \ src/crypto/external/bsd/openssl/lib/libcrypto/arch/powerpc/chacha.inc \ src/crypto/external/bsd/openssl/lib/libcrypto/arch/powerpc/poly1305-ppc.S \ src/crypto/external/bsd/openssl/lib/libcrypto/arch/powerpc/poly1305-ppcfp.S \ src/crypto/external/bsd/openssl/lib/libcrypto/arch/powerpc/poly1305.inc cvs rdiff -u -r1.9 -r1.10 \ src/crypto/external/bsd/openssl/lib/libcrypto/arch/powerpc/ppccpuid.S Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/crypto/external/bsd/openssl/lib/libcrypto/arch/powerpc/aesp8-ppc.S diff -u src/crypto/external/bsd/openssl/lib/libcrypto/arch/powerpc/aesp8-ppc.S:1.1 src/crypto/external/bsd/openssl/lib/libcrypto/arch/powerpc/aesp8-ppc.S:1.2 --- src/crypto/external/bsd/openssl/lib/libcrypto/arch/powerpc/aesp8-ppc.S:1.1 Fri Oct 14 12:09:44 2016 +++ src/crypto/external/bsd/openssl/lib/libcrypto/arch/powerpc/aesp8-ppc.S Sat Mar 3 22:25:18 2018 @@ -1832,3 +1832,1810 @@ _aesp8_ctr32_encrypt8x: .byte 0,12,0x04,0,0x80,6,6,0 .long 0 +.globl aes_p8_xts_encrypt +.type aes_p8_xts_encrypt,@function +.align 5 +aes_p8_xts_encrypt: + mr 10,3 + li 3,-1 + cmplwi 5,16 + bltlr + + lis 0,0xfff0 + mfspr 12,256 + li 11,0 + mtspr 256,0 + + vspltisb 9,0x07 + + + + + li 3,15 + lvx 8,0,8 + lvsl 5,0,8 + lvx 4,3,8 + + vperm 8,8,4,5 + + neg 11,10 + lvsr 5,0,11 + lvx 2,0,10 + addi 10,10,15 + + + cmplwi 7,0 + beq .Lxts_enc_no_key2 + + lvsl 7,0,7 + lwz 9,240(7) + srwi 9,9,1 + subi 9,9,1 + li 3,16 + + lvx 0,0,7 + lvx 1,3,7 + addi 3,3,16 + vperm 0,0,1,7 + vxor 8,8,0 + lvx 0,3,7 + addi 3,3,16 + mtctr 9 + +.Ltweak_xts_enc: + vperm 1,1,0,7 +.long 0x11080D08 + lvx 1,3,7 + addi 3,3,16 + vperm 0,0,1,7 +.long 0x11080508 + lvx 0,3,7 + addi 3,3,16 + bc 16,0,.Ltweak_xts_enc + + vperm 1,1,0,7 +.long 0x11080D08 + lvx 1,3,7 + vperm 0,0,1,7 +.long 0x11080509 + + li 8,0 + b .Lxts_enc + +.Lxts_enc_no_key2: + li 3,-16 + and 5,5,3 + + +.Lxts_enc: + lvx 4,0,10 + addi 10,10,16 + + lvsl 7,0,6 + lwz 9,240(6) + srwi 9,9,1 + subi 9,9,1 + li 3,16 + + vslb 10,9,9 + vor 10,10,9 + vspltisb 11,1 + vsldoi 10,10,11,15 + + cmplwi 5,96 + bge _aesp8_xts_encrypt6x + + andi. 7,5,15 + subic 0,5,32 + subi 7,7,16 + subfe 0,0,0 + and 0,0,7 + add 10,10,0 + + lvx 0,0,6 + lvx 1,3,6 + addi 3,3,16 + vperm 2,2,4,5 + vperm 0,0,1,7 + vxor 2,2,8 + vxor 2,2,0 + lvx 0,3,6 + addi 3,3,16 + mtctr 9 + b .Loop_xts_enc + +.align 5 +.Loop_xts_enc: + vperm 1,1,0,7 +.long 0x10420D08 + lvx 1,3,6 + addi 3,3,16 + vperm 0,0,1,7 +.long 0x10420508 + lvx 0,3,6 + addi 3,3,16 + bc 16,0,.Loop_xts_enc + + vperm 1,1,0,7 +.long 0x10420D08 + lvx 1,3,6 + li 3,16 + vperm 0,0,1,7 + vxor 0,0,8 +.long 0x10620509 + + + nop + +.long 0x7C602799 + addi 4,4,16 + + subic. 5,5,16 + beq .Lxts_enc_done + + vor 2,4,4 + lvx 4,0,10 + addi 10,10,16 + lvx 0,0,6 + lvx 1,3,6 + addi 3,3,16 + + subic 0,5,32 + subfe 0,0,0 + and 0,0,7 + add 10,10,0 + + vsrab 11,8,9 + vaddubm 8,8,8 + vsldoi 11,11,11,15 + vand 11,11,10 + vxor 8,8,11 + + vperm 2,2,4,5 + vperm 0,0,1,7 + vxor 2,2,8 + vxor 3,3,0 + vxor 2,2,0 + lvx 0,3,6 + addi 3,3,16 + + mtctr 9 + cmplwi 5,16 + bge .Loop_xts_enc + + vxor 3,3,8 + lvsr 5,0,5 + vxor 4,4,4 + vspltisb 11,-1 + vperm 4,4,11,5 + vsel 2,2,3,4 + + subi 11,4,17 + subi 4,4,16 + mtctr 5 + li 5,16 +.Loop_xts_enc_steal: + lbzu 0,1(11) + stb 0,16(11) + bc 16,0,.Loop_xts_enc_steal + + mtctr 9 + b .Loop_xts_enc + +.Lxts_enc_done: + cmplwi 8,0 + beq .Lxts_enc_ret + + vsrab 11,8,9 + vaddubm 8,8,8 + vsldoi 11,11,11,15 + vand 11,11,10 + vxor 8,8,11 + + +.long 0x7D004799 + +.Lxts_enc_ret: + mtspr 256,12 + li 3,0 + blr +.long 0 +.byte 0,12,0x04,0,0x80,6,6,0 +.long 0 + + +.globl aes_p8_xts_decrypt +.type aes_p8_xts_decrypt,@function +.align 5 +aes_p8_xts_decrypt: + mr 10,3 + li 3,-1 + cmplwi 5,16 + bltlr + + lis 0,0xfff8 + mfspr 12,256 + li 11,0 + mtspr 256,0 + + andi. 0,5,15 + neg 0,0 + andi. 0,0,16 + sub 5,5,0 + + vspltisb 9,0x07 + + + + + li 3,15 + lvx 8,0,8 + lvsl 5,0,8 + lvx 4,3,8 + + vperm 8,8,4,5 + + neg 11,10 + lvsr 5,0,11 + lvx 2,0,10 + addi 10,10,15 + + + cmplwi 7,0 + beq .Lxts_dec_no_key2 + + lvsl 7,0,7 + lwz 9,240(7) + srwi 9,9,1 + subi 9,9,1 + li 3,16 + + lvx 0,0,7 + lvx 1,3,7 + addi 3,3,16 + vperm 0,0,1,7 + vxor 8,8,0 + lvx 0,3,7 + addi 3,3,16 + mtctr 9 + +
CVS commit: src
Module Name:src Committed By: tsutsui Date: Sun Mar 4 03:14:52 UTC 2018 Modified Files: src/distrib/sets/lists/base: md.atari src/sys/arch/atari/stand/xxboot/ahdi-xxboot/milan: Makefile src/sys/arch/atari/stand/xxboot/sdboot/milan: Makefile Log Message: Provide wdboot as a copy of sdboot for Milan. It looks Milan's bootloader ROM emulates IDE disks as SCSI disks so sdboot works for them, but atari's installboot checks a specified device name and requires wdboot for wd(4) devices. To generate a diff of this commit: cvs rdiff -u -r1.54 -r1.55 src/distrib/sets/lists/base/md.atari cvs rdiff -u -r1.3 -r1.4 \ src/sys/arch/atari/stand/xxboot/ahdi-xxboot/milan/Makefile cvs rdiff -u -r1.3 -r1.4 \ src/sys/arch/atari/stand/xxboot/sdboot/milan/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/distrib/sets/lists/base/md.atari diff -u src/distrib/sets/lists/base/md.atari:1.54 src/distrib/sets/lists/base/md.atari:1.55 --- src/distrib/sets/lists/base/md.atari:1.54 Wed Aug 6 12:15:01 2014 +++ src/distrib/sets/lists/base/md.atari Sun Mar 4 03:14:51 2018 @@ -1,4 +1,4 @@ -# $NetBSD: md.atari,v 1.54 2014/08/06 12:15:01 martin Exp $ +# $NetBSD: md.atari,v 1.55 2018/03/04 03:14:51 tsutsui Exp $ ./sbin/ahdilabelbase-sysutil-root ./sbin/binpatch base-sysutil-root ./sbin/edahdi base-sysutil-root @@ -10,6 +10,8 @@ ./usr/mdec/milan/fdbootbase-sysutil-bin ./usr/mdec/milan/sdb00t.ahdi base-sysutil-bin ./usr/mdec/milan/sdbootbase-sysutil-bin +./usr/mdec/milan/wdb00t.ahdi base-sysutil-bin +./usr/mdec/milan/wdbootbase-sysutil-bin ./usr/mdec/milan/xxboot.ahdi base-sysutil-bin ./usr/mdec/std base-sysutil-bin ./usr/mdec/std/boot.atari base-sysutil-bin Index: src/sys/arch/atari/stand/xxboot/ahdi-xxboot/milan/Makefile diff -u src/sys/arch/atari/stand/xxboot/ahdi-xxboot/milan/Makefile:1.3 src/sys/arch/atari/stand/xxboot/ahdi-xxboot/milan/Makefile:1.4 --- src/sys/arch/atari/stand/xxboot/ahdi-xxboot/milan/Makefile:1.3 Sat Jun 28 09:09:53 2003 +++ src/sys/arch/atari/stand/xxboot/ahdi-xxboot/milan/Makefile Sun Mar 4 03:14:51 2018 @@ -1,5 +1,6 @@ -# $NetBSD: Makefile,v 1.3 2003/06/28 09:09:53 he Exp $ +# $NetBSD: Makefile,v 1.4 2018/03/04 03:14:51 tsutsui Exp $ BTYPE=MILAN +LINKS= ${BINDIR}/sdb00t.ahdi ${BINDIR}/wdb00t.ahdi .include <../Makefile.xxb> Index: src/sys/arch/atari/stand/xxboot/sdboot/milan/Makefile diff -u src/sys/arch/atari/stand/xxboot/sdboot/milan/Makefile:1.3 src/sys/arch/atari/stand/xxboot/sdboot/milan/Makefile:1.4 --- src/sys/arch/atari/stand/xxboot/sdboot/milan/Makefile:1.3 Sat Jun 28 09:09:54 2003 +++ src/sys/arch/atari/stand/xxboot/sdboot/milan/Makefile Sun Mar 4 03:14:51 2018 @@ -1,5 +1,6 @@ -# $NetBSD: Makefile,v 1.3 2003/06/28 09:09:54 he Exp $ +# $NetBSD: Makefile,v 1.4 2018/03/04 03:14:51 tsutsui Exp $ BTYPE=MILAN +LINKS= ${BINDIR}/sdboot ${BINDIR}/wdboot .include <../Makefile.sdboot>
CVS commit: src/share/man/man4
Module Name:src Committed By: pgoyette Date: Sun Mar 4 02:10:26 UTC 2018 Modified Files: src/share/man/man4: acpi.4 Log Message: emove an unnecessary .Dq To generate a diff of this commit: cvs rdiff -u -r1.85 -r1.86 src/share/man/man4/acpi.4 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/share/man/man4/acpi.4 diff -u src/share/man/man4/acpi.4:1.85 src/share/man/man4/acpi.4:1.86 --- src/share/man/man4/acpi.4:1.85 Sun Mar 4 00:07:39 2018 +++ src/share/man/man4/acpi.4 Sun Mar 4 02:10:26 2018 @@ -1,4 +1,4 @@ -.\" $NetBSD: acpi.4,v 1.85 2018/03/04 00:07:39 pgoyette Exp $ +.\" $NetBSD: acpi.4,v 1.86 2018/03/04 02:10:26 pgoyette Exp $ .\" .\" Copyright (c) 2002, 2004, 2010 The NetBSD Foundation, Inc. .\" All rights reserved. @@ -83,7 +83,6 @@ This may be required on specific .Dq nForce4 chipset systems, which hard hang when this method is called instead of having it fail gracefully. -.Dq .El .Sh SYSCTL SUPPORT The following
CVS commit: src/crypto/external/bsd/openssl/lib/libcrypto/arch/arm
Module Name:src Committed By: christos Date: Sun Mar 4 00:24:21 UTC 2018 Modified Files: src/crypto/external/bsd/openssl/lib/libcrypto/arch/arm: Makefile Log Message: remove useless grep To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 \ src/crypto/external/bsd/openssl/lib/libcrypto/arch/arm/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/crypto/external/bsd/openssl/lib/libcrypto/arch/arm/Makefile diff -u src/crypto/external/bsd/openssl/lib/libcrypto/arch/arm/Makefile:1.1 src/crypto/external/bsd/openssl/lib/libcrypto/arch/arm/Makefile:1.2 --- src/crypto/external/bsd/openssl/lib/libcrypto/arch/arm/Makefile:1.1 Fri Mar 2 19:20:57 2018 +++ src/crypto/external/bsd/openssl/lib/libcrypto/arch/arm/Makefile Sat Mar 3 19:24:21 2018 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.1 2018/03/03 00:20:57 christos Exp $ +# $NetBSD: Makefile,v 1.2 2018/03/04 00:24:21 christos Exp $ .include "bsd.own.mk" @@ -6,8 +6,7 @@ CRYPTODIST=${NETBSDSRCDIR}/crypto .include "${NETBSDSRCDIR}/crypto/Makefile.openssl" regen: - for i in $$(find ${OPENSSLSRC} -name \*arm\*.pl | grep -v charmap.pl); \ - do \ + for i in $$(find ${OPENSSLSRC} -name \*arm\*.pl); do \ case $$i in \ (*/charmap.pl|*/arm-xlate.pl);; \ (*) perl -I${OPENSSLSRC}/crypto/perlasm \
CVS commit: src/sys/arch/macppc/conf
Module Name:src Committed By: macallan Date: Sun Mar 4 00:22:22 UTC 2018 Modified Files: src/sys/arch/macppc/conf: POWERMAC_G5 Log Message: no more need to hardwire the boot device To generate a diff of this commit: cvs rdiff -u -r1.33 -r1.34 src/sys/arch/macppc/conf/POWERMAC_G5 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/macppc/conf/POWERMAC_G5 diff -u src/sys/arch/macppc/conf/POWERMAC_G5:1.33 src/sys/arch/macppc/conf/POWERMAC_G5:1.34 --- src/sys/arch/macppc/conf/POWERMAC_G5:1.33 Sat Mar 3 00:27:51 2018 +++ src/sys/arch/macppc/conf/POWERMAC_G5 Sun Mar 4 00:22:21 2018 @@ -105,8 +105,8 @@ options WS_KERNEL_BG=WSCOL_LIGHT_WHITE options FONT_GALLANT12x22 # Kernel root file system and dump configuration. -#config netbsd root on ? type ? -config netbsd root on gem0 type nfs +config netbsd root on ? type ? +#config netbsd root on gem0 type nfs options NFS_BOOT_DHCP #
CVS commit: src/sys/arch/powerpc/oea
Module Name:src Committed By: macallan Date: Sun Mar 4 00:21:20 UTC 2018 Modified Files: src/sys/arch/powerpc/oea: ofw_autoconf.c Log Message: detect if we netboot and set booted_device accordingly To generate a diff of this commit: cvs rdiff -u -r1.20 -r1.21 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.20 src/sys/arch/powerpc/oea/ofw_autoconf.c:1.21 --- src/sys/arch/powerpc/oea/ofw_autoconf.c:1.20 Tue Feb 18 12:27:15 2014 +++ src/sys/arch/powerpc/oea/ofw_autoconf.c Sun Mar 4 00:21:20 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: ofw_autoconf.c,v 1.20 2014/02/18 12:27:15 macallan Exp $ */ +/* $NetBSD: ofw_autoconf.c,v 1.21 2018/03/04 00:21:20 macallan 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.20 2014/02/18 12:27:15 macallan Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ofw_autoconf.c,v 1.21 2018/03/04 00:21:20 macallan Exp $"); #ifdef ofppc #include "gtpci.h" @@ -67,6 +67,7 @@ __KERNEL_RCSID(0, "$NetBSD: ofw_autoconf extern char bootpath[256]; char cbootpath[256]; +static int boot_node = 0; /* points at boot device if we netboot */ static void canonicalize_bootpath(void); @@ -88,9 +89,9 @@ cpu_configure(void) static void canonicalize_bootpath(void) { - int node; + int node, len; char *p, *lastp; - char last[32]; + char last[32], type[32]; /* * If the bootpath doesn't start with a / then it isn't @@ -104,7 +105,6 @@ canonicalize_bootpath(void) if (aliases != 0) { char *cp1, *cp2, *cp; char saved_ch = '\0'; - int len; cp1 = strchr(bootpath, ':'); cp2 = strchr(bootpath, ','); cp = cp1; @@ -151,6 +151,15 @@ canonicalize_bootpath(void) return; } + /* see if we netbooted */ + len = OF_getprop(node, "device_type", type, sizeof(type) - 1); + if (len > -1) { + type[len] = 0; + if (strcmp(type, "network") == 0) { + boot_node = node; + } + } + /* * cbootpath is a valid OF path. Use package-to-path to * canonicalize pathname. @@ -326,6 +335,10 @@ device_register(device_t dev, void *aux) prop_dictionary_set_uint32(dict, "device_node", node); + if (node == boot_node) { +/* we netbooted from whatever this is */ +booted_device = dev; + } /* see if this is going to be console */ memset(name, 0, sizeof(name)); OF_getprop(node, "device_type", name, sizeof(name));
CVS commit: src/share/mk
Module Name:src Committed By: christos Date: Sun Mar 4 00:17:05 UTC 2018 Modified Files: src/share/mk: bsd.own.mk Log Message: switch sh3 to openssl-1.1 To generate a diff of this commit: cvs rdiff -u -r1.1039 -r1.1040 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.1039 src/share/mk/bsd.own.mk:1.1040 --- src/share/mk/bsd.own.mk:1.1039 Fri Mar 2 19:22:04 2018 +++ src/share/mk/bsd.own.mk Sat Mar 3 19:17:05 2018 @@ -1,4 +1,4 @@ -# $NetBSD: bsd.own.mk,v 1.1039 2018/03/03 00:22:04 christos Exp $ +# $NetBSD: bsd.own.mk,v 1.1040 2018/03/04 00:17:05 christos Exp $ # This needs to be before bsd.init.mk .if defined(BSD_MK_COMPAT_FILE) @@ -104,6 +104,7 @@ MKGCCCMDS?= no .if ${MACHINE} == "amd64" || \ ${MACHINE} == "arm" || \ ${MACHINE} == "i386" || \ +${MACHINE_ARCH} == "sh3" || \ ${MACHINE} == "sparc" || \ ${MACHINE} == "sparc64" HAVE_OPENSSL?= 11
CVS commit: src/share/man/man4
Module Name:src Committed By: pgoyette Date: Sun Mar 4 00:07:39 UTC 2018 Modified Files: src/share/man/man4: acpi.4 Log Message: Improve wording To generate a diff of this commit: cvs rdiff -u -r1.84 -r1.85 src/share/man/man4/acpi.4 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/share/man/man4/acpi.4 diff -u src/share/man/man4/acpi.4:1.84 src/share/man/man4/acpi.4:1.85 --- src/share/man/man4/acpi.4:1.84 Sat Jan 13 23:43:46 2018 +++ src/share/man/man4/acpi.4 Sun Mar 4 00:07:39 2018 @@ -1,4 +1,4 @@ -.\" $NetBSD: acpi.4,v 1.84 2018/01/13 23:43:46 wiz Exp $ +.\" $NetBSD: acpi.4,v 1.85 2018/03/04 00:07:39 pgoyette Exp $ .\" .\" Copyright (c) 2002, 2004, 2010 The NetBSD Foundation, Inc. .\" All rights reserved. @@ -24,7 +24,7 @@ .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\" POSSIBILITY OF SUCH DAMAGE. .\" -.Dd February 20, 2017 +.Dd March 4, 2018 .Dt ACPI 4 .Os .Sh NAME @@ -86,9 +86,11 @@ having it fail gracefully. .Dq .El .Sh SYSCTL SUPPORT -Few +The following .Xr sysctl 8 -variables are directly relevant for ACPI. +variables are provided by the +.Nm +driver: .Bl -tag -width "123456" -offset indent .It Ic hw.acpi.root The address of the ACPI root pointer in system memory.
CVS commit: src/sys/arch/dreamcast/dev/g2
Module Name:src Committed By: christos Date: Sat Mar 3 23:27:51 UTC 2018 Modified Files: src/sys/arch/dreamcast/dev/g2: aica.c Log Message: this ain't python, thanks gcc6. To generate a diff of this commit: cvs rdiff -u -r1.23 -r1.24 src/sys/arch/dreamcast/dev/g2/aica.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/dreamcast/dev/g2/aica.c diff -u src/sys/arch/dreamcast/dev/g2/aica.c:1.23 src/sys/arch/dreamcast/dev/g2/aica.c:1.24 --- src/sys/arch/dreamcast/dev/g2/aica.c:1.23 Tue Jul 25 19:18:04 2017 +++ src/sys/arch/dreamcast/dev/g2/aica.c Sat Mar 3 18:27:51 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: aica.c,v 1.23 2017/07/25 23:18:04 nat Exp $ */ +/* $NetBSD: aica.c,v 1.24 2018/03/03 23:27:51 christos Exp $ */ /* * Copyright (c) 2003 SHIMIZU Ryo @@ -29,7 +29,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: aica.c,v 1.23 2017/07/25 23:18:04 nat Exp $"); +__KERNEL_RCSID(0, "$NetBSD: aica.c,v 1.24 2018/03/03 23:27:51 christos Exp $"); #include #include @@ -414,8 +414,9 @@ aica_ch2p8write(struct aica_softc *sc, b if (len) { p = (uint8_t *)buf; - for (i = 0; i < len; i++) + for (i = 0; i < len; i++) { *p++ = *src++; src++; + } aica_g2fifo_wait(); bus_space_write_region_4(sc->sc_memt, sc->sc_aica_memh,
CVS commit: src/sys/arch/powerpc/oea
Module Name:src Committed By: macallan Date: Sat Mar 3 22:50:17 UTC 2018 Modified Files: src/sys/arch/powerpc/oea: ofwoea_machdep.c Log Message: get bootpath from OF if we don't get it as an argument To generate a diff of this commit: cvs rdiff -u -r1.43 -r1.44 src/sys/arch/powerpc/oea/ofwoea_machdep.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/ofwoea_machdep.c diff -u src/sys/arch/powerpc/oea/ofwoea_machdep.c:1.43 src/sys/arch/powerpc/oea/ofwoea_machdep.c:1.44 --- src/sys/arch/powerpc/oea/ofwoea_machdep.c:1.43 Fri Mar 2 14:37:18 2018 +++ src/sys/arch/powerpc/oea/ofwoea_machdep.c Sat Mar 3 22:50:17 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: ofwoea_machdep.c,v 1.43 2018/03/02 14:37:18 macallan Exp $ */ +/* $NetBSD: ofwoea_machdep.c,v 1.44 2018/03/03 22:50:17 macallan Exp $ */ /*- * Copyright (c) 2007 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: ofwoea_machdep.c,v 1.43 2018/03/02 14:37:18 macallan Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ofwoea_machdep.c,v 1.44 2018/03/03 22:50:17 macallan Exp $"); #include "opt_ppcarch.h" #include "opt_compat_netbsd.h" @@ -230,6 +230,13 @@ ofwoea_initppc(u_int startkernel, u_int while (*args) BOOT_FLAG(*args++, boothowto); } + } else { + int chs = OF_finddevice("/chosen"); + int len; + + len = OF_getprop(chs, "bootpath", bootpath, sizeof(bootpath) - 1); + if (len > -1) + bootpath[len] = 0; } uvm_md_init();
CVS commit: src/sys/rump
Module Name:src Committed By: christos Date: Sat Mar 3 22:46:30 UTC 2018 Modified Files: src/sys/rump: Makefile.rump Log Message: Disable NULL pointer check deletion like we do for the kernel in src/sys/conf/Makefile.kern.inc. This is the same code we are compiling after all and it has the same issues. To generate a diff of this commit: cvs rdiff -u -r1.123 -r1.124 src/sys/rump/Makefile.rump Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/rump/Makefile.rump diff -u src/sys/rump/Makefile.rump:1.123 src/sys/rump/Makefile.rump:1.124 --- src/sys/rump/Makefile.rump:1.123 Wed Jan 17 19:32:49 2018 +++ src/sys/rump/Makefile.rump Sat Mar 3 17:46:30 2018 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile.rump,v 1.123 2018/01/18 00:32:49 mrg Exp $ +# $NetBSD: Makefile.rump,v 1.124 2018/03/03 22:46:30 christos Exp $ # .if !defined(_RUMP_MK) @@ -19,6 +19,11 @@ CPPFLAGS:= -I${RUMPTOP}/include ${CPPFLA CPPFLAGS+= -D_RUMPKERNEL -I${RUMPTOP}/librump/rumpkern .endif +# We are compiling the kernel code with no-delete-null-pointer-checks, +# and compiling without it, causes issues at least on sh3 by adding +# aborts after kern_assert on NULL pointer checks. +CFLAGS+=${${ACTIVE_CC} == "gcc":? -fno-delete-null-pointer-checks :} + # Define baseline cpu for mips ports, required for # rumpcomp_sync_icache() hypercall. .if !empty(MACHINE_ARCH:Mmips*)
CVS commit: [netbsd-6-1] src/doc
Module Name:src Committed By: snj Date: Sat Mar 3 20:51:09 UTC 2018 Modified Files: src/doc [netbsd-6-1]: CHANGES-6.1.6 Log Message: 1512 To generate a diff of this commit: cvs rdiff -u -r1.1.2.129 -r1.1.2.130 src/doc/CHANGES-6.1.6 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/doc/CHANGES-6.1.6 diff -u src/doc/CHANGES-6.1.6:1.1.2.129 src/doc/CHANGES-6.1.6:1.1.2.130 --- src/doc/CHANGES-6.1.6:1.1.2.129 Mon Feb 19 20:56:16 2018 +++ src/doc/CHANGES-6.1.6 Sat Mar 3 20:51:09 2018 @@ -1,4 +1,4 @@ -# $NetBSD: CHANGES-6.1.6,v 1.1.2.129 2018/02/19 20:56:16 snj Exp $ +# $NetBSD: CHANGES-6.1.6,v 1.1.2.130 2018/03/03 20:51:09 snj Exp $ A complete list of changes from the NetBSD 6.1.5 release to the NetBSD 6.1.6 release: @@ -15016,3 +15016,11 @@ sys/arch/x86/x86/vm_machdep.c 1.30 via Prevent unrestricted userland access to I/O ports in XEN. [maxv, ticket #1517] +sys/dev/rndpseudo.cpatch +sys/kern/subr_cprng.cpatch +sys/sys/cprng.h patch + + Fix panic when waiting with kqueue/kevent for a read from + /dev/random. + [riastradh, ticket #1512] +
CVS commit: [netbsd-6-0] src/doc
Module Name:src Committed By: snj Date: Sat Mar 3 20:51:26 UTC 2018 Modified Files: src/doc [netbsd-6-0]: CHANGES-6.0.7 Log Message: 1510, 1512 To generate a diff of this commit: cvs rdiff -u -r1.1.2.132 -r1.1.2.133 src/doc/CHANGES-6.0.7 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/doc/CHANGES-6.0.7 diff -u src/doc/CHANGES-6.0.7:1.1.2.132 src/doc/CHANGES-6.0.7:1.1.2.133 --- src/doc/CHANGES-6.0.7:1.1.2.132 Mon Feb 19 20:56:02 2018 +++ src/doc/CHANGES-6.0.7 Sat Mar 3 20:51:26 2018 @@ -1,4 +1,4 @@ -# $NetBSD: CHANGES-6.0.7,v 1.1.2.132 2018/02/19 20:56:02 snj Exp $ +# $NetBSD: CHANGES-6.0.7,v 1.1.2.133 2018/03/03 20:51:26 snj Exp $ A complete list of changes from the NetBSD 6.0.6 release to the NetBSD 6.0.7 release: @@ -15342,3 +15342,16 @@ sys/arch/x86/x86/vm_machdep.c 1.30 via Prevent unrestricted userland access to I/O ports in XEN. [maxv, ticket #1517] +distrib/sets/lists/comp/mi patch + + Add missing debug entry. + [spz, ticket #1510] + +sys/dev/rndpseudo.cpatch +sys/kern/subr_cprng.cpatch +sys/sys/cprng.h patch + + Fix panic when waiting with kqueue/kevent for a read from + /dev/random. + [riastradh, ticket #1512] +
CVS commit: [netbsd-6] src/doc
Module Name:src Committed By: snj Date: Sat Mar 3 20:50:38 UTC 2018 Modified Files: src/doc [netbsd-6]: CHANGES-6.2 Log Message: 1512, 1513, 1515 To generate a diff of this commit: cvs rdiff -u -r1.1.2.325 -r1.1.2.326 src/doc/CHANGES-6.2 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/doc/CHANGES-6.2 diff -u src/doc/CHANGES-6.2:1.1.2.325 src/doc/CHANGES-6.2:1.1.2.326 --- src/doc/CHANGES-6.2:1.1.2.325 Mon Feb 19 20:56:37 2018 +++ src/doc/CHANGES-6.2 Sat Mar 3 20:50:38 2018 @@ -1,4 +1,4 @@ -# $NetBSD: CHANGES-6.2,v 1.1.2.325 2018/02/19 20:56:37 snj Exp $ +# $NetBSD: CHANGES-6.2,v 1.1.2.326 2018/03/03 20:50:38 snj Exp $ A complete list of changes from the 6.1 release until the 6.2 release: @@ -21073,3 +21073,23 @@ sys/arch/x86/x86/vm_machdep.c 1.30 via Prevent unrestricted userland access to I/O ports in XEN. [maxv, ticket #1517] +sys/dev/rndpseudo.cpatch +sys/kern/subr_cprng.cpatch +sys/sys/cprng.h patch + + Fix panic when waiting with kqueue/kevent for a read from + /dev/random. + [riastradh, ticket #1512] + +sys/arch/sparc/sparc/locore.s 1.269 + + Avoid an instruction requiring a higher alignment than we + are guaranteed. PR port-sparc/52721: ddb errors on ps command + [maya, ticket #1513] + +dist/pf/etc/pf.os1.4-1.5 + + Synchronise with r1.27 from OpenBSD + Add DragonFly BSD fingerprints. + [sevan, ticket #1515] +
CVS commit: [netbsd-6] src/dist/pf/etc
Module Name:src Committed By: snj Date: Sat Mar 3 20:49:18 UTC 2018 Modified Files: src/dist/pf/etc [netbsd-6]: pf.os Log Message: Pull up following revision(s) (requested by sevan in ticket #1515): dist/pf/etc/pf.os: 1.4-1.5 Synchronise with r1.27 from OpenBSD -- Add DragonFly BSD fingerprints. To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.3.20.1 src/dist/pf/etc/pf.os Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/dist/pf/etc/pf.os diff -u src/dist/pf/etc/pf.os:1.3 src/dist/pf/etc/pf.os:1.3.20.1 --- src/dist/pf/etc/pf.os:1.3 Wed Jun 18 09:06:25 2008 +++ src/dist/pf/etc/pf.os Sat Mar 3 20:49:18 2018 @@ -1,5 +1,5 @@ -# $NetBSD: pf.os,v 1.3 2008/06/18 09:06:25 yamt Exp $ -# $OpenBSD: pf.os,v 1.21 2006/07/28 21:51:12 david Exp $ +# $NetBSD: pf.os,v 1.3.20.1 2018/03/03 20:49:18 snj Exp $ +# $OpenBSD: pf.os,v 1.27 2016/09/03 17:08:57 sthen Exp $ # passive OS fingerprinting # - # @@ -226,7 +226,13 @@ S2:64:1:60:M*,S,T,N,W0: Linux:2.4::Linu S3:64:1:60:M*,S,T,N,W0: Linux:2.4:.18-21:Linux 2.4.18 and newer S4:64:1:60:M*,S,T,N,W0: Linux:2.4::Linux 2.4/2.6 <= 2.6.7 S4:64:1:60:M*,S,T,N,W0: Linux:2.6:.1-7:Linux 2.4/2.6 <= 2.6.7 -S4:64:1:60:M*,S,T,N,W7: Linux:2.6:8:Linux 2.6.8 and newer (?) + +S4:64:1:60:M*,S,T,N,W5: Linux:2.6::Linux 2.6 (newer, 1) +S4:64:1:60:M*,S,T,N,W6: Linux:2.6::Linux 2.6 (newer, 2) +S4:64:1:60:M*,S,T,N,W7: Linux:2.6::Linux 2.6 (newer, 3) +T4:64:1:60:M*,S,T,N,W7: Linux:2.6::Linux 2.6 (newer, 4) + +S10:64:1:60:M*,S,T,N,W4: Linux:3.0::Linux 3.0 S3:64:1:60:M*,S,T,N,W1: Linux:2.5::Linux 2.5 (sometimes 2.4) S4:64:1:60:M*,S,T,N,W1: Linux:2.5-2.6::Linux 2.5/2.6 @@ -299,13 +305,27 @@ S22:64:1:52:M*,N,N,S,N,W0: Linux:2.2:ts: # - OpenBSD - 16384:64:0:60:M*,N,W0,N,N,T: OpenBSD:2.6::NetBSD 1.3 (or OpenBSD 2.6) -16384:64:1:64:M*,N,N,S,N,W0,N,N,T: OpenBSD:3.0-4.0::OpenBSD 3.0-4.0 -16384:64:0:64:M*,N,N,S,N,W0,N,N,T: OpenBSD:3.0-4.0:no-df:OpenBSD 3.0-4.0 (scrub no-df) +16384:64:1:64:M*,N,N,S,N,W0,N,N,T: OpenBSD:3.0-4.8::OpenBSD 3.0-4.8 +16384:64:0:64:M*,N,N,S,N,W0,N,N,T: OpenBSD:3.0-4.8:no-df:OpenBSD 3.0-4.8 (scrub no-df) 57344:64:1:64:M*,N,N,S,N,W0,N,N,T: OpenBSD:3.3-4.0::OpenBSD 3.3-4.0 57344:64:0:64:M*,N,N,S,N,W0,N,N,T: OpenBSD:3.3-4.0:no-df:OpenBSD 3.3-4.0 (scrub no-df) 65535:64:1:64:M*,N,N,S,N,W0,N,N,T: OpenBSD:3.0-4.0:opera:OpenBSD 3.0-4.0 (Opera) +16384:64:1:64:M*,N,N,S,N,W3,N,N,T: OpenBSD:4.9::OpenBSD 4.9 +16384:64:0:64:M*,N,N,S,N,W3,N,N,T: OpenBSD:4.9:no-df:OpenBSD 4.9 (scrub no-df) + +16384:64:1:64:M*,N,N,S,N,W6,N,N,T: OpenBSD:6.1::OpenBSD 6.1 +16384:64:0:64:M*,N,N,S,N,W6,N,N,T: OpenBSD:6.1:no-df:OpenBSD 6.1 (scrub no-df) + +# - DragonFly BSD - + +57344:64:1:60:M*,N,W0,N,N,T: DragonFly:1.0:A:DragonFly 1.0A +57344:64:0:64:M*,N,W0,N,N,S,N,N,T: DragonFly:1.2-1.12::DragonFly 1.2-1.12 +5840:64:1:60:M*,S,T,N,W4: DragonFly:2.0-2.1::DragonFly 2.0-2.1 +57344:64:0:64:M*,N,W0,N,N,S,N,N,T: DragonFly:2.2-2.3::DragonFly 2.2-2.3 +57344:64:0:64:M*,N,W5,N,N,S,N,N,T: DragonFly:2.4-2.7::DragonFly 2.4-2.7 + # - Solaris - S17:64:1:64:N,W3,N,N,T0,N,N,S,M*: Solaris:8:RFC1323:Solaris 8 RFC1323 @@ -362,7 +382,7 @@ S34:64:1:52:M*,N,W0,N,N,S: Solaris:10:b # - Windows - # Windows TCP/IP stack is a mess. For most recent XP, 2000 and -# even 98, the pathlevel, not the actual OS version, is more +# even 98, the patchlevel, not the actual OS version, is more # relevant to the signature. They share the same code, so it would # seem. Luckily for us, almost all Windows 9x boxes have an # awkward MSS of 536, which I use to tell one from another @@ -426,6 +446,8 @@ S44:128:1:48:M*,N,N,S: Windows:XP:SP1: 32767:128:1:48:M*,N,N,S: Windows:2000:SP4:Windows SP1, 2000 SP4 32767:128:1:48:M*,N,N,S: Windows:XP:SP1:Windows SP1, 2000 SP4 +8192:128:1:52:M*,N,W2,N,N,S: Windows:Vista::Windows Vista/7 + # Odds, ends, mods: S52:128:1:48:M1260,N,N,S: Windows:2000:cisco:Windows XP/2000 via Cisco
CVS commit: [netbsd-6] src/sys/arch/sparc/sparc
Module Name:src Committed By: snj Date: Sat Mar 3 20:47:24 UTC 2018 Modified Files: src/sys/arch/sparc/sparc [netbsd-6]: locore.s Log Message: Pull up following revision(s) (requested by maya in ticket #1513): sys/arch/sparc/sparc/locore.s: 1.269 Avoid an instruction requiring a higher alignment than we are guaranteed Fixes PR port-sparc/52721: ddb errors on ps command Thanks to mlelstv. To generate a diff of this commit: cvs rdiff -u -r1.265 -r1.265.8.1 src/sys/arch/sparc/sparc/locore.s 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/sparc/sparc/locore.s diff -u src/sys/arch/sparc/sparc/locore.s:1.265 src/sys/arch/sparc/sparc/locore.s:1.265.8.1 --- src/sys/arch/sparc/sparc/locore.s:1.265 Mon Aug 15 02:19:44 2011 +++ src/sys/arch/sparc/sparc/locore.s Sat Mar 3 20:47:24 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: locore.s,v 1.265 2011/08/15 02:19:44 mrg Exp $ */ +/* $NetBSD: locore.s,v 1.265.8.1 2018/03/03 20:47:24 snj Exp $ */ /* * Copyright (c) 1996 Paul Kranenburg @@ -6286,8 +6286,9 @@ ENTRY(longjmp) cmp %fp, %g7 ! compare against desired frame bl,a 1b ! if below, restore !pop frame and loop - be,a 2f ! if there, - ldd [%g1+0], %o2 !fetch return %sp and pc, and get out + ld [%g1+0], %o2 ! fetch return %sp + be,a 2f ! we're there, get out + ld [%g1+4], %o3 ! fetch return pc Llongjmpbotch: ! otherwise, went too far; bomb out
CVS commit: [netbsd-6-1] src/sys
Module Name:src Committed By: snj Date: Sat Mar 3 20:44:36 UTC 2018 Modified Files: src/sys/dev [netbsd-6-1]: rndpseudo.c src/sys/kern [netbsd-6-1]: subr_cprng.c src/sys/sys [netbsd-6-1]: cprng.h Log Message: Apply patch (requested by riastradh in ticket #1512): Fix panic when waiting with kqueue/kevent for a read from /dev/random. To generate a diff of this commit: cvs rdiff -u -r1.6.2.3 -r1.6.2.3.6.1 src/sys/dev/rndpseudo.c cvs rdiff -u -r1.5.2.8 -r1.5.2.8.2.1 src/sys/kern/subr_cprng.c cvs rdiff -u -r1.4.2.1 -r1.4.2.1.6.1 src/sys/sys/cprng.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/rndpseudo.c diff -u src/sys/dev/rndpseudo.c:1.6.2.3 src/sys/dev/rndpseudo.c:1.6.2.3.6.1 --- src/sys/dev/rndpseudo.c:1.6.2.3 Mon May 21 16:49:54 2012 +++ src/sys/dev/rndpseudo.c Sat Mar 3 20:44:35 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: rndpseudo.c,v 1.6.2.3 2012/05/21 16:49:54 jdc Exp $ */ +/* $NetBSD: rndpseudo.c,v 1.6.2.3.6.1 2018/03/03 20:44:35 snj Exp $ */ /*- * Copyright (c) 1997-2011 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: rndpseudo.c,v 1.6.2.3 2012/05/21 16:49:54 jdc Exp $"); +__KERNEL_RCSID(0, "$NetBSD: rndpseudo.c,v 1.6.2.3.6.1 2018/03/03 20:44:35 snj Exp $"); #if defined(_KERNEL_OPT) #include "opt_compat_netbsd.h" @@ -673,13 +673,13 @@ rnd_poll(struct file *fp, int events) } } + mutex_enter(&ctx->cprng->mtx); if (cprng_strong_ready(ctx->cprng)) { revents |= events & (POLLIN | POLLRDNORM); } else { - mutex_enter(&ctx->cprng->mtx); selrecord(curlwp, &ctx->cprng->selq); - mutex_exit(&ctx->cprng->mtx); } + mutex_exit(&ctx->cprng->mtx); return (revents); } @@ -731,12 +731,24 @@ static int filt_rndread(struct knote *kn, long hint) { cprng_strong_t *c = kn->kn_hook; + int ret; + if (hint & NOTE_SUBMIT) + KASSERT(mutex_owned(&c->mtx)); + else + mutex_enter(&c->mtx); if (cprng_strong_ready(c)) { kn->kn_data = RND_TEMP_BUFFER_SIZE; - return 1; + ret = 1; + } else { + ret = 0; } - return 0; + if (hint & NOTE_SUBMIT) + KASSERT(mutex_owned(&c->mtx)); + else + mutex_exit(&c->mtx); + + return ret; } static const struct filterops rnd_seltrue_filtops = Index: src/sys/kern/subr_cprng.c diff -u src/sys/kern/subr_cprng.c:1.5.2.8 src/sys/kern/subr_cprng.c:1.5.2.8.2.1 --- src/sys/kern/subr_cprng.c:1.5.2.8 Fri Mar 29 00:44:28 2013 +++ src/sys/kern/subr_cprng.c Sat Mar 3 20:44:35 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: subr_cprng.c,v 1.5.2.8 2013/03/29 00:44:28 msaitoh Exp $ */ +/* $NetBSD: subr_cprng.c,v 1.5.2.8.2.1 2018/03/03 20:44:35 snj Exp $ */ /*- * Copyright (c) 2011 The NetBSD Foundation, Inc. @@ -46,7 +46,7 @@ #include -__KERNEL_RCSID(0, "$NetBSD: subr_cprng.c,v 1.5.2.8 2013/03/29 00:44:28 msaitoh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: subr_cprng.c,v 1.5.2.8.2.1 2018/03/03 20:44:35 snj Exp $"); void cprng_init(void) @@ -95,7 +95,7 @@ cprng_strong_doreseed(cprng_strong_t *co if (c->flags & CPRNG_USE_CV) { cv_broadcast(&c->cv); } - selnotify(&c->selq, 0, 0); + selnotify(&c->selq, 0, NOTE_SUBMIT); } static void @@ -397,7 +397,7 @@ cprng_strong_setflags(cprng_strong_t *co if (c->flags & CPRNG_USE_CV) { cv_broadcast(&c->cv); } - selnotify(&c->selq, 0, 0); + selnotify(&c->selq, 0, NOTE_SUBMIT); } } c->flags = flags; Index: src/sys/sys/cprng.h diff -u src/sys/sys/cprng.h:1.4.2.1 src/sys/sys/cprng.h:1.4.2.1.6.1 --- src/sys/sys/cprng.h:1.4.2.1 Fri Apr 20 23:35:20 2012 +++ src/sys/sys/cprng.h Sat Mar 3 20:44:36 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: cprng.h,v 1.4.2.1 2012/04/20 23:35:20 riz Exp $ */ +/* $NetBSD: cprng.h,v 1.4.2.1.6.1 2018/03/03 20:44:36 snj Exp $ */ /*- * Copyright (c) 2011 The NetBSD Foundation, Inc. @@ -121,12 +121,11 @@ static inline int cprng_strong_ready(cprng_strong_t *c) { int ret = 0; - - mutex_enter(&c->mtx); + + KASSERT(mutex_owned(&c->mtx)); if (c->drbg.reseed_counter < NIST_CTR_DRBG_RESEED_INTERVAL) { ret = 1; } - mutex_exit(&c->mtx); return ret; }
CVS commit: [netbsd-6] src/sys
Module Name:src Committed By: snj Date: Sat Mar 3 20:44:39 UTC 2018 Modified Files: src/sys/dev [netbsd-6]: rndpseudo.c src/sys/kern [netbsd-6]: subr_cprng.c src/sys/sys [netbsd-6]: cprng.h Log Message: Apply patch (requested by riastradh in ticket #1512): Fix panic when waiting with kqueue/kevent for a read from /dev/random. To generate a diff of this commit: cvs rdiff -u -r1.6.2.3 -r1.6.2.4 src/sys/dev/rndpseudo.c cvs rdiff -u -r1.5.2.8 -r1.5.2.9 src/sys/kern/subr_cprng.c cvs rdiff -u -r1.4.2.1 -r1.4.2.2 src/sys/sys/cprng.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/rndpseudo.c diff -u src/sys/dev/rndpseudo.c:1.6.2.3 src/sys/dev/rndpseudo.c:1.6.2.4 --- src/sys/dev/rndpseudo.c:1.6.2.3 Mon May 21 16:49:54 2012 +++ src/sys/dev/rndpseudo.c Sat Mar 3 20:44:38 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: rndpseudo.c,v 1.6.2.3 2012/05/21 16:49:54 jdc Exp $ */ +/* $NetBSD: rndpseudo.c,v 1.6.2.4 2018/03/03 20:44:38 snj Exp $ */ /*- * Copyright (c) 1997-2011 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: rndpseudo.c,v 1.6.2.3 2012/05/21 16:49:54 jdc Exp $"); +__KERNEL_RCSID(0, "$NetBSD: rndpseudo.c,v 1.6.2.4 2018/03/03 20:44:38 snj Exp $"); #if defined(_KERNEL_OPT) #include "opt_compat_netbsd.h" @@ -673,13 +673,13 @@ rnd_poll(struct file *fp, int events) } } + mutex_enter(&ctx->cprng->mtx); if (cprng_strong_ready(ctx->cprng)) { revents |= events & (POLLIN | POLLRDNORM); } else { - mutex_enter(&ctx->cprng->mtx); selrecord(curlwp, &ctx->cprng->selq); - mutex_exit(&ctx->cprng->mtx); } + mutex_exit(&ctx->cprng->mtx); return (revents); } @@ -731,12 +731,24 @@ static int filt_rndread(struct knote *kn, long hint) { cprng_strong_t *c = kn->kn_hook; + int ret; + if (hint & NOTE_SUBMIT) + KASSERT(mutex_owned(&c->mtx)); + else + mutex_enter(&c->mtx); if (cprng_strong_ready(c)) { kn->kn_data = RND_TEMP_BUFFER_SIZE; - return 1; + ret = 1; + } else { + ret = 0; } - return 0; + if (hint & NOTE_SUBMIT) + KASSERT(mutex_owned(&c->mtx)); + else + mutex_exit(&c->mtx); + + return ret; } static const struct filterops rnd_seltrue_filtops = Index: src/sys/kern/subr_cprng.c diff -u src/sys/kern/subr_cprng.c:1.5.2.8 src/sys/kern/subr_cprng.c:1.5.2.9 --- src/sys/kern/subr_cprng.c:1.5.2.8 Fri Mar 29 00:44:28 2013 +++ src/sys/kern/subr_cprng.c Sat Mar 3 20:44:38 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: subr_cprng.c,v 1.5.2.8 2013/03/29 00:44:28 msaitoh Exp $ */ +/* $NetBSD: subr_cprng.c,v 1.5.2.9 2018/03/03 20:44:38 snj Exp $ */ /*- * Copyright (c) 2011 The NetBSD Foundation, Inc. @@ -46,7 +46,7 @@ #include -__KERNEL_RCSID(0, "$NetBSD: subr_cprng.c,v 1.5.2.8 2013/03/29 00:44:28 msaitoh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: subr_cprng.c,v 1.5.2.9 2018/03/03 20:44:38 snj Exp $"); void cprng_init(void) @@ -95,7 +95,7 @@ cprng_strong_doreseed(cprng_strong_t *co if (c->flags & CPRNG_USE_CV) { cv_broadcast(&c->cv); } - selnotify(&c->selq, 0, 0); + selnotify(&c->selq, 0, NOTE_SUBMIT); } static void @@ -397,7 +397,7 @@ cprng_strong_setflags(cprng_strong_t *co if (c->flags & CPRNG_USE_CV) { cv_broadcast(&c->cv); } - selnotify(&c->selq, 0, 0); + selnotify(&c->selq, 0, NOTE_SUBMIT); } } c->flags = flags; Index: src/sys/sys/cprng.h diff -u src/sys/sys/cprng.h:1.4.2.1 src/sys/sys/cprng.h:1.4.2.2 --- src/sys/sys/cprng.h:1.4.2.1 Fri Apr 20 23:35:20 2012 +++ src/sys/sys/cprng.h Sat Mar 3 20:44:39 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: cprng.h,v 1.4.2.1 2012/04/20 23:35:20 riz Exp $ */ +/* $NetBSD: cprng.h,v 1.4.2.2 2018/03/03 20:44:39 snj Exp $ */ /*- * Copyright (c) 2011 The NetBSD Foundation, Inc. @@ -121,12 +121,11 @@ static inline int cprng_strong_ready(cprng_strong_t *c) { int ret = 0; - - mutex_enter(&c->mtx); + + KASSERT(mutex_owned(&c->mtx)); if (c->drbg.reseed_counter < NIST_CTR_DRBG_RESEED_INTERVAL) { ret = 1; } - mutex_exit(&c->mtx); return ret; }
CVS commit: [netbsd-6-0] src/sys
Module Name:src Committed By: snj Date: Sat Mar 3 20:44:33 UTC 2018 Modified Files: src/sys/dev [netbsd-6-0]: rndpseudo.c src/sys/kern [netbsd-6-0]: subr_cprng.c src/sys/sys [netbsd-6-0]: cprng.h Log Message: Apply patch (requested by riastradh in ticket #1512): Fix panic when waiting with kqueue/kevent for a read from /dev/random. To generate a diff of this commit: cvs rdiff -u -r1.6.2.3 -r1.6.2.3.4.1 src/sys/dev/rndpseudo.c cvs rdiff -u -r1.5.2.3.4.2 -r1.5.2.3.4.3 src/sys/kern/subr_cprng.c cvs rdiff -u -r1.4.2.1 -r1.4.2.1.4.1 src/sys/sys/cprng.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/rndpseudo.c diff -u src/sys/dev/rndpseudo.c:1.6.2.3 src/sys/dev/rndpseudo.c:1.6.2.3.4.1 --- src/sys/dev/rndpseudo.c:1.6.2.3 Mon May 21 16:49:54 2012 +++ src/sys/dev/rndpseudo.c Sat Mar 3 20:44:32 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: rndpseudo.c,v 1.6.2.3 2012/05/21 16:49:54 jdc Exp $ */ +/* $NetBSD: rndpseudo.c,v 1.6.2.3.4.1 2018/03/03 20:44:32 snj Exp $ */ /*- * Copyright (c) 1997-2011 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: rndpseudo.c,v 1.6.2.3 2012/05/21 16:49:54 jdc Exp $"); +__KERNEL_RCSID(0, "$NetBSD: rndpseudo.c,v 1.6.2.3.4.1 2018/03/03 20:44:32 snj Exp $"); #if defined(_KERNEL_OPT) #include "opt_compat_netbsd.h" @@ -673,13 +673,13 @@ rnd_poll(struct file *fp, int events) } } + mutex_enter(&ctx->cprng->mtx); if (cprng_strong_ready(ctx->cprng)) { revents |= events & (POLLIN | POLLRDNORM); } else { - mutex_enter(&ctx->cprng->mtx); selrecord(curlwp, &ctx->cprng->selq); - mutex_exit(&ctx->cprng->mtx); } + mutex_exit(&ctx->cprng->mtx); return (revents); } @@ -731,12 +731,24 @@ static int filt_rndread(struct knote *kn, long hint) { cprng_strong_t *c = kn->kn_hook; + int ret; + if (hint & NOTE_SUBMIT) + KASSERT(mutex_owned(&c->mtx)); + else + mutex_enter(&c->mtx); if (cprng_strong_ready(c)) { kn->kn_data = RND_TEMP_BUFFER_SIZE; - return 1; + ret = 1; + } else { + ret = 0; } - return 0; + if (hint & NOTE_SUBMIT) + KASSERT(mutex_owned(&c->mtx)); + else + mutex_exit(&c->mtx); + + return ret; } static const struct filterops rnd_seltrue_filtops = Index: src/sys/kern/subr_cprng.c diff -u src/sys/kern/subr_cprng.c:1.5.2.3.4.2 src/sys/kern/subr_cprng.c:1.5.2.3.4.3 --- src/sys/kern/subr_cprng.c:1.5.2.3.4.2 Fri Mar 29 00:46:58 2013 +++ src/sys/kern/subr_cprng.c Sat Mar 3 20:44:33 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: subr_cprng.c,v 1.5.2.3.4.2 2013/03/29 00:46:58 msaitoh Exp $ */ +/* $NetBSD: subr_cprng.c,v 1.5.2.3.4.3 2018/03/03 20:44:33 snj Exp $ */ /*- * Copyright (c) 2011 The NetBSD Foundation, Inc. @@ -46,7 +46,7 @@ #include -__KERNEL_RCSID(0, "$NetBSD: subr_cprng.c,v 1.5.2.3.4.2 2013/03/29 00:46:58 msaitoh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: subr_cprng.c,v 1.5.2.3.4.3 2018/03/03 20:44:33 snj Exp $"); void cprng_init(void) @@ -95,7 +95,7 @@ cprng_strong_doreseed(cprng_strong_t *co if (c->flags & CPRNG_USE_CV) { cv_broadcast(&c->cv); } - selnotify(&c->selq, 0, 0); + selnotify(&c->selq, 0, NOTE_SUBMIT); } static void @@ -389,7 +389,7 @@ cprng_strong_setflags(cprng_strong_t *co if (c->flags & CPRNG_USE_CV) { cv_broadcast(&c->cv); } - selnotify(&c->selq, 0, 0); + selnotify(&c->selq, 0, NOTE_SUBMIT); } } c->flags = flags; Index: src/sys/sys/cprng.h diff -u src/sys/sys/cprng.h:1.4.2.1 src/sys/sys/cprng.h:1.4.2.1.4.1 --- src/sys/sys/cprng.h:1.4.2.1 Fri Apr 20 23:35:20 2012 +++ src/sys/sys/cprng.h Sat Mar 3 20:44:33 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: cprng.h,v 1.4.2.1 2012/04/20 23:35:20 riz Exp $ */ +/* $NetBSD: cprng.h,v 1.4.2.1.4.1 2018/03/03 20:44:33 snj Exp $ */ /*- * Copyright (c) 2011 The NetBSD Foundation, Inc. @@ -121,12 +121,11 @@ static inline int cprng_strong_ready(cprng_strong_t *c) { int ret = 0; - - mutex_enter(&c->mtx); + + KASSERT(mutex_owned(&c->mtx)); if (c->drbg.reseed_counter < NIST_CTR_DRBG_RESEED_INTERVAL) { ret = 1; } - mutex_exit(&c->mtx); return ret; }
CVS commit: [netbsd-6-0] src/distrib/sets/lists/comp
Module Name:src Committed By: snj Date: Sat Mar 3 20:34:28 UTC 2018 Modified Files: src/distrib/sets/lists/comp [netbsd-6-0]: mi Log Message: Apply patch (requested by spz in ticket #1510): Add missing debug entry. To generate a diff of this commit: cvs rdiff -u -r1.1738.2.7.2.6 -r1.1738.2.7.2.7 src/distrib/sets/lists/comp/mi Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/distrib/sets/lists/comp/mi diff -u src/distrib/sets/lists/comp/mi:1.1738.2.7.2.6 src/distrib/sets/lists/comp/mi:1.1738.2.7.2.7 --- src/distrib/sets/lists/comp/mi:1.1738.2.7.2.6 Wed Aug 30 06:54:39 2017 +++ src/distrib/sets/lists/comp/mi Sat Mar 3 20:34:28 2018 @@ -1,4 +1,4 @@ -# $NetBSD: mi,v 1.1738.2.7.2.6 2017/08/30 06:54:39 snj Exp $ +# $NetBSD: mi,v 1.1738.2.7.2.7 2018/03/03 20:34:28 snj Exp $ # # Note: don't delete entries from here - mark them as "obsolete" instead. # @@ -4099,6 +4099,7 @@ ./usr/libdata/debug/usr/sbin/dnssec-revoke.debug comp-bind-debug debug ./usr/libdata/debug/usr/sbin/dnssec-settime.debug comp-bind-debug debug ./usr/libdata/debug/usr/sbin/dnssec-signzone.debug comp-bind-debug debug +./usr/libdata/debug/usr/sbin/dnssec-verify.debug comp-bind-debug debug ./usr/libdata/debug/usr/sbin/dtmfdecode.debug comp-isdn-debug debug ./usr/libdata/debug/usr/sbin/dtrace.debug comp-util-debug dtrace,debug ./usr/libdata/debug/usr/sbin/dumpfs.debug comp-sysutil-debug debug
CVS commit: [netbsd-7-1] src/doc
Module Name:src Committed By: snj Date: Sat Mar 3 20:27:00 UTC 2018 Modified Files: src/doc [netbsd-7-1]: CHANGES-7.1.2 Log Message: 1577 To generate a diff of this commit: cvs rdiff -u -r1.1.2.18 -r1.1.2.19 src/doc/CHANGES-7.1.2 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/doc/CHANGES-7.1.2 diff -u src/doc/CHANGES-7.1.2:1.1.2.18 src/doc/CHANGES-7.1.2:1.1.2.19 --- src/doc/CHANGES-7.1.2:1.1.2.18 Sun Feb 25 23:35:54 2018 +++ src/doc/CHANGES-7.1.2 Sat Mar 3 20:27:00 2018 @@ -1,4 +1,4 @@ -# $NetBSD: CHANGES-7.1.2,v 1.1.2.18 2018/02/25 23:35:54 snj Exp $ +# $NetBSD: CHANGES-7.1.2,v 1.1.2.19 2018/03/03 20:27:00 snj Exp $ A complete list of changes from the NetBSD 7.1.1 release to the NetBSD 7.1.2 release: @@ -181,3 +181,8 @@ sys/netinet6/ip6_input.c 1.188 via pat Kick nested IPv6 fragments. [maxv, ticket #1572] +sys/netipsec/ipsec_input.c 1.57-1.58 + + Fix out-of-bounds read. + [maxv, ticket #1577] +
CVS commit: [netbsd-7-0] src/doc
Module Name:src Committed By: snj Date: Sat Mar 3 20:27:09 UTC 2018 Modified Files: src/doc [netbsd-7-0]: CHANGES-7.0.3 Log Message: 1577 To generate a diff of this commit: cvs rdiff -u -r1.1.2.88 -r1.1.2.89 src/doc/CHANGES-7.0.3 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/doc/CHANGES-7.0.3 diff -u src/doc/CHANGES-7.0.3:1.1.2.88 src/doc/CHANGES-7.0.3:1.1.2.89 --- src/doc/CHANGES-7.0.3:1.1.2.88 Sun Feb 25 23:35:25 2018 +++ src/doc/CHANGES-7.0.3 Sat Mar 3 20:27:09 2018 @@ -1,4 +1,4 @@ -# $NetBSD: CHANGES-7.0.3,v 1.1.2.88 2018/02/25 23:35:25 snj Exp $ +# $NetBSD: CHANGES-7.0.3,v 1.1.2.89 2018/03/03 20:27:09 snj Exp $ A complete list of changes from the NetBSD 7.0.2 release to the NetBSD 7.0.3 release: @@ -5293,3 +5293,8 @@ sys/netinet6/ip6_input.c 1.188 via pat Kick nested IPv6 fragments. [maxv, ticket #1572] +sys/netipsec/ipsec_input.c 1.57-1.58 + + Fix out-of-bounds read. + [maxv, ticket #1577] +
CVS commit: [netbsd-7] src/doc
Module Name:src Committed By: snj Date: Sat Mar 3 20:26:52 UTC 2018 Modified Files: src/doc [netbsd-7]: CHANGES-7.2 Log Message: 1575-1577 To generate a diff of this commit: cvs rdiff -u -r1.1.2.74 -r1.1.2.75 src/doc/CHANGES-7.2 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/doc/CHANGES-7.2 diff -u src/doc/CHANGES-7.2:1.1.2.74 src/doc/CHANGES-7.2:1.1.2.75 --- src/doc/CHANGES-7.2:1.1.2.74 Sun Feb 25 23:35:15 2018 +++ src/doc/CHANGES-7.2 Sat Mar 3 20:26:52 2018 @@ -1,4 +1,4 @@ -# $NetBSD: CHANGES-7.2,v 1.1.2.74 2018/02/25 23:35:15 snj Exp $ +# $NetBSD: CHANGES-7.2,v 1.1.2.75 2018/03/03 20:26:52 snj Exp $ A complete list of changes from the NetBSD 7.1 release to the NetBSD 7.2 release: @@ -5273,3 +5273,21 @@ sys/fs/msdosfs/msdosfs_vfsops.c 1.129 than needed. [mlelstv, ticket #1574] +sys/dev/sbus/be.c1.86 + + Fix an spl leak. + [msaitoh, ticket #1575] + +lib/libc/arch/powerpc/gen/swapcontext.S 1.8 +lib/libc/arch/powerpc/genassym.cf 1.5 + + PIC code clobbers %r30 so we need to update the saved oucp with + caller's %r30 manually. Makes old context happy when it needs + to do more function calls after restore. + [uwe, ticket #1576] + +sys/netipsec/ipsec_input.c 1.57-1.58 + + Fix out-of-bounds read. + [maxv, ticket #1577] +
CVS commit: [netbsd-7-1] src/sys/netipsec
Module Name:src Committed By: snj Date: Sat Mar 3 20:24:55 UTC 2018 Modified Files: src/sys/netipsec [netbsd-7-1]: ipsec_input.c Log Message: Pull up following revision(s) (requested by maxv in ticket #1577): sys/netipsec/ipsec_input.c: 1.57 1.58 sys/netipsec/ipsec_input.c: 1.57 Extend these #ifdef notyet. The m_copydata's in these branches are wrong, we are not guaranteed to have enough room for another struct ip, and we may crash here. Triggerable remotely, but after authentication, by sending an AH packet that has a one-byte-sized IPIP payload. Argh, in my previous commit in this file I forgot to fix the IPv6 entry point; apply the same fix there. To generate a diff of this commit: cvs rdiff -u -r1.32 -r1.32.12.1 src/sys/netipsec/ipsec_input.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/netipsec/ipsec_input.c diff -u src/sys/netipsec/ipsec_input.c:1.32 src/sys/netipsec/ipsec_input.c:1.32.12.1 --- src/sys/netipsec/ipsec_input.c:1.32 Sat Mar 8 12:18:04 2014 +++ src/sys/netipsec/ipsec_input.c Sat Mar 3 20:24:54 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: ipsec_input.c,v 1.32 2014/03/08 12:18:04 ozaki-r Exp $ */ +/* $NetBSD: ipsec_input.c,v 1.32.12.1 2018/03/03 20:24:54 snj Exp $ */ /* $FreeBSD: /usr/local/www/cvsroot/FreeBSD/src/sys/netipsec/ipsec_input.c,v 1.2.4.2 2003/03/28 20:32:53 sam Exp $ */ /* $OpenBSD: ipsec_input.c,v 1.63 2003/02/20 18:35:43 deraadt Exp $ */ @@ -39,7 +39,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: ipsec_input.c,v 1.32 2014/03/08 12:18:04 ozaki-r Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ipsec_input.c,v 1.32.12.1 2018/03/03 20:24:54 snj Exp $"); /* * IPsec input processing. @@ -324,14 +324,15 @@ ipsec4_common_input_cb(struct mbuf *m, s ip->ip_len = htons(m->m_pkthdr.len); prot = ip->ip_p; +#ifdef notyet /* IP-in-IP encapsulation */ if (prot == IPPROTO_IPIP) { struct ip ipn; /* ipn will now contain the inner IPv4 header */ + /* XXX: check m_pkthdr.len */ m_copydata(m, ip->ip_hl << 2, sizeof(struct ip), &ipn); -#ifdef notyet /* XXX PROXY address isn't recorded in SAH */ /* * Check that the inner source address is the same as @@ -359,7 +360,6 @@ ipsec4_common_input_cb(struct mbuf *m, s error = EACCES; goto bad; } -#endif /*XXX*/ } #if INET6 /* IPv6-in-IP encapsulation. */ @@ -367,9 +367,9 @@ ipsec4_common_input_cb(struct mbuf *m, s struct ip6_hdr ip6n; /* ip6n will now contain the inner IPv6 header. */ + /* XXX: check m_pkthdr.len */ m_copydata(m, ip->ip_hl << 2, sizeof(struct ip6_hdr), &ip6n); -#ifdef notyet /* * Check that the inner source address is the same as * the proxy address, if available. @@ -395,9 +395,9 @@ ipsec4_common_input_cb(struct mbuf *m, s error = EACCES; goto bad; } -#endif /*XXX*/ } #endif /* INET6 */ +#endif /* notyet */ /* * Record what we've done to the packet (under what SA it was @@ -643,15 +643,16 @@ ipsec6_common_input_cb(struct mbuf *m, s /* Save protocol */ m_copydata(m, protoff, 1, &prot); +#ifdef notyet #ifdef INET /* IP-in-IP encapsulation */ if (prot == IPPROTO_IPIP) { struct ip ipn; /* ipn will now contain the inner IPv4 header */ + /* XXX: check m_pkthdr.len */ m_copydata(m, skip, sizeof(struct ip), &ipn); -#ifdef notyet /* * Check that the inner source address is the same as * the proxy address, if available. @@ -675,18 +676,16 @@ ipsec6_common_input_cb(struct mbuf *m, s error = EACCES; goto bad; } -#endif /*XXX*/ } #endif /* INET */ - /* IPv6-in-IP encapsulation */ if (prot == IPPROTO_IPV6) { struct ip6_hdr ip6n; /* ip6n will now contain the inner IPv6 header. */ + /* XXX: check m_pkthdr.len */ m_copydata(m, skip, sizeof(struct ip6_hdr), &ip6n); -#ifdef notyet /* * Check that the inner source address is the same as * the proxy address, if available. @@ -711,8 +710,8 @@ ipsec6_common_input_cb(struct mbuf *m, s error = EACCES; goto bad; } -#endif /*XXX*/ } +#endif /* notyet */ /* * Record what we've done to the packet (under what SA it was
CVS commit: [netbsd-7] src/sys/netipsec
Module Name:src Committed By: snj Date: Sat Mar 3 20:24:57 UTC 2018 Modified Files: src/sys/netipsec [netbsd-7]: ipsec_input.c Log Message: Pull up following revision(s) (requested by maxv in ticket #1577): sys/netipsec/ipsec_input.c: 1.57 1.58 sys/netipsec/ipsec_input.c: 1.57 Extend these #ifdef notyet. The m_copydata's in these branches are wrong, we are not guaranteed to have enough room for another struct ip, and we may crash here. Triggerable remotely, but after authentication, by sending an AH packet that has a one-byte-sized IPIP payload. Argh, in my previous commit in this file I forgot to fix the IPv6 entry point; apply the same fix there. To generate a diff of this commit: cvs rdiff -u -r1.32 -r1.32.4.1 src/sys/netipsec/ipsec_input.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/netipsec/ipsec_input.c diff -u src/sys/netipsec/ipsec_input.c:1.32 src/sys/netipsec/ipsec_input.c:1.32.4.1 --- src/sys/netipsec/ipsec_input.c:1.32 Sat Mar 8 12:18:04 2014 +++ src/sys/netipsec/ipsec_input.c Sat Mar 3 20:24:56 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: ipsec_input.c,v 1.32 2014/03/08 12:18:04 ozaki-r Exp $ */ +/* $NetBSD: ipsec_input.c,v 1.32.4.1 2018/03/03 20:24:56 snj Exp $ */ /* $FreeBSD: /usr/local/www/cvsroot/FreeBSD/src/sys/netipsec/ipsec_input.c,v 1.2.4.2 2003/03/28 20:32:53 sam Exp $ */ /* $OpenBSD: ipsec_input.c,v 1.63 2003/02/20 18:35:43 deraadt Exp $ */ @@ -39,7 +39,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: ipsec_input.c,v 1.32 2014/03/08 12:18:04 ozaki-r Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ipsec_input.c,v 1.32.4.1 2018/03/03 20:24:56 snj Exp $"); /* * IPsec input processing. @@ -324,14 +324,15 @@ ipsec4_common_input_cb(struct mbuf *m, s ip->ip_len = htons(m->m_pkthdr.len); prot = ip->ip_p; +#ifdef notyet /* IP-in-IP encapsulation */ if (prot == IPPROTO_IPIP) { struct ip ipn; /* ipn will now contain the inner IPv4 header */ + /* XXX: check m_pkthdr.len */ m_copydata(m, ip->ip_hl << 2, sizeof(struct ip), &ipn); -#ifdef notyet /* XXX PROXY address isn't recorded in SAH */ /* * Check that the inner source address is the same as @@ -359,7 +360,6 @@ ipsec4_common_input_cb(struct mbuf *m, s error = EACCES; goto bad; } -#endif /*XXX*/ } #if INET6 /* IPv6-in-IP encapsulation. */ @@ -367,9 +367,9 @@ ipsec4_common_input_cb(struct mbuf *m, s struct ip6_hdr ip6n; /* ip6n will now contain the inner IPv6 header. */ + /* XXX: check m_pkthdr.len */ m_copydata(m, ip->ip_hl << 2, sizeof(struct ip6_hdr), &ip6n); -#ifdef notyet /* * Check that the inner source address is the same as * the proxy address, if available. @@ -395,9 +395,9 @@ ipsec4_common_input_cb(struct mbuf *m, s error = EACCES; goto bad; } -#endif /*XXX*/ } #endif /* INET6 */ +#endif /* notyet */ /* * Record what we've done to the packet (under what SA it was @@ -643,15 +643,16 @@ ipsec6_common_input_cb(struct mbuf *m, s /* Save protocol */ m_copydata(m, protoff, 1, &prot); +#ifdef notyet #ifdef INET /* IP-in-IP encapsulation */ if (prot == IPPROTO_IPIP) { struct ip ipn; /* ipn will now contain the inner IPv4 header */ + /* XXX: check m_pkthdr.len */ m_copydata(m, skip, sizeof(struct ip), &ipn); -#ifdef notyet /* * Check that the inner source address is the same as * the proxy address, if available. @@ -675,18 +676,16 @@ ipsec6_common_input_cb(struct mbuf *m, s error = EACCES; goto bad; } -#endif /*XXX*/ } #endif /* INET */ - /* IPv6-in-IP encapsulation */ if (prot == IPPROTO_IPV6) { struct ip6_hdr ip6n; /* ip6n will now contain the inner IPv6 header. */ + /* XXX: check m_pkthdr.len */ m_copydata(m, skip, sizeof(struct ip6_hdr), &ip6n); -#ifdef notyet /* * Check that the inner source address is the same as * the proxy address, if available. @@ -711,8 +710,8 @@ ipsec6_common_input_cb(struct mbuf *m, s error = EACCES; goto bad; } -#endif /*XXX*/ } +#endif /* notyet */ /* * Record what we've done to the packet (under what SA it was
CVS commit: [netbsd-7-0] src/sys/netipsec
Module Name:src Committed By: snj Date: Sat Mar 3 20:24:53 UTC 2018 Modified Files: src/sys/netipsec [netbsd-7-0]: ipsec_input.c Log Message: Pull up following revision(s) (requested by maxv in ticket #1577): sys/netipsec/ipsec_input.c: 1.57 1.58 sys/netipsec/ipsec_input.c: 1.57 Extend these #ifdef notyet. The m_copydata's in these branches are wrong, we are not guaranteed to have enough room for another struct ip, and we may crash here. Triggerable remotely, but after authentication, by sending an AH packet that has a one-byte-sized IPIP payload. Argh, in my previous commit in this file I forgot to fix the IPv6 entry point; apply the same fix there. To generate a diff of this commit: cvs rdiff -u -r1.32 -r1.32.8.1 src/sys/netipsec/ipsec_input.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/netipsec/ipsec_input.c diff -u src/sys/netipsec/ipsec_input.c:1.32 src/sys/netipsec/ipsec_input.c:1.32.8.1 --- src/sys/netipsec/ipsec_input.c:1.32 Sat Mar 8 12:18:04 2014 +++ src/sys/netipsec/ipsec_input.c Sat Mar 3 20:24:53 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: ipsec_input.c,v 1.32 2014/03/08 12:18:04 ozaki-r Exp $ */ +/* $NetBSD: ipsec_input.c,v 1.32.8.1 2018/03/03 20:24:53 snj Exp $ */ /* $FreeBSD: /usr/local/www/cvsroot/FreeBSD/src/sys/netipsec/ipsec_input.c,v 1.2.4.2 2003/03/28 20:32:53 sam Exp $ */ /* $OpenBSD: ipsec_input.c,v 1.63 2003/02/20 18:35:43 deraadt Exp $ */ @@ -39,7 +39,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: ipsec_input.c,v 1.32 2014/03/08 12:18:04 ozaki-r Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ipsec_input.c,v 1.32.8.1 2018/03/03 20:24:53 snj Exp $"); /* * IPsec input processing. @@ -324,14 +324,15 @@ ipsec4_common_input_cb(struct mbuf *m, s ip->ip_len = htons(m->m_pkthdr.len); prot = ip->ip_p; +#ifdef notyet /* IP-in-IP encapsulation */ if (prot == IPPROTO_IPIP) { struct ip ipn; /* ipn will now contain the inner IPv4 header */ + /* XXX: check m_pkthdr.len */ m_copydata(m, ip->ip_hl << 2, sizeof(struct ip), &ipn); -#ifdef notyet /* XXX PROXY address isn't recorded in SAH */ /* * Check that the inner source address is the same as @@ -359,7 +360,6 @@ ipsec4_common_input_cb(struct mbuf *m, s error = EACCES; goto bad; } -#endif /*XXX*/ } #if INET6 /* IPv6-in-IP encapsulation. */ @@ -367,9 +367,9 @@ ipsec4_common_input_cb(struct mbuf *m, s struct ip6_hdr ip6n; /* ip6n will now contain the inner IPv6 header. */ + /* XXX: check m_pkthdr.len */ m_copydata(m, ip->ip_hl << 2, sizeof(struct ip6_hdr), &ip6n); -#ifdef notyet /* * Check that the inner source address is the same as * the proxy address, if available. @@ -395,9 +395,9 @@ ipsec4_common_input_cb(struct mbuf *m, s error = EACCES; goto bad; } -#endif /*XXX*/ } #endif /* INET6 */ +#endif /* notyet */ /* * Record what we've done to the packet (under what SA it was @@ -643,15 +643,16 @@ ipsec6_common_input_cb(struct mbuf *m, s /* Save protocol */ m_copydata(m, protoff, 1, &prot); +#ifdef notyet #ifdef INET /* IP-in-IP encapsulation */ if (prot == IPPROTO_IPIP) { struct ip ipn; /* ipn will now contain the inner IPv4 header */ + /* XXX: check m_pkthdr.len */ m_copydata(m, skip, sizeof(struct ip), &ipn); -#ifdef notyet /* * Check that the inner source address is the same as * the proxy address, if available. @@ -675,18 +676,16 @@ ipsec6_common_input_cb(struct mbuf *m, s error = EACCES; goto bad; } -#endif /*XXX*/ } #endif /* INET */ - /* IPv6-in-IP encapsulation */ if (prot == IPPROTO_IPV6) { struct ip6_hdr ip6n; /* ip6n will now contain the inner IPv6 header. */ + /* XXX: check m_pkthdr.len */ m_copydata(m, skip, sizeof(struct ip6_hdr), &ip6n); -#ifdef notyet /* * Check that the inner source address is the same as * the proxy address, if available. @@ -711,8 +710,8 @@ ipsec6_common_input_cb(struct mbuf *m, s error = EACCES; goto bad; } -#endif /*XXX*/ } +#endif /* notyet */ /* * Record what we've done to the packet (under what SA it was
CVS commit: [netbsd-7] src/lib/libc/arch/powerpc
Module Name:src Committed By: snj Date: Sat Mar 3 20:18:39 UTC 2018 Modified Files: src/lib/libc/arch/powerpc [netbsd-7]: genassym.cf src/lib/libc/arch/powerpc/gen [netbsd-7]: swapcontext.S Log Message: Pull up following revision(s) (requested by uwe in ticket #1576): lib/libc/arch/powerpc/genassym.cf: 1.8 1.5 lib/libc/arch/powerpc/gen/swapcontext.S: 1.8 PIC code clobbers %r30 so we need to update the saved oucp with caller's %r30 manually. Makes old context happy when it needs to do more function calls after restore. To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.4.4.1 src/lib/libc/arch/powerpc/genassym.cf cvs rdiff -u -r1.7 -r1.7.4.1 src/lib/libc/arch/powerpc/gen/swapcontext.S 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/arch/powerpc/genassym.cf diff -u src/lib/libc/arch/powerpc/genassym.cf:1.4 src/lib/libc/arch/powerpc/genassym.cf:1.4.4.1 --- src/lib/libc/arch/powerpc/genassym.cf:1.4 Fri Aug 30 21:28:59 2013 +++ src/lib/libc/arch/powerpc/genassym.cf Sat Mar 3 20:18:39 2018 @@ -1,4 +1,4 @@ -# $NetBSD: genassym.cf,v 1.4 2013/08/30 21:28:59 matt Exp $ +# $NetBSD: genassym.cf,v 1.4.4.1 2018/03/03 20:18:39 snj Exp $ # # Copyright (c) 2001 The NetBSD Foundation, Inc. @@ -44,6 +44,7 @@ define CALLFRAME_R31 offsetof(struct cal define UC_GREGS_R1 offsetof(ucontext_t, uc_mcontext.__gregs[_REG_R1]) define UC_GREGS_R3 offsetof(ucontext_t, uc_mcontext.__gregs[_REG_R3]) +define UC_GREGS_R30 offsetof(ucontext_t, uc_mcontext.__gregs[_REG_R30]) define UC_GREGS_PC offsetof(ucontext_t, uc_mcontext.__gregs[_REG_PC]) define SIG_BLOCK SIG_BLOCK Index: src/lib/libc/arch/powerpc/gen/swapcontext.S diff -u src/lib/libc/arch/powerpc/gen/swapcontext.S:1.7 src/lib/libc/arch/powerpc/gen/swapcontext.S:1.7.4.1 --- src/lib/libc/arch/powerpc/gen/swapcontext.S:1.7 Thu Sep 12 15:36:15 2013 +++ src/lib/libc/arch/powerpc/gen/swapcontext.S Sat Mar 3 20:18:39 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: swapcontext.S,v 1.7 2013/09/12 15:36:15 joerg Exp $ */ +/* $NetBSD: swapcontext.S,v 1.7.4.1 2018/03/03 20:18:39 snj Exp $ */ /*- * Copyright (c) 2001 The NetBSD Foundation, Inc. @@ -32,7 +32,7 @@ #include "SYS.h" #include "assym.h" -__RCSID("$NetBSD: swapcontext.S,v 1.7 2013/09/12 15:36:15 joerg Exp $") +__RCSID("$NetBSD: swapcontext.S,v 1.7.4.1 2018/03/03 20:18:39 snj Exp $") #define XCALLFRAMELEN (((2+3)*SZREG + CALLFRAMELEN - 1) & -CALLFRAMELEN) #define XCALLFRAME_R30 (XCALLFRAMELEN-1*SZREG) @@ -57,6 +57,10 @@ ENTRY(swapcontext) stw %r0,UC_GREGS_PC(%r11) # pc <- lr addi %r0,%r1,XCALLFRAMELEN stw %r0,UC_GREGS_R1(%r11) # adjust sp +#ifdef __PIC__ + lwz %r0,XCALLFRAME_R30(%r1) + stw %r0,UC_GREGS_R30(%r11) # caller's r30 +#endif lwz %r3,XCALLFRAME_UCP(%r1) # load ucp bl PIC_PLT(_C_LABEL(setcontext)) # setcontext(ucp) 1:
CVS commit: [netbsd-7] src/sys/dev/sbus
Module Name:src Committed By: snj Date: Sat Mar 3 20:14:20 UTC 2018 Modified Files: src/sys/dev/sbus [netbsd-7]: be.c Log Message: Pull up following revision(s) (requested by msaitoh in ticket #1575): sys/dev/sbus/be.c: 1.86 spl leak, found by Mootja a long time ago To generate a diff of this commit: cvs rdiff -u -r1.80 -r1.80.8.1 src/sys/dev/sbus/be.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/dev/sbus/be.c diff -u src/sys/dev/sbus/be.c:1.80 src/sys/dev/sbus/be.c:1.80.8.1 --- src/sys/dev/sbus/be.c:1.80 Sun Jun 9 09:23:35 2013 +++ src/sys/dev/sbus/be.c Sat Mar 3 20:14:20 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: be.c,v 1.80 2013/06/09 09:23:35 msaitoh Exp $ */ +/* $NetBSD: be.c,v 1.80.8.1 2018/03/03 20:14:20 snj Exp $ */ /*- * Copyright (c) 1999 The NetBSD Foundation, Inc. @@ -57,7 +57,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: be.c,v 1.80 2013/06/09 09:23:35 msaitoh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: be.c,v 1.80.8.1 2018/03/03 20:14:20 snj Exp $"); #include "opt_ddb.h" #include "opt_inet.h" @@ -1126,6 +1126,7 @@ beinit(struct ifnet *ifp) callout_reset(&sc->sc_tick_ch, hz, be_tick, sc); + splx(s); return 0; out: splx(s);
CVS commit: src/sys/dev
Module Name:src Committed By: christos Date: Sat Mar 3 19:26:12 UTC 2018 Modified Files: src/sys/dev: md.c Log Message: conditionally elide conditional for rump. To generate a diff of this commit: cvs rdiff -u -r1.79 -r1.80 src/sys/dev/md.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/dev/md.c diff -u src/sys/dev/md.c:1.79 src/sys/dev/md.c:1.80 --- src/sys/dev/md.c:1.79 Fri Oct 27 23:47:24 2017 +++ src/sys/dev/md.c Sat Mar 3 14:26:12 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: md.c,v 1.79 2017/10/28 03:47:24 riastradh Exp $ */ +/* $NetBSD: md.c,v 1.80 2018/03/03 19:26:12 christos Exp $ */ /* * Copyright (c) 1995 Gordon W. Ross, Leo Weppelman. @@ -40,7 +40,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: md.c,v 1.79 2017/10/28 03:47:24 riastradh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: md.c,v 1.80 2018/03/03 19:26:12 christos Exp $"); #ifdef _KERNEL_OPT #include "opt_md.h" @@ -633,8 +633,16 @@ md_ioctl_server(struct md_softc *sc, str /* Sanity check addr, size. */ end = (vaddr_t) ((char *)umd->md_addr + umd->md_size); - if ((end >= VM_MAXUSER_ADDRESS) || - (end < ((vaddr_t) umd->md_addr)) ) + if ( +#ifndef _RUMPKERNEL + /* + * On some architectures (e.g. powerpc) rump kernel provides + * "safe" low defaults which make this test fail since malloc + * does return higher addresses than the "safe" default. + */ + (end >= VM_MAXUSER_ADDRESS) || +#endif + (end < ((vaddr_t) umd->md_addr))) return EINVAL; /* This unit is now configured. */
CVS commit: src/sys/sys
Module Name:src Committed By: jdolecek Date: Sat Mar 3 19:21:59 UTC 2018 Modified Files: src/sys/sys: once.h Log Message: mark the ONCE_DECL() variables as __read_mostly to optimize cache placement To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 src/sys/sys/once.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/sys/once.h diff -u src/sys/sys/once.h:1.5 src/sys/sys/once.h:1.6 --- src/sys/sys/once.h:1.5 Thu Oct 9 10:48:21 2008 +++ src/sys/sys/once.h Sat Mar 3 19:21:59 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: once.h,v 1.5 2008/10/09 10:48:21 pooka Exp $ */ +/* $NetBSD: once.h,v 1.6 2018/03/03 19:21:59 jdolecek Exp $ */ /*- * Copyright (c)2005 YAMAMOTO Takashi, @@ -42,7 +42,7 @@ void once_init(void); int _run_once(once_t *, int (*)(void)); #define ONCE_DECL(o) \ - once_t (o) = { \ + once_t (o) __read_mostly = { \ .o_status = 0, \ };
CVS commit: src/sys/arch/arm/arm32
Module Name:src Committed By: skrll Date: Sat Mar 3 18:14:27 UTC 2018 Modified Files: src/sys/arch/arm/arm32: bus_dma.c Log Message: Style To generate a diff of this commit: cvs rdiff -u -r1.104 -r1.105 src/sys/arch/arm/arm32/bus_dma.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/arm/arm32/bus_dma.c diff -u src/sys/arch/arm/arm32/bus_dma.c:1.104 src/sys/arch/arm/arm32/bus_dma.c:1.105 --- src/sys/arch/arm/arm32/bus_dma.c:1.104 Sat Mar 3 18:11:25 2018 +++ src/sys/arch/arm/arm32/bus_dma.c Sat Mar 3 18:14:27 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: bus_dma.c,v 1.104 2018/03/03 18:11:25 skrll Exp $ */ +/* $NetBSD: bus_dma.c,v 1.105 2018/03/03 18:14:27 skrll Exp $ */ /*- * Copyright (c) 1996, 1997, 1998 The NetBSD Foundation, Inc. @@ -35,7 +35,7 @@ #include "opt_arm_bus_space.h" #include -__KERNEL_RCSID(0, "$NetBSD: bus_dma.c,v 1.104 2018/03/03 18:11:25 skrll Exp $"); +__KERNEL_RCSID(0, "$NetBSD: bus_dma.c,v 1.105 2018/03/03 18:14:27 skrll Exp $"); #include #include @@ -118,13 +118,11 @@ EVCNT_ATTACH_STATIC(bus_dma_sync_postwri int _bus_dmamap_load_buffer(bus_dma_tag_t, bus_dmamap_t, void *, bus_size_t, struct vmspace *, int); -static struct arm32_dma_range * - _bus_dma_paddr_inrange(struct arm32_dma_range *, int, paddr_t); /* * Check to see if the specified page is in an allowed DMA range. */ -inline struct arm32_dma_range * +static inline struct arm32_dma_range * _bus_dma_paddr_inrange(struct arm32_dma_range *ranges, int nranges, bus_addr_t curaddr) { @@ -528,8 +526,8 @@ int _bus_dmamap_load_mbuf(bus_dma_tag_t t, bus_dmamap_t map, struct mbuf *m0, int flags) { - int error; struct mbuf *m; + int error; #ifdef DEBUG_DMA printf("dmamap_load_mbuf: t=%p map=%p m0=%p f=%d\n", @@ -672,10 +670,10 @@ int _bus_dmamap_load_uio(bus_dma_tag_t t, bus_dmamap_t map, struct uio *uio, int flags) { - int i, error; bus_size_t minlen, resid; struct iovec *iov; void *addr; + int i, error; /* * Make sure that on error condition we return "no valid mappings."
CVS commit: src/sys/arch/arm/arm32
Module Name:src Committed By: skrll Date: Sat Mar 3 18:11:25 UTC 2018 Modified Files: src/sys/arch/arm/arm32: bus_dma.c Log Message: Rely on the cache operations to perform the necessary barriers. To generate a diff of this commit: cvs rdiff -u -r1.103 -r1.104 src/sys/arch/arm/arm32/bus_dma.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/arm/arm32/bus_dma.c diff -u src/sys/arch/arm/arm32/bus_dma.c:1.103 src/sys/arch/arm/arm32/bus_dma.c:1.104 --- src/sys/arch/arm/arm32/bus_dma.c:1.103 Sat Mar 3 16:16:24 2018 +++ src/sys/arch/arm/arm32/bus_dma.c Sat Mar 3 18:11:25 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: bus_dma.c,v 1.103 2018/03/03 16:16:24 skrll Exp $ */ +/* $NetBSD: bus_dma.c,v 1.104 2018/03/03 18:11:25 skrll Exp $ */ /*- * Copyright (c) 1996, 1997, 1998 The NetBSD Foundation, Inc. @@ -35,7 +35,7 @@ #include "opt_arm_bus_space.h" #include -__KERNEL_RCSID(0, "$NetBSD: bus_dma.c,v 1.103 2018/03/03 16:16:24 skrll Exp $"); +__KERNEL_RCSID(0, "$NetBSD: bus_dma.c,v 1.104 2018/03/03 18:11:25 skrll Exp $"); #include #include @@ -867,13 +867,11 @@ _bus_dmamap_sync_segment(vaddr_t va, pad */ case BUS_DMASYNC_POSTREAD|BUS_DMASYNC_POSTWRITE: STAT_INCR(sync_postreadwrite); - arm_dmb(); cpu_dcache_inv_range(va, len); cpu_sdcache_inv_range(va, pa, len); break; case BUS_DMASYNC_POSTREAD: STAT_INCR(sync_postread); - arm_dmb(); cpu_dcache_inv_range(va, len); cpu_sdcache_inv_range(va, pa, len); break;
CVS commit: src/sys/arch/arm/arm32
Module Name:src Committed By: skrll Date: Sat Mar 3 16:16:25 UTC 2018 Modified Files: src/sys/arch/arm/arm32: bus_dma.c Log Message: Wrap some long lines To generate a diff of this commit: cvs rdiff -u -r1.102 -r1.103 src/sys/arch/arm/arm32/bus_dma.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/arm/arm32/bus_dma.c diff -u src/sys/arch/arm/arm32/bus_dma.c:1.102 src/sys/arch/arm/arm32/bus_dma.c:1.103 --- src/sys/arch/arm/arm32/bus_dma.c:1.102 Sat Mar 3 16:14:06 2018 +++ src/sys/arch/arm/arm32/bus_dma.c Sat Mar 3 16:16:24 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: bus_dma.c,v 1.102 2018/03/03 16:14:06 skrll Exp $ */ +/* $NetBSD: bus_dma.c,v 1.103 2018/03/03 16:16:24 skrll Exp $ */ /*- * Copyright (c) 1996, 1997, 1998 The NetBSD Foundation, Inc. @@ -35,7 +35,7 @@ #include "opt_arm_bus_space.h" #include -__KERNEL_RCSID(0, "$NetBSD: bus_dma.c,v 1.102 2018/03/03 16:14:06 skrll Exp $"); +__KERNEL_RCSID(0, "$NetBSD: bus_dma.c,v 1.103 2018/03/03 16:16:24 skrll Exp $"); #include #include @@ -316,8 +316,8 @@ _bus_dmamap_create(bus_dma_tag_t t, bus_ void *mapstore; #ifdef DEBUG_DMA - printf("dmamap_create: t=%p size=%lx nseg=%x msegsz=%lx boundary=%lx flags=%x\n", - t, size, nsegments, maxsegsz, boundary, flags); + printf("dmamap_create: t=%p size=%lx nseg=%x msegsz=%lx boundary=%lx" + " flags=%x\n", t, size, nsegments, maxsegsz, boundary, flags); #endif /* DEBUG_DMA */ /* @@ -792,7 +792,8 @@ _bus_dmamap_unload(bus_dma_tag_t t, bus_ } static void -_bus_dmamap_sync_segment(vaddr_t va, paddr_t pa, vsize_t len, int ops, bool readonly_p) +_bus_dmamap_sync_segment(vaddr_t va, paddr_t pa, vsize_t len, int ops, +bool readonly_p) { KASSERTMSG((va & PAGE_MASK) == (pa & PAGE_MASK), "va %#lx pa %#lx", va, pa);
CVS commit: src/sys/arch/arm/arm32
Module Name:src Committed By: skrll Date: Sat Mar 3 16:14:06 UTC 2018 Modified Files: src/sys/arch/arm/arm32: bus_dma.c Log Message: Remove unnecessary includes To generate a diff of this commit: cvs rdiff -u -r1.101 -r1.102 src/sys/arch/arm/arm32/bus_dma.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/arm/arm32/bus_dma.c diff -u src/sys/arch/arm/arm32/bus_dma.c:1.101 src/sys/arch/arm/arm32/bus_dma.c:1.102 --- src/sys/arch/arm/arm32/bus_dma.c:1.101 Fri Dec 29 08:58:57 2017 +++ src/sys/arch/arm/arm32/bus_dma.c Sat Mar 3 16:14:06 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: bus_dma.c,v 1.101 2017/12/29 08:58:57 skrll Exp $ */ +/* $NetBSD: bus_dma.c,v 1.102 2018/03/03 16:14:06 skrll Exp $ */ /*- * Copyright (c) 1996, 1997, 1998 The NetBSD Foundation, Inc. @@ -35,22 +35,13 @@ #include "opt_arm_bus_space.h" #include -__KERNEL_RCSID(0, "$NetBSD: bus_dma.c,v 1.101 2017/12/29 08:58:57 skrll Exp $"); +__KERNEL_RCSID(0, "$NetBSD: bus_dma.c,v 1.102 2018/03/03 16:14:06 skrll Exp $"); #include -#include -#include -#include -#include #include #include -#include -#include -#include #include #include -#include -#include #include
CVS commit: src/sys/arch/arm/include
Module Name:src Committed By: skrll Date: Sat Mar 3 16:11:22 UTC 2018 Modified Files: src/sys/arch/arm/include: bootconfig.h Log Message: Multiple inclusion protection To generate a diff of this commit: cvs rdiff -u -r1.8 -r1.9 src/sys/arch/arm/include/bootconfig.h 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/arm/include/bootconfig.h diff -u src/sys/arch/arm/include/bootconfig.h:1.8 src/sys/arch/arm/include/bootconfig.h:1.9 --- src/sys/arch/arm/include/bootconfig.h:1.8 Sun May 28 23:31:41 2017 +++ src/sys/arch/arm/include/bootconfig.h Sat Mar 3 16:11:22 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: bootconfig.h,v 1.8 2017/05/28 23:31:41 jmcneill Exp $ */ +/* $NetBSD: bootconfig.h,v 1.9 2018/03/03 16:11:22 skrll Exp $ */ /* * Copyright (c) 1994 Mark Brinicombe. @@ -36,6 +36,9 @@ * SUCH DAMAGE. */ +#ifndef _ARM_BOOTCONFIG_H +#define _ARM_BOOTCONFIG_H + #ifdef _KERNEL #define BOOTOPT_TYPE_BOOLEAN 0 #define BOOTOPT_TYPE_STRING 1 @@ -59,3 +62,5 @@ char *get_bootconf_string(char *, const extern char *boot_args; #endif /* _KERNEL */ + +#endif
CVS commit: src/external/apache2/mDNSResponder/dist
Module Name:src Committed By: christos Date: Sat Mar 3 16:09:56 UTC 2018 Modified Files: src/external/apache2/mDNSResponder/dist/Clients: dns-sd.c src/external/apache2/mDNSResponder/dist/mDNSPosix: PosixDaemon.c src/external/apache2/mDNSResponder/dist/mDNSShared: dnssd_clientlib.c Log Message: Fix Reproducible builds by obeying MDNS_VERSIONSTR_NODTS in all cases. Reported by wiz@ To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.7 \ src/external/apache2/mDNSResponder/dist/Clients/dns-sd.c cvs rdiff -u -r1.10 -r1.11 \ src/external/apache2/mDNSResponder/dist/mDNSPosix/PosixDaemon.c cvs rdiff -u -r1.5 -r1.6 \ src/external/apache2/mDNSResponder/dist/mDNSShared/dnssd_clientlib.c 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/mDNSResponder/dist/Clients/dns-sd.c diff -u src/external/apache2/mDNSResponder/dist/Clients/dns-sd.c:1.6 src/external/apache2/mDNSResponder/dist/Clients/dns-sd.c:1.7 --- src/external/apache2/mDNSResponder/dist/Clients/dns-sd.c:1.6 Sun Jan 14 15:04:55 2018 +++ src/external/apache2/mDNSResponder/dist/Clients/dns-sd.c Sat Mar 3 11:09:56 2018 @@ -2288,7 +2288,12 @@ Fail: // NOT static -- otherwise the compiler may optimize it out // The "@(#) " pattern is a special prefix the "what" command looks for -const char VersionString_SCCS[] = "@(#) dns-sd " STRINGIFY(mDNSResponderVersion) " (" __DATE__ " " __TIME__ ")"; +const char VersionString_SCCS[] = "@(#) dns-sd " +STRINGIFY(mDNSResponderVersion) +#ifndef MDNS_VERSIONSTR_NODTS +" (" __DATE__ " " __TIME__ ")" +#endif +; #if _BUILDING_XCODE_PROJECT_ // If the process crashes, then this string will be magically included in the automatically-generated crash log Index: src/external/apache2/mDNSResponder/dist/mDNSPosix/PosixDaemon.c diff -u src/external/apache2/mDNSResponder/dist/mDNSPosix/PosixDaemon.c:1.10 src/external/apache2/mDNSResponder/dist/mDNSPosix/PosixDaemon.c:1.11 --- src/external/apache2/mDNSResponder/dist/mDNSPosix/PosixDaemon.c:1.10 Sun Jan 14 15:04:56 2018 +++ src/external/apache2/mDNSResponder/dist/mDNSPosix/PosixDaemon.c Sat Mar 3 11:09:56 2018 @@ -249,9 +249,15 @@ asm (".desc ___crashreporter_info__, 0x1 // For convenience when using the "strings" command, this is the last thing in the file #if mDNSResponderVersion > 1 -mDNSexport const char mDNSResponderVersionString_SCCS[] = "@(#) mDNSResponder-" STRINGIFY(mDNSResponderVersion) " (" __DATE__ " " __TIME__ ")"; -#elif MDNS_VERSIONSTR_NODTS -mDNSexport const char mDNSResponderVersionString_SCCS[] = "@(#) mDNSResponder (Engineering Build)"; +mDNSexport const char mDNSResponderVersionString_SCCS[] = "@(#) mDNSResponder-" STRINGIFY(mDNSResponderVersion) +#ifndef MDNS_VERSIONSTR_NODTS +" (" __DATE__ " " __TIME__ ")" +#endif +; #else -mDNSexport const char mDNSResponderVersionString_SCCS[] = "@(#) mDNSResponder (Engineering Build) (" __DATE__ " " __TIME__ ")"; +mDNSexport const char mDNSResponderVersionString_SCCS[] = "@(#) mDNSResponder (Engineering Build)" +#ifndef MDNS_VERSIONSTR_NODTS +" (" __DATE__ " " __TIME__ ")" +#endif +; #endif Index: src/external/apache2/mDNSResponder/dist/mDNSShared/dnssd_clientlib.c diff -u src/external/apache2/mDNSResponder/dist/mDNSShared/dnssd_clientlib.c:1.5 src/external/apache2/mDNSResponder/dist/mDNSShared/dnssd_clientlib.c:1.6 --- src/external/apache2/mDNSResponder/dist/mDNSShared/dnssd_clientlib.c:1.5 Sun Jan 14 15:04:56 2018 +++ src/external/apache2/mDNSResponder/dist/mDNSShared/dnssd_clientlib.c Sat Mar 3 11:09:56 2018 @@ -363,4 +363,10 @@ DNSServiceErrorType DNSSD_API TXTRecordG // NOT static -- otherwise the compiler may optimize it out // The "@(#) " pattern is a special prefix the "what" command looks for -const char VersionString_SCCS_libdnssd[] = "@(#) libdns_sd " STRINGIFY(mDNSResponderVersion) " (" __DATE__ " " __TIME__ ")"; +const char VersionString_SCCS_libdnssd[] = "@(#) libdns_sd " +STRINGIFY(mDNSResponderVersion) +#ifndef MDNS_VERSIONSTR_NODTS +" (" __DATE__ " " __TIME__ ")" +#endif +; +
CVS commit: src/sys/arch/arm/broadcom
Module Name:src Committed By: skrll Date: Sat Mar 3 16:03:38 UTC 2018 Modified Files: src/sys/arch/arm/broadcom: bcm2835_bsc.c Log Message: bcm2835_bsc: use fdt to enumerate i2c child devices >From jmcneill@ To generate a diff of this commit: cvs rdiff -u -r1.9 -r1.10 src/sys/arch/arm/broadcom/bcm2835_bsc.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/arm/broadcom/bcm2835_bsc.c diff -u src/sys/arch/arm/broadcom/bcm2835_bsc.c:1.9 src/sys/arch/arm/broadcom/bcm2835_bsc.c:1.10 --- src/sys/arch/arm/broadcom/bcm2835_bsc.c:1.9 Thu Dec 28 22:42:36 2017 +++ src/sys/arch/arm/broadcom/bcm2835_bsc.c Sat Mar 3 16:03:38 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: bcm2835_bsc.c,v 1.9 2017/12/28 22:42:36 christos Exp $ */ +/* $NetBSD: bcm2835_bsc.c,v 1.10 2018/03/03 16:03:38 skrll Exp $ */ /* * Copyright (c) 2012 Jonathan A. Kollasch @@ -27,7 +27,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: bcm2835_bsc.c,v 1.9 2017/12/28 22:42:36 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: bcm2835_bsc.c,v 1.10 2018/03/03 16:03:38 skrll Exp $"); #if defined(_KERNEL_OPT) #include "opt_kernhist.h" @@ -102,6 +102,8 @@ bsciic_attach(device_t parent, device_t struct fdt_attach_args * const faa = aux; const int phandle = faa->faa_phandle; prop_dictionary_t prop = device_properties(self); + prop_dictionary_t devs; + uint32_t address_cells; struct i2cbus_attach_args iba; bool disable = false; @@ -170,10 +172,21 @@ bsciic_attach(device_t parent, device_t sc->sc_i2c.ic_release_bus = bsciic_release_bus; sc->sc_i2c.ic_exec = bsciic_exec; - memset(&iba, 0, sizeof(iba)); + devs = prop_dictionary_create(); + if (of_getprop_uint32(phandle, "#address-cells", &address_cells)) + address_cells = 1; + + of_enter_i2c_devs(devs, phandle, address_cells * 4, 0); + memset(&iba, 0, sizeof(iba)); iba.iba_tag = &sc->sc_i2c; - iba.iba_type = 0; + iba.iba_child_devices = prop_dictionary_get(devs, "i2c-child-devices"); + if (iba.iba_child_devices) + prop_object_retain(iba.iba_child_devices); + else + iba.iba_child_devices = prop_array_create(); + prop_object_release(devs); + config_found_ia(self, "i2cbus", &iba, iicbus_print); }
CVS commit: src/sys/arch/evbarm/include
Module Name:src Committed By: skrll Date: Sat Mar 3 15:59:46 UTC 2018 Modified Files: src/sys/arch/evbarm/include: atomic.h Log Message: RCSid police To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/sys/arch/evbarm/include/atomic.h 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/evbarm/include/atomic.h diff -u src/sys/arch/evbarm/include/atomic.h:1.1 src/sys/arch/evbarm/include/atomic.h:1.2 --- src/sys/arch/evbarm/include/atomic.h:1.1 Sat Oct 19 12:22:34 2002 +++ src/sys/arch/evbarm/include/atomic.h Sat Mar 3 15:59:46 2018 @@ -1 +1,3 @@ +/* $NetBSD: atomic.h,v 1.2 2018/03/03 15:59:46 skrll Exp $ */ + #include
CVS commit: src/sys/arch/mips/mips
Module Name:src Committed By: flxd Date: Sat Mar 3 15:47:50 UTC 2018 Modified Files: src/sys/arch/mips/mips: cache.c Log Message: Add missing call to mips_dcache_compute_align() affecting "modern" MIPS (MIPS32{,R2}/MIPS64{,R2}). Thanks jmcneill@; OK skrll@. To generate a diff of this commit: cvs rdiff -u -r1.58 -r1.59 src/sys/arch/mips/mips/cache.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/mips/mips/cache.c diff -u src/sys/arch/mips/mips/cache.c:1.58 src/sys/arch/mips/mips/cache.c:1.59 --- src/sys/arch/mips/mips/cache.c:1.58 Sun May 14 09:37:13 2017 +++ src/sys/arch/mips/mips/cache.c Sat Mar 3 15:47:49 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: cache.c,v 1.58 2017/05/14 09:37:13 skrll Exp $ */ +/* $NetBSD: cache.c,v 1.59 2018/03/03 15:47:49 flxd Exp $ */ /* * Copyright 2001, 2002 Wasabi Systems, Inc. @@ -68,7 +68,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: cache.c,v 1.58 2017/05/14 09:37:13 skrll Exp $"); +__KERNEL_RCSID(0, "$NetBSD: cache.c,v 1.59 2018/03/03 15:47:49 flxd Exp $"); #include "opt_cputype.h" #include "opt_mips_cache.h" @@ -1455,5 +1455,7 @@ mips_config_cache_modern(uint32_t cpu_id mco->mco_intern_pdcache_sync_range_index = no_cache_op_range_index; mco->mco_intern_pdcache_sync_range = no_cache_op_range; } + + mips_dcache_compute_align(); } #endif /* MIPS32 + MIPS32R2 + MIPS64 + MIPS64R2 > 0 */
CVS commit: src/sys/arch/evbarm
Module Name:src Committed By: skrll Date: Sat Mar 3 13:46:33 UTC 2018 Modified Files: src/sys/arch/evbarm/exynos: exynos_start.S src/sys/arch/evbarm/fdt: fdt_machdep.c src/sys/arch/evbarm/rpi: rpi2_start.S rpi_start.S src/sys/arch/evbarm/sunxi: sunxi_start.S src/sys/arch/evbarm/tegra: tegra_start.S src/sys/arch/evbarm/ti: ti_start.S src/sys/arch/evbarm/vexpress: vexpress_start.S Log Message: Start code now updates a global variable fdt_addr_r to handle differences in boot protocol (think arm64) To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/sys/arch/evbarm/exynos/exynos_start.S cvs rdiff -u -r1.19 -r1.20 src/sys/arch/evbarm/fdt/fdt_machdep.c cvs rdiff -u -r1.4 -r1.5 src/sys/arch/evbarm/rpi/rpi2_start.S cvs rdiff -u -r1.16 -r1.17 src/sys/arch/evbarm/rpi/rpi_start.S cvs rdiff -u -r1.2 -r1.3 src/sys/arch/evbarm/sunxi/sunxi_start.S cvs rdiff -u -r1.15 -r1.16 src/sys/arch/evbarm/tegra/tegra_start.S cvs rdiff -u -r1.1 -r1.2 src/sys/arch/evbarm/ti/ti_start.S cvs rdiff -u -r1.5 -r1.6 src/sys/arch/evbarm/vexpress/vexpress_start.S 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/evbarm/exynos/exynos_start.S diff -u src/sys/arch/evbarm/exynos/exynos_start.S:1.4 src/sys/arch/evbarm/exynos/exynos_start.S:1.5 --- src/sys/arch/evbarm/exynos/exynos_start.S:1.4 Sat Jun 10 23:20:56 2017 +++ src/sys/arch/evbarm/exynos/exynos_start.S Sat Mar 3 13:46:32 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: exynos_start.S,v 1.4 2017/06/10 23:20:56 jmcneill Exp $ */ +/* $NetBSD: exynos_start.S,v 1.5 2018/03/03 13:46:32 skrll Exp $ */ /*- * Copyright (c) 2014 The NetBSD Foundation, Inc. @@ -35,6 +35,7 @@ #include "opt_cputypes.h" #include "opt_multiprocessor.h" #include "opt_arm_debug.h" +#include "opt_fdt.h" #include #include @@ -45,7 +46,7 @@ #include -RCSID("$NetBSD: exynos_start.S,v 1.4 2017/06/10 23:20:56 jmcneill Exp $") +RCSID("$NetBSD: exynos_start.S,v 1.5 2018/03/03 13:46:32 skrll Exp $") #if defined(VERBOSE_INIT_ARM) @@ -95,11 +96,19 @@ _C_LABEL(exynos_start): */ movw r4, #:lower16:uboot_args movt r4, #:upper16:uboot_args -#if KERNEL_BASE_VOFFSET != 0 sub r4, r4, #KERNEL_BASE_VOFFSET -#endif stmia r4, {r0-r3} // Save the arguments +#ifdef FDT + /* + * ARM boot protocol has FDT address in r2 + */ + movw r4, #:lower16:fdt_addr_r + movt r4, #:upper16:fdt_addr_r + sub r4, r4, #KERNEL_BASE_VOFFSET + str r2, [r4] +#endif + /* Add DTB PA (1MB) from r2 to MMU init table */ movw r3, #:lower16:(L1_S_SIZE - 1) /* align DTB PA to 1M */ movt r3, #:upper16:(L1_S_SIZE - 1) Index: src/sys/arch/evbarm/fdt/fdt_machdep.c diff -u src/sys/arch/evbarm/fdt/fdt_machdep.c:1.19 src/sys/arch/evbarm/fdt/fdt_machdep.c:1.20 --- src/sys/arch/evbarm/fdt/fdt_machdep.c:1.19 Thu Dec 21 08:28:55 2017 +++ src/sys/arch/evbarm/fdt/fdt_machdep.c Sat Mar 3 13:46:32 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: fdt_machdep.c,v 1.19 2017/12/21 08:28:55 skrll Exp $ */ +/* $NetBSD: fdt_machdep.c,v 1.20 2018/03/03 13:46:32 skrll Exp $ */ /*- * Copyright (c) 2015-2017 Jared McNeill @@ -27,7 +27,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: fdt_machdep.c,v 1.19 2017/12/21 08:28:55 skrll Exp $"); +__KERNEL_RCSID(0, "$NetBSD: fdt_machdep.c,v 1.20 2018/03/03 13:46:32 skrll Exp $"); #include "opt_machdep.h" #include "opt_ddb.h" @@ -87,7 +87,11 @@ __KERNEL_RCSID(0, "$NetBSD: fdt_machdep. BootConfig bootconfig; char bootargs[FDT_MAX_BOOT_STRING] = ""; char *boot_args = NULL; -u_int uboot_args[4] = { 0 }; /* filled in by xxx_start.S (not in bss) */ +/* + * filled in by xxx_start.S (must not be in bss) + */ +unsigned long uboot_args[4] = { 0 }; +const uint8_t *fdt_addr_r = (const uint8_t *)0xdeadc0de; static char fdt_memory_ext_storage[EXTENT_FIXED_STORAGE_SIZE(DRAM_BLOCKS)]; static struct extent *fdt_memory_ext; @@ -333,7 +337,6 @@ initarm(void *arg) uint64_t memory_addr, memory_size; /* Load FDT */ - const uint8_t *fdt_addr_r = (const uint8_t *)uboot_args[2]; int error = fdt_check_header(fdt_addr_r); if (error == 0) { error = fdt_move(fdt_addr_r, fdt_data, sizeof(fdt_data)); Index: src/sys/arch/evbarm/rpi/rpi2_start.S diff -u src/sys/arch/evbarm/rpi/rpi2_start.S:1.4 src/sys/arch/evbarm/rpi/rpi2_start.S:1.5 --- src/sys/arch/evbarm/rpi/rpi2_start.S:1.4 Sun Dec 10 21:38:27 2017 +++ src/sys/arch/evbarm/rpi/rpi2_start.S Sat Mar 3 13:46:32 2018 @@ -32,13 +32,14 @@ #include "opt_cputypes.h" #include "opt_multiprocessor.h" #include "opt_arm_debug.h" +#include "opt_fdt.h" #include #include #include "assym.h" -RCSID("$NetBSD: rpi2_start.S,v 1.4 2017/12/10 21:38:27 skrll Exp $") +RCSID("$NetBSD: rpi2_start.S,v 1.5 2018/03/03 13:46:32 skrll Exp $") #if defined(KERNEL_BASES_EQUAL) #define CALL(f) bl _C_LABEL(f) @@ -100,6 +101,16 @@ _C_LABEL(rpi_start): stmia r4, {r0-r3} // Save the arguments +#ifdef FDT + /* +
CVS commit: src/sys/dev/acpi
Module Name:src Committed By: maya Date: Sat Mar 3 11:23:24 UTC 2018 Modified Files: src/sys/dev/acpi: acpi.c Log Message: include correct header for NPCI to be defined when necessary. Now acpi.o has a call for acpimcfg_probe. heads by paulg, sorry for breakage. To generate a diff of this commit: cvs rdiff -u -r1.266 -r1.267 src/sys/dev/acpi/acpi.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/dev/acpi/acpi.c diff -u src/sys/dev/acpi/acpi.c:1.266 src/sys/dev/acpi/acpi.c:1.267 --- src/sys/dev/acpi/acpi.c:1.266 Thu Mar 1 06:00:49 2018 +++ src/sys/dev/acpi/acpi.c Sat Mar 3 11:23:24 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: acpi.c,v 1.266 2018/03/01 06:00:49 maya Exp $ */ +/* $NetBSD: acpi.c,v 1.267 2018/03/03 11:23:24 maya Exp $ */ /*- * Copyright (c) 2003, 2007 The NetBSD Foundation, Inc. @@ -100,10 +100,10 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: acpi.c,v 1.266 2018/03/01 06:00:49 maya Exp $"); +__KERNEL_RCSID(0, "$NetBSD: acpi.c,v 1.267 2018/03/03 11:23:24 maya Exp $"); +#include "pci.h" #include "opt_acpi.h" -#include "opt_pci.h" #include "opt_pcifixup.h" #include
CVS commit: src/sys/netipsec
Module Name:src Committed By: maxv Date: Sat Mar 3 09:54:55 UTC 2018 Modified Files: src/sys/netipsec: ipsec.c Log Message: Reduce the diff between ipsec4_output and ipsec6_check_policy. While here style. To generate a diff of this commit: cvs rdiff -u -r1.150 -r1.151 src/sys/netipsec/ipsec.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/netipsec/ipsec.c diff -u src/sys/netipsec/ipsec.c:1.150 src/sys/netipsec/ipsec.c:1.151 --- src/sys/netipsec/ipsec.c:1.150 Sat Mar 3 09:47:01 2018 +++ src/sys/netipsec/ipsec.c Sat Mar 3 09:54:55 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: ipsec.c,v 1.150 2018/03/03 09:47:01 maxv Exp $ */ +/* $NetBSD: ipsec.c,v 1.151 2018/03/03 09:54:55 maxv Exp $ */ /* $FreeBSD: src/sys/netipsec/ipsec.c,v 1.2.2.2 2003/07/01 01:38:13 sam Exp $ */ /* $KAME: ipsec.c,v 1.103 2001/05/24 07:14:18 sakane Exp $ */ @@ -32,7 +32,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: ipsec.c,v 1.150 2018/03/03 09:47:01 maxv Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ipsec.c,v 1.151 2018/03/03 09:54:55 maxv Exp $"); /* * IPsec controller part. @@ -458,7 +458,7 @@ ipsec_getpolicybysock(struct mbuf *m, u_ } KASSERT(currsp != NULL); - if (pcbsp->priv) { /* when privilieged socket */ + if (pcbsp->priv) { /* when privileged socket */ switch (currsp->policy) { case IPSEC_POLICY_BYPASS: case IPSEC_POLICY_IPSEC: @@ -613,6 +613,7 @@ ipsec4_output(struct mbuf *m, struct inp u_long *mtu, bool *natt_frag, bool *done) { struct secpolicy *sp = NULL; + u_long _mtu = 0; int error, s; /* @@ -635,10 +636,10 @@ ipsec4_output(struct mbuf *m, struct inp /* * There are four return cases: - * sp != NULL apply IPsec policy - * sp == NULL, error == 0 no IPsec handling needed - * sp == NULL, error == -EINVAL discard packet w/o error - * sp == NULL, error != 0 discard packet, report error + * sp != NULLapply IPsec policy + * sp == NULL, error == 0no IPsec handling needed + * sp == NULL, error == -EINVAL discard packet w/o error + * sp == NULL, error != 0discard packet, report error */ if (sp == NULL) { splx(s); @@ -668,11 +669,7 @@ ipsec4_output(struct mbuf *m, struct inp m->m_pkthdr.csum_flags &= ~(M_CSUM_TCPv4|M_CSUM_UDPv4); } -{ - u_long _mtu = 0; - error = ipsec4_process_packet(m, sp->req, &_mtu); - if (error == 0 && _mtu != 0) { /* * NAT-T ESP fragmentation: do not do IPSec processing @@ -684,7 +681,6 @@ ipsec4_output(struct mbuf *m, struct inp splx(s); return 0; } -} /* * Preserve KAME behaviour: ENOENT can be returned @@ -1923,37 +1919,31 @@ ipsec6_check_policy(struct mbuf *m, stru int error = 0; int needipsec = 0; - if (!ipsec_outdone(m)) { - s = splsoftnet(); - if (in6p != NULL && - ipsec_pcb_skip_ipsec(in6p->in6p_sp, IPSEC_DIR_OUTBOUND)) { - splx(s); - goto skippolicycheck; - } - sp = ipsec_checkpolicy(m, IPSEC_DIR_OUTBOUND, flags, &error, - in6p); - - /* - * There are four return cases: - * sp != NULL apply IPsec policy - * sp == NULL, error == 0 no IPsec handling needed - * sp == NULL, error == -EINVAL discard packet w/o error - * sp == NULL, error != 0 discard packet, report error - */ - + if (ipsec_outdone(m)) { + goto skippolicycheck; + } + s = splsoftnet(); + if (in6p && ipsec_pcb_skip_ipsec(in6p->in6p_sp, IPSEC_DIR_OUTBOUND)) { splx(s); - if (sp == NULL) { - /* - * Caller must check the error return to see if it needs to discard - * the packet. - */ - needipsec = 0; - } else { - needipsec = 1; - } + goto skippolicycheck; + } + sp = ipsec_checkpolicy(m, IPSEC_DIR_OUTBOUND, flags, &error, in6p); + splx(s); + + /* + * There are four return cases: + * sp != NULLapply IPsec policy + * sp == NULL, error == 0no IPsec handling needed + * sp == NULL, error == -EINVAL discard packet w/o error + * sp == NULL, error != 0discard packet, report error + */ + if (sp == NULL) { + needipsec = 0; + } else { + needipsec = 1; } -skippolicycheck:; +skippolicycheck: *errorp = error; *needipsecp = needipsec; return sp;
CVS commit: src/sys/netipsec
Module Name:src Committed By: maxv Date: Sat Mar 3 09:47:01 UTC 2018 Modified Files: src/sys/netipsec: ipsec.c Log Message: Dedup. To generate a diff of this commit: cvs rdiff -u -r1.149 -r1.150 src/sys/netipsec/ipsec.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/netipsec/ipsec.c diff -u src/sys/netipsec/ipsec.c:1.149 src/sys/netipsec/ipsec.c:1.150 --- src/sys/netipsec/ipsec.c:1.149 Wed Feb 28 11:29:14 2018 +++ src/sys/netipsec/ipsec.c Sat Mar 3 09:47:01 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: ipsec.c,v 1.149 2018/02/28 11:29:14 maxv Exp $ */ +/* $NetBSD: ipsec.c,v 1.150 2018/03/03 09:47:01 maxv Exp $ */ /* $FreeBSD: src/sys/netipsec/ipsec.c,v 1.2.2.2 2003/07/01 01:38:13 sam Exp $ */ /* $KAME: ipsec.c,v 1.103 2001/05/24 07:14:18 sakane Exp $ */ @@ -32,7 +32,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: ipsec.c,v 1.149 2018/02/28 11:29:14 maxv Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ipsec.c,v 1.150 2018/03/03 09:47:01 maxv Exp $"); /* * IPsec controller part. @@ -417,7 +417,7 @@ ipsec_getpolicybysock(struct mbuf *m, u_ KASSERT(inph->inph_socket != NULL); KASSERT(inph_locked(inph)); - /* XXX FIXME inpcb/in6pcb vs socket*/ + /* XXX FIXME inpcb/in6pcb vs socket*/ af = inph->inph_af; KASSERTMSG(af == AF_INET || af == AF_INET6, "unexpected protocol family %u", af); @@ -433,22 +433,13 @@ ipsec_getpolicybysock(struct mbuf *m, u_ IPSEC_STATINC(IPSEC_STAT_SPDCACHEMISS); switch (af) { - case AF_INET: { - struct inpcb *in4p = (struct inpcb *)inph; - /* set spidx in pcb */ - *error = ipsec_setspidx_inpcb(m, in4p); - pcbsp = in4p->inp_sp; - break; - } + case AF_INET: #if defined(INET6) - case AF_INET6: { - struct in6pcb *in6p = (struct in6pcb *)inph; - /* set spidx in pcb */ - *error = ipsec_setspidx_inpcb(m, in6p); - pcbsp = in6p->in6p_sp; - break; - } + case AF_INET6: #endif + *error = ipsec_setspidx_inpcb(m, inph); + pcbsp = inph->inph_sp; + break; default: *error = EPFNOSUPPORT; break;
CVS commit: src/sys
Module Name:src Committed By: maxv Date: Sat Mar 3 09:39:29 UTC 2018 Modified Files: src/sys/netinet: ip_output.c src/sys/netipsec: ipsec_output.c Log Message: Add KASSERTs, we don't want m_nextpkt in ipsec{4/6}_process_packet. To generate a diff of this commit: cvs rdiff -u -r1.297 -r1.298 src/sys/netinet/ip_output.c cvs rdiff -u -r1.69 -r1.70 src/sys/netipsec/ipsec_output.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/netinet/ip_output.c diff -u src/sys/netinet/ip_output.c:1.297 src/sys/netinet/ip_output.c:1.298 --- src/sys/netinet/ip_output.c:1.297 Tue Feb 27 15:01:30 2018 +++ src/sys/netinet/ip_output.c Sat Mar 3 09:39:29 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: ip_output.c,v 1.297 2018/02/27 15:01:30 maxv Exp $ */ +/* $NetBSD: ip_output.c,v 1.298 2018/03/03 09:39:29 maxv Exp $ */ /* * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project. @@ -91,7 +91,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: ip_output.c,v 1.297 2018/02/27 15:01:30 maxv Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ip_output.c,v 1.298 2018/03/03 09:39:29 maxv Exp $"); #ifdef _KERNEL_OPT #include "opt_inet.h" @@ -760,7 +760,7 @@ sendit: for (; m; m = m0) { m0 = m->m_nextpkt; - m->m_nextpkt = 0; + m->m_nextpkt = NULL; if (error) { m_freem(m); continue; Index: src/sys/netipsec/ipsec_output.c diff -u src/sys/netipsec/ipsec_output.c:1.69 src/sys/netipsec/ipsec_output.c:1.70 --- src/sys/netipsec/ipsec_output.c:1.69 Mon Feb 26 06:34:39 2018 +++ src/sys/netipsec/ipsec_output.c Sat Mar 3 09:39:29 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: ipsec_output.c,v 1.69 2018/02/26 06:34:39 maxv Exp $ */ +/* $NetBSD: ipsec_output.c,v 1.70 2018/03/03 09:39:29 maxv Exp $ */ /* * Copyright (c) 2002, 2003 Sam Leffler, Errno Consulting @@ -29,7 +29,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: ipsec_output.c,v 1.69 2018/02/26 06:34:39 maxv Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ipsec_output.c,v 1.70 2018/03/03 09:39:29 maxv Exp $"); #if defined(_KERNEL_OPT) #include "opt_inet.h" @@ -466,6 +466,7 @@ ipsec4_process_packet(struct mbuf *m, co int setdf; KASSERT(m != NULL); + KASSERT(m->m_nextpkt == NULL); KASSERT(isr != NULL); s = splsoftnet(); /* insure SA contents don't change */ @@ -718,6 +719,7 @@ ipsec6_process_packet(struct mbuf *m, co union sockaddr_union *dst; KASSERT(m != NULL); + KASSERT(m->m_nextpkt == NULL); KASSERT(isr != NULL); s = splsoftnet(); /* insure SA contents don't change */