From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-qk1-f172.google.com (mail-qk1-f172.google.com [209.85.222.172]) (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 3F2983E639A for ; Wed, 27 May 2026 16:07:18 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.222.172 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779898040; cv=none; b=j1MVvxcXMT1oA2aQbygjPh9yugbWRSdNLRp0CjAl3LQn45pU0MXM+NJtrsplA4L4owxIxm5CAErax7XGn3SKPfNNLqSeMJxVsG32P4h1n5/sQMT0d8TK5ODfNiOysUIlB1CWtl3omekuv2xlT7ustQTSO0N6tni/PUHElAVLhKs= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779898040; c=relaxed/simple; bh=aval9P+49I+gSSuUWbQmWVLEEDNUMRnbLgYtSiXlBo4=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=Ra8eXsWb9riu8qpZG+O/P4RuBGJ/JG9NquDnEwWQ68wOmgHzOSxy2S1TVMMrp2+jhmn6y+t4xTUE8KvHTiYHx+uVSj/za8j2wy8Jdj/4GhB3VjkJD6A/iUDqt+2JZrEvLgNjtOiO8+ji4nDUsO7q9qvDiFeqQhFT+PleBQRcAlk= 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=h2tiAGEq; arc=none smtp.client-ip=209.85.222.172 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="h2tiAGEq" Received: by mail-qk1-f172.google.com with SMTP id af79cd13be357-914bf8abeaeso421532485a.0 for ; Wed, 27 May 2026 09:07:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ziepe.ca; s=google; t=1779898037; x=1780502837; 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=STKe203GtXAmunHIdMeMAq0fDblU9FAY1byc40VlLXM=; b=h2tiAGEqPW7XLlmf+UIP2CsdaNxwpGao2hDvmsau6y9jbmQGLkss8lg2/iShGVrQ0V CCbHsJ+Gl02H3YaEYuVAeMKKu4CYFPPZ4WHgdP3MyRvjtlSVBrfeSYVVISAcs64wjQrv 0ZMDQZvfcpI40i13Vy35drnRp/cTvGqTc/7OoW+57I8hUQRrwJN2o9B8pmH/LigyJqXh RLGgLtW+SZnU3XQRRPkJ7lRyCP66TkhUgIN412F/PJ44fCRBQnYj+6tEOZu30ZLzelhX C+uPQaT4h0xdOvcKo7fc3vfNGIMWPbFdEdBWNNv/Nrz86VHr4jNn4HagaZWRhH5pvN/b xF3Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1779898037; x=1780502837; 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=STKe203GtXAmunHIdMeMAq0fDblU9FAY1byc40VlLXM=; b=l2UCdtukfVXIIUXZ6+KKL5Fn5om/8x1HVg37R9S/iVmlzo2l6kY2yu4oVSz3fvtx40 UlZIigyIKHDp1iVAVWePLga28e8UMhMWoDVN4FoRV75lNX+DMigIoc0qomntoOhw5/PA I2agI3ZnvV/KDlw50xDVihfikbfJ7JO0Ayey4FqUUHrg3+FwOr7hjYw6pjzemdFeKMBN 24vrGOP/zhenKAY4MFKpHFyVgMGnRM58jkVFyJmdAXdob419KG1yXB+PW683pCdEDqu7 4tbMyc6RrbvKnuErQ7Zc4lzOZ6PYlwIgUNmpRq9l4+ok28g7da+sNGcuuK9b/4/Sd/kX bXXQ== X-Forwarded-Encrypted: i=1; AFNElJ+kJJdgqTzociPt5JhqChdZ+Ha2wuQJfglRaKtCSz5v82ojo52LWsOk7CSV7tgNlCm6e2eRTAY4ObJyAvg=@vger.kernel.org X-Gm-Message-State: AOJu0YxcV3F/dh8O3FRIfkNXGeRBbO6eulpFFLen7bs14tydsji3V9H7 CyjDuN44duWgQt/uxMUQD+3VWwsJNoKSoYa5V/JRE3QUfAgBwGT1g1TixBzeG5VlP3I= X-Gm-Gg: Acq92OEqigN6NsmhKZzakApfnYFszeGlNIlhufprpysy16rCvc7/cyavdFu1MWnS9vM K8pu4DnyVFK6nrZxOcffG8znyOvIBbXfCJNH8vlehPOKg2eXkp27SFEmMKBL+uouEOGI9gMC2cf Kb1owNvlL5tx4QVxxE00F8Lk2Yn0F9mNtbAxAg+48T7IwcZlynjziQnsxu+SGeruTXsIURvEA3a TkTt7/KLuSmUX2MUV2HCKv1EJnx2eEVU01YIDmhBDHF6vWI/vC3ikZkajGAy+Y6lk6/0DMYdBKa zmAgN0Xfh8yr1M4U0vvzytGxTR0jDRDUJViaDhi6cCl2bKbaOvxOn5hLaTDTZ8pcgpblkAOIRoT 9ZqIPRFuNh79x5HHSQRu3y40urxf25xeHkyzuIjkKoqRFw3iCStNDy0AQ1zuyHxkBw/lPAjMQKx uUpE2gIF10uL6ZE8rg58lUuUUghX8RBwcYLliQwhRt9ycpFFcELzDzVYYAw/ycVyHIjK5Ug8q7E LZqTQ== X-Received: by 2002:a05:620a:1b89:b0:914:c246:aca0 with SMTP id af79cd13be357-914c246b146mr2808635885a.36.1779898037030; Wed, 27 May 2026 09:07:17 -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 af79cd13be357-914f86e8e13sm505133685a.2.2026.05.27.09.07.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 27 May 2026 09:07:16 -0700 (PDT) Received: from jgg by wakko with local (Exim 4.97) (envelope-from ) id 1wSGmq-0000000FI8B-0NaX; Wed, 27 May 2026 13:07:16 -0300 Date: Wed, 27 May 2026 13:07:16 -0300 From: Jason Gunthorpe To: Christoph Hellwig Cc: "T.J. Mercier" , maddy@linux.ibm.com, mpe@ellerman.id.au, npiggin@gmail.com, chleroy@kernel.org, linuxppc-dev@lists.ozlabs.org, mripard@kernel.org, sumit.semwal@linaro.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 Subject: Re: [PATCH] powerpc: Export set_memory_encrypted and set_memory_decrypted Message-ID: <20260527160716.GN2487554@ziepe.ca> References: <20260522225853.878411-1-tjmercier@google.com> 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 Sun, May 24, 2026 at 11:21:33PM -0700, Christoph Hellwig wrote: > On Fri, May 22, 2026 at 03:58:53PM -0700, T.J. Mercier wrote: > > After commit fd55edff8a0a ("dma-buf: heaps: system: Turn the heap into a > > module") the system dma-buf heaps can be built as a module. The > > system_cc_shared heap uses set_memory_encrypted and set_memory_decrypted > > but those functions are not exported on powerpc. This can result in a > > build error like: > > I'd much rather revert the above commit. Yes, x86 has exported these > since 2017, but that's a really bad idea, and we should fix it instead > of spreading the export. > > Setting memory decrypted is a dangerous operations and should only > be available to core code. We should have various allocators for > decrypted code, but not export the functionality to random code. At the very least an EXPORT_SYMBOL_NS. Looks like there are about 3 modules using it already.. Jason