diff options
author | allanjude <allanjude@FreeBSD.org> | 2016-03-16 23:12:19 +0000 |
---|---|---|
committer | allanjude <allanjude@FreeBSD.org> | 2016-03-16 23:12:19 +0000 |
commit | 736b39250974facd8d5f4ab24f56636212c50a33 (patch) | |
tree | e3e47b4adfddec374c56af417380ab82142fa71a /sys/boot/common | |
parent | ecffce941a074abbd944385dc1cc659f4df1b04d (diff) | |
download | FreeBSD-src-736b39250974facd8d5f4ab24f56636212c50a33.zip FreeBSD-src-736b39250974facd8d5f4ab24f56636212c50a33.tar.gz |
Implement GELI (AES-XTS and AES-CBC only) in gptboot and gptzfsboot
Allows booting from a GELI encrypted root file system, via UFS or ZFS
Reviewed by: gnn, smh (previous version), delphij (previous version)
Relnotes: yes
Sponsored by: ScaleEngine Inc.
Differential Revision: https://reviews.freebsd.org/D4593
Diffstat (limited to 'sys/boot/common')
-rw-r--r-- | sys/boot/common/disk.c | 2 | ||||
-rw-r--r-- | sys/boot/common/disk.h | 1 | ||||
-rw-r--r-- | sys/boot/common/gpt.c | 2 | ||||
-rw-r--r-- | sys/boot/common/gpt.h | 2 |
4 files changed, 4 insertions, 3 deletions
diff --git a/sys/boot/common/disk.c b/sys/boot/common/disk.c index a8801e1..c862d30 100644 --- a/sys/boot/common/disk.c +++ b/sys/boot/common/disk.c @@ -170,7 +170,7 @@ display_size(uint64_t size, u_int sectorsize) return (buf); } -static int +int ptblread(void *d, void *buf, size_t blocks, off_t offset) { struct disk_devdesc *dev; diff --git a/sys/boot/common/disk.h b/sys/boot/common/disk.h index e95256d..d24fb1a 100644 --- a/sys/boot/common/disk.h +++ b/sys/boot/common/disk.h @@ -107,6 +107,7 @@ extern int disk_read(struct disk_devdesc *dev, void *buf, off_t offset, u_int blocks); extern int disk_write(struct disk_devdesc *dev, void *buf, off_t offset, u_int blocks); +extern int ptblread(void *d, void *buf, size_t blocks, off_t offset); /* * Print information about slices on a disk. diff --git a/sys/boot/common/gpt.c b/sys/boot/common/gpt.c index 8baa64c..7ab3fc6 100644 --- a/sys/boot/common/gpt.c +++ b/sys/boot/common/gpt.c @@ -39,8 +39,6 @@ __FBSDID("$FreeBSD$"); #include "util.h" #include "gpt.h" -#define MAXTBLENTS 128 - static struct gpt_hdr hdr_primary, hdr_backup, *gpthdr; static uint64_t hdr_primary_lba, hdr_backup_lba; static struct gpt_ent table_primary[MAXTBLENTS], table_backup[MAXTBLENTS]; diff --git a/sys/boot/common/gpt.h b/sys/boot/common/gpt.h index c42b40d..9d48564 100644 --- a/sys/boot/common/gpt.h +++ b/sys/boot/common/gpt.h @@ -32,6 +32,8 @@ #include <uuid.h> #include <drv.h> +#define MAXTBLENTS 128 + int gptread(const uuid_t *uuid, struct dsk *dskp, char *buf); int gptfind(const uuid_t *uuid, struct dsk *dskp, int part); void gptbootfailed(struct dsk *dskp); |