summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2019-04-10 04:17:38 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2019-04-10 04:17:38 +0000
commit8f0c1aa9fd0ce5d319af8590f3da4e11d36119ac (patch)
tree623711690bbd522dd6a546a3a7a25db4ca835639
parent11a564e909360219908f5872d7b84a175d37875e (diff)
change marks[] array to uint64_t, so the code can track full 64-bit
details from the ELF header instead of faking it. Proposal from mlarkin, tested on most architectures already
-rw-r--r--sys/arch/alpha/stand/boot/boot.c4
-rw-r--r--sys/arch/alpha/stand/netboot/netboot.c4
-rw-r--r--sys/arch/amd64/include/loadfile_machdep.h4
-rw-r--r--sys/arch/amd64/stand/libsa/exec_i386.c4
-rw-r--r--sys/arch/arm64/include/loadfile_machdep.h4
-rw-r--r--sys/arch/arm64/stand/efiboot/exec.c4
-rw-r--r--sys/arch/armv7/include/loadfile_machdep.h4
-rw-r--r--sys/arch/armv7/stand/efiboot/exec.c4
-rw-r--r--sys/arch/hppa/stand/boot/exec.c8
-rw-r--r--sys/arch/hppa/stand/cdboot/cdboot.c8
-rw-r--r--sys/arch/hppa/stand/cdboot/elf64.c4
-rw-r--r--sys/arch/hppa/stand/libsa/libsa.h4
-rw-r--r--sys/arch/i386/include/loadfile_machdep.h4
-rw-r--r--sys/arch/i386/stand/libsa/exec_i386.c4
-rw-r--r--sys/arch/landisk/stand/boot/devs.c4
-rw-r--r--sys/arch/loongson/stand/boot/exec.c4
-rw-r--r--sys/arch/loongson/stand/boot/libsa.h4
-rw-r--r--sys/arch/luna88k/stand/boot/boot.c4
-rw-r--r--sys/arch/macppc/stand/main.c4
-rw-r--r--sys/arch/octeon/stand/boot/exec.c7
-rw-r--r--sys/arch/octeon/stand/boot/libsa.h4
-rw-r--r--sys/arch/sgi/stand/boot/boot.c4
-rw-r--r--sys/arch/socppc/stand/boot/exec.c4
-rw-r--r--sys/lib/libsa/loadfile.c8
-rw-r--r--sys/lib/libsa/loadfile.h4
-rw-r--r--sys/lib/libsa/loadfile_elf.c6
-rw-r--r--sys/stand/boot/boot.c4
27 files changed, 63 insertions, 62 deletions
diff --git a/sys/arch/alpha/stand/boot/boot.c b/sys/arch/alpha/stand/boot/boot.c
index 132d8e2d13e..b379f765102 100644
--- a/sys/arch/alpha/stand/boot/boot.c
+++ b/sys/arch/alpha/stand/boot/boot.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: boot.c,v 1.23 2014/02/19 22:02:14 miod Exp $ */
+/* $OpenBSD: boot.c,v 1.24 2019/04/10 04:17:31 deraadt Exp $ */
/* $NetBSD: boot.c,v 1.10 1997/01/18 01:58:33 cgd Exp $ */
/*
@@ -89,7 +89,7 @@ main()
char *name, **namep;
u_int64_t entry;
int rc;
- u_long marks[MARK_MAX];
+ uint64_t marks[MARK_MAX];
#ifdef DEBUG
struct rpb *r;
struct mddt *mddtp;
diff --git a/sys/arch/alpha/stand/netboot/netboot.c b/sys/arch/alpha/stand/netboot/netboot.c
index c39fc3b5b7d..7d99cc2f2da 100644
--- a/sys/arch/alpha/stand/netboot/netboot.c
+++ b/sys/arch/alpha/stand/netboot/netboot.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: netboot.c,v 1.8 2011/06/05 21:49:36 miod Exp $ */
+/* $OpenBSD: netboot.c,v 1.9 2019/04/10 04:17:33 deraadt Exp $ */
/* $NetBSD: netboot.c,v 1.1 1996/09/18 20:03:12 cgd Exp $ */
/*
@@ -57,7 +57,7 @@ void
main()
{
u_int64_t entry;
- u_long marks[MARK_MAX];
+ uint64_t marks[MARK_MAX];
int rc;
/* Init prom callback vector. */
diff --git a/sys/arch/amd64/include/loadfile_machdep.h b/sys/arch/amd64/include/loadfile_machdep.h
index 1b51946b62a..5ee23dc8661 100644
--- a/sys/arch/amd64/include/loadfile_machdep.h
+++ b/sys/arch/amd64/include/loadfile_machdep.h
@@ -1,5 +1,5 @@
/* XXX - DSR */
-/* $OpenBSD: loadfile_machdep.h,v 1.6 2015/10/05 22:59:39 yasuoka Exp $ */
+/* $OpenBSD: loadfile_machdep.h,v 1.7 2019/04/10 04:17:33 deraadt Exp $ */
/* $NetBSD: loadfile_machdep.h,v 1.1 1999/04/29 03:17:12 tsubai Exp $ */
/*-
@@ -59,4 +59,4 @@ extern u_long efi_loadaddr;
#define ALLOC(a) alloc(a)
#define FREE(a, b) free(a, b)
-void run_loadfile(u_long *, int);
+void run_loadfile(uint64_t *, int);
diff --git a/sys/arch/amd64/stand/libsa/exec_i386.c b/sys/arch/amd64/stand/libsa/exec_i386.c
index 89c3cf56caf..df98dd7c052 100644
--- a/sys/arch/amd64/stand/libsa/exec_i386.c
+++ b/sys/arch/amd64/stand/libsa/exec_i386.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: exec_i386.c,v 1.26 2018/12/10 16:52:02 jsing Exp $ */
+/* $OpenBSD: exec_i386.c,v 1.27 2019/04/10 04:17:33 deraadt Exp $ */
/*
* Copyright (c) 1997-1998 Michael Shalayeff
@@ -59,7 +59,7 @@ extern struct cmd_state cmd;
char *bootmac = NULL;
void
-run_loadfile(u_long *marks, int howto)
+run_loadfile(uint64_t *marks, int howto)
{
u_long entry;
#ifdef EXEC_DEBUG
diff --git a/sys/arch/arm64/include/loadfile_machdep.h b/sys/arch/arm64/include/loadfile_machdep.h
index 0226bce5b84..10d052dc8b7 100644
--- a/sys/arch/arm64/include/loadfile_machdep.h
+++ b/sys/arch/arm64/include/loadfile_machdep.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: loadfile_machdep.h,v 1.1 2016/12/17 23:38:33 patrick Exp $ */
+/* $OpenBSD: loadfile_machdep.h,v 1.2 2019/04/10 04:17:34 deraadt Exp $ */
/* $NetBSD: loadfile_machdep.h,v 1.1 1999/04/29 03:17:12 tsubai Exp $ */
/*-
@@ -50,4 +50,4 @@ extern u_long efi_loadaddr;
#define ALLOC(a) alloc(a)
#define FREE(a, b) free(a, b)
-void run_loadfile(u_long *, int);
+void run_loadfile(uint64_t *, int);
diff --git a/sys/arch/arm64/stand/efiboot/exec.c b/sys/arch/arm64/stand/efiboot/exec.c
index 9ddb31806fc..07886ad2dce 100644
--- a/sys/arch/arm64/stand/efiboot/exec.c
+++ b/sys/arch/arm64/stand/efiboot/exec.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: exec.c,v 1.6 2019/01/09 13:18:50 yasuoka Exp $ */
+/* $OpenBSD: exec.c,v 1.7 2019/04/10 04:17:34 deraadt Exp $ */
/*
* Copyright (c) 2006, 2016 Mark Kettenis
@@ -88,7 +88,7 @@ cpu_inval_icache(void)
}
void
-run_loadfile(u_long *marks, int howto)
+run_loadfile(uint64_t *marks, int howto)
{
char args[256];
char *cp;
diff --git a/sys/arch/armv7/include/loadfile_machdep.h b/sys/arch/armv7/include/loadfile_machdep.h
index ec044802bba..17265814203 100644
--- a/sys/arch/armv7/include/loadfile_machdep.h
+++ b/sys/arch/armv7/include/loadfile_machdep.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: loadfile_machdep.h,v 1.4 2016/05/14 18:04:02 kettenis Exp $ */
+/* $OpenBSD: loadfile_machdep.h,v 1.5 2019/04/10 04:17:34 deraadt Exp $ */
/* $NetBSD: loadfile_machdep.h,v 1.1 1999/04/29 03:17:12 tsubai Exp $ */
/*-
@@ -50,4 +50,4 @@ extern u_long efi_loadaddr;
#define ALLOC(a) alloc(a)
#define FREE(a, b) free(a, b)
-void run_loadfile(u_long *, int);
+void run_loadfile(uint64_t *, int);
diff --git a/sys/arch/armv7/stand/efiboot/exec.c b/sys/arch/armv7/stand/efiboot/exec.c
index 6eb730b2bbb..2cf82dde6c1 100644
--- a/sys/arch/armv7/stand/efiboot/exec.c
+++ b/sys/arch/armv7/stand/efiboot/exec.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: exec.c,v 1.12 2017/06/12 18:26:33 mglocker Exp $ */
+/* $OpenBSD: exec.c,v 1.13 2019/04/10 04:17:34 deraadt Exp $ */
/*
* Copyright (c) 2006, 2016 Mark Kettenis
@@ -33,7 +33,7 @@
typedef void (*startfuncp)(void *, void *, void *) __attribute__ ((noreturn));
void
-run_loadfile(u_long *marks, int howto)
+run_loadfile(uint64_t *marks, int howto)
{
Elf_Ehdr *elf = (Elf_Ehdr *)marks[MARK_SYM];
Elf_Shdr *shp = (Elf_Shdr *)(marks[MARK_SYM] + elf->e_shoff);
diff --git a/sys/arch/hppa/stand/boot/exec.c b/sys/arch/hppa/stand/boot/exec.c
index a6e9896dde1..d8947d9be46 100644
--- a/sys/arch/hppa/stand/boot/exec.c
+++ b/sys/arch/hppa/stand/boot/exec.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: exec.c,v 1.5 2012/06/26 16:18:43 deraadt Exp $ */
+/* $OpenBSD: exec.c,v 1.6 2019/04/10 04:17:34 deraadt Exp $ */
/*
* Copyright (c) 2002-2004 Michael Shalayeff
@@ -38,15 +38,15 @@ typedef void (*startfuncp)(int, int, int, int, int, int, caddr_t)
__attribute__ ((noreturn));
void
-run_loadfile(u_long *marks, int howto)
+run_loadfile(uint64_t *marks, int howto)
{
fcacheall();
__asm("mtctl %r0, %cr17");
__asm("mtctl %r0, %cr17");
/* stack and the gung is ok at this point, so, no need for asm setup */
- (*(startfuncp)(marks[MARK_ENTRY]))((int)pdc, howto, bootdev,
- marks[MARK_END], BOOTARG_APIVER, BOOTARG_LEN, (caddr_t)BOOTARG_OFF);
+ (*(startfuncp)((u_long)marks[MARK_ENTRY]))((int)pdc, howto, bootdev,
+ (u_long)marks[MARK_END], BOOTARG_APIVER, BOOTARG_LEN, (caddr_t)BOOTARG_OFF);
/* not reached */
}
diff --git a/sys/arch/hppa/stand/cdboot/cdboot.c b/sys/arch/hppa/stand/cdboot/cdboot.c
index e19c54c93e8..dfba5a1cbe7 100644
--- a/sys/arch/hppa/stand/cdboot/cdboot.c
+++ b/sys/arch/hppa/stand/cdboot/cdboot.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: cdboot.c,v 1.13 2013/12/28 02:51:07 deraadt Exp $ */
+/* $OpenBSD: cdboot.c,v 1.14 2019/04/10 04:17:34 deraadt Exp $ */
/*
* Copyright (c) 2003 Michael Shalayeff
@@ -68,7 +68,7 @@ char rnddata[BOOTRANDOM_MAX]; /* XXX dummy */
void
boot(dev_t dev)
{
- u_long marks[MARK_MAX];
+ uint64_t marks[MARK_MAX];
char path[128];
pdc_init();
@@ -86,8 +86,8 @@ boot(dev_t dev)
__asm("mtctl %r0, %cr17");
__asm("mtctl %r0, %cr17");
- (*(startfuncp)(marks[MARK_ENTRY]))((int)pdc, 0, bootdev,
- marks[MARK_END], BOOTARG_APIVER, BOOTARG_LEN,
+ (*(startfuncp)((u_long)marks[MARK_ENTRY]))((int)pdc, 0, bootdev,
+ (u_long)marks[MARK_END], BOOTARG_APIVER, BOOTARG_LEN,
(caddr_t)BOOTARG_OFF);
/* not reached */
}
diff --git a/sys/arch/hppa/stand/cdboot/elf64.c b/sys/arch/hppa/stand/cdboot/elf64.c
index 006d7f03b9a..2f261d8b851 100644
--- a/sys/arch/hppa/stand/cdboot/elf64.c
+++ b/sys/arch/hppa/stand/cdboot/elf64.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: elf64.c,v 1.1 2010/08/16 13:04:52 kettenis Exp $ */
+/* $OpenBSD: elf64.c,v 1.2 2019/04/10 04:17:34 deraadt Exp $ */
/*
* Copyright (c) 2010 Mark Kettenis
@@ -30,7 +30,7 @@
#include <sys/exec_elf.h>
int
-ELFNAME(exec)(int fd, Elf_Ehdr *elf, u_long *marks, int flags)
+ELFNAME(exec)(int fd, Elf_Ehdr *elf, uint64_t *marks, int flags)
{
return 1;
}
diff --git a/sys/arch/hppa/stand/libsa/libsa.h b/sys/arch/hppa/stand/libsa/libsa.h
index 5428c30bb01..4cb466eff1f 100644
--- a/sys/arch/hppa/stand/libsa/libsa.h
+++ b/sys/arch/hppa/stand/libsa/libsa.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: libsa.h,v 1.14 2011/03/13 00:13:52 deraadt Exp $ */
+/* $OpenBSD: libsa.h,v 1.15 2019/04/10 04:17:35 deraadt Exp $ */
/*
* Copyright (c) 1998-2004 Michael Shalayeff
@@ -60,7 +60,7 @@ void ite_pollc(dev_t, int);
void machdep(void);
void devboot(dev_t, char *);
void fcacheall(void);
-void run_loadfile(u_long *marks, int howto);
+void run_loadfile(uint64_t *marks, int howto);
int lif_open(char *path, struct open_file *f);
int lif_close(struct open_file *f);
diff --git a/sys/arch/i386/include/loadfile_machdep.h b/sys/arch/i386/include/loadfile_machdep.h
index 55ddc9b4e00..a0507b00024 100644
--- a/sys/arch/i386/include/loadfile_machdep.h
+++ b/sys/arch/i386/include/loadfile_machdep.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: loadfile_machdep.h,v 1.7 2015/07/17 20:44:38 miod Exp $ */
+/* $OpenBSD: loadfile_machdep.h,v 1.8 2019/04/10 04:17:35 deraadt Exp $ */
/* $NetBSD: loadfile_machdep.h,v 1.1 1999/04/29 03:17:12 tsubai Exp $ */
/*-
@@ -52,4 +52,4 @@
#define ALLOC(a) alloc(a)
#define FREE(a, b) free(a, b)
-void run_loadfile(u_long *, int);
+void run_loadfile(uint64_t *, int);
diff --git a/sys/arch/i386/stand/libsa/exec_i386.c b/sys/arch/i386/stand/libsa/exec_i386.c
index 70d8ae9f9d4..d2e6152cf42 100644
--- a/sys/arch/i386/stand/libsa/exec_i386.c
+++ b/sys/arch/i386/stand/libsa/exec_i386.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: exec_i386.c,v 1.48 2019/03/07 10:46:37 jsg Exp $ */
+/* $OpenBSD: exec_i386.c,v 1.49 2019/04/10 04:17:35 deraadt Exp $ */
/*
* Copyright (c) 1997-1998 Michael Shalayeff
@@ -60,7 +60,7 @@ extern struct cmd_state cmd;
char *bootmac = NULL;
void
-run_loadfile(u_long *marks, int howto)
+run_loadfile(uint64_t *marks, int howto)
{
u_long entry;
#ifdef EXEC_DEBUG
diff --git a/sys/arch/landisk/stand/boot/devs.c b/sys/arch/landisk/stand/boot/devs.c
index 3762e1e830d..ec91d1731b5 100644
--- a/sys/arch/landisk/stand/boot/devs.c
+++ b/sys/arch/landisk/stand/boot/devs.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: devs.c,v 1.10 2014/07/17 13:14:06 miod Exp $ */
+/* $OpenBSD: devs.c,v 1.11 2019/04/10 04:17:35 deraadt Exp $ */
/*
* Copyright (c) 2006 Michael Shalayeff
@@ -71,7 +71,7 @@ cnspeed(dev_t dev, int sp)
}
void
-run_loadfile(u_long *marks, int howto)
+run_loadfile(uint64_t *marks, int howto)
{
u_long entry;
diff --git a/sys/arch/loongson/stand/boot/exec.c b/sys/arch/loongson/stand/boot/exec.c
index 610389f973e..c93a8e00153 100644
--- a/sys/arch/loongson/stand/boot/exec.c
+++ b/sys/arch/loongson/stand/boot/exec.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: exec.c,v 1.3 2014/11/18 20:51:01 krw Exp $ */
+/* $OpenBSD: exec.c,v 1.4 2019/04/10 04:17:35 deraadt Exp $ */
/*
* Copyright (c) 2010 Miodrag Vallat.
@@ -28,7 +28,7 @@ typedef void (*program)(int32_t, int32_t, int32_t *, int32_t, uint64_t *);
#define PTR_TO_CKSEG1(ptr) (int32_t)(CKSEG1_BASE | (uint64_t)(ptr))
void
-run_loadfile(u_long *marks, int howto)
+run_loadfile(uint64_t *marks, int howto)
{
int32_t newargc;
int32_t *newargv;
diff --git a/sys/arch/loongson/stand/boot/libsa.h b/sys/arch/loongson/stand/boot/libsa.h
index 7a3bc9eaccf..2dea425026d 100644
--- a/sys/arch/loongson/stand/boot/libsa.h
+++ b/sys/arch/loongson/stand/boot/libsa.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: libsa.h,v 1.5 2011/03/13 00:13:53 deraadt Exp $ */
+/* $OpenBSD: libsa.h,v 1.6 2019/04/10 04:17:35 deraadt Exp $ */
/*
* Copyright (c) 2010 Miodrag Vallat.
@@ -28,7 +28,7 @@
*/
void devboot(dev_t, char *);
void machdep(void);
-void run_loadfile(u_long *, int);
+void run_loadfile(uint64_t *, int);
/*
* PMON console
diff --git a/sys/arch/luna88k/stand/boot/boot.c b/sys/arch/luna88k/stand/boot/boot.c
index 14425846e76..6ecfdf3e166 100644
--- a/sys/arch/luna88k/stand/boot/boot.c
+++ b/sys/arch/luna88k/stand/boot/boot.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: boot.c,v 1.5 2017/03/16 18:08:58 miod Exp $ */
+/* $OpenBSD: boot.c,v 1.6 2019/04/10 04:17:36 deraadt Exp $ */
/* $NetBSD: boot.c,v 1.3 2013/03/05 15:34:53 tsutsui Exp $ */
/*
@@ -164,7 +164,7 @@ bootunix(char *line)
#if 0
int dev, unit, part;
#endif
- u_long marks[MARK_MAX];
+ uint64_t marks[MARK_MAX];
char *lparen, *rparen;
char rndpath[MAXPATHLEN];
static int rnd_loaded = 0;
diff --git a/sys/arch/macppc/stand/main.c b/sys/arch/macppc/stand/main.c
index 2378bfaf3d9..aa047eca6fd 100644
--- a/sys/arch/macppc/stand/main.c
+++ b/sys/arch/macppc/stand/main.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: main.c,v 1.8 2013/03/21 21:51:00 deraadt Exp $ */
+/* $OpenBSD: main.c,v 1.9 2019/04/10 04:17:36 deraadt Exp $ */
/* $NetBSD: boot.c,v 1.1 1997/04/16 20:29:17 thorpej Exp $ */
/*
@@ -177,7 +177,7 @@ devboot(dev_t dev, char *p)
}
int
-run_loadfile(u_long *marks, int howto)
+run_loadfile(uint64_t *marks, int howto)
{
char bootline[512]; /* Should check size? */
u_int32_t entry;
diff --git a/sys/arch/octeon/stand/boot/exec.c b/sys/arch/octeon/stand/boot/exec.c
index 592de9c6d57..1a20a45b5f2 100644
--- a/sys/arch/octeon/stand/boot/exec.c
+++ b/sys/arch/octeon/stand/boot/exec.c
@@ -1,8 +1,9 @@
-/* $OpenBSD: exec.c,v 1.2 2015/01/20 04:41:01 krw Exp $ */
+/* $OpenBSD: exec.c,v 1.3 2019/04/10 04:17:36 deraadt Exp $ */
#include <sys/param.h>
#include "libsa.h"
#include <lib/libsa/loadfile.h>
void
-run_loadfile(u_long *marks, int howto)
-{}
+run_loadfile(uint64_t *marks, int howto)
+{
+}
diff --git a/sys/arch/octeon/stand/boot/libsa.h b/sys/arch/octeon/stand/boot/libsa.h
index 2f6ce1027d4..9afddcf500b 100644
--- a/sys/arch/octeon/stand/boot/libsa.h
+++ b/sys/arch/octeon/stand/boot/libsa.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: libsa.h,v 1.4 2014/07/14 10:23:58 jasper Exp $ */
+/* $OpenBSD: libsa.h,v 1.5 2019/04/10 04:17:36 deraadt Exp $ */
/*
* Copyright (c) 2013 Jasper Lievisse Adriaanse <jasper@openbsd.org>
@@ -27,7 +27,7 @@ extern char *kernelfile;
*/
void devboot(dev_t, char *);
void machdep(void);
-void run_loadfile(u_long *, int);
+void run_loadfile(uint64_t *, int);
/*
* CN30XX UART
diff --git a/sys/arch/sgi/stand/boot/boot.c b/sys/arch/sgi/stand/boot/boot.c
index bccf7ad953d..1a5ec3be92a 100644
--- a/sys/arch/sgi/stand/boot/boot.c
+++ b/sys/arch/sgi/stand/boot/boot.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: boot.c,v 1.24 2014/02/22 20:27:21 miod Exp $ */
+/* $OpenBSD: boot.c,v 1.25 2019/04/10 04:17:36 deraadt Exp $ */
/*
* Copyright (c) 2004 Opsycon AB, www.opsycon.se.
@@ -68,7 +68,7 @@ char rnddata[BOOTRANDOM_MAX];
void
boot_main(int argc, char *argv[])
{
- u_long marks[MARK_MAX];
+ uint64_t marks[MARK_MAX];
u_int64_t *esym;
char line[1024];
u_long entry;
diff --git a/sys/arch/socppc/stand/boot/exec.c b/sys/arch/socppc/stand/boot/exec.c
index ec941ba5cdb..5f41774587a 100644
--- a/sys/arch/socppc/stand/boot/exec.c
+++ b/sys/arch/socppc/stand/boot/exec.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: exec.c,v 1.3 2009/09/07 21:16:57 dms Exp $ */
+/* $OpenBSD: exec.c,v 1.4 2019/04/10 04:17:37 deraadt Exp $ */
/*
* Copyright (c) 2006 Mark Kettenis
@@ -27,7 +27,7 @@
typedef void (*startfuncp)(int, int, u_int32_t, char *, int) __dead;
void
-run_loadfile(u_long *marks, int howto)
+run_loadfile(uint64_t *marks, int howto)
{
char args[512]; /* Should check size? */
u_int32_t entry;
diff --git a/sys/lib/libsa/loadfile.c b/sys/lib/libsa/loadfile.c
index bf2a2b23e91..5d7d37c984f 100644
--- a/sys/lib/libsa/loadfile.c
+++ b/sys/lib/libsa/loadfile.c
@@ -1,5 +1,5 @@
/* $NetBSD: loadfile.c,v 1.10 2000/12/03 02:53:04 tsutsui Exp $ */
-/* $OpenBSD: loadfile.c,v 1.19 2013/10/17 08:45:02 deraadt Exp $ */
+/* $OpenBSD: loadfile.c,v 1.20 2019/04/10 04:17:37 deraadt Exp $ */
/*-
* Copyright (c) 1997 The NetBSD Foundation, Inc.
@@ -90,8 +90,8 @@
* Both defined, so elf32_exec() and elf64_exec() need to be separately
* created (can't do it by including loadfile_elf.c here).
*/
-int elf32_exec(int, Elf32_Ehdr *, u_long *, int);
-int elf64_exec(int, Elf64_Ehdr *, u_long *, int);
+int elf32_exec(int, Elf32_Ehdr *, uint64_t *, int);
+int elf64_exec(int, Elf64_Ehdr *, uint64_t *, int);
#else
#include "loadfile_elf.c"
#endif
@@ -103,7 +103,7 @@ int elf64_exec(int, Elf64_Ehdr *, u_long *, int);
* Also fills in marks.
*/
int
-loadfile(const char *fname, u_long *marks, int flags)
+loadfile(const char *fname, uint64_t *marks, int flags)
{
union {
#if defined(BOOT_ELF32) || (defined(BOOT_ELF) && ELFSIZE == 32)
diff --git a/sys/lib/libsa/loadfile.h b/sys/lib/libsa/loadfile.h
index 48771b763bf..be0f7469d24 100644
--- a/sys/lib/libsa/loadfile.h
+++ b/sys/lib/libsa/loadfile.h
@@ -1,5 +1,5 @@
/* $NetBSD: loadfile.h,v 1.1 1999/04/28 09:08:50 christos Exp $ */
-/* $OpenBSD: loadfile.h,v 1.5 2015/07/17 20:44:39 miod Exp $ */
+/* $OpenBSD: loadfile.h,v 1.6 2019/04/10 04:17:37 deraadt Exp $ */
/*-
* Copyright (c) 1998 The NetBSD Foundation, Inc.
@@ -61,6 +61,6 @@
#define COUNT_RANDOM 0x4000
#define COUNT_ALL 0x7d00
-int loadfile(const char *, u_long *, int);
+int loadfile(const char *, uint64_t *, int);
#include <machine/loadfile_machdep.h>
diff --git a/sys/lib/libsa/loadfile_elf.c b/sys/lib/libsa/loadfile_elf.c
index a3fa472b293..07b16c37a3e 100644
--- a/sys/lib/libsa/loadfile_elf.c
+++ b/sys/lib/libsa/loadfile_elf.c
@@ -1,5 +1,5 @@
/* $NetBSD: loadfile.c,v 1.10 2000/12/03 02:53:04 tsutsui Exp $ */
-/* $OpenBSD: loadfile_elf.c,v 1.13 2016/09/17 17:39:34 jasper Exp $ */
+/* $OpenBSD: loadfile_elf.c,v 1.14 2019/04/10 04:17:37 deraadt Exp $ */
/*-
* Copyright (c) 1997 The NetBSD Foundation, Inc.
@@ -65,10 +65,10 @@
* @(#)boot.c 8.1 (Berkeley) 6/10/93
*/
-int ELFNAME(exec)(int, Elf_Ehdr *, u_long *, int);
+int ELFNAME(exec)(int, Elf_Ehdr *, uint64_t *, int);
int
-ELFNAME(exec)(int fd, Elf_Ehdr *elf, u_long *marks, int flags)
+ELFNAME(exec)(int fd, Elf_Ehdr *elf, uint64_t *marks, int flags)
{
Elf_Shdr *shp;
Elf_Phdr *phdr;
diff --git a/sys/stand/boot/boot.c b/sys/stand/boot/boot.c
index 16fe1d84a71..ea452c54ece 100644
--- a/sys/stand/boot/boot.c
+++ b/sys/stand/boot/boot.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: boot.c,v 1.46 2019/04/08 13:55:46 florian Exp $ */
+/* $OpenBSD: boot.c,v 1.47 2019/04/10 04:17:37 deraadt Exp $ */
/*
* Copyright (c) 2003 Dale Rahn
@@ -61,7 +61,7 @@ boot(dev_t bootdev)
{
int fd;
int try = 0, st;
- u_long marks[MARK_MAX];
+ uint64_t marks[MARK_MAX];
machdep();