Received: by 2002:a89:2c3:0:b0:1ed:23cc:44d1 with SMTP id d3csp1058230lqs; Wed, 6 Mar 2024 05:19:13 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCUYiX23z78WsQx011gRfYwyG05JJnyWhBitdvLYApS65KfgQUqwaJRfIhdL6OZTdsiaBRm6rBaGi3CP2fW+L7yScFeYn4c/DkYPnl2l6g== X-Google-Smtp-Source: AGHT+IH73D2dPJ8H46mf6SGwVjwKqlKQY10y0xtTMIbFftljvFsI+EleAb5JNLghRsFWN/Aw7+kw X-Received: by 2002:a17:902:e547:b0:1db:47bb:671b with SMTP id n7-20020a170902e54700b001db47bb671bmr7059961plf.19.1709731153181; Wed, 06 Mar 2024 05:19:13 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709731153; cv=pass; d=google.com; s=arc-20160816; b=bo9T43FwSGp6OmFUOQABtxl5sDbVOFZ+dZbtCBUcAGer+K9MrJTb7hNu1qBAzXS7mq 6KMR2AdJSHB+YlQ0Z6vQsP/+XBuyr+EAg3prQh+obH94k3MdmLrt0P8ZoMttSy6etvVf yFZ5USkDnW7wJcH6pL/GX98Z+3D6HJ4fYVE8bkmM4XXF1xBUSiRQlOpb0T+HfpbWnClG ISpYBsnNF131yZPajcoGisiIyXvwZIh+jplnUt33eCG8zsOIBBG6sLrwDIScqifTWTBq BiGivaDXgskGt0ciV4hjvSpBd50dnLl2Za1qXVhY5yqlSABxl3XmFPpqRMVSlM1OErky wGpA== 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=PKCuv8kmiOEcIsEda8cwWHeTnSLLUr7cPDUpeRfzlFE=; fh=sFtGJubqCPLm9vwZmgUxnacAfFMvGSW8YUR30YGs01s=; b=ksFoEfPUZuwejqbefs9shB4Pld4W6Sqgwj26mQq6+z6wY5AZ+fSd9Mi+n3lZkaHSPr EErIvwMN4Q/nLxL8aaezkz2w82oHgF4LlQEpFCTp6BlLM+nxLrHeiJPkcIQIOSqNN9F1 Q3Up2r/wDAmvM4VmX/YChOXPjVn7hjVay05E98diokoLsoITpbfz1Khb9AKlBG13pv4E hPu0nqbNy9/MM9VM6ZEYGdITRen/Ar/8CpFv3P1DgsmnsUmlAxG+0UDHkkyX5PW3xaBk fxXPEZy5yWCYnOEnvntmrXyKH4J3xm3XtCXSw1UrU2am/h+iZ0Bps8AxY66ZCJcZnFFy wZ1g==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=pT3kOgbb; 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-93964-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-93964-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id x15-20020a170902a38f00b001dbe81d153asi11622997pla.605.2024.03.06.05.19.12 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 06 Mar 2024 05:19:13 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-93964-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=pT3kOgbb; 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-93964-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-93964-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 sv.mirrors.kernel.org (Postfix) with ESMTPS id B28DD286BA9 for ; Wed, 6 Mar 2024 13:19:12 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 1B2D3130E2F; Wed, 6 Mar 2024 13:19:04 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="pT3kOgbb" Received: from mail-yw1-f179.google.com (mail-yw1-f179.google.com [209.85.128.179]) (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 AA3C67FBDC for ; Wed, 6 Mar 2024 13:19:01 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.179 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709731143; cv=none; b=fRfUijKsvFNzVUBOd9shMALXktI2EBpZ9w+vnLa1+xLoq32P7CsAnXMZH7hftMQqeUrO0qdrDeQQ/xH/pWBq1BWd/tG3GBeqLSS4CJNt5Cqyvybkx7ht+PFEpgS81rGkWZCcjnVz7GK2TZuSvHsRcjbSGPTSLIgOrHe+b11FOC0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709731143; c=relaxed/simple; bh=mPnkZEtTSAh6vbCxB45rCsbaTkRBTrfhhwve8I26+7Q=; h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=RD6xT1sGoPgNBjb9E9htFhYv9PppJssNyTOcPbk3K9rGKI/JCBVVv6tXalZT0QyZWshhA+0sxsRslYpYXsmHG7E2OqN/4ewf1EeAZi8iVwEbJQJuvu9cZtwJmU9i6FDlM9YthtfcfYb94uJbjoqbi54CLhqSoK+pUtRA2umkNUQ= 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=pT3kOgbb; arc=none smtp.client-ip=209.85.128.179 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-yw1-f179.google.com with SMTP id 00721157ae682-607e54b6cf5so6718567b3.0 for ; Wed, 06 Mar 2024 05:19:01 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1709731140; x=1710335940; 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=PKCuv8kmiOEcIsEda8cwWHeTnSLLUr7cPDUpeRfzlFE=; b=pT3kOgbbhq4e6idWAGfA5/BXIMMXkmKhmqT1zal3Pt3xt5qjBCKfimqMW7V6XOrPSC rTLwFkEn9FI1vcw7ESJBKYxebBDVD5fMEYzHZvqPu1FXLdvPv/kt0XGwc8inM4KCS0CD 3C6GZof6LBgGslVZIDFDzsURhA4nD9dj0Nrqbvfw6Qrrq+KoGfMPE8s87FSErTDrhdto 5QWMJa1h1/rK10cQy1DLrdGZa8YALO/uwc+LQop6YjHQhL/ll1rMrygszAkVdSPYarNZ pQ8wAlD7yU3yjQ+N8qaYZ3bkzhurxFEeOZZ1evIGyf/2r/tcLQ2quRFAiDjDnClT8epw Gg7Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1709731140; x=1710335940; 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=PKCuv8kmiOEcIsEda8cwWHeTnSLLUr7cPDUpeRfzlFE=; b=GGkNkwUMJeed8/+HPDtki7ieZJxlMCeeTfQAxGO5W7PrZXl9Ag+hSORcr3beouzZpU hslrtGsigbqu2I7AuXTBHZ4Zl25GNUyFVHngFJOf13qBV9ay5JKjHU7CskqOz7RD/XaM +STyknSzd+jbg7ghkAryeTUptEoG1zcMoOe2Of6ikNWvNQu1+mqIiLL1ithKDZweKcP/ GdamfEPp6wPPAyCLPne4aJkeWZiVLvLL7qXRzSmB4pYLkQrTY8CHIxC2hjqE/aDk1HV1 hEFQktDs1JMDakYX3aV9pBBD0T7NgMOaIVSUBgalZqLGnqkVXJWjPxWR6FK8ssyrK6R4 gmwQ== X-Forwarded-Encrypted: i=1; AJvYcCUxDBrmOKyucj+o9/AnWSQ4FHiRlezbnxpx7YjncTtGQLaIKIIAdw60rtGdp90SMM6d3GgO0zUun3lbvxOrBKlz6KfC1Vg9LjxugKWo X-Gm-Message-State: AOJu0YxejsTZ612HqBw4YF0L959K88rGv19C/xwsYvb/HRSojjLXu7PN rM494QqdovpWv4txzal//U8LQmusdAxhLRG7ySe8Y7m4jE1sS7Coi0t9YOdefyI/OoAKzLvxVZQ LgV0HsPeeE0duJ0Qa6trf29hCbUaJoK4+HR8vdQ== X-Received: by 2002:a81:4915:0:b0:608:d4a0:1dbe with SMTP id w21-20020a814915000000b00608d4a01dbemr37631ywa.15.1709731140673; Wed, 06 Mar 2024 05:19:00 -0800 (PST) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: <20240306-mmc-partswitch-v1-1-bf116985d950@codewreck.org> In-Reply-To: From: Linus Walleij Date: Wed, 6 Mar 2024 14:18:49 +0100 Message-ID: Subject: Re: [PATCH] mmc: part_switch: fixes switch on gp3 partition To: "Jorge Ramirez-Ortiz, Foundries" , Jens Wiklander , Tomas Winkler Cc: Dominique Martinet , Ulf Hansson , linux-mmc@vger.kernel.org, linux-kernel@vger.kernel.org, Dominique Martinet , stable@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Wed, Mar 6, 2024 at 10:05=E2=80=AFAM Jorge Ramirez-Ortiz, Foundries wrote: > That looked strange as there should be support for 4 GP but this code > kind of convinced me of the opposite. > > if (idata->rpmb) { > /* Support multiple RPMB partitions */ > target_part =3D idata->rpmb->part_index; > target_part |=3D EXT_CSD_PART_CONFIG_ACC_RPMB; > } > > So if we apply the fix that you propose, how are multiple RPMB > partitions (ie, 4) going to be identified as RPMB? Unless there can't be > more than 3? As far as I can tell there can only be one RPMB partition per device. The v5.1A spec says (section 6.2.1): "Two Boot Area Partitions, (...)" "One RPMB Partition accessed through a trusted mechanism, (...)" "Four General Purpose Area Partitions (...)" implying there can be only one RPMB. Also I have never seen more than one in practice. I paged in Jens Wiklander and Tomas Winkler who used it much more than I have, to confirm. I think my linked list of RPMB partitions is a case of overdesign and could be simplified. I blame the fact that I didn't have the (non-public) spec at the time. Yours, Linus Walleij