Received: by 2002:a89:2c3:0:b0:1ed:23cc:44d1 with SMTP id d3csp479157lqs; Tue, 5 Mar 2024 07:30:33 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCV3ykD8IGeE80a2Oop6AFoOKgEWCCcQWGEQbj+T/qZOVX3DovRP10M8KB0KeBrnM5NSixLwv4orARzTBrBzZOGPQm8FaK+8emI7bQoKdA== X-Google-Smtp-Source: AGHT+IEU0t/x5aDzcfyXE/Y8GQZgnLPuGBhNL32sBGJEQLvPakRieGxoNri8Ok8R+qxt4Bxq6Ms5 X-Received: by 2002:a50:cddd:0:b0:565:46e6:56db with SMTP id h29-20020a50cddd000000b0056546e656dbmr8650573edj.19.1709652633247; Tue, 05 Mar 2024 07:30:33 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709652633; cv=pass; d=google.com; s=arc-20160816; b=TqUfhISQTb2TTJ8zLC/0/YbDox3OQSasAI2hKQX1lQL3ink3z277uJgGVb7R0VCPpe eVsUiZH77QUgWikZ24iv6eg7MahtJFfNB34xCRroIt6S91382r79IRh/es7iLbOiogF8 GVQ3Au3CdJIlKxEqH5x0r/GuOTFHlypF0ePyHCMlsGcx+xTo1tPkylvwiCGVHjPOw3t1 Ti90HsG5MEa2Y6dQVRT1O6e0nK5gC0jr1MMajqfujmftnVpTRlFgvLTZ1xhI+yQhD3RK ZDlXe8Pti18wBPihD4agqwL7QqM7MKegK2z6LACEo6zDjOb4yMvQUtQnGtgZZtiEF3g4 FPjQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:list-unsubscribe:list-subscribe :list-id:precedence:dkim-signature; bh=OVzMwD4DQOhd2AA1RQ0K70S/0JATIinWz2gy9l7GKtI=; fh=6GqRL0ZZVNFdhYwkwIEoA+Fy8E0XXXyeqevhrpSOubc=; b=e+7BikhPxPEsWUwvnnwaf0J1uO64NF0VQmJvsjSslWUBSA6Ruw01hEraXOw9heor6l j3GvMSNDizXSEDxtexN4paAv3jQTbtODghmUnpt+HlDdejyU15AzjbgYPV8yHKSBZbjg BUFHE0beehYPEHZ2nlWHpcZl9/jzvNJe1jPMRTyzDJhQl74tvoh6StI30sc62dyYjl7A K6L2FFjHZ/rQLuTU4/c0L2fiyTw13YbThDGx+0IHfYHjWAXMEzt8MCfNEYHDLa9vxXW3 oAljclxeJfPd3+zXIk6qp2zq2CfHKBEzKps9o7cftfE2Gaa8CQU3v5xAuh/+3iIhaC0Z heMA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=CItfI8oH; arc=pass (i=1 spf=pass spfdomain=linaro.org dkim=pass dkdomain=linaro.org dmarc=pass fromdomain=linaro.org); spf=pass (google.com: domain of linux-kernel+bounces-92607-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-92607-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id d9-20020aa7ce09000000b00567c4b82535si111748edv.658.2024.03.05.07.30.33 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 05 Mar 2024 07:30:33 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-92607-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=CItfI8oH; arc=pass (i=1 spf=pass spfdomain=linaro.org dkim=pass dkdomain=linaro.org dmarc=pass fromdomain=linaro.org); spf=pass (google.com: domain of linux-kernel+bounces-92607-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-92607-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org 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 C7DA11F2488C for ; Tue, 5 Mar 2024 15:30:32 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 949C51272D9; Tue, 5 Mar 2024 15:30:28 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="CItfI8oH" Received: from mail-oa1-f50.google.com (mail-oa1-f50.google.com [209.85.160.50]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 1C12C1272BD for ; Tue, 5 Mar 2024 15:30:25 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.160.50 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709652627; cv=none; b=tPhHqadaG5RIWCuwGy/ebrnH3A9wEl+Y1ePT1KAuOLFBLkvHyWXBlMIAh315boFjy8SP8xI+87RvgLurF4VHwVnNggHNTF3pbSCeQJquTNg3eK4tkH2WIFJ/NbODRVzfgu8CAPI7hXSPr2lnqu0WbPG8LhzryW5rxdbXiWSdLgY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709652627; c=relaxed/simple; bh=h1qWJgukNhb6x74QzK47l9/kz0S0qysx0w18QZaOrio=; h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=IXqigQkjDFeiFtSiSKHtYGG5Yn+L1UC5DjcHIhbMBoTFAgqqO1EPF0F0lZRhv65HKdzAAxkPfCBRCKWwHn7QeCnafdzmc/E3da1Vx7BAaFg6ZSJWcEobeNuYN6ElMgClx/8AqzMwmctnssMFcDy/BdRLthnc0yz2ziBfLvBxCfg= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=CItfI8oH; arc=none smtp.client-ip=209.85.160.50 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Received: by mail-oa1-f50.google.com with SMTP id 586e51a60fabf-214def5da12so3497477fac.2 for ; Tue, 05 Mar 2024 07:30:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1709652625; x=1710257425; darn=vger.kernel.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=OVzMwD4DQOhd2AA1RQ0K70S/0JATIinWz2gy9l7GKtI=; b=CItfI8oHdvltTraQej2B5NOEhtO8qTt87GFx0DjUbd8I9r3FWmTSWlkdHw909GPxZO 8/CJn36ctPOddMXzGV8MvynEK78bQRjMG1KHgx3ob2QItGoMcvpvEmYafqkBVwsMzFmc GpCXrWwsgBVjkJA4mRx+WXi1IpMbQlaAfYouVrCWfnwjs/t4/3lwUf3PdMKl0jfj1CCb Pryjx1zZdj2/qVCJOKV6rejpyP7iQDv5RMN2io60H5YhUv/VNZrU+Zjujjmy1JMDg++y kV35H+ByZ7oLRU/Ef8JfkLXiZ+A7m0sbeyrf1jWBG8ZhTdDTR4scdxynnLwYeDZqtHo3 Wjvw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1709652625; x=1710257425; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=OVzMwD4DQOhd2AA1RQ0K70S/0JATIinWz2gy9l7GKtI=; b=aJeItzDyzx0N1FJ/mvkFdw0dYKv4Uaqlf9ECaaxrw85M80StGXuQHIAwPHqB9E/w8h fvBxutkj10s3GisZwF5+16uDlVVBb5bfggUlz2AOH9b1aCigHMhgcS+0PWj53Iwbe07g wJxHIff5MOL3S1BAqj+QV4sNbIt1VB4yaY+Fh+Avo4WJURXB66pZEU2HKhI8sCGvsl7Q ChU2m37ViiEXoCh04NdoNlZ26We6PalKESAzWenAgsM+bY6jyp25QSs9GMlgmN5ccZcc BsMf5x8O7J+NGQOw6kt8Ml3d1TabujNJmYVs7YqBrG1hCVHjvKCoER43gxNoCLSymKwd mYjA== X-Forwarded-Encrypted: i=1; AJvYcCVkqkA47VBMU7d3QaieNLcRMLuavwx0qKi/8xYO1/zcYhBm0Z3D6HCB6M3M9KfFsVEzUWP0bLGAJvBgon2RP+qCx5DNU+SnOaRaTFTJ X-Gm-Message-State: AOJu0YykoVyJjXgi9IsMRDdMYXB0Myd2AuIvNnRBcvc+hlul9EKDMj2U X2S6wdV1JzGii6fW1aKLZz/NcaqRe0KbC6AOKTnDmtYzCS1xqFBCcKy3Tpa5lm+/Fh4yIk6St3V kuIk/WOFYGuDiQzQmd0XrkYkv9ZmT2TEApqNY/Q== X-Received: by 2002:a05:6870:3123:b0:21e:459a:1fb6 with SMTP id v35-20020a056870312300b0021e459a1fb6mr2105805oaa.23.1709652625164; Tue, 05 Mar 2024 07:30:25 -0800 (PST) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: <20240227153132.2611499-1-jens.wiklander@linaro.org> <20240227153132.2611499-2-jens.wiklander@linaro.org> In-Reply-To: From: Jens Wiklander Date: Tue, 5 Mar 2024 16:30:13 +0100 Message-ID: Subject: Re: [PATCH v3 1/3] rpmb: add Replay Protected Memory Block (RPMB) subsystem To: "Winkler, Tomas" Cc: Linus Walleij , "linux-kernel@vger.kernel.org" , "linux-mmc@vger.kernel.org" , "op-tee@lists.trustedfirmware.org" , Shyam Saini , Ulf Hansson , Jerome Forissier , Sumit Garg , Ilias Apalodimas , Bart Van Assche , Randy Dunlap , Ard Biesheuvel , Arnd Bergmann , Greg Kroah-Hartman , =?UTF-8?B?QWxleCBCZW5uw6ll?= Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Tue, Mar 5, 2024 at 1:55=E2=80=AFPM Winkler, Tomas wrote: > > > > Hi Jens, > > > > thanks for your patch! > > > > On Tue, Feb 27, 2024 at 4:31=E2=80=AFPM Jens Wiklander > > wrote: > > > > > A number of storage technologies support a specialised hardware > > > partition designed to be resistant to replay attacks. The underlying > > > HW protocols differ but the operations are common. The RPMB partition > > > cannot be accessed via standard block layer, but by a set of specific > > > RPMB commands: WRITE, READ, GET_WRITE_COUNTER, and > > PROGRAM_KEY. Such a > > > partition provides authenticated and replay protected access, hence > > > suitable as a secure storage. > > > > > > The initial aim of this patch is to provide a simple RPMB driver > > > interface which can be accessed by the optee driver to facilitate > > > early RPMB access to OP-TEE OS (secure OS) during the boot time. > > > > > > A TEE device driver can claim the RPMB interface, for example, via > > > rpmb_interface_register() or rpmb_dev_find_device(). The RPMB driver > > > provides a callback to route RPMB frames to the RPMB device accessibl= e > > > via rpmb_route_frames(). > > > > > > The detailed operation of implementing the access is left to the TEE > > > device driver itself. > > > > > > Signed-off-by: Tomas Winkler > > > Signed-off-by: Alex Benn=C3=A9e > > > Signed-off-by: Shyam Saini > > > Signed-off-by: Jens Wiklander > > > > I would mention in the commit that the subsystem is currently only used= with > > eMMC but is designed to be used also by UFS and NVME. Nevertheless, no > > big deal so: > > Reviewed-by: Linus Walleij Thanks, I'll update the commit for the next version. > > > > > +config RPMB > > > + tristate "RPMB partition interface" > > > + depends on MMC > > > > depends on MMC || SCSI_UFSHCD || NVME_CORE ? > > > > Or do we want to hold it off until we implement the backends? > > I believe I've sent the implementation for all the backends, need to sear= ch the mailing list. I would prefer to only add the MMC backend now. I'm afraid that adding more backends will risk stalling this patch set, besides I don't have the code for it either. Eventual older patches will need to be rebased and possibly redesigned to take the previous comments into account. Thanks, Jens