Received: by 2002:a89:d88:0:b0:1fa:5c73:8e2d with SMTP id eb8csp2010520lqb; Mon, 27 May 2024 05:13:46 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVtolBPLSdPwDVB0zpmYmorun7lvqjLG4h2kqtfz6Vx+OFHrK44yucPOgDnRw2YBWEf1RU5+P1pxtWjszZ27ne6u7yHTIQqXX0sZcsyFQ== X-Google-Smtp-Source: AGHT+IEN8/lf0KiA3ZQ0EakeCBBaAWAt/Bu9xa7FtoasU3Ztnhcy7plWy3VShG0Y0i5CsXgd5fJS X-Received: by 2002:a50:aad9:0:b0:579:cee1:9139 with SMTP id 4fb4d7f45d1cf-579cee19250mr4094036a12.28.1716812025975; Mon, 27 May 2024 05:13:45 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1716812025; cv=pass; d=google.com; s=arc-20160816; b=tbXqJW8f9m3+RiMhFF6lDugkoU/jKUQfU00e3j6RUyZ/zmENqqud8uPNMtrFWNZrTn hcezU1uVJNA01htZTLeVZK5VdRpEoXio/4GFD26iHBwBrUg8eViJTGeJlRqk3E4o5JWJ YD8ZAb0ARc5nzSg7nnq04YypErGwpCd2keeTPL9IoO4yGwPQqHjhP97Q7GNtllE99TFw hrOvmPaYxnVq8Srn5Rf3IJXpZZQr3n6oBT4FqjU3Z+zIngsfqAEI2ok/xX5rbaS5hQ/r 0wbSoIaHwxgq87Yz4Gui8ZOOBP/oYo2oyiTKQBLDEaugQrIza8zTzLU2D9IqaD5E6bnX 0r3w== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=+OKAUXQhMDtGHYqwXXNFtRVYDfPTCAVoi3C8q4Qhibs=; fh=+fEw3/zQrmpgsgtgl9f9CsaDRovpb+9b/IJZeo8A5zw=; b=VzrP3p8NKu2dLAB/AfK/EzqZEt0gJ+V5stP6bPbS4Bk3CVLfO8Or0Zmw5Ki4JLbDVO bH1uXxYtckIyXWd6r+NbfRYkqxr2zqyVsB0VFu5WEdTDANkdk34TFmGG0yppV6EkF/qT fqV6QYoApz1BPlgJUZEskw4uTtHJXP07nbv6pYTuIw+o/j2URupmKbA5ReAuZ+Iq1MuI F3dNpEEvvVy6fTAwrBFjlJ2HeF2huUTB+UNGxz8VgOlN0R3vbJ/RSb6CT3NtZNA8kXWt lMQyjhL7w1/hXoWKSWXSXwg6drjg/iTCwRz8VwkbyyaxDahOovEoyGC62+A99x2DIYKw /bTg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@habana.ai header.s=default header.b=fZHcM75B; arc=pass (i=1 spf=pass spfdomain=habana.ai dkim=pass dkdomain=habana.ai dmarc=pass fromdomain=habana.ai); spf=pass (google.com: domain of linux-kernel+bounces-190541-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-190541-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=habana.ai Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id 4fb4d7f45d1cf-5785245f5b7si3763397a12.260.2024.05.27.05.13.45 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 May 2024 05:13:45 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-190541-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@habana.ai header.s=default header.b=fZHcM75B; arc=pass (i=1 spf=pass spfdomain=habana.ai dkim=pass dkdomain=habana.ai dmarc=pass fromdomain=habana.ai); spf=pass (google.com: domain of linux-kernel+bounces-190541-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-190541-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=habana.ai Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 8B9D01F21CBD for ; Mon, 27 May 2024 12:13:45 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 1D65415E5DE; Mon, 27 May 2024 12:13:15 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=habana.ai header.i=@habana.ai header.b="fZHcM75B" Received: from mail02.habana.ai (habanamailrelay.habana.ai [213.57.90.13]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id B37A015DBCB for ; Mon, 27 May 2024 12:13:12 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=213.57.90.13 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716811994; cv=none; b=PQ2yd8ayGyAHySKHxVCH0n9Udz1qI/3ZZuLcRw2yBadBw40Fvjr3yU0qHUOkLzUSTdAQ+RwHzN+kjYOZgs3P9+uTbxCU++zjVD+o6Aiyvu9kaRbBHsj8utejdp9WjZzOIichhKundUaf4t70mGcEZG4bTaQgA/hnoLufYdsZ/6k= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716811994; c=relaxed/simple; bh=hikixPhgw118twEP+21boqHR0BCJuA1UyHNIo4eFSHc=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=Fsf09ArrBNzSORVmyy7oOgFeHFiCKRb09zSJRbVRWVHquq1GbQAYouncxjupDLkFZLGWBA35z+YOr5dSunAZ+rgh/Z7arwn7AZo8gt7LL6nOM2AWZIM6788XOvqdrDEJ6NCRnzxE+wz4Zha6xL9GG/Hw5FlqwaFepEsGNlrMvLc= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=habana.ai; spf=pass smtp.mailfrom=habana.ai; dkim=pass (2048-bit key) header.d=habana.ai header.i=@habana.ai header.b=fZHcM75B; arc=none smtp.client-ip=213.57.90.13 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=habana.ai Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=habana.ai Received: internal info suppressed DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=habana.ai; s=default; t=1716811993; bh=hikixPhgw118twEP+21boqHR0BCJuA1UyHNIo4eFSHc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=fZHcM75BM/ZPCm5dogM9PnM2+U6VWsKfHNApocPn57lLGXJ8tUPoYjLT1F86ne5cr mEOtlWPuSo6frJzyxu3p8jU4NhvJpASqHThmvzrDpawGeN3riUTZ+YW8P95ddU4kmt VMYYDPnEmluzgrRQPDKLYCNsUe0C8UGa1np/60FHiKRBJYLGLsi0yOJEICtk5m8tYf oWQU7qildiZgUmLj0YfvGe66zMDKLz9crvlzbG4NhUFlZJSXBsqa29lUdW1VKs/VhD zF2tz5ULOMOzoTHx6+xnWogyd5u4mLIfrkz+m8hohlIxI4N7YxC5hw5yCWRd6PYV6L DlXsPryuK/8Uw== Received: from obitton-vm-u22.habana-labs.com (localhost [127.0.0.1]) by obitton-vm-u22.habana-labs.com (8.15.2/8.15.2/Debian-22ubuntu3) with ESMTP id 44RCCuaw1921351; Mon, 27 May 2024 15:12:57 +0300 From: Ofir Bitton To: dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org Cc: Dani Liberman Subject: [PATCH 6/8] accel/habanalabs: separate nonce from max_size in cpucp_packet struct Date: Mon, 27 May 2024 15:12:52 +0300 Message-Id: <20240527121254.1921306-6-obitton@habana.ai> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240527121254.1921306-1-obitton@habana.ai> References: <20240527121254.1921306-1-obitton@habana.ai> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit From: Dani Liberman In struct cpucp_packet both nonce and data_max_size members are in an union overlapping each other. This is a problem as they both are used in attestation and info_signed packets. The solution here is to move the nonce member to a different union under the same structure. Signed-off-by: Dani Liberman Reviewed-by: Ofir Bitton --- include/linux/habanalabs/cpucp_if.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/include/linux/habanalabs/cpucp_if.h b/include/linux/habanalabs/cpucp_if.h index 1ac1d68193e3..0913415243e8 100644 --- a/include/linux/habanalabs/cpucp_if.h +++ b/include/linux/habanalabs/cpucp_if.h @@ -859,9 +859,6 @@ struct cpucp_packet { * result cannot be used to hold general purpose data. */ __le32 status_mask; - - /* random, used once number, for security packets */ - __le32 nonce; }; union { @@ -870,6 +867,9 @@ struct cpucp_packet { /* For Generic packet sub index */ __le32 pkt_subidx; + + /* random, used once number, for security packets */ + __le32 nonce; }; }; -- 2.34.1