From nobody Sat Oct 17 19:56:02 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4j6XcM13hpz6whds for ; Sat, 17 Oct 2026 19:56:03 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 4j6XcL6xzXz4vtV for ; Sat, 17 Oct 2026 19:56:02 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1792266963; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=E9ESG9C6Zux37IVUx4O+UorABCIAXGERdrPvsiEMJkU=; b=QSR6Zq3O8Bn9Dsn3Nqi5T/LTQoJ8FRU392e09xqj7soyNioG2sL8GChmjEP1fXXc+SfLiS ce1HD+5gO+rvP2WgXtVX4O3jzO+jjce2RzvSZyNh1nDk/ojCSXAFRSfiGgQfxHKmj19Kpy uAtGSQJnrTOsRIiR5DM+z5v9y8y3Np+sBEF94Ehan7a7a5X2Pft3iJ1tS2EZUYsLbO1Vin QNHgq1qthMlPNZIiVMEvsbTfl54CD7HV6YcVgWtTQsOVkugCu5ZBqv2CxylUnfzVZ5st15 5rRtLQ46GM7ru8KLLkF3DRW73FPvbnyZdZjkEdgHaoHAQorzdy2j8t8deY4c+A== ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1792266963; b=QuC6x1n9tnTqAxP3BspVk5+GqU59ligpVEhVSpYV4XdqD0RCT4jtX/ZbKtMOebT0c9dW5H fD4JtkCN/Nj5U0wUJNibjjb4+x/MsImKVSVI8FV0/G+HrHwxyLpcH6/Hp8gapD2ESZKARW Ui/RkLsPKsnPHGe2chEh8DHcqjN9EQbOblsayiF0ryLrBzas1dVAzHRS97DffgbtyXSW3X WLKQOeVExf0buAvrX+Iqqq2vniTwk2ewi5sxDHL3PSRnWDsJTiH3sy0eDe4TIptYL5wTwO 1VZFdkTkDaW6R1QAFJuWIsBw2LS9enWFWxqzF4nvWVwWsTr6TAJK64IAiAcsZQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1792266963; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=E9ESG9C6Zux37IVUx4O+UorABCIAXGERdrPvsiEMJkU=; b=NZOBxEilecxt6fhXc93L2n7e8XbodTicapIci8WCnPBx2EVtQ6aCucfbE1ofz0SaLJ5oVz 59Yc0qqIFKwgZMX8iNpNv4IhjUvbemwS6q89qBeLD0hDZqzZC7pmiVkAFKxG0GjCHItmdI WQ4Q3FjlsK3Q7ZAMA7q5beuxLvlrGXgglAKBTqoIjy60roy7p3QYE6Prj/SKlSdEITzxnK mjF2CdVND1WrM1P1f+MzlfL0bygr0HEr1PDBvSYg5reqZI5lWgL9o+6mWj2PNWwyExhdvS oVlJM2/idPnw5EouCOEpmOYq9dd22KlryB1l0oeEt6lCnu+w9YT9lvULZ2bByA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4j6XcL67cmzH0w for ; Sat, 17 Oct 2026 19:56:02 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 34326 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Sat, 17 Oct 2026 19:56:02 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Cc: Denis Borovikov From: Vladimir Kondratyev Subject: git: fce354b0e9eb - main - linuxkpi: add uuid_t and helpers List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: Commit messages for all branches of the src repository List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: wulf X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: fce354b0e9ebd682b251de17bc743d8d855e0cdd Auto-Submitted: auto-generated Date: Sat, 17 Oct 2026 19:56:02 +0000 Message-Id: <6ad3d2d2.34326.2602f5fa@gitrepo.freebsd.org> The branch main has been updated by wulf: URL: https://cgit.FreeBSD.org/src/commit/?id=fce354b0e9ebd682b251de17bc743d8d855e0cdd commit fce354b0e9ebd682b251de17bc743d8d855e0cdd Author: Denis Borovikov AuthorDate: 2026-10-17 19:55:17 +0000 Commit: Vladimir Kondratyev CommitDate: 2026-10-17 19:55:17 +0000 linuxkpi: add uuid_t and helpers linux/uuid.h has only the guid_t family. Add uuid_t, next to guid_t, with uuid_equal(), uuid_copy(), import_uuid() and export_uuid(), mirroring the guid_ versions. Used by drm/virtio for dma-buf UUID export. Signed-off-by: Denis Borovikov Reviewed by: wulf Differential Revision: https://reviews.freebsd.org/D60199 --- sys/compat/linuxkpi/common/include/linux/uuid.h | 30 +++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/sys/compat/linuxkpi/common/include/linux/uuid.h b/sys/compat/linuxkpi/common/include/linux/uuid.h index 0765ef4dcc1e..2296cc9b881f 100644 --- a/sys/compat/linuxkpi/common/include/linux/uuid.h +++ b/sys/compat/linuxkpi/common/include/linux/uuid.h @@ -60,6 +60,12 @@ typedef struct { char x[16]; } guid_t; +/* Renamed to stay clear of the other uuid_t types in the tree. */ +typedef struct { + uint8_t b[UUID_SIZE]; +} linux_uuid_t; +#define uuid_t linux_uuid_t + extern const guid_t guid_null; static inline void @@ -101,4 +107,28 @@ guid_is_null(const guid_t *guid) return (guid_equal(guid, &guid_null)); } +static inline bool +uuid_equal(const linux_uuid_t *u1, const linux_uuid_t *u2) +{ + return (memcmp(u1, u2, sizeof(linux_uuid_t)) == 0); +} + +static inline void +uuid_copy(linux_uuid_t *dst, const linux_uuid_t *src) +{ + memcpy(dst, src, sizeof(linux_uuid_t)); +} + +static inline void +import_uuid(linux_uuid_t *dst, const uint8_t *src) +{ + memcpy(dst, src, sizeof(linux_uuid_t)); +} + +static inline void +export_uuid(uint8_t *dst, const linux_uuid_t *src) +{ + memcpy(dst, src, sizeof(linux_uuid_t)); +} + #endif /* _LINUXKPI_LINUX_UUID_H */