From nobody Sat Oct 17 19:56:02 2026 X-Original-To: dev-commits-src-main@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 4j6XcM14Dbz6whft 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 4j6XcL6QgKz4wLr 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=1792266962; 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=IBYmMT3Dp74p+lHAeRlXE6T9mRwn7Apq5dlRDvaLt3lJpa/Ce6M9JXzH81MAjPAYO31cVD dNXM3dCn7scjkydey3KJPb2tbFS2P5SxWO1XZmU4tenPtff8+anTepzyowbOUohPOLF2H1 t02j6ZmLVVB8qAB/uVOfaEp+QCH4uXf/0cQpUprPKSTZf7mlI4MQUtaF4ugFK1/IytAiDL SdTksUDnC7OvJUwCnw/LIvVj5adoJUZlAwp7+ZbfCKv56ZjYLy992DTsIkpjyPmDAfHF2D AkcumTW0RNiGh3kS/MdtAdapRurhB10qhQcMIPtYsqy026tafh41QxWfLXXvXA== ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1792266962; b=MQt7twTqYUTZryU+lTqV7S+WsN7dXNsPtffFJjoRWV+H+1lIMnqYfX5xnNuB6cOGjj89zz 8KD7PdpxEO6J7FUpVuGmUcrSEzXj5VGIQMpMfcYAa5mAs3Pxhkv9WcM58lL7FpGjm5ThUV TF84RfH6bfU1gu/MW7Bbn6XyOdc2R5GeCAKA7POW81pUJl8vT9Prxt8W8qD5/RnMze61lE RWoJ1E6QipbpwsEyrTUVO3dwZbhZbf39lg2qa2jrqkSvdlnSw3hBwy7Y9chNQO92e/buX4 hX5YmW5HpDqWlH5UEyEbOlJfWQf6BpH1VoOSJ6rmpFXiIZhiEtYfhvfpBPSGDQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1792266962; 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=vwt1xMpfm/ryPE1qlCAvdY6ixmAI5ZhyjLrEhOUxIeLraiekiuntJlg5XSKrycljLg9Mfs q1N0GfVAnUtsIgaYohHXfKhwz9IMEmxQlLVhNDjpvORqFZfJFUGmvyrXOZez9pKfp6hzex Cvrz8aPx0hExxZ9mCb/6cAmBd7+Pm0JvI7zomVj6P83SwYlL85BjtQ1opyl5/cJQUXR5EL xbKlyUa20iscZV9/cMo3YcSCbh9ZSfYh5GHo6Xh1DHaHIWF2Wx5UEKe5LEGypi5xWCHYtW fSiO8jo1ybvPc5UELK4PaPQChNNGdUXKFazJ862h1hJ8uJwK5t1Kd1XPYpyX8w== 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 4j6XcL5npZzG5q 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-main X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org List-Id: Commit messages for the main branch 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 */