From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-qv1-f50.google.com (mail-qv1-f50.google.com [209.85.219.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 DB7293C8729 for ; Tue, 21 Apr 2026 12:34:21 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.219.50 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1776774864; cv=none; b=K+BClUNRVfSHnlMpSQeRADHE7bTJbiVkqlRFQssk7xjri2orA+tnejnRxgNrS07yf8idkafghRGyrtLpi0RBUJqZ8guRPd18voLdVYZosIZYADl/i9KTxMdJ8wJ4DwWTHNpsbuF5pbag6VXRF2sHXMSZ1O3oa8bkQuC0Vyen9Ls= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1776774864; c=relaxed/simple; bh=Q8hsYP0eQ6DWDsyU5uNsCAi+QF2Q/nDAhCTSIZvOTcU=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=eIB3PO/yreIGXcuQaV8hi+emsdKjQLCz0F8wNIvLigL5sRbhkIlBzi1F67HK5CfFFuRKuZFwIPlv3PSyzZBkj2D8zOyGvYR4zJwcKKQXP3ItODbPPd375Po0JAqZy6gnOMdguKAgIz4tFlz8Oy5K2DK1ErcDAGOgMw8Fv69eqzw= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=ziepe.ca; spf=pass smtp.mailfrom=ziepe.ca; dkim=pass (2048-bit key) header.d=ziepe.ca header.i=@ziepe.ca header.b=Uu0U0LqC; arc=none smtp.client-ip=209.85.219.50 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=ziepe.ca Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=ziepe.ca Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=ziepe.ca header.i=@ziepe.ca header.b="Uu0U0LqC" Received: by mail-qv1-f50.google.com with SMTP id 6a1803df08f44-8a210c813f8so29041806d6.0 for ; Tue, 21 Apr 2026 05:34:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ziepe.ca; s=google; t=1776774861; x=1777379661; darn=vger.kernel.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=tC8i24gwR219DOneSxA0k5YBvGK2RMd/jt8pfdFwqW8=; b=Uu0U0LqCF2wijcOlhmedRo/m5kaJUEReHDXVd5Qj6idOgmJA1zA7qfit+a32sHQREM 2CPc+0UzROcs/t+TZVoIVJXqaRRovcg9iBNlALIUrIbiTPghUJZ7WWBrVmXENGkZKq31 YlJ669XjqAUJZCl+GyO6NdUhHnAtsalKDGNffMmXOGAdWbXoC9QPyGHViGn/wPtV9T0M xhgN7R2w5cFo+Gkh4R+HFa+iFDadC7irzIRfvtLZhYfQpVcLUJJryU59Ulq4xBuX1o68 1fRZlROaETe3If2BpZn3rNvTjq32wapPZjPexWm6ZrzrKyUzXNN9KS0/vkSG2LvbYz0M nKhQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1776774861; x=1777379661; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-gg:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=tC8i24gwR219DOneSxA0k5YBvGK2RMd/jt8pfdFwqW8=; b=V+3U3SkmZfduZ+rPM0Tipq2pH3x54w9/nhX2U747xS5MuLfYNBCxos1eWloLQtkMpu psYpzHKjiaaBLNhAa5kWWHXghDNmK9Qad8Qg30RWj8JhaFpLOgEge8No4h5o9ynxW7D3 8G7rnf4BLhH4agl4FjOPSrICkFOVxVVvW6fcqLR6+FzOSQDC+cZA2lEOoB1acQcE/mVW +L7jW1V8KgcA0QChbAg4KQOl0oL5LqjSqHbSams8fAUivNMxRNsfBgy/wZc141DbRIol CiI5KoseCODjOehTjKWRCV6xXrIfpaaoYZkGpd8v0tQpXXFki/3q2qUJ+t2SoGF1h1EK 11cA== X-Forwarded-Encrypted: i=1; AFNElJ9wX4yubAodiyLLXtdCrkCSslVlL+8zcRmqNvHQIKORvYoNZqIBHkCsq/fq8ZYLuJ/yY/IKY/2DAtROat8=@vger.kernel.org X-Gm-Message-State: AOJu0YzU8C4b9kR6tbfcl/DS0CmEU9Ynun99zr4zMzyJkHuLQWPZ9edx iDRT2BbL0W39i8VlJ6jv9CZlR/GD1mags87WH0RhyIaD4s+l2avD3ZNJnff+S5JfNFI= X-Gm-Gg: AeBDieudi813gN+lzvlGl4h9AFbSGxNANRyUKIxqkTsNkpNOttTmVwEfRISptm+9S8A 50IXDsQTr5W/WPouU5TN6JpVEOk9/ZGKlhpwunNJQT+Zad1EiH+wYxwwIfzAICpBavkiZPNB07N iFMzp9TOAs4lCRRBhkRLpIs3+kvHUgJ0qRqi7fvtF8vgEPbZEFpIemHxbb6hL0hUyXdLL2knKBK Y/YiGW4kGYKfw8EPbiqs+8hatfqI8+wUEHizJxUdvT7u8T04lh6GTKfaTIEh/w0SUtJdg7UMfoT laRkoHebMgtJ+maxpjN5X2oMrtOQ8FWYItT6YtyoUfJ1UXb4LSQ9YoPu9TdTtRSGpZsByy4ysZx eSkJDwE4tYKNLy6d2/p5VGZkBDUL9vcBZihvs6I+qzgkOghrcBbs8osNHGDOLShtTsiy6A10x9i GLJAAbTIm1 X-Received: by 2002:a05:6214:cc1:b0:8a4:21d9:bbf2 with SMTP id 6a1803df08f44-8b02810fbd4mr262604966d6.33.1776774860571; Tue, 21 Apr 2026 05:34:20 -0700 (PDT) Received: from ziepe.ca ([130.41.10.202]) by smtp.gmail.com with ESMTPSA id 6a1803df08f44-8b02ae6133dsm99335276d6.25.2026.04.21.05.34.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 21 Apr 2026 05:34:19 -0700 (PDT) Received: from jgg by wakko with local (Exim 4.97) (envelope-from ) id 1wFAJ1-00000001McO-1C8N; Tue, 21 Apr 2026 09:34:19 -0300 Date: Tue, 21 Apr 2026 09:34:19 -0300 From: Jason Gunthorpe To: "Aneesh Kumar K.V (Arm)" Cc: iommu@lists.linux.dev, linux-kernel@vger.kernel.org, robin.murphy@arm.com, m.szyprowski@samsung.com, will@kernel.org, maz@kernel.org, suzuki.poulose@arm.com, catalin.marinas@arm.com, jiri@resnulli.us, Mostafa Saleh Subject: Re: [PATCH v2 7/8] dma-direct: set decrypted flag for remapped DMA allocations Message-ID: <20260421123419.GC3611611@ziepe.ca> References: <20260420061415.3650870-1-aneesh.kumar@kernel.org> <20260420061415.3650870-8-aneesh.kumar@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20260420061415.3650870-8-aneesh.kumar@kernel.org> On Mon, Apr 20, 2026 at 11:44:14AM +0530, Aneesh Kumar K.V (Arm) wrote: > Devices that are DMA non-coherent and require a remap were skipping > dma_set_decrypted(), leaving DMA buffers encrypted even when the device > requires unencrypted access. Move the call after the if (remap) branch > so that both the direct and remapped allocation paths correctly mark the > allocation as decrypted (or fail cleanly) before use. > > Architectures such as arm64 cannot mark vmap addresses as decrypted, and > highmem pages necessarily require a vmap remap. I don't think I saw an aswer for this, why can't arm accept pgprot_decrypted() for vmap? It really should, I don't think we should have these minor pointless arch differences. Suzuki? You mentioned it, can you elaborate? Jason