From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from fout-a5-smtp.messagingengine.com (fout-a5-smtp.messagingengine.com [103.168.172.148]) (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 2ACAD285071 for ; Fri, 5 Dec 2025 13:56:43 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=103.168.172.148 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1764943007; cv=none; b=l1FihWPKA6SuaNTffNdTtmzGePsWg0jIcHDcjb10RXZaRgEd3Yi5/ydQHa2RGGgRPUDpNAMAn+HxyJW063iJ6UXNm1V8+qi2l8m+k6qN4SvmmqhqgOoSWEgpRTqh/FtwHRZ64eRCv+Aqh1QOUDgukQ4k99A/v/H5eLeeq6svaYc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1764943007; c=relaxed/simple; bh=KczxWujonC5zWQaSNOm6PXUB2S7P7grqXlY6OUJjvYY=; h=MIME-Version:Date:From:To:Cc:Message-Id:In-Reply-To:References: Subject:Content-Type; b=EqQTSqvUBhgbGhBzqOUrE1OaDMcxVFZhwAtaFxF3d8bMx6p4Pcsu8eAtSnbIUldLQDvfPpvEfzk0W8qBIUOR5AhXPSVmP18ROvxy6pj/KSOwKfYqu9S+baZaPrCDSKn4CCKZUeM26y/mCFT6D9EWD/bo/msYaUJdMveMMGoFSEk= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arndb.de; spf=pass smtp.mailfrom=arndb.de; dkim=pass (2048-bit key) header.d=arndb.de header.i=@arndb.de header.b=F4xxuDGc; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b=MTztJQnm; arc=none smtp.client-ip=103.168.172.148 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arndb.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=arndb.de Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=arndb.de header.i=@arndb.de header.b="F4xxuDGc"; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="MTztJQnm" Received: from phl-compute-04.internal (phl-compute-04.internal [10.202.2.44]) by mailfout.phl.internal (Postfix) with ESMTP id CFC23EC059A; Fri, 5 Dec 2025 08:56:42 -0500 (EST) Received: from phl-imap-17 ([10.202.2.105]) by phl-compute-04.internal (MEProxy); Fri, 05 Dec 2025 08:56:42 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=arndb.de; h=cc :cc:content-transfer-encoding:content-type:content-type:date :date:from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to; s=fm3; t=1764943002; x=1765029402; bh=6jIDgDQomoK9NQlUOGMcADl/DSu11Lk9z8Cy7t1RvbY=; b= F4xxuDGc0gtaakPjCiWR79J4MlpS0Orv/CX+jp/pcae0eZCVsUG9bJJpNU16r9WC Q97J0yMJhPcWHUPSJ3y7AsCKikdIcivHm5Jre7waVdfZgmlk3b5iyNWk0TUqWiH+ b+G6/knQa0YlX4RkBheoIqPEj12LT6mOc/fX+rAs4hyImiCdcWQ70JJZm/31Gjap OxsYCr3wSN0Vd83d1+sI4ZHLKjOG2IPw3OuEDhhXJB0+SgmZ28PBcpVXyBLvCIW8 fM322kBRxvJv0N+pFVFuTjtlqZ1Er7X8X0N7IrEg72aWxzD/PRYsrszkIH8AAPte 7x6Ay4Vir6CQzwb1zWl6Fg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm1; t=1764943002; x= 1765029402; bh=6jIDgDQomoK9NQlUOGMcADl/DSu11Lk9z8Cy7t1RvbY=; b=M TztJQnmfFCAOlzNO3QmXE2FxoP9qsTsJoYtxjRbN4pB6Yj4XdrEuCfkifspBcRtz SkjJjSUE4C4arq2LrkQZIJQcZHeVWw2rmIUj2/arM2tqTqq/NQOBuFz6hdZjsnpW 8i0fSPuYlYCbBLSdvEm3ckJieUvAsUt2mUIMPtU2n9nd3WfhhbDQU8mkLw8EWjm1 f7ea/FLYK8kpjgJCiS5s8y5qMSewCS/STDCnnN5OWMCSzmJFblW8cmv+x3nsQmRh Khf5eK6XDigO3F/SL2ApH3nIU9uZw5DmlhCSnjWSwYq8aVf++Bgnowt7Jqm2jkAQ YG7xTBprYQ+pyGjlk0X5Q== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefgedrtddtgdekheehucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfurfetoffkrfgpnffqhgenuceurghi lhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujfgurh epofggfffhvfevkfgjfhfutgfgsehtqhertdertdejnecuhfhrohhmpedftehrnhguuceu vghrghhmrghnnhdfuceorghrnhgusegrrhhnuggsrdguvgeqnecuggftrfgrthhtvghrnh epteefudehvedutdeugfeuveffleduheehfeehffeujeduledvheeivdffleffjedtnecu ffhomhgrihhnpehgihhthhhusgdrtghomhenucevlhhushhtvghrufhiiigvpedtnecurf grrhgrmhepmhgrihhlfhhrohhmpegrrhhnugesrghrnhgusgdruggvpdhnsggprhgtphht thhopeduhedpmhhouggvpehsmhhtphhouhhtpdhrtghpthhtohepphgrlhhmvghrsegurg gssggvlhhtrdgtohhmpdhrtghpthhtoheprghouhesvggvtghsrdgsvghrkhgvlhgvhidr vgguuhdprhgtphhtthhopegvthhivghnnhgvrdgtrghrrhhivghrvgesfhhoshhsrdhsth drtghomhdprhgtphhtthhopegrlhgvgiesghhhihhtihdrfhhrpdhrtghpthhtoheprhgu uhhnlhgrphesihhnfhhrrgguvggrugdrohhrghdprhgtphhtthhopegrrhhnugeskhgvrh hnvghlrdhorhhgpdhrtghpthhtohepphhjfieskhgvrhhnvghlrdhorhhgpdhrtghpthht ohepshhumhhithdrghgrrhhgsehkvghrnhgvlhdrohhrghdprhgtphhtthhopehjvghnsh drfihikhhlrghnuggvrheslhhinhgrrhhordhorhhg X-ME-Proxy: Feedback-ID: i56a14606:Fastmail Received: by mailuser.phl.internal (Postfix, from userid 501) id 51D8AC40054; Fri, 5 Dec 2025 08:56:41 -0500 (EST) X-Mailer: MessagingEngine.com Webmail Interface Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-ThreadId: A173SAdB9O0B Date: Fri, 05 Dec 2025 14:56:21 +0100 From: "Arnd Bergmann" To: "Harshal Dev" , "Jens Wiklander" , "Arnd Bergmann" Cc: "Paul Walmsley" , "Palmer Dabbelt" , "Albert Ou" , "Amirreza Zarrabi" , "Sumit Garg" , "Sumit Garg" , "Alexandre Ghiti" , "Etienne Carriere" , "Randy Dunlap" , op-tee@lists.trustedfirmware.org, linux-kernel@vger.kernel.org, linux-riscv@lists.infradead.org Message-Id: <9e44024d-a649-49d6-825f-97f2a11e1691@app.fastmail.com> In-Reply-To: <45b5f14b-3746-4b05-a4b4-dc9f88e89e52@oss.qualcomm.com> References: <20251204101730.1036671-1-arnd@kernel.org> <45b5f14b-3746-4b05-a4b4-dc9f88e89e52@oss.qualcomm.com> Subject: Re: [PATCH] tee: fix tee_ioctl_object_invoke_arg padding Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On Fri, Dec 5, 2025, at 14:45, Harshal Dev wrote: > On 12/4/2025 6:57 PM, Jens Wiklander wrote: >> On Thu, Dec 4, 2025 at 11:17=E2=80=AFAM Arnd Bergmann wrote: >>=20 > The only user-space client which is currently using this ABI (as per=20 > our knowledge) > is the libqcomtee library:=20 > https://github.com/quic/quic-teec/blob/main/libqcomtee/src/linux/tee.h= #L432 > > If I understand Arnd's concern correctly, if a compiler used to build=20 > the user-space > client skips the padding for tee_ioctl_object_invoke_arg, it could lea= d=20 > to issues. > > Let's wait for Amir's view here as well, however I do think the=20 > explicit padding would > benefit here. > The problem is much narrower: as the amount of padding is determined by the architecture specific ABI, kernel and userspace on the same architecture always agree, and specifically 32-bit Arm userspace and 64-bit Arm userspace (aarch64) also have the same rules, so there is no problem on Qualcomm's platforms even with compat 32-bit userspace. The only actual ABI problem would happen on 32-bit x86 (i386) userspace running on a 64-bit x86 kernel, since i386-linux compilers have different alignment rules from most other architectures. Arnd