From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-qv1-f42.google.com (mail-qv1-f42.google.com [209.85.219.42]) (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 5A98A23E35F for ; Fri, 23 Jan 2026 19:12:27 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.219.42 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1769195548; cv=none; b=N0DfAXT7vEQwsDkiRohQaUJpJF1uOx32FvF+eqI/6Xqhbjoz+Bd0p9QW65D8uf8m2W3WQVo6KbJxzhxsKOpk5pXBqj3zjN8VTqJ9lE2wWeyl2u5JA3d6VAtCBECElmrrjEr5aS3VgZEZrAF/q/9swrgiI8b6za5/tLJV8rwnHpk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1769195548; c=relaxed/simple; bh=dwNTImMJO2gHVlejeQ8Ezs9GSst86dOsrCCdrs8fh6Q=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=bj/fW8liVi7AEE0hjhlhVikZ2WsXDzDKk/PceSG/Qvq6OqI5NmCGg2OdOCur6rqyjruD2kGxL89nKuf6JKMsXPkcjQE9V4D2iWm8FVKzmDxkyq8GnWt1hWyUX3txccv4HOPVckfj8hSrzXWBQRPWtWPGKpegVyGLGsKPwOyE0eg= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=gourry.net; spf=pass smtp.mailfrom=gourry.net; dkim=pass (2048-bit key) header.d=gourry.net header.i=@gourry.net header.b=A1tjVfI1; arc=none smtp.client-ip=209.85.219.42 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=gourry.net Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gourry.net Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gourry.net header.i=@gourry.net header.b="A1tjVfI1" Received: by mail-qv1-f42.google.com with SMTP id 6a1803df08f44-88a2e3bd3cdso32217226d6.0 for ; Fri, 23 Jan 2026 11:12:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gourry.net; s=google; t=1769195546; x=1769800346; 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=iAb3V8FwAoFt+i7QIjKEQtHflVF/O2of2sgUimojvUA=; b=A1tjVfI1/YSIGghnUuHAEIFbcLGo8l5KYHiHmJMb6V1pi0OST81qkNHZJQVi1fwWzT ujEsqPso36fMBDQmlnB86+vxjK+V5pHg75bQXWrPmgafA80jJAOPJFcmPwgolnmkGV+x yNpVG4NmynCS1O2pqmZmvAN3x1Ftqh4h/WhNJthB1hCmn4mOVdZemTQfbIcEvrYWGkbJ Gz/FziR/F8qJ+5uxvRUdsxgoXhO+NkuDdtoQEewdJij2oGUrdnUfDyQcx9gu5s+pOD2w 2l0FhLX+8hKHFzWWA5FBdZGhXNIJTi5IPBWK9POvsVE8gTD2R38JMam8WMjVTw4uxPu+ 94CQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1769195546; x=1769800346; 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=iAb3V8FwAoFt+i7QIjKEQtHflVF/O2of2sgUimojvUA=; b=T8j9lUin9cZsPV8M1A7rVKzVw+YLvFgYA2kjvaBUINp6Va7DMpV2dGRMXM2HpM4Szq JWu9GKszEcX+8me2qq+ivWQxiRFtplAttf5MzpC1clq1fSN3HWX3zJMtPgLV6hQcOYuz S56KsaAwqq+GOPdlg0fZcs9BqesqVfAGe2WcBx/8dAxbYYFS2On2lG8cSb8FhzBm1lm+ 53GAyO2Mgg/ZlPMIflqg1zBo+0bB6O8d8caoj2jSKNWvXTxj21MZU0M48X+1Bp4iTy2l 3IGRV492SGBHiJXgobOJ9x9pg4rED2ShGSMaeKajaoWphHWD3HM8mJdqmNfDBxMEhmnB S5ZA== X-Forwarded-Encrypted: i=1; AJvYcCXfTspVViGjBxK8RSXQcT9p966cl1XwtuAZnSPrLn6qJC/qqd1hq+4naQM2RICcKhcZz98Qn7FXvNWeghg=@vger.kernel.org X-Gm-Message-State: AOJu0YzssI7Bl4APD4ShlvnFx5dQh6xdZjulvYZNz1dwyg0xdTCVlkdM 4ffGEPCLsLAEzbHYEQu5k2P3+yG9f5sraY81hXxUj+hk3xb10qz9t7o/f2M3wAg1zTg= X-Gm-Gg: AZuq6aLG65TNiTxrC5U7rplSKS/BDDGK3L9Qc93aIOX289Liq6C507e9J/o2xo0k5iW 0ozng7MDGCsic/U3PwtVWqUiPuxReJF5X8mSGEFFPBkGgv/72U/oImd9EqFyN65gm5EIVS7VHU6 SA7cFgYG0v8fbkmdMG6D6Xa9nqJC7vjX/I/OaBkML8ZeOio3mMYd8t/HmpD/t0mXHoYH+cr4/Dx q576g6s3HSAnkkJK5OxUcKsdaR47g1HN4ZVWzayKJSDPeEEFW6Ro4a4WjYNjjQ8i2suVCu6JbFu i/vOwXdlGE/q8vaI8LJC9tdV1r8Pk1XlH+/blGjiFoSIDdW2TyiIywmEdrPD6C2rPv6lRGsxMCF zQ16vGXdWuPnxIqCBy5DDKhCIttluDJ7YpzR7A66R45ekHkCiOTM+xeRE8a19h1S3HJMiwHAxyZ ZpKfEfsjjQEv+9sBC/ah9R5Wu+FPP3XNOTws8hnP+BWNayliJKrMMz8oErPHZVDXfuQ5Lvo5Lh4 CDKEZg8 X-Received: by 2002:a05:6214:3008:b0:88a:2ac8:9b3 with SMTP id 6a1803df08f44-8947df771admr103884956d6.9.1769195546348; Fri, 23 Jan 2026 11:12:26 -0800 (PST) Received: from gourry-fedora-PF4VCD3F (pool-96-255-20-138.washdc.ftas.verizon.net. [96.255.20.138]) by smtp.gmail.com with ESMTPSA id 6a1803df08f44-89491823cf0sm23001816d6.8.2026.01.23.11.12.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 23 Jan 2026 11:12:25 -0800 (PST) Date: Fri, 23 Jan 2026 14:12:24 -0500 From: Gregory Price To: Jonathan Cameron Cc: "David Hildenbrand (Red Hat)" , linux-mm@kvack.org, linux-cxl@vger.kernel.org, nvdimm@lists.linux.dev, linux-kernel@vger.kernel.org, virtualization@lists.linux.dev, kernel-team@meta.com, dan.j.williams@intel.com, vishal.l.verma@intel.com, dave.jiang@intel.com, mst@redhat.com, jasowang@redhat.com, xuanzhuo@linux.alibaba.com, eperezma@redhat.com, osalvador@suse.de, akpm@linux-foundation.org Subject: Re: [PATCH 3/8] mm/memory_hotplug: add APIs for explicit online type control Message-ID: References: <20260114085201.3222597-1-gourry@gourry.net> <20260114085201.3222597-4-gourry@gourry.net> <4520e7b0-8218-404d-8ede-e62d95c50825@kernel.org> <20260123182526.00005ee8@huawei.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: <20260123182526.00005ee8@huawei.com> On Fri, Jan 23, 2026 at 06:25:26PM +0000, Jonathan Cameron wrote: > On Thu, 22 Jan 2026 19:34:10 -0500 > Gregory Price wrote: > > > On Thu, Jan 22, 2026 at 11:41:24PM +0100, David Hildenbrand (Red Hat) wrote: > > > > > > Right, but I don't want any other OOT kernel module to be able to make use > > > of add_memory_driver_managed() to do arbitrary things, because we don't know > > > if it's really user space setting the policy for that memory then. > > > > > > > Ah, this was lost on me. > > > > > So either restrict add_memory_driver_managed() to kmem+virtio_mem > > > completely, or add another variant that will be kmem-only (or however that > > > dax/cxl module is called). > > > > unclear to me how to restrict a function to specific drivers, but i can > > add add_and_online_memory_driver_managed() trivially so no big issue. > > Is EXPORT_SYMBOL_GPL_FOR_MODULE() enough? > Is the issue just that add_memory_driver_manage is `extern`? If so yeah, i can just do the EXPORT_*_GPL path. If you prefer FOR_MODULE, then yes I can do this. ~Gregory