Received: by 2002:a05:6602:2086:0:0:0:0 with SMTP id a6csp3613903ioa; Tue, 26 Apr 2022 06:56:27 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwXjmP/FFFPpSYFOJ8eA5decJ2g+ACFN2KucpXzRl78EnV3hzGML4FV3gPL/X4Q5IdDT1dX X-Received: by 2002:a63:f743:0:b0:3a6:6786:30b1 with SMTP id f3-20020a63f743000000b003a6678630b1mr19144575pgk.243.1650981387588; Tue, 26 Apr 2022 06:56:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1650981387; cv=none; d=google.com; s=arc-20160816; b=cWj7HCODjcHQcL/R11gv39O1ejMXG1w1zOHfIo/ZVxEiQOiugte0ju1QnIWIWF79bu GTqgYWec7omxAF0SeKcsLXLSfPAkynB5dHSCeJGIT4hIQdcVcj9L18sPFCrRuIGTJ1P+ qJ87KUiWM5LmMQb+ydVeesC9vU+7kwCWaZigGMzYd5iqSHvlaVURnvzeeT8JvIiryq3+ h9QpVIRBLgF9KkEAnHOg21gPCQGpuhsbdxLA3YsMeAfqZjE0Y0TQpfi0wiNpStFaRMaf KIouwEr4LfbFHBoPsOfj9KWjx5D/9pfzM/fz0X/7M2UaidFOBt/LZmGGjyhQA8KChsOj hjfA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=vYVekr4YvbLsHucHgm8G116TEThN3UMClXJfeXv+hU4=; b=YgJPenf52pT8+83FxnwrvhiEal5S5T5ysyeGOo3Hpe0b81/ZtVbl4hSry8UCo2IiQS 6ZW8xBBHFjipY4/zMQJRzzM8XVdj/zUZDfgJpK7W2btu6Oe7cuFaLTULB1ruhDCiGlAy eUcGbE/SvqpAnpO4cteBEnFIh4pbphJjVJx7Djjg33ujAT/7TkogqrSyRSED50dhEhIe 5if755nVl0u0oDEUZJD86BuH5B/vk9kyI/vFbWXZpIY0uWu/IMO6kqGb3FQVUW0QN7LL NtFXXwtm8fpONqWX63wxFbReDfXHjQHl8bLE6dV6DWdybcJpQxNZJR58Tz7kLxeVQ1lc F8Ug== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Nb0f085Z; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id k9-20020a170902ce0900b0015b4474c722si14151479plg.546.2022.04.26.06.56.11; Tue, 26 Apr 2022 06:56:27 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Nb0f085Z; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229807AbiDZIZN (ORCPT + 99 others); Tue, 26 Apr 2022 04:25:13 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57688 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233617AbiDZIZL (ORCPT ); Tue, 26 Apr 2022 04:25:11 -0400 Received: from mail-pg1-x532.google.com (mail-pg1-x532.google.com [IPv6:2607:f8b0:4864:20::532]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 52D5C3A183 for ; Tue, 26 Apr 2022 01:22:04 -0700 (PDT) Received: by mail-pg1-x532.google.com with SMTP id t13so15478355pgn.8 for ; Tue, 26 Apr 2022 01:22:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=vYVekr4YvbLsHucHgm8G116TEThN3UMClXJfeXv+hU4=; b=Nb0f085ZebEJPCinOt6pZuFn0qnmDisNJu5Rk80wCa2s+nzszKjhhN4UYYPkQf6Acl 4MNxkF4dJar7sBIPLss1tBOwkJIQPxjxDiJhtK+qBWVV3FueQ7Y3/3FNXr4iEj6LLWQ0 XtKDYU3kDmdNcLu0lZTv3l1D1v8FEexelBTge/3sgZ1G2+x/gnzegDDxD7OWEEqauFPo Dyh4tqvAiTtlFtRibQNGYrzkR+45N/GSrL65LCMM6ZIYcS2gUX/5TrsQf/m7AWZIsDlz HCl0y0xFw62Tkv9V9sIeieoOmG678iXvg1SIo/di5OfVnOIVtnLujz92GTkOopXwSOqg Pa/Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=vYVekr4YvbLsHucHgm8G116TEThN3UMClXJfeXv+hU4=; b=eb8au87+HbSnDhVZH4eifnAbAeUKTYI5nsAIBnwK/gDmZOFmrbVE/obqlwBqn901xb 6H9HC0K9DHtIt8ixGoHsQo1Thj69WNmOzYBdpX0R2peXloHvzY6jgOd18BRjgX0fE/24 Y/TJAjwR+mFm26YOdt/wd/KWWB5bWawULhQBfyB8CTyO8OvglA3/B24Q0P7SjT2+uTHk ej4sLUBsuWcCwvexETnSP9ZdgOp3Y5EpoWYlEN/pbpb2jdvAugx6GH/gVABeUZImTPYu tR3JlLBg+yX9RZIHbJ2spbeYiIb7+XkpNJ/RzWV2oSpm8nqJXkq4Vg/VoaIMdxE4ntmi x+LQ== X-Gm-Message-State: AOAM5338Zas5qD3Jq2uoJ8VmQEnloKl3B8ALz2MrITuF73FmS833pBE1 vzelZW8hWT+c4tYNXCx98uM7hDOqOAvAKC3ambR2Hw== X-Received: by 2002:a05:6a00:2310:b0:4fa:7eb1:e855 with SMTP id h16-20020a056a00231000b004fa7eb1e855mr23543830pfh.14.1650961323839; Tue, 26 Apr 2022 01:22:03 -0700 (PDT) MIME-Version: 1.0 References: <20220425141617.23925-1-afd@ti.com> <20220425141617.23925-2-afd@ti.com> In-Reply-To: From: Jens Wiklander Date: Tue, 26 Apr 2022 10:21:53 +0200 Message-ID: Subject: Re: [PATCH v2 2/2] tee: remove flags TEE_IOCTL_SHM_MAPPED and TEE_IOCTL_SHM_DMA_BUF To: Sumit Garg Cc: Andrew Davis , op-tee@lists.trustedfirmware.org, linux-kernel@vger.kernel.org Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Apr 25, 2022 at 4:18 PM Sumit Garg wrote: > > On Mon, 25 Apr 2022 at 19:46, Andrew Davis wrote: > > > > These look to be leftover from an early edition of this driver. Userspace > > does not need this information. Checking all users of this that I have > > access to I have verified no one is using them. > > > > They leak internal use flags out to userspace. Even more they are not > > correct anymore after a45ea4efa358. Lets drop these flags before > > someone does try to use them for something and they become ABI. > > > > Signed-off-by: Andrew Davis > > --- > > > > Changes from v1: > > - Removed flags return from tee_ioctl_shm_alloc() > > > > Acked-by: Sumit Garg > > -Sumit > > > drivers/tee/tee_core.c | 2 -- > > include/uapi/linux/tee.h | 4 ---- > > 2 files changed, 6 deletions(-) Looks good to me, I'm picking up this. Thanks, Jens > > > > diff --git a/drivers/tee/tee_core.c b/drivers/tee/tee_core.c > > index 8aa1a4836b92f..af0f7c603fa46 100644 > > --- a/drivers/tee/tee_core.c > > +++ b/drivers/tee/tee_core.c > > @@ -302,7 +302,6 @@ static int tee_ioctl_shm_alloc(struct tee_context *ctx, > > return PTR_ERR(shm); > > > > data.id = shm->id; > > - data.flags = shm->flags; > > data.size = shm->size; > > > > if (copy_to_user(udata, &data, sizeof(data))) > > @@ -339,7 +338,6 @@ tee_ioctl_shm_register(struct tee_context *ctx, > > return PTR_ERR(shm); > > > > data.id = shm->id; > > - data.flags = shm->flags; > > data.length = shm->size; > > > > if (copy_to_user(udata, &data, sizeof(data))) > > diff --git a/include/uapi/linux/tee.h b/include/uapi/linux/tee.h > > index 25a6c534beb1b..23e57164693c4 100644 > > --- a/include/uapi/linux/tee.h > > +++ b/include/uapi/linux/tee.h > > @@ -42,10 +42,6 @@ > > #define TEE_IOC_MAGIC 0xa4 > > #define TEE_IOC_BASE 0 > > > > -/* Flags relating to shared memory */ > > -#define TEE_IOCTL_SHM_MAPPED 0x1 /* memory mapped in normal world */ > > -#define TEE_IOCTL_SHM_DMA_BUF 0x2 /* dma-buf handle on shared memory */ > > - > > #define TEE_MAX_ARG_SIZE 1024 > > > > #define TEE_GEN_CAP_GP (1 << 0)/* GlobalPlatform compliant TEE */ > > -- > > 2.17.1 > >