Sun Jan 14 18:05:57 2024 UTC (126d)
Pull up following revision(s) (requested by mrg in ticket #552):

	sys/arch/vax/vax/machdep.c: revision 1.198

vax: set default RLIMIT_AS to the same as MAXDSIZ
this allows modern GCC to run without returning to the issues that
reported in PR#28379, and avoids a strange sort-of-invariant violation
where the rlimit for data equaled the rlimit for all address space, so
there is no room for text or stack etc.

ok ragge@


(martin)
diff -r1.196 -r1.196.20.1 src/sys/arch/vax/vax/machdep.c

cvs diff -r1.196 -r1.196.20.1 src/sys/arch/vax/vax/machdep.c (expand / switch to unified diff)

--- src/sys/arch/vax/vax/machdep.c 2020/06/11 19:20:46 1.196
+++ src/sys/arch/vax/vax/machdep.c 2024/01/14 18:05:57 1.196.20.1
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: machdep.c,v 1.196 2020/06/11 19:20:46 ad Exp $ */ 1/* $NetBSD: machdep.c,v 1.196.20.1 2024/01/14 18:05:57 martin Exp $ */
2 2
3/* 3/*
4 * Copyright (c) 1982, 1986, 1990 The Regents of the University of California. 4 * Copyright (c) 1982, 1986, 1990 The Regents of the University of California.
5 * All rights reserved. 5 * All rights reserved.
6 *  6 *
7 * Changed for the VAX port (and for readability) /IC 7 * Changed for the VAX port (and for readability) /IC
8 *  8 *
9 * This code is derived from software contributed to Berkeley by the Systems 9 * This code is derived from software contributed to Berkeley by the Systems
10 * Programming Group of the University of Utah Computer Science Department. 10 * Programming Group of the University of Utah Computer Science Department.
11 *  11 *
12 * Redistribution and use in source and binary forms, with or without 12 * Redistribution and use in source and binary forms, with or without
13 * modification, are permitted provided that the following conditions 13 * modification, are permitted provided that the following conditions
14 * are met: 14 * are met:
@@ -73,27 +73,27 @@ @@ -73,27 +73,27 @@
73 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 73 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
74 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 74 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
75 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 75 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
76 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 76 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
77 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 77 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
78 * SUCH DAMAGE. 78 * SUCH DAMAGE.
79 *  79 *
80 * from: Utah Hdr: machdep.c 1.63 91/04/24 80 * from: Utah Hdr: machdep.c 1.63 91/04/24
81 *  81 *
82 * @(#)machdep.c 7.16 (Berkeley) 6/3/91 82 * @(#)machdep.c 7.16 (Berkeley) 6/3/91
83 */ 83 */
84 84
85#include <sys/cdefs.h> 85#include <sys/cdefs.h>
86__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.196 2020/06/11 19:20:46 ad Exp $"); 86__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.196.20.1 2024/01/14 18:05:57 martin Exp $");
87 87
88#include "opt_ddb.h" 88#include "opt_ddb.h"
89#include "opt_compat_netbsd.h" 89#include "opt_compat_netbsd.h"
90#include "opt_compat_ultrix.h" 90#include "opt_compat_ultrix.h"
91#include "opt_modular.h" 91#include "opt_modular.h"
92#include "opt_multiprocessor.h" 92#include "opt_multiprocessor.h"
93#include "opt_lockdebug.h" 93#include "opt_lockdebug.h"
94 94
95#include <sys/param.h> 95#include <sys/param.h>
96#include <sys/systm.h> 96#include <sys/systm.h>
97#include <sys/buf.h> 97#include <sys/buf.h>
98#include <sys/conf.h> 98#include <sys/conf.h>
99#include <sys/cpu.h> 99#include <sys/cpu.h>
@@ -762,16 +762,16 @@ mm_md_readwrite(dev_t dev, struct uio *u @@ -762,16 +762,16 @@ mm_md_readwrite(dev_t dev, struct uio *u
762#endif 762#endif
763 default: 763 default:
764 return ENXIO; 764 return ENXIO;
765 } 765 }
766} 766}
767 767
768/* 768/*
769 * Set max virtual size a process may allocate. 769 * Set max virtual size a process may allocate.
770 * This could be tuned based on amount of physical memory. 770 * This could be tuned based on amount of physical memory.
771 */ 771 */
772void 772void
773machdep_init(void) 773machdep_init(void)
774{ 774{
775 proc0.p_rlimit[RLIMIT_AS].rlim_cur = DFLDSIZ; 775 proc0.p_rlimit[RLIMIT_AS].rlim_cur = MAXDSIZ;
776 proc0.p_rlimit[RLIMIT_AS].rlim_max = MAXDSIZ; 776 proc0.p_rlimit[RLIMIT_AS].rlim_max = MAXDSIZ;
777} 777}