Received: by 2002:a89:288:0:b0:1f7:eeee:6653 with SMTP id j8csp392824lqh; Tue, 7 May 2024 02:22:25 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCU/HwnaC0wnc/Q331tmt+gluGLkqinQJ0leMK7fz0ZQ5f5Dqo4felE+nxzWaQJQDW2Du57LIIxgtsbyn/9q6M8ki4cSNBR5BC/KbI6D5g== X-Google-Smtp-Source: AGHT+IHG2Ch4QEJG2Hv0OjQlvlfS9hfL9sfnKwYm0qNOfx0EFiDzF2sRQa0N8/1MSZ/vIioUsRKb X-Received: by 2002:a05:6a00:3a0a:b0:6f3:ef3d:60f3 with SMTP id fj10-20020a056a003a0a00b006f3ef3d60f3mr15825162pfb.29.1715073745172; Tue, 07 May 2024 02:22:25 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1715073745; cv=pass; d=google.com; s=arc-20160816; b=Sn9FjpxtcdtxS3PpNK4hlspmE8f/BKKZC8/a/BQpPnpO5c6IrkeJSh6qffTj8uqfIh zhJo8TSLS2ziaTcpxZKpSr9XyBAKmzmAWcM958yCI9MMoCCNw0QNSfOlt9FkBE3LDGX5 eLcje3xLvV6a/Nk/gsBYeQG6z/6qrkK/gZ1fyrPbxT2ry5TLubAHA0V4gnK040NJOQ3J CnE+NBgIjUfsBgFkTmumSjZPlsls5pe/ndG5Zh0km2IGZEGYiYcxE9WIIEkLOIgPwr4+ wGJEMZEKS58YF6GUwKm/FNpBp/iBv/vGuXBbTbsQ+fNPoJvMIHpqM9+gf8Cwv9MqoQRQ FUIw== 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=MYbuBqfdt+dluLElLanY3jhxaBB9u5sP0QgbMlw6Cds=; fh=r9pSbPiT/+zhEpHY2SkcNcFHfyTevMLvsZ02npLCM0Y=; b=uuKxHMZIQDzWkLE5ix0gC3UDXHKmU6cO+SahuaOWZm7P90eJgoZpkQnVtamPVOsPtM X0y0krj9A2R0u5wElY/Chdf7+1WAek/odPohtwDZ1027YEeXx4hvtd6+uV2W6xqh7Fm9 SHqgreiRe+LEBXvZ/hGYIbNoLhZMihjjdICztlVwEIOlueu41WFJUwcp9GjW8jynGptO 6tE6M8tmIuykvzkwwT/RaCCkmXho/xRJl05GiNNXbRCKV+0hHtUFDSFw5h+4o2Le8B3v kjDkwThTQUvS1CFZYs86civRFNv+wgShQJYCGCjLUxUA4kVyTTnVZaUTeYc9rLErXnhf GvUw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=SMG7SAJH; 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-170933-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-170933-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. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id jo4-20020a056a00908400b006f47e09a0d3si3780365pfb.183.2024.05.07.02.22.24 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 07 May 2024 02:22:25 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-170933-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=SMG7SAJH; 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-170933-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-170933-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 41E54284E97 for ; Tue, 7 May 2024 09:22:23 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 6B3C514D6ED; Tue, 7 May 2024 09:22:13 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="SMG7SAJH" Received: from mail-oo1-f44.google.com (mail-oo1-f44.google.com [209.85.161.44]) (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 398A514D713 for ; Tue, 7 May 2024 09:22:11 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.161.44 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715073732; cv=none; b=VSTwuLoD+wrUSmEO9fuOVt4IOlK89Zmv52dy8BUTUorSJfSdFJqLo5nETNjPeGm6dT/Uyelnwss/rB9LipQ76usBtTGw1hkhqIK44cx+tWz60FZj/VpJU2CNvwaCr/U5/dypHAHqDVXigk4vu0itvEs74+p8uTVXkvdtzXq9i5k= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715073732; c=relaxed/simple; bh=MYbuBqfdt+dluLElLanY3jhxaBB9u5sP0QgbMlw6Cds=; h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=tpvZop5FU3mRNRiXZkq1kZhfZ5+j5qRVTYWgrlziHdX9kx30G4g5uvy6ZWpAupGys6jvor+am9/GGUkj3YiuH95iny6JJUgADGTSHWNZ5+j9saLQNql9w4dmMh91UAW676Ubrlv/8QyrCjRBYlyfSoJFtkXP3uuo3FzzAdhU1VM= 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=SMG7SAJH; arc=none smtp.client-ip=209.85.161.44 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-oo1-f44.google.com with SMTP id 006d021491bc7-5b203c9933dso1542923eaf.3 for ; Tue, 07 May 2024 02:22:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1715073730; x=1715678530; 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=MYbuBqfdt+dluLElLanY3jhxaBB9u5sP0QgbMlw6Cds=; b=SMG7SAJHNXGovld8lQ1jlyj0OeSUAhQsbGGNvlSRUMu0zai4KfRsfA7VpfDnWLwLfd ImOWkx5ToyVOiHnNKNTnYHIju7QogtZB66JRm1R9uh7qc7uaahU2bl6FcqrHn6SKKRE/ YptLXKJ19AmayZRVEkz+xKZKHTcLszWIQHDiw+MsoJDS94uZTT8zSjf36GqIEANWUXs9 2B0A1Sduc9X6bwRP5mxXYozkgOf8B7lKLj+JflLwwikbcdmuR5hA3JDWzzrqX++ZPrQw gGloHL9mUGW3Ss5opr+qATTgbrSD1tOBqvMaRlKdRzS1gehl39kpLL4Lxs9jYDaETxeh xy5g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1715073730; x=1715678530; 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=MYbuBqfdt+dluLElLanY3jhxaBB9u5sP0QgbMlw6Cds=; b=A9DObHQikEUy1K8eB1Mk1hWSUEWLl2Z54NVbhHwhqVNeLk/tHxhBcLfjJEBlvhvi0Z WMBQo5hdJ6m5G5hw78vrVk3ZBzbTJ6yw8SND0dAj4jWEPtP9Bq2KPPYekszVUYg7nh4R NUEki/KghkbYfmT3mfJh40D6X6/FyBH+ht9hCPEB9W6sjZ3tolcdNMttmXpGYRIeBzxR cyLdZhdQ70qkz7eQNpoXYN/f/pVw3GxuK4vmLDH8bjbFJ54TrlHKuC3uvhM/VFHXrKwu zMp+2Ig1dV9YuqPQfNeshnmYeY9SPfVz8AAndrNePM7jPhFWUyx7L7tTZOGEqpRpTXd+ kcsg== X-Forwarded-Encrypted: i=1; AJvYcCXQnBDnDsIOVQ6lbIJRYcWq0P2I+0vG2z1NLjvKob8cI9n8MdOMHpILNB56QMYZiF+n4yWggJwevaht0KOSJSlBqzD8sW0rp0fZZPxK X-Gm-Message-State: AOJu0YyTxP9Jqi1QTZFL9Oy/LoAB7AuylDlc5IE8z75OndX3vU0UB7ah Kp+G83m3gEDje54r0CM5m6qmkQMkZDMHppvepv860xgCHgTC61fiP24fWRvfH8PfkWJ4o3dFIs8 ZhVy9K8t16L6R6qsbmc796Era2dNE7DIwUyL8OQ== X-Received: by 2002:a4a:5441:0:b0:5aa:538a:ed60 with SMTP id t62-20020a4a5441000000b005aa538aed60mr12850169ooa.3.1715073730349; Tue, 07 May 2024 02:22:10 -0700 (PDT) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: <20240422091936.3714381-1-jens.wiklander@linaro.org> <20240422091936.3714381-3-jens.wiklander@linaro.org> In-Reply-To: From: Jens Wiklander Date: Tue, 7 May 2024 11:21:58 +0200 Message-ID: Subject: Re: [PATCH v5 2/3] mmc: block: register RPMB partition with the RPMB subsystem To: Avri Altman Cc: Manuel Traut , "linux-kernel@vger.kernel.org" , "linux-mmc@vger.kernel.org" , "op-tee@lists.trustedfirmware.org" , Shyam Saini , Ulf Hansson , Linus Walleij , Jerome Forissier , Sumit Garg , Ilias Apalodimas , Bart Van Assche , Randy Dunlap , Ard Biesheuvel , Arnd Bergmann , Greg Kroah-Hartman , Tomas Winkler , Alexander Usyskin Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Mon, Apr 29, 2024 at 9:36=E2=80=AFPM Avri Altman w= rote: > > > > > > > > > > > Is it possible that idata->buf is not DMA capable? Any other idea= s? > > > > > > > > Thanks for testing. I don't know, the idata->buf is allocated using > > > > alloc_pages_exact(nr_pages * PAGE_SIZE, GFP_KERNEL | __GFP_ZERO); i= n > > > > optee_pool_op_alloc_helper(). > > > > > > Is this really true for idata->buf or isnt the complete RPMB frame > > > memory allocated like this and therefore idata->buf not page aligned? > > > > You're right. > Maybe add an assert of PAGE_ALIGNED(idata->buf)? That might be a bit much. It turned out that there was a 2-byte alignment causing the trouble. I don't know exactly what's needed, but the amount used by kmalloc() by default is good. Cheers, Jens > > Thanks, > Avri > > > > > > > > > For RPMB via tee-supplicant the idata->buf is allocated within > > > memdup_user and therefore page aligned. > > > > Yes, that's a difference. Have you tested with page-aligned buffers to = see if it > > helps?