From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 93695C433B4 for ; Mon, 19 Apr 2021 12:01:39 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 6946261166 for ; Mon, 19 Apr 2021 12:01:39 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238912AbhDSMCH (ORCPT ); Mon, 19 Apr 2021 08:02:07 -0400 Received: from mga17.intel.com ([192.55.52.151]:30078 "EHLO mga17.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232272AbhDSMCG (ORCPT ); Mon, 19 Apr 2021 08:02:06 -0400 IronPort-SDR: 37+PFCbMHU6rGzXREAmkEwuJA1VOULdSvvx8kGEjl4rJTATa7slOYAdXQFRE8bchhGYvN+7FHq /OL0v/1NNHzQ== X-IronPort-AV: E=McAfee;i="6200,9189,9958"; a="175419055" X-IronPort-AV: E=Sophos;i="5.82,234,1613462400"; d="scan'208";a="175419055" Received: from orsmga004.jf.intel.com ([10.7.209.38]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 19 Apr 2021 05:01:36 -0700 IronPort-SDR: ++WMBT+IG89dr/8Un5PoXtGDoUc+rRZrGd7ee2yOatMloeZMsnARRHiG4d5Wo4xkj/1RgfR8kj tUZ70kS/gXxg== X-IronPort-AV: E=Sophos;i="5.82,234,1613462400"; d="scan'208";a="534113285" Received: from smile.fi.intel.com (HELO smile) ([10.237.68.40]) by orsmga004-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 19 Apr 2021 05:01:35 -0700 Received: from andy by smile with local (Exim 4.94) (envelope-from ) id 1lYSaq-005UAg-QV; Mon, 19 Apr 2021 15:01:32 +0300 Date: Mon, 19 Apr 2021 15:01:32 +0300 From: Andy Shevchenko To: Jens Wiklander Cc: OP-TEE TrustedFirmware , Linux Kernel Mailing List Subject: Re: [PATCH v1 1/1] tee: optee: Provide special parameter field for UUID values Message-ID: References: <20210415145857.34183-1-andriy.shevchenko@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Apr 19, 2021 at 01:35:51PM +0200, Jens Wiklander wrote: > On Thu, Apr 15, 2021 at 4:58 PM Andy Shevchenko > wrote: Thanks for review, my answer below. > > struct optee_msg_param_tmem tmem; > > struct optee_msg_param_rmem rmem; > > struct optee_msg_param_value value; > > + uuid_t uuid; > > It's nice to get rid of the cast above, but I'm not that keen on the > change in this struct. This file defines the ABI towards Secure world > and adding dependencies on external complex types is a larger problem > than the cast above in my opinion. I understand. So, the cast is simply wrong there. Can you add a comment above that cast to explain that and make it is marked as FIXME? Because there is no guarantee that internal Linux types can be 1:1 mapped to the ABI of something. What you need, perhaps, is a middle layer function that will copy u64 data to uuid_t or so. Also, u64 is not an ABI type, why the respective __uXX variants are not in use? -- With Best Regards, Andy Shevchenko