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 2EE413DB970 for ; Mon, 8 Jun 2026 15:27:46 +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=1780932467; cv=none; b=XFakZyafjIREqkd8EJbxApXebirTat08+GrU3Idmnj24lNsLdgGROfkjEnpVty1XjO4iby0Ud30iykM1i/CvAB88bjDEPhlF5Iyx/ufsA2YcrVSoTS/eN8ealQYSldTd8BxeKAE9tsQx69/JoLsuOlUJUVTgeBhQCYY66IGfdqg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1780932467; c=relaxed/simple; bh=nCG933nQPeoFVRfOrxJzr4DbOXEyeRKLr41Z0txUjMA=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=eXdXcZ4mOxGG0kv1VFlLtV5EL/wdGjeqeYatpOESU2QFhVgeMvPan0qv/q8q+7+CLyd7QSo8zF71EqR5oTVBKf0YwMTuVUjd/2m0dlevhY9sJ/Q+ya5pW8jEteiGuJXYRZG7AKiIU/xLGmf4a+bhyB9CnEzZnra3Y+oQvqLVWQI= 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=bk4s2mRD; 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="bk4s2mRD" Received: by mail-qv1-f50.google.com with SMTP id 6a1803df08f44-8ccea53f35cso47730646d6.1 for ; Mon, 08 Jun 2026 08:27:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ziepe.ca; s=google; t=1780932465; x=1781537265; 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=UocT/uaqPPxlXiS0ZwSI1AWXKBm8Im9MW3m9ZqlaaCo=; b=bk4s2mRDkUI886TqYJXvOR3o6P+dWOfLgtNjhLDESKeN6PLQDH97E0084ruESKt42/ l4kzy/4qxUaR2w4TYe5lY618sLNJTHJsmEJxMpn1sAGzpwCs8S1XNOOD3Tk0ymKwLXhZ 7JgiovHdSlTITmqTbQFjrsad/UoOR2uRUxc1AShB99SMmmBbOy6dFTDcR8KwgeXrVMiv cYCFk8RWBidPtXfgyA6aA8LgQavMxaBNc1yh3zjnuX35e/jwpMUMlcMSScAyJooYKYsj CAtEtXjnAymv52/+lz5pH9yssdRafLPqijm7VEfiYOLHq/x6ebDdIxdFd71a9RNl1qZg 3Axg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1780932465; x=1781537265; 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=UocT/uaqPPxlXiS0ZwSI1AWXKBm8Im9MW3m9ZqlaaCo=; b=IVqzMCF+vgAHSzy4aW8tl+NpGN9mWH8aYbBaHo9IBG5YgsRQKV8zFb1ViwauPVwsP0 TT+JgofY0lLJWtEWdwjI0w47hQfDKp+W7RYxX04RZa0ciNfOk538O6B/AB7GUOwHKOoV FQpD2WrYJOWAS6IO81bw3bwakYpEgEX/ck0Z6YcLbPDxmxLr/aS3ugF3CqtS2n3I3SEK 8Ydm9wBiyuuZABvWvX4EInJ9QcCXkG7tJFPs9eb9Qcp0jy0DkBVsHD9DY+c0JKsELvDQ mSbajbsKJflNvB/c8az9R9bO++7tvbRZ9eh4PXMekJktIgv0NtlY5coDCnSgKxCaKjCq aGkA== X-Forwarded-Encrypted: i=1; AFNElJ/WF+Pd765+1RbHD++3p/2TjOndKVsKYhlxLC+tt0qY2qm57qVCweWiP10YktphIbEghStylYrAqsEeBUc=@vger.kernel.org X-Gm-Message-State: AOJu0YxWMvuWHc5LsbUTIbZWsyr98ytQPIdtURoTDirYt+y4dmav3v0U J5QNgZcHjguvUHMyKuO9qoka9H3FvmbX1jCpnUNNBmAsiIFlQejtBz+RjiKKYOszuWE= X-Gm-Gg: Acq92OEA6LtFbEV5CBo1rIDIS0+uSHCP2Eup6D3UXShGaDRoOzBOvAsUtunELM0FhU4 yM8b2miDwEVgbG5GRA4lpyvYpc8URQas3ly4uKV9UOC/cJcZuMMovxTpacQqvPF93Is0QVmAbCy n0OL4l/z/HrqDGLp2rx3BzMMEN1h5l99eubZY6Mo5JkpR53uI8B6jcRFOB37tuoPN6TSWoDByGh vWvBWllObehaZY5kSICU3Ff0OTb/lPu1gLlmy+eHzn1n9HDkOijWCGrFoQqGMApctt7fpqi0myO 4PEsAi8xg9KrOGVBAYQ/Mz4Y2UChD4aS7Nb6ZYfV7kdtxWJMwhS7ylhv6bm+XArsGz+x+Pz/HtS /TiuJCHX9wRf+LhMDpIg9hC6pN/IyF2BwFljJ0CpUS3R5cSYs1P+GpfNZz38xH9tf2TsRH/dRAS GFjuFruR12BAnF2m2oLQIpXz/O+KL6HpmWSU2HKSYZOXzud8DQ1F3oztaPlJfCR9a9sli4lSSEl kQZjcenL9zximz8 X-Received: by 2002:a05:6214:4e09:b0:8be:7779:d1b1 with SMTP id 6a1803df08f44-8cee6252853mr236200376d6.30.1780932464978; Mon, 08 Jun 2026 08:27:44 -0700 (PDT) Received: from ziepe.ca (crbknf0213w-47-54-130-67.pppoe-dynamic.high-speed.nl.bellaliant.net. [47.54.130.67]) by smtp.gmail.com with ESMTPSA id 6a1803df08f44-8ceccda0611sm170331636d6.1.2026.06.08.08.27.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 08 Jun 2026 08:27:44 -0700 (PDT) Received: from jgg by wakko with local (Exim 4.97) (envelope-from ) id 1wWbt9-0000000HQjH-3xEo; Mon, 08 Jun 2026 12:27:43 -0300 Date: Mon, 8 Jun 2026 12:27:43 -0300 From: Jason Gunthorpe To: Sumit Semwal , Jiri Pirko Cc: Maxime Ripard , Jiri Pirko , Christoph Hellwig , "T.J. Mercier" , maddy@linux.ibm.com, mpe@ellerman.id.au, npiggin@gmail.com, chleroy@kernel.org, linuxppc-dev@lists.ozlabs.org, lkp@intel.com, linux-kernel@vger.kernel.org, iommu@lists.linux.dev, linux-mm@kvack.org, agordeev@linux.ibm.com, gerald.schaefer@linux.ibm.com, linux-s390@vger.kernel.org, Dan Williams , Tom Lendacky , x86@kernel.org, Arnd Bergmann Subject: Re: [PATCH] powerpc: Export set_memory_encrypted and set_memory_decrypted Message-ID: <20260608152743.GD2764304@ziepe.ca> References: <20260522225853.878411-1-tjmercier@google.com> <20260527160716.GN2487554@ziepe.ca> <20260604-dangerous-tuatara-of-sympathy-28e05e@houat> <20260604135712.GV2487554@ziepe.ca> 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: On Mon, Jun 08, 2026 at 08:47:15PM +0530, Sumit Semwal wrote: > Hi Jason, > > On Thu, 4 Jun 2026 at 19:27, Jason Gunthorpe wrote: > > > > On Thu, Jun 04, 2026 at 12:51:49PM +0530, Sumit Semwal wrote: > > > > > Given that Christoph's objection is not really about the modules part, > > > but that the set_memory_{encrypted,decrypted} should not be used here, > > > one option is to revert 78b30c50a7ac until that issue is sorted out? > > > > Please no, we have stuff already using this so it would be a > > functional regression. Revert making heaps into a module since that > > doesn't have a functional regression. > > Thanks for your comments. > > To me, it looks like while system and system_cc_shared heaps share a > lot of code, their user bases have different needs. It's apparent that > system_cc_heap users don't care about it being a module while system > heap users would very much like so. > > I also discussed this with Arnd, and he suggested we could rearrange > the code so that system_heap_cc_shared_priv depends on a new Kconfig > symbol like > > config DMABUF_HEAPS_CC_SYSTEM > bool "DMA-BUF System Heap for memory encryption" > depends on ARCH_HAS_MEM_ENCRYPT && DMABUF_HEAPS_SYSTEM=y > > This allows building both into the kernel or leave encryption choice > up to the consumers of the system heap. > > If this is agreeable to everyone, I can post Arnd's patch. Yeah, that's fine for me for now Jason