Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 81e3e044 authored by Linus Torvalds's avatar Linus Torvalds
Browse files

Merge tag 'uuid-for-4.13' of git://git.infradead.org/users/hch/uuid

Pull uuid subsystem from Christoph Hellwig:
 "This is the new uuid subsystem, in which Amir, Andy and I have started
  consolidating our uuid/guid helpers and improving the types used for
  them. Note that various other subsystems have pulled in this tree, so
  I'd like it to go in early.

  UUID/GUID summary:

   - introduce the new uuid_t/guid_t types that are going to replace the
     somewhat confusing uuid_be/uuid_le types and make the terminology
     fit the various specs, as well as the userspace libuuid library.
     (me, based on a previous version from Amir)

   - consolidated generic uuid/guid helper functions lifted from XFS and
     libnvdimm (Amir and me)

   - conversions to the new types and helpers (Amir, Andy and me)"

* tag 'uuid-for-4.13' of git://git.infradead.org/users/hch/uuid: (34 commits)
  ACPI: hns_dsaf_acpi_dsm_guid can be static
  mmc: sdhci-pci: make guid intel_dsm_guid static
  uuid: Take const on input of uuid_is_null() and guid_is_null()
  thermal: int340x_thermal: fix compile after the UUID API switch
  thermal: int340x_thermal: Switch to use new generic UUID API
  acpi: always include uuid.h
  ACPI: Switch to use generic guid_t in acpi_evaluate_dsm()
  ACPI / extlog: Switch to use new generic UUID API
  ACPI / bus: Switch to use new generic UUID API
  ACPI / APEI: Switch to use new generic UUID API
  acpi, nfit: Switch to use new generic UUID API
  MAINTAINERS: add uuid entry
  tmpfs: generate random sb->s_uuid
  scsi_debug: switch to uuid_t
  nvme: switch to uuid_t
  sysctl: switch to use uuid_t
  partitions/ldm: switch to use uuid_t
  overlayfs: use uuid_t instead of uuid_be
  fs: switch ->s_uuid to uuid_t
  ima/policy: switch to use uuid_t
  ...
parents 6f7da290 b86a496a
Loading
Loading
Loading
Loading
+11 −0
Original line number Diff line number Diff line
@@ -13462,6 +13462,17 @@ W: http://en.wikipedia.org/wiki/Util-linux
T:	git git://git.kernel.org/pub/scm/utils/util-linux/util-linux.git
S:	Maintained

UUID HELPERS
M:	Christoph Hellwig <hch@lst.de>
R:	Andy Shevchenko <andriy.shevchenko@linux.intel.com>
L:	linux-kernel@vger.kernel.org
T:	git git://git.infradead.org/users/hch/uuid.git
F:	lib/uuid.c
F:	lib/test_uuid.c
F:	include/linux/uuid.h
F:	include/uapi/linux/uuid.h
S:	Maintained

UVESAFB DRIVER
M:	Michal Januszewski <spock@gentoo.org>
L:	linux-fbdev@vger.kernel.org
+2 −2
Original line number Diff line number Diff line
@@ -109,7 +109,7 @@ struct sysinfo_2_2_2 {
	unsigned short cpus_shared;
	char reserved_4[3];
	unsigned char vsne;
	uuid_be uuid;
	uuid_t uuid;
	char reserved_5[160];
	char ext_name[256];
};
@@ -134,7 +134,7 @@ struct sysinfo_3_2_2 {
		char reserved_1[3];
		unsigned char evmne;
		unsigned int reserved_2;
		uuid_be uuid;
		uuid_t uuid;
	} vm[8];
	char reserved_3[1504];
	char ext_names[8][256];
+1 −1
Original line number Diff line number Diff line
@@ -242,7 +242,7 @@ static void print_ext_name(struct seq_file *m, int lvl,

static void print_uuid(struct seq_file *m, int i, struct sysinfo_3_2_2 *info)
{
	if (!memcmp(&info->vm[i].uuid, &NULL_UUID_BE, sizeof(uuid_be)))
	if (uuid_is_null(&info->vm[i].uuid))
		return;
	seq_printf(m, "VM%02d UUID:            %pUb\n", i, &info->vm[i].uuid);
}
+5 −5
Original line number Diff line number Diff line
@@ -115,7 +115,7 @@ static bool ldm_parse_privhead(const u8 *data, struct privhead *ph)
		ldm_error("PRIVHEAD disk size doesn't match real disk size");
		return false;
	}
	if (uuid_be_to_bin(data + 0x0030, (uuid_be *)ph->disk_id)) {
	if (uuid_parse(data + 0x0030, &ph->disk_id)) {
		ldm_error("PRIVHEAD contains an invalid GUID.");
		return false;
	}
@@ -234,7 +234,7 @@ static bool ldm_compare_privheads (const struct privhead *ph1,
		(ph1->logical_disk_size  == ph2->logical_disk_size)	&&
		(ph1->config_start       == ph2->config_start)		&&
		(ph1->config_size        == ph2->config_size)		&&
		!memcmp (ph1->disk_id, ph2->disk_id, GUID_SIZE));
		uuid_equal(&ph1->disk_id, &ph2->disk_id));
}

/**
@@ -557,7 +557,7 @@ static struct vblk * ldm_get_disk_objid (const struct ldmdb *ldb)

	list_for_each (item, &ldb->v_disk) {
		struct vblk *v = list_entry (item, struct vblk, list);
		if (!memcmp (v->vblk.disk.disk_id, ldb->ph.disk_id, GUID_SIZE))
		if (uuid_equal(&v->vblk.disk.disk_id, &ldb->ph.disk_id))
			return v;
	}

@@ -892,7 +892,7 @@ static bool ldm_parse_dsk3 (const u8 *buffer, int buflen, struct vblk *vb)
	disk = &vb->vblk.disk;
	ldm_get_vstr (buffer + 0x18 + r_diskid, disk->alt_name,
		sizeof (disk->alt_name));
	if (uuid_be_to_bin(buffer + 0x19 + r_name, (uuid_be *)disk->disk_id))
	if (uuid_parse(buffer + 0x19 + r_name, &disk->disk_id))
		return false;

	return true;
@@ -927,7 +927,7 @@ static bool ldm_parse_dsk4 (const u8 *buffer, int buflen, struct vblk *vb)
		return false;

	disk = &vb->vblk.disk;
	memcpy (disk->disk_id, buffer + 0x18 + r_name, GUID_SIZE);
	uuid_copy(&disk->disk_id, (uuid_t *)(buffer + 0x18 + r_name));
	return true;
}

+2 −4
Original line number Diff line number Diff line
@@ -112,8 +112,6 @@ struct frag { /* VBLK Fragment handling */

/* In memory LDM database structures. */

#define GUID_SIZE		16

struct privhead {			/* Offsets and sizes are in sectors. */
	u16	ver_major;
	u16	ver_minor;
@@ -121,7 +119,7 @@ struct privhead { /* Offsets and sizes are in sectors. */
	u64	logical_disk_size;
	u64	config_start;
	u64	config_size;
	u8	disk_id[GUID_SIZE];
	uuid_t	disk_id;
};

struct tocblock {			/* We have exactly two bitmaps. */
@@ -154,7 +152,7 @@ struct vblk_dgrp { /* VBLK Disk Group */
};

struct vblk_disk {			/* VBLK Disk */
	u8	disk_id[GUID_SIZE];
	uuid_t	disk_id;
	u8	alt_name[128];
};

Loading