Sun May 15 20:37:51 2022 UTC ()
s/wich/which in comments.


(andvar)
diff -r1.15 -r1.16 src/lib/libc/gen/randomid.c
diff -r1.10 -r1.11 src/sbin/newfs_udf/udf_core.c
diff -r1.100 -r1.101 src/sys/arch/acorn32/acorn32/rpc_machdep.c
diff -r1.36 -r1.37 src/sys/arch/acorn32/eb7500atx/eb7500atx_machdep.c
diff -r1.91 -r1.92 src/sys/arch/atari/dev/fd.c
diff -r1.169 -r1.170 src/sys/fs/udf/udf_subr.c
diff -r1.19 -r1.20 src/usr.sbin/syslogd/tls.c

cvs diff -r1.15 -r1.16 src/lib/libc/gen/randomid.c (expand / switch to unified diff)

--- src/lib/libc/gen/randomid.c 2021/09/11 20:28:03 1.15
+++ src/lib/libc/gen/randomid.c 2022/05/15 20:37:50 1.16
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: randomid.c,v 1.15 2021/09/11 20:28:03 andvar Exp $ */ 1/* $NetBSD: randomid.c,v 1.16 2022/05/15 20:37:50 andvar Exp $ */
2/* $KAME: ip6_id.c,v 1.8 2003/09/06 13:41:06 itojun Exp $ */ 2/* $KAME: ip6_id.c,v 1.8 2003/09/06 13:41:06 itojun Exp $ */
3/* $OpenBSD: ip_id.c,v 1.6 2002/03/15 18:19:52 millert Exp $ */ 3/* $OpenBSD: ip_id.c,v 1.6 2002/03/15 18:19:52 millert Exp $ */
4 4
5/* 5/*
6 * Copyright (C) 2003 WIDE Project. 6 * Copyright (C) 2003 WIDE Project.
7 * All rights reserved. 7 * All rights reserved.
8 * 8 *
9 * Redistribution and use in source and binary forms, with or without 9 * Redistribution and use in source and binary forms, with or without
10 * modification, are permitted provided that the following conditions 10 * modification, are permitted provided that the following conditions
11 * are met: 11 * are met:
12 * 1. Redistributions of source code must retain the above copyright 12 * 1. Redistributions of source code must retain the above copyright
13 * notice, this list of conditions and the following disclaimer. 13 * notice, this list of conditions and the following disclaimer.
14 * 2. Redistributions in binary form must reproduce the above copyright 14 * 2. Redistributions in binary form must reproduce the above copyright
@@ -73,27 +73,27 @@ @@ -73,27 +73,27 @@
73 * b = random with gcd(b,m) == 1 73 * b = random with gcd(b,m) == 1
74 * m = constant and a maximal period of m-1. 74 * m = constant and a maximal period of m-1.
75 * 75 *
76 * The transaction id is determined by: 76 * The transaction id is determined by:
77 * id[n] = seed xor (g^X[n] mod n) 77 * id[n] = seed xor (g^X[n] mod n)
78 * 78 *
79 * Effectively the id is restricted to the lower (bits - 1) bits, thus 79 * Effectively the id is restricted to the lower (bits - 1) bits, thus
80 * yielding two different cycles by toggling the msb on and off. 80 * yielding two different cycles by toggling the msb on and off.
81 * This avoids reuse issues caused by reseeding. 81 * This avoids reuse issues caused by reseeding.
82 */ 82 */
83 83
84#include <sys/cdefs.h> 84#include <sys/cdefs.h>
85#if defined(LIBC_SCCS) && !defined(lint) 85#if defined(LIBC_SCCS) && !defined(lint)
86__RCSID("$NetBSD: randomid.c,v 1.15 2021/09/11 20:28:03 andvar Exp $"); 86__RCSID("$NetBSD: randomid.c,v 1.16 2022/05/15 20:37:50 andvar Exp $");
87#endif 87#endif
88 88
89#include "namespace.h" 89#include "namespace.h"
90 90
91#include <sys/types.h> 91#include <sys/types.h>
92#include <sys/time.h> 92#include <sys/time.h>
93#include <stdlib.h> 93#include <stdlib.h>
94#include <string.h> 94#include <string.h>
95#include <errno.h> 95#include <errno.h>
96#include <randomid.h> 96#include <randomid.h>
97 97
98#ifdef __weak_alias 98#ifdef __weak_alias
99__weak_alias(randomid,_randomid) 99__weak_alias(randomid,_randomid)
@@ -112,27 +112,27 @@ struct randomconf { @@ -112,27 +112,27 @@ struct randomconf {
112 const int rc_skip; /* skip values */ 112 const int rc_skip; /* skip values */
113}; 113};
114 114
115struct randomid_ctx { 115struct randomid_ctx {
116 struct randomconf *ru_conf; 116 struct randomconf *ru_conf;
117#define ru_bits ru_conf->rc_bits 117#define ru_bits ru_conf->rc_bits
118#define ru_max ru_conf->rc_max 118#define ru_max ru_conf->rc_max
119#define ru_gen ru_conf->rc_gen 119#define ru_gen ru_conf->rc_gen
120#define ru_n ru_conf->rc_n 120#define ru_n ru_conf->rc_n
121#define ru_agen ru_conf->rc_agen 121#define ru_agen ru_conf->rc_agen
122#define ru_m ru_conf->rc_m 122#define ru_m ru_conf->rc_m
123#define ru_pfacts ru_conf->rc_pfacts 123#define ru_pfacts ru_conf->rc_pfacts
124#define ru_skip ru_conf->rc_skip 124#define ru_skip ru_conf->rc_skip
125 long ru_out; /* Time after wich will be reseeded */ 125 long ru_out; /* Time after which will be reseeded */
126 u_int32_t ru_counter; 126 u_int32_t ru_counter;
127 u_int32_t ru_msb; 127 u_int32_t ru_msb;
128 128
129 u_int32_t ru_x; 129 u_int32_t ru_x;
130 u_int32_t ru_seed, ru_seed2; 130 u_int32_t ru_seed, ru_seed2;
131 u_int32_t ru_a, ru_b; 131 u_int32_t ru_a, ru_b;
132 u_int32_t ru_g; 132 u_int32_t ru_g;
133 time_t ru_reseed; 133 time_t ru_reseed;
134}; 134};
135 135
136static struct randomconf randomconf[] = { 136static struct randomconf randomconf[] = {
137 { 137 {
138 32, /* resulting bits */ 138 32, /* resulting bits */

cvs diff -r1.10 -r1.11 src/sbin/newfs_udf/udf_core.c (expand / switch to unified diff)

--- src/sbin/newfs_udf/udf_core.c 2022/05/07 08:51:32 1.10
+++ src/sbin/newfs_udf/udf_core.c 2022/05/15 20:37:50 1.11
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: udf_core.c,v 1.10 2022/05/07 08:51:32 reinoud Exp $ */ 1/* $NetBSD: udf_core.c,v 1.11 2022/05/15 20:37:50 andvar Exp $ */
2 2
3/* 3/*
4 * Copyright (c) 2006, 2008, 2021, 2022 Reinoud Zandijk 4 * Copyright (c) 2006, 2008, 2021, 2022 Reinoud Zandijk
5 * All rights reserved. 5 * All rights reserved.
6 * 6 *
7 * Redistribution and use in source and binary forms, with or without 7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions 8 * modification, are permitted provided that the following conditions
9 * are met: 9 * are met:
10 * 1. Redistributions of source code must retain the above copyright 10 * 1. Redistributions of source code must retain the above copyright
11 * notice, this list of conditions and the following disclaimer. 11 * notice, this list of conditions and the following disclaimer.
12 * 2. Redistributions in binary form must reproduce the above copyright 12 * 2. Redistributions in binary form must reproduce the above copyright
13 * notice, this list of conditions and the following disclaimer in the 13 * notice, this list of conditions and the following disclaimer in the
14 * documentation and/or other materials provided with the distribution. 14 * documentation and/or other materials provided with the distribution.
@@ -20,27 +20,27 @@ @@ -20,27 +20,27 @@
20 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 20 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
21 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 21 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
22 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 22 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
23 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 23 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 24 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
25 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26 * 26 *
27 */ 27 */
28#if HAVE_NBTOOL_CONFIG_H 28#if HAVE_NBTOOL_CONFIG_H
29#include "nbtool_config.h" 29#include "nbtool_config.h"
30#endif 30#endif
31 31
32#include <sys/cdefs.h> 32#include <sys/cdefs.h>
33__RCSID("$NetBSD: udf_core.c,v 1.10 2022/05/07 08:51:32 reinoud Exp $"); 33__RCSID("$NetBSD: udf_core.c,v 1.11 2022/05/15 20:37:50 andvar Exp $");
34 34
35#include <stdio.h> 35#include <stdio.h>
36#include <stdlib.h> 36#include <stdlib.h>
37#include <stddef.h> 37#include <stddef.h>
38#include <string.h> 38#include <string.h>
39#include <strings.h> 39#include <strings.h>
40#include <unistd.h> 40#include <unistd.h>
41#include <errno.h> 41#include <errno.h>
42#include <time.h> 42#include <time.h>
43#include <assert.h> 43#include <assert.h>
44#include <err.h> 44#include <err.h>
45#include <fcntl.h> 45#include <fcntl.h>
46#include <util.h> 46#include <util.h>
@@ -2425,27 +2425,27 @@ udf_create_new_fe(struct file_entry **fe @@ -2425,27 +2425,27 @@ udf_create_new_fe(struct file_entry **fe
2425 struct filetimes_extattr_entry *ft_extattr; 2425 struct filetimes_extattr_entry *ft_extattr;
2426 uint32_t crclen; /* XXX: should be 16; need to detect overflow */ 2426 uint32_t crclen; /* XXX: should be 16; need to detect overflow */
2427 uint16_t icbflags; 2427 uint16_t icbflags;
2428 2428
2429 *fep = NULL; 2429 *fep = NULL;
2430 fe = calloc(1, context.sector_size); 2430 fe = calloc(1, context.sector_size);
2431 if (fe == NULL) 2431 if (fe == NULL)
2432 return ENOMEM; 2432 return ENOMEM;
2433 2433
2434 udf_inittag(&fe->tag, TAGID_FENTRY, /* loc */ 0); 2434 udf_inittag(&fe->tag, TAGID_FENTRY, /* loc */ 0);
2435 icb = &fe->icbtag; 2435 icb = &fe->icbtag;
2436 2436
2437 /* 2437 /*
2438 * Always use strategy type 4 unless on WORM wich we don't support 2438 * Always use strategy type 4 unless on WORM which we don't support
2439 * (yet). Fill in defaults and set for internal allocation of data. 2439 * (yet). Fill in defaults and set for internal allocation of data.
2440 */ 2440 */
2441 icb->strat_type = udf_rw16(4); 2441 icb->strat_type = udf_rw16(4);
2442 icb->max_num_entries = udf_rw16(1); 2442 icb->max_num_entries = udf_rw16(1);
2443 icb->file_type = file_type; /* 8 bit */ 2443 icb->file_type = file_type; /* 8 bit */
2444 icb->flags = udf_rw16(UDF_ICB_INTERN_ALLOC); 2444 icb->flags = udf_rw16(UDF_ICB_INTERN_ALLOC);
2445 2445
2446 fe->perm = udf_rw32(0x7fff); /* all is allowed */ 2446 fe->perm = udf_rw32(0x7fff); /* all is allowed */
2447 fe->link_cnt = udf_rw16(0); /* explicit setting */ 2447 fe->link_cnt = udf_rw16(0); /* explicit setting */
2448 2448
2449 fe->ckpoint = udf_rw32(1); /* user supplied file version */ 2449 fe->ckpoint = udf_rw32(1); /* user supplied file version */
2450 2450
2451 udf_set_timestamp_now(&birthtime); 2451 udf_set_timestamp_now(&birthtime);
@@ -2525,27 +2525,27 @@ udf_create_new_efe(struct extfile_entry  @@ -2525,27 +2525,27 @@ udf_create_new_efe(struct extfile_entry
2525 struct icb_tag *icb; 2525 struct icb_tag *icb;
2526 uint32_t crclen; /* XXX: should be 16; need to detect overflow */ 2526 uint32_t crclen; /* XXX: should be 16; need to detect overflow */
2527 uint16_t icbflags; 2527 uint16_t icbflags;
2528 2528
2529 *efep = NULL; 2529 *efep = NULL;
2530 efe = calloc(1, context.sector_size); 2530 efe = calloc(1, context.sector_size);
2531 if (efe == NULL) 2531 if (efe == NULL)
2532 return ENOMEM; 2532 return ENOMEM;
2533 2533
2534 udf_inittag(&efe->tag, TAGID_EXTFENTRY, /* loc */ 0); 2534 udf_inittag(&efe->tag, TAGID_EXTFENTRY, /* loc */ 0);
2535 icb = &efe->icbtag; 2535 icb = &efe->icbtag;
2536 2536
2537 /* 2537 /*
2538 * Always use strategy type 4 unless on WORM wich we don't support 2538 * Always use strategy type 4 unless on WORM which we don't support
2539 * (yet). Fill in defaults and set for internal allocation of data. 2539 * (yet). Fill in defaults and set for internal allocation of data.
2540 */ 2540 */
2541 icb->strat_type = udf_rw16(4); 2541 icb->strat_type = udf_rw16(4);
2542 icb->max_num_entries = udf_rw16(1); 2542 icb->max_num_entries = udf_rw16(1);
2543 icb->file_type = file_type; /* 8 bit */ 2543 icb->file_type = file_type; /* 8 bit */
2544 icb->flags = udf_rw16(UDF_ICB_INTERN_ALLOC); 2544 icb->flags = udf_rw16(UDF_ICB_INTERN_ALLOC);
2545 2545
2546 efe->perm = udf_rw32(0x7fff); /* all is allowed */ 2546 efe->perm = udf_rw32(0x7fff); /* all is allowed */
2547 efe->link_cnt = udf_rw16(0); /* explicit setting */ 2547 efe->link_cnt = udf_rw16(0); /* explicit setting */
2548 2548
2549 efe->ckpoint = udf_rw32(1); /* user supplied file version */ 2549 efe->ckpoint = udf_rw32(1); /* user supplied file version */
2550 2550
2551 udf_set_timestamp_now(&efe->ctime); 2551 udf_set_timestamp_now(&efe->ctime);

cvs diff -r1.100 -r1.101 src/sys/arch/acorn32/acorn32/rpc_machdep.c (expand / switch to unified diff)

--- src/sys/arch/acorn32/acorn32/rpc_machdep.c 2021/09/16 20:17:46 1.100
+++ src/sys/arch/acorn32/acorn32/rpc_machdep.c 2022/05/15 20:37:50 1.101
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: rpc_machdep.c,v 1.100 2021/09/16 20:17:46 andvar Exp $ */ 1/* $NetBSD: rpc_machdep.c,v 1.101 2022/05/15 20:37:50 andvar Exp $ */
2 2
3/* 3/*
4 * Copyright (c) 2000-2002 Reinoud Zandijk. 4 * Copyright (c) 2000-2002 Reinoud Zandijk.
5 * Copyright (c) 1994-1998 Mark Brinicombe. 5 * Copyright (c) 1994-1998 Mark Brinicombe.
6 * Copyright (c) 1994 Brini. 6 * Copyright (c) 1994 Brini.
7 * All rights reserved. 7 * All rights reserved.
8 * 8 *
9 * This code is derived from software written for Brini by Mark Brinicombe 9 * This code is derived from software written for Brini by Mark Brinicombe
10 * 10 *
11 * Redistribution and use in source and binary forms, with or without 11 * Redistribution and use in source and binary forms, with or without
12 * modification, are permitted provided that the following conditions 12 * modification, are permitted provided that the following conditions
13 * are met: 13 * are met:
14 * 1. Redistributions of source code must retain the above copyright 14 * 1. Redistributions of source code must retain the above copyright
@@ -44,27 +44,27 @@ @@ -44,27 +44,27 @@
44 * This file still needs a lot of work 44 * This file still needs a lot of work
45 * 45 *
46 * Created : 17/09/94 46 * Created : 17/09/94
47 * Updated for yet another new bootloader 28/12/02 47 * Updated for yet another new bootloader 28/12/02
48 */ 48 */
49 49
50#include "opt_ddb.h" 50#include "opt_ddb.h"
51#include "opt_modular.h" 51#include "opt_modular.h"
52#include "vidcvideo.h" 52#include "vidcvideo.h"
53#include "podulebus.h" 53#include "podulebus.h"
54 54
55#include <sys/param.h> 55#include <sys/param.h>
56 56
57__KERNEL_RCSID(0, "$NetBSD: rpc_machdep.c,v 1.100 2021/09/16 20:17:46 andvar Exp $"); 57__KERNEL_RCSID(0, "$NetBSD: rpc_machdep.c,v 1.101 2022/05/15 20:37:50 andvar Exp $");
58 58
59#include <sys/systm.h> 59#include <sys/systm.h>
60#include <sys/kernel.h> 60#include <sys/kernel.h>
61#include <sys/reboot.h> 61#include <sys/reboot.h>
62#include <sys/proc.h> 62#include <sys/proc.h>
63#include <sys/msgbuf.h> 63#include <sys/msgbuf.h>
64#include <sys/exec.h> 64#include <sys/exec.h>
65#include <sys/exec_aout.h> 65#include <sys/exec_aout.h>
66#include <sys/ksyms.h> 66#include <sys/ksyms.h>
67#include <sys/bus.h> 67#include <sys/bus.h>
68#include <sys/cpu.h> 68#include <sys/cpu.h>
69#include <sys/intr.h> 69#include <sys/intr.h>
70#include <sys/device.h> 70#include <sys/device.h>
@@ -447,27 +447,27 @@ initarm(void *cookie) @@ -447,27 +447,27 @@ initarm(void *cookie)
447 * This allows a means of generating output during initarm(). 447 * This allows a means of generating output during initarm().
448 * Once all the memory map changes are complete we can call consinit() 448 * Once all the memory map changes are complete we can call consinit()
449 * and not have to worry about things moving. 449 * and not have to worry about things moving.
450 */ 450 */
451 /* fcomcnattach(DC21285_ARMCSR_BASE, comcnspeed, comcnmode); */ 451 /* fcomcnattach(DC21285_ARMCSR_BASE, comcnspeed, comcnmode); */
452 /* XXX snif .... i am still not able to this */ 452 /* XXX snif .... i am still not able to this */
453 453
454 /* 454 /*
455 * We have the following memory map (derived from EBSA) 455 * We have the following memory map (derived from EBSA)
456 * 456 *
457 * virtual address == physical address apart from the areas: 457 * virtual address == physical address apart from the areas:
458 * 0x00000000 -> 0x000fffff which is mapped to 458 * 0x00000000 -> 0x000fffff which is mapped to
459 * top 1MB of physical memory 459 * top 1MB of physical memory
460 * 0xf0000000 -> 0xf0ffffff wich is mapped to 460 * 0xf0000000 -> 0xf0ffffff which is mapped to
461 * physical address 0x10000000 -> 0x10ffffff 461 * physical address 0x10000000 -> 0x10ffffff
462 * or on a Kinetic: 462 * or on a Kinetic:
463 * physical address 0x20400000 -> 0x20ffffff 463 * physical address 0x20400000 -> 0x20ffffff
464 * 464 *
465 * This means that the kernel is mapped suitably for continuing 465 * This means that the kernel is mapped suitably for continuing
466 * execution, all I/O is mapped 1:1 virtual to physical and 466 * execution, all I/O is mapped 1:1 virtual to physical and
467 * physical memory is accessible. 467 * physical memory is accessible.
468 * 468 *
469 * The initarm() has the responsibility for creating the kernel 469 * The initarm() has the responsibility for creating the kernel
470 * page tables. 470 * page tables.
471 * It must also set up various memory pointers that are used 471 * It must also set up various memory pointers that are used
472 * by pmap etc. 472 * by pmap etc.
473 */ 473 */

cvs diff -r1.36 -r1.37 src/sys/arch/acorn32/eb7500atx/eb7500atx_machdep.c (expand / switch to unified diff)

--- src/sys/arch/acorn32/eb7500atx/eb7500atx_machdep.c 2021/09/16 20:17:46 1.36
+++ src/sys/arch/acorn32/eb7500atx/eb7500atx_machdep.c 2022/05/15 20:37:51 1.37
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: eb7500atx_machdep.c,v 1.36 2021/09/16 20:17:46 andvar Exp $ */ 1/* $NetBSD: eb7500atx_machdep.c,v 1.37 2022/05/15 20:37:51 andvar Exp $ */
2 2
3/* 3/*
4 * Copyright (c) 2000-2002 Reinoud Zandijk. 4 * Copyright (c) 2000-2002 Reinoud Zandijk.
5 * Copyright (c) 1994-1998 Mark Brinicombe. 5 * Copyright (c) 1994-1998 Mark Brinicombe.
6 * Copyright (c) 1994 Brini. 6 * Copyright (c) 1994 Brini.
7 * All rights reserved. 7 * All rights reserved.
8 * 8 *
9 * This code is derived from software written for Brini by Mark Brinicombe 9 * This code is derived from software written for Brini by Mark Brinicombe
10 * 10 *
11 * Redistribution and use in source and binary forms, with or without 11 * Redistribution and use in source and binary forms, with or without
12 * modification, are permitted provided that the following conditions 12 * modification, are permitted provided that the following conditions
13 * are met: 13 * are met:
14 * 1. Redistributions of source code must retain the above copyright 14 * 1. Redistributions of source code must retain the above copyright
@@ -44,27 +44,27 @@ @@ -44,27 +44,27 @@
44 * This file still needs a lot of work 44 * This file still needs a lot of work
45 * 45 *
46 * Created : 17/09/94 46 * Created : 17/09/94
47 * Updated for yet another new bootloader 28/12/02 47 * Updated for yet another new bootloader 28/12/02
48 */ 48 */
49 49
50#include "opt_ddb.h" 50#include "opt_ddb.h"
51#include "opt_modular.h" 51#include "opt_modular.h"
52#include "vidcvideo.h" 52#include "vidcvideo.h"
53#include "pckbc.h" 53#include "pckbc.h"
54 54
55#include <sys/param.h> 55#include <sys/param.h>
56 56
57__KERNEL_RCSID(0, "$NetBSD: eb7500atx_machdep.c,v 1.36 2021/09/16 20:17:46 andvar Exp $"); 57__KERNEL_RCSID(0, "$NetBSD: eb7500atx_machdep.c,v 1.37 2022/05/15 20:37:51 andvar Exp $");
58 58
59#include <sys/systm.h> 59#include <sys/systm.h>
60#include <sys/kernel.h> 60#include <sys/kernel.h>
61#include <sys/reboot.h> 61#include <sys/reboot.h>
62#include <sys/proc.h> 62#include <sys/proc.h>
63#include <sys/msgbuf.h> 63#include <sys/msgbuf.h>
64#include <sys/exec.h> 64#include <sys/exec.h>
65#include <sys/exec_aout.h> 65#include <sys/exec_aout.h>
66#include <sys/ksyms.h> 66#include <sys/ksyms.h>
67#include <sys/bus.h> 67#include <sys/bus.h>
68#include <sys/cpu.h> 68#include <sys/cpu.h>
69#include <sys/intr.h> 69#include <sys/intr.h>
70#include <sys/device.h> 70#include <sys/device.h>
@@ -412,27 +412,27 @@ initarm(void *cookie) @@ -412,27 +412,27 @@ initarm(void *cookie)
412 * This allows a means of generating output during initarm(). 412 * This allows a means of generating output during initarm().
413 * Once all the memory map changes are complete we can call consinit() 413 * Once all the memory map changes are complete we can call consinit()
414 * and not have to worry about things moving. 414 * and not have to worry about things moving.
415 */ 415 */
416 /* fcomcnattach(DC21285_ARMCSR_BASE, comcnspeed, comcnmode); */ 416 /* fcomcnattach(DC21285_ARMCSR_BASE, comcnspeed, comcnmode); */
417 /* XXX snif .... i am still not able to this */ 417 /* XXX snif .... i am still not able to this */
418 418
419 /* 419 /*
420 * We have the following memory map (derived from EBSA) 420 * We have the following memory map (derived from EBSA)
421 * 421 *
422 * virtual address == physical address apart from the areas: 422 * virtual address == physical address apart from the areas:
423 * 0x00000000 -> 0x000fffff which is mapped to 423 * 0x00000000 -> 0x000fffff which is mapped to
424 * top 1MB of physical memory 424 * top 1MB of physical memory
425 * 0xf0000000 -> 0xf0ffffff wich is mapped to 425 * 0xf0000000 -> 0xf0ffffff which is mapped to
426 * physical address 0x01000000 -> 0x01ffffff (DRAM0a, dram[0]) 426 * physical address 0x01000000 -> 0x01ffffff (DRAM0a, dram[0])
427 * 427 *
428 * This means that the kernel is mapped suitably for continuing 428 * This means that the kernel is mapped suitably for continuing
429 * execution, all I/O is mapped 1:1 virtual to physical and 429 * execution, all I/O is mapped 1:1 virtual to physical and
430 * physical memory is accessible. 430 * physical memory is accessible.
431 * 431 *
432 * The initarm() has the responsibility for creating the kernel 432 * The initarm() has the responsibility for creating the kernel
433 * page tables. 433 * page tables.
434 * It must also set up various memory pointers that are used 434 * It must also set up various memory pointers that are used
435 * by pmap etc. 435 * by pmap etc.
436 */ 436 */
437 437
438 /* START OF REAL NEW STUFF */ 438 /* START OF REAL NEW STUFF */

cvs diff -r1.91 -r1.92 src/sys/arch/atari/dev/fd.c (expand / switch to unified diff)

--- src/sys/arch/atari/dev/fd.c 2022/05/03 20:52:31 1.91
+++ src/sys/arch/atari/dev/fd.c 2022/05/15 20:37:51 1.92
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: fd.c,v 1.91 2022/05/03 20:52:31 andvar Exp $ */ 1/* $NetBSD: fd.c,v 1.92 2022/05/15 20:37:51 andvar Exp $ */
2 2
3/* 3/*
4 * Copyright (c) 1995 Leo Weppelman. 4 * Copyright (c) 1995 Leo Weppelman.
5 * All rights reserved. 5 * All rights reserved.
6 * 6 *
7 * Redistribution and use in source and binary forms, with or without 7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions 8 * modification, are permitted provided that the following conditions
9 * are met: 9 * are met:
10 * 1. Redistributions of source code must retain the above copyright 10 * 1. Redistributions of source code must retain the above copyright
11 * notice, this list of conditions and the following disclaimer. 11 * notice, this list of conditions and the following disclaimer.
12 * 2. Redistributions in binary form must reproduce the above copyright 12 * 2. Redistributions in binary form must reproduce the above copyright
13 * notice, this list of conditions and the following disclaimer in the 13 * notice, this list of conditions and the following disclaimer in the
14 * documentation and/or other materials provided with the distribution. 14 * documentation and/or other materials provided with the distribution.
@@ -34,27 +34,27 @@ @@ -34,27 +34,27 @@
34 * use of some special DMA accessing code. 34 * use of some special DMA accessing code.
35 * 35 *
36 * Interrupts from the FDC are in fact DMA interrupts which get their 36 * Interrupts from the FDC are in fact DMA interrupts which get their
37 * first level handling in 'dma.c' . If the floppy driver is currently 37 * first level handling in 'dma.c' . If the floppy driver is currently
38 * using DMA the interrupt is signalled to 'fdcint'. 38 * using DMA the interrupt is signalled to 'fdcint'.
39 * 39 *
40 * TODO: 40 * TODO:
41 * - Test it with 2 drives (I don't have them) 41 * - Test it with 2 drives (I don't have them)
42 * - Test it with an HD-drive (Don't have that either) 42 * - Test it with an HD-drive (Don't have that either)
43 * - Finish ioctl's 43 * - Finish ioctl's
44 */ 44 */
45 45
46#include <sys/cdefs.h> 46#include <sys/cdefs.h>
47__KERNEL_RCSID(0, "$NetBSD: fd.c,v 1.91 2022/05/03 20:52:31 andvar Exp $"); 47__KERNEL_RCSID(0, "$NetBSD: fd.c,v 1.92 2022/05/15 20:37:51 andvar Exp $");
48 48
49#include <sys/param.h> 49#include <sys/param.h>
50#include <sys/systm.h> 50#include <sys/systm.h>
51#include <sys/callout.h> 51#include <sys/callout.h>
52#include <sys/kernel.h> 52#include <sys/kernel.h>
53#include <sys/malloc.h> 53#include <sys/malloc.h>
54#include <sys/buf.h> 54#include <sys/buf.h>
55#include <sys/bufq.h> 55#include <sys/bufq.h>
56#include <sys/proc.h> 56#include <sys/proc.h>
57#include <sys/device.h> 57#include <sys/device.h>
58#include <sys/ioctl.h> 58#include <sys/ioctl.h>
59#include <sys/fcntl.h> 59#include <sys/fcntl.h>
60#include <sys/conf.h> 60#include <sys/conf.h>
@@ -1245,27 +1245,27 @@ fdmoff(struct fd_softc *fdsoftc) @@ -1245,27 +1245,27 @@ fdmoff(struct fd_softc *fdsoftc)
1245 if ((fd_state == FLP_MON) && selected) { 1245 if ((fd_state == FLP_MON) && selected) {
1246 tmp = read_fdreg(FDC_CS); 1246 tmp = read_fdreg(FDC_CS);
1247 if ((tmp & MOTORON) == 0) { 1247 if ((tmp & MOTORON) == 0) {
1248 fddeselect(); 1248 fddeselect();
1249 fd_state = FLP_IDLE; 1249 fd_state = FLP_IDLE;
1250 } else 1250 } else
1251 callout_reset(&fdsoftc->sc_motor_ch, 10 * FLP_MONDELAY, 1251 callout_reset(&fdsoftc->sc_motor_ch, 10 * FLP_MONDELAY,
1252 (FPV)fdmotoroff, fdsoftc); 1252 (FPV)fdmotoroff, fdsoftc);
1253 } 1253 }
1254 st_dmafree(fdsoftc, &tmp); 1254 st_dmafree(fdsoftc, &tmp);
1255} 1255}
1256 1256
1257/* 1257/*
1258 * Used to find out wich drives are actually connected. We do this by issuing 1258 * Used to find out which drives are actually connected. We do this by issuing
1259 * is 'RESTORE' command and check if the 'track-0' bit is set. This also works 1259 * is 'RESTORE' command and check if the 'track-0' bit is set. This also works
1260 * if the drive is present but no floppy is inserted. 1260 * if the drive is present but no floppy is inserted.
1261 */ 1261 */
1262static void 1262static void
1263fdtestdrv(struct fd_softc *fdsoftc) 1263fdtestdrv(struct fd_softc *fdsoftc)
1264{ 1264{
1265 int status; 1265 int status;
1266 1266
1267 /* 1267 /*
1268 * Select the right unit and head. 1268 * Select the right unit and head.
1269 */ 1269 */
1270 fdselect(fdsoftc->unit, 0, FLP_DD); 1270 fdselect(fdsoftc->unit, 0, FLP_DD);
1271 1271

cvs diff -r1.169 -r1.170 src/sys/fs/udf/udf_subr.c (expand / switch to unified diff)

--- src/sys/fs/udf/udf_subr.c 2022/04/22 21:21:10 1.169
+++ src/sys/fs/udf/udf_subr.c 2022/05/15 20:37:51 1.170
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: udf_subr.c,v 1.169 2022/04/22 21:21:10 reinoud Exp $ */ 1/* $NetBSD: udf_subr.c,v 1.170 2022/05/15 20:37:51 andvar Exp $ */
2 2
3/* 3/*
4 * Copyright (c) 2006, 2008 Reinoud Zandijk 4 * Copyright (c) 2006, 2008 Reinoud Zandijk
5 * All rights reserved. 5 * All rights reserved.
6 * 6 *
7 * Redistribution and use in source and binary forms, with or without 7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions 8 * modification, are permitted provided that the following conditions
9 * are met: 9 * are met:
10 * 1. Redistributions of source code must retain the above copyright 10 * 1. Redistributions of source code must retain the above copyright
11 * notice, this list of conditions and the following disclaimer. 11 * notice, this list of conditions and the following disclaimer.
12 * 2. Redistributions in binary form must reproduce the above copyright 12 * 2. Redistributions in binary form must reproduce the above copyright
13 * notice, this list of conditions and the following disclaimer in the 13 * notice, this list of conditions and the following disclaimer in the
14 * documentation and/or other materials provided with the distribution. 14 * documentation and/or other materials provided with the distribution.
@@ -19,27 +19,27 @@ @@ -19,27 +19,27 @@
19 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 19 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
20 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 20 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
21 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 21 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
22 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 22 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
23 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 23 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 24 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
25 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26 * 26 *
27 */ 27 */
28 28
29 29
30#include <sys/cdefs.h> 30#include <sys/cdefs.h>
31#ifndef lint 31#ifndef lint
32__KERNEL_RCSID(0, "$NetBSD: udf_subr.c,v 1.169 2022/04/22 21:21:10 reinoud Exp $"); 32__KERNEL_RCSID(0, "$NetBSD: udf_subr.c,v 1.170 2022/05/15 20:37:51 andvar Exp $");
33#endif /* not lint */ 33#endif /* not lint */
34 34
35 35
36#if defined(_KERNEL_OPT) 36#if defined(_KERNEL_OPT)
37#include "opt_compat_netbsd.h" 37#include "opt_compat_netbsd.h"
38#endif 38#endif
39 39
40#include <sys/param.h> 40#include <sys/param.h>
41#include <sys/systm.h> 41#include <sys/systm.h>
42#include <sys/sysctl.h> 42#include <sys/sysctl.h>
43#include <sys/namei.h> 43#include <sys/namei.h>
44#include <sys/proc.h> 44#include <sys/proc.h>
45#include <sys/kernel.h> 45#include <sys/kernel.h>
@@ -4673,27 +4673,27 @@ udf_create_new_fe(struct udf_mount *ump, @@ -4673,27 +4673,27 @@ udf_create_new_fe(struct udf_mount *ump,
4673 struct timespec now; 4673 struct timespec now;
4674 struct icb_tag *icb; 4674 struct icb_tag *icb;
4675 struct filetimes_extattr_entry *ft_extattr; 4675 struct filetimes_extattr_entry *ft_extattr;
4676 uint64_t unique_id; 4676 uint64_t unique_id;
4677 uint32_t fidsize, lb_num; 4677 uint32_t fidsize, lb_num;
4678 uint8_t *bpos; 4678 uint8_t *bpos;
4679 int crclen, attrlen; 4679 int crclen, attrlen;
4680 4680
4681 lb_num = udf_rw32(node_icb->loc.lb_num); 4681 lb_num = udf_rw32(node_icb->loc.lb_num);
4682 udf_inittag(ump, &fe->tag, TAGID_FENTRY, lb_num); 4682 udf_inittag(ump, &fe->tag, TAGID_FENTRY, lb_num);
4683 icb = &fe->icbtag; 4683 icb = &fe->icbtag;
4684 4684
4685 /* 4685 /*
4686 * Always use strategy type 4 unless on WORM wich we don't support 4686 * Always use strategy type 4 unless on WORM which we don't support
4687 * (yet). Fill in defaults and set for internal allocation of data. 4687 * (yet). Fill in defaults and set for internal allocation of data.
4688 */ 4688 */
4689 icb->strat_type = udf_rw16(4); 4689 icb->strat_type = udf_rw16(4);
4690 icb->max_num_entries = udf_rw16(1); 4690 icb->max_num_entries = udf_rw16(1);
4691 icb->file_type = file_type; /* 8 bit */ 4691 icb->file_type = file_type; /* 8 bit */
4692 icb->flags = udf_rw16(UDF_ICB_INTERN_ALLOC); 4692 icb->flags = udf_rw16(UDF_ICB_INTERN_ALLOC);
4693 4693
4694 fe->perm = udf_rw32(0x7fff); /* all is allowed */ 4694 fe->perm = udf_rw32(0x7fff); /* all is allowed */
4695 fe->link_cnt = udf_rw16(0); /* explicit setting */ 4695 fe->link_cnt = udf_rw16(0); /* explicit setting */
4696 4696
4697 fe->ckpoint = udf_rw32(1); /* user supplied file version */ 4697 fe->ckpoint = udf_rw32(1); /* user supplied file version */
4698 4698
4699 vfs_timestamp(&now); 4699 vfs_timestamp(&now);
@@ -4755,27 +4755,27 @@ udf_create_new_efe(struct udf_mount *ump @@ -4755,27 +4755,27 @@ udf_create_new_efe(struct udf_mount *ump
4755{ 4755{
4756 struct timespec now; 4756 struct timespec now;
4757 struct icb_tag *icb; 4757 struct icb_tag *icb;
4758 uint64_t unique_id; 4758 uint64_t unique_id;
4759 uint32_t fidsize, lb_num; 4759 uint32_t fidsize, lb_num;
4760 uint8_t *bpos; 4760 uint8_t *bpos;
4761 int crclen; 4761 int crclen;
4762 4762
4763 lb_num = udf_rw32(node_icb->loc.lb_num); 4763 lb_num = udf_rw32(node_icb->loc.lb_num);
4764 udf_inittag(ump, &efe->tag, TAGID_EXTFENTRY, lb_num); 4764 udf_inittag(ump, &efe->tag, TAGID_EXTFENTRY, lb_num);
4765 icb = &efe->icbtag; 4765 icb = &efe->icbtag;
4766 4766
4767 /* 4767 /*
4768 * Always use strategy type 4 unless on WORM wich we don't support 4768 * Always use strategy type 4 unless on WORM which we don't support
4769 * (yet). Fill in defaults and set for internal allocation of data. 4769 * (yet). Fill in defaults and set for internal allocation of data.
4770 */ 4770 */
4771 icb->strat_type = udf_rw16(4); 4771 icb->strat_type = udf_rw16(4);
4772 icb->max_num_entries = udf_rw16(1); 4772 icb->max_num_entries = udf_rw16(1);
4773 icb->file_type = file_type; /* 8 bit */ 4773 icb->file_type = file_type; /* 8 bit */
4774 icb->flags = udf_rw16(UDF_ICB_INTERN_ALLOC); 4774 icb->flags = udf_rw16(UDF_ICB_INTERN_ALLOC);
4775 4775
4776 efe->perm = udf_rw32(0x7fff); /* all is allowed */ 4776 efe->perm = udf_rw32(0x7fff); /* all is allowed */
4777 efe->link_cnt = udf_rw16(0); /* explicit setting */ 4777 efe->link_cnt = udf_rw16(0); /* explicit setting */
4778 4778
4779 efe->ckpoint = udf_rw32(1); /* user supplied file version */ 4779 efe->ckpoint = udf_rw32(1); /* user supplied file version */
4780 4780
4781 vfs_timestamp(&now); 4781 vfs_timestamp(&now);

cvs diff -r1.19 -r1.20 src/usr.sbin/syslogd/tls.c (expand / switch to unified diff)

--- src/usr.sbin/syslogd/tls.c 2021/11/27 22:30:26 1.19
+++ src/usr.sbin/syslogd/tls.c 2022/05/15 20:37:51 1.20
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: tls.c,v 1.19 2021/11/27 22:30:26 rillig Exp $ */ 1/* $NetBSD: tls.c,v 1.20 2022/05/15 20:37:51 andvar Exp $ */
2 2
3/*- 3/*-
4 * Copyright (c) 2008 The NetBSD Foundation, Inc. 4 * Copyright (c) 2008 The NetBSD Foundation, Inc.
5 * All rights reserved. 5 * All rights reserved.
6 * 6 *
7 * This code is derived from software contributed to The NetBSD Foundation 7 * This code is derived from software contributed to The NetBSD Foundation
8 * by Martin Schütte. 8 * by Martin Schütte.
9 * 9 *
10 * Redistribution and use in source and binary forms, with or without 10 * Redistribution and use in source and binary forms, with or without
11 * modification, are permitted provided that the following conditions 11 * modification, are permitted provided that the following conditions
12 * are met: 12 * are met:
13 * 1. Redistributions of source code must retain the above copyright 13 * 1. Redistributions of source code must retain the above copyright
14 * notice, this list of conditions and the following disclaimer. 14 * notice, this list of conditions and the following disclaimer.
@@ -35,27 +35,27 @@ @@ -35,27 +35,27 @@
35 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 35 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
36 * POSSIBILITY OF SUCH DAMAGE. 36 * POSSIBILITY OF SUCH DAMAGE.
37 */ 37 */
38/* 38/*
39 * tls.c TLS related code for syslogd 39 * tls.c TLS related code for syslogd
40 * 40 *
41 * implements the TLS init and handshake callbacks with all required 41 * implements the TLS init and handshake callbacks with all required
42 * checks from http://tools.ietf.org/html/draft-ietf-syslog-transport-tls-13 42 * checks from http://tools.ietf.org/html/draft-ietf-syslog-transport-tls-13
43 * 43 *
44 * Martin Schütte 44 * Martin Schütte
45 */ 45 */
46 46
47#include <sys/cdefs.h> 47#include <sys/cdefs.h>
48__RCSID("$NetBSD: tls.c,v 1.19 2021/11/27 22:30:26 rillig Exp $"); 48__RCSID("$NetBSD: tls.c,v 1.20 2022/05/15 20:37:51 andvar Exp $");
49 49
50#ifndef DISABLE_TLS 50#ifndef DISABLE_TLS
51#include <sys/stat.h> 51#include <sys/stat.h>
52#include "syslogd.h" 52#include "syslogd.h"
53#include "tls.h" 53#include "tls.h"
54#include <netinet/in.h> 54#include <netinet/in.h>
55#include <ifaddrs.h> 55#include <ifaddrs.h>
56#include "extern.h" 56#include "extern.h"
57 57
58static unsigned getVerifySetting(const char *x509verifystring); 58static unsigned getVerifySetting(const char *x509verifystring);
59 59
60/* to output SSL error codes */ 60/* to output SSL error codes */
61static const char *SSL_ERRCODE[] = { 61static const char *SSL_ERRCODE[] = {
@@ -326,27 +326,27 @@ get_fingerprint(const X509 *cert, char * @@ -326,27 +326,27 @@ get_fingerprint(const X509 *cert, char *
326 size_t memsize, i; 326 size_t memsize, i;
327 unsigned len; 327 unsigned len;
328 const EVP_MD *digest; 328 const EVP_MD *digest;
329 const char *openssl_algname; 329 const char *openssl_algname;
330 /* RFC nnnn uses hash function names from 330 /* RFC nnnn uses hash function names from
331 * http://www.iana.org/assignments/hash-function-text-names/ 331 * http://www.iana.org/assignments/hash-function-text-names/
332 * in certificate fingerprints. 332 * in certificate fingerprints.
333 * We have to map them to the hash function names used by OpenSSL. 333 * We have to map them to the hash function names used by OpenSSL.
334 * Actually we use the union of both namespaces to be RFC compliant 334 * Actually we use the union of both namespaces to be RFC compliant
335 * and to let the user use "openssl -fingerprint ..." 335 * and to let the user use "openssl -fingerprint ..."
336 * 336 *
337 * Intended behaviour is to prefer the IANA names, 337 * Intended behaviour is to prefer the IANA names,
338 * but allow the user to use OpenSSL names as well 338 * but allow the user to use OpenSSL names as well
339 * (e.g. for "RIPEMD160" wich has no IANA name) 339 * (e.g. for "RIPEMD160" which has no IANA name)
340 */ 340 */
341 static const struct hash_alg_namemap { 341 static const struct hash_alg_namemap {
342 const char *iana; 342 const char *iana;
343 const char *openssl; 343 const char *openssl;
344 } hash_alg_namemap[] = { 344 } hash_alg_namemap[] = {
345 {"md2", "MD2" }, 345 {"md2", "MD2" },
346 {"md5", "MD5" }, 346 {"md5", "MD5" },
347 {"sha-1", "SHA1" }, 347 {"sha-1", "SHA1" },
348 {"sha-224", "SHA224"}, 348 {"sha-224", "SHA224"},
349 {"sha-256", "SHA256"}, 349 {"sha-256", "SHA256"},
350 {"sha-384", "SHA384"}, 350 {"sha-384", "SHA384"},
351 {"sha-512", "SHA512"} 351 {"sha-512", "SHA512"}
352 }; 352 };