From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wm1-f44.google.com (mail-wm1-f44.google.com [209.85.128.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 79BC83815CF for ; Tue, 9 Jun 2026 11:43:55 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.44 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1781005438; cv=none; b=Khyo8f9gnCFImsA0NolN/4GKv9G04ErINxJJf3TvsLqILyxns1EH9eGPjvLDx9TbUwYIGHL3EvctFV2+MDc+v72zrDKI5bGSu1rHx885/Nh2I135013sKgzgxwEVWS/+ii/l/beLRYpEXftWsBYDPiH/Kw2xREe5Ak2X/h/nItE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1781005438; c=relaxed/simple; bh=8JzEEDqHZUshYgNBjU0C/8tQ2nLf8nxqQ36wmE+xh9g=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=DL/rY1gQ1JoxPjjAlssaeKBs4Q1qiLhZs9l2fUVRn9ifDxcN3drYCPobiyalURRz8CBuM48Vpjl0yrMJbf6PIeThd1sYaWRXVkIoMjYs8wfU26J1bKXaLNl1iV9pURIkXH32AyjYnU7HjhbTHfpIEs2bBDU4grdozNLKjzRjWT4= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=resnulli.us; spf=none smtp.mailfrom=resnulli.us; dkim=pass (2048-bit key) header.d=resnulli-us.20251104.gappssmtp.com header.i=@resnulli-us.20251104.gappssmtp.com header.b=QP1I+Rd9; arc=none smtp.client-ip=209.85.128.44 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=resnulli.us Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=resnulli.us Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=resnulli-us.20251104.gappssmtp.com header.i=@resnulli-us.20251104.gappssmtp.com header.b="QP1I+Rd9" Received: by mail-wm1-f44.google.com with SMTP id 5b1f17b1804b1-490b3e03939so45272185e9.1 for ; Tue, 09 Jun 2026 04:43:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=resnulli-us.20251104.gappssmtp.com; s=20251104; t=1781005434; x=1781610234; 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=h2j6CzARsoMyv7N0DLitThZjZq+4w2DpaYqL8Xb2hr4=; b=QP1I+Rd9QKCqO+ixFkXXVYFReUps+TElzGWriC2WPhG1fwvo/SwIbdBoxwjFrWPrwB h6Mj0S3LXkUXnt2Xe4uZ7DffdljuzjzrorzN5APk1wsBLJtSKciVnsTePZRu+Z3kGmrG rWHRKNhBuLoC19/n5ct/a55Zn3YpNhQA6KhkzhMgTDEIpCA0eZyEUvQei53DRH58vcKY q61PQnduoO3bx2mdng3CdRHdLm9Pg51Pw1SItgWYmkzJMl6MGhfH5NAxchXz8loKdGfH Z/WcNPb44zFnZ2uYXTKHO+d4SheOhRY2drweBdthmnY5hafG2QBsCAZuNV50RTXuUQlt sF6A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1781005434; x=1781610234; 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=h2j6CzARsoMyv7N0DLitThZjZq+4w2DpaYqL8Xb2hr4=; b=fYW6X2D1m7stxvknGCHEvVErVShWc01YPuOhlt+PFA8TebjXvTS/T1TbHFHIIVzTeT aB5HeVgdW7SR5VVtFbIjNHmi/8mK1hiBgBWbGD7AOlGLz2RecvZ6C1oJzxfiMjMTrH+/ dqV3KaJs0JEYlxtrUc6z+YRI+D/4V5BZDpkM/7xY+7QJSs9qbvaE/Pnj5VnMtUzbX3EF PROFcJzv+bX+HlN5j4J+PxIfCR9e6nTJUJ9LQ4Pc51vuGPco+txqgRia8XmTB/hEVnLw D1Q4XL4LjDJ/oG3DKY7oKnbfcnAVztNH2w6yqjEseV3NY31kEGtv0i1A6M3pwX+JsS51 pwgg== X-Forwarded-Encrypted: i=1; AFNElJ/QjxtQgVVeu4BahL7eh7Dg9nkjQh+uAL54CgRebE4EdImVWDqTUq5JmjY+UHL+2PEJi4ZhiUKEiGOW9K4=@vger.kernel.org X-Gm-Message-State: AOJu0YxvyE3H2ziD4Zj4b4pRT2/3ccTyV7aQ2zSiJraeaiS5RZPueiXz zTPMwdk7UV76Baipl5IPbiAD78ONX/49piYe7XCBVgEvnVhynsmHbIB7Mgy2xHOFG7U= X-Gm-Gg: Acq92OEVEPrk1c1a8ygX7o+UabT49deSbCUe764GL17QrV9i72sb7amOkwuPGCchok2 M83mLi/glNDC9d3o5xVxKDc1dgeQvSRiDC78CGWAPvmbPJdj2qADuwWLISZlCx8dA9GxGcEh1l1 mpUvvFr3gEb2iDvIufgclq+M8S+PZb8OVJvb6moTww/JJJGCQjIfyuXnGCgjx6LjXk7zEN+2LHF GJb/u+ZvJs6lGTOAsXukot/iXCIA3ADkOIwZWwPbVU6BRlOHhFQNA2BnvLDadg2oKzeY239d3MN O0MMWC8w8FOKvUJ1EKxUjjIHKJyer8J+h9/cUuSmAHYu0VBkr97DFph32EZ5IIaySJ7yX6GES/k AE5eUAY3OqH9cuOGh1zFGOPSfCi8MmYLzLX1QKFz42g6PUoz39Zb/wEm13BDY2POdO6Tfh8A4I9 G5PhK6+aH82IhgQ4Z0as/rwzvrAWEV9Yk6qc7WKS0OU2Zia1oFxJfTpA== X-Received: by 2002:a05:600c:4750:b0:490:9dc3:3483 with SMTP id 5b1f17b1804b1-490c2cb81fbmr232851615e9.2.1781005433488; Tue, 09 Jun 2026 04:43:53 -0700 (PDT) Received: from localhost ([140.209.217.212]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-490bc3b5b06sm432012895e9.3.2026.06.09.04.43.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 09 Jun 2026 04:43:53 -0700 (PDT) Date: Tue, 9 Jun 2026 13:43:33 +0200 From: Jiri Pirko To: Sumit Semwal Cc: Jason Gunthorpe , Maxime Ripard , 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: 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: Mon, Jun 08, 2026 at 05:17:15PM +0200, sumit.semwal@linaro.org 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. Sounds good to me. Thanks!