From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-ed1-f43.google.com (mail-ed1-f43.google.com [209.85.208.43]) (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 1B45D3AE715 for ; Sun, 23 Aug 2026 22:12:42 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.43 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1787523165; cv=none; b=a6xTxNXy5tevQ4mO56bSjY5BvZcwJ9Yl7c8lO+DwAzhV66Vb3waczTQPvtaxEQOGVfcZ2tnHxCowwJAEYGrnmN7L2oaQvnKFb70tSK1rH2Zv5TU5XbuwVIhD1npAwwnonGDAMFESr+5/R7QJVrCodLk7pvq2Gg/yxo3zxIBFKLQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1787523165; c=relaxed/simple; bh=GqPg7liRNMqrm8j4qggfPJWb6w6iifsnP6+v+SgJcSk=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=UJoLWNww6ir0/qNi9RS4Mv9hPhkZMhwfT/sJczH1hYBvhxK6UfMEPJxhAGPYmKNT8MR4z5zK027vRQVjFvsVsszpL91vk9cOayryfdYuFUeP0e7dJeCe/sUF4noDfT3SKjjuhx6aZB/FbHhLB8q5MYE0Fg3TFsB+lTb5J9fhUPY= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=baylibre.com; spf=pass smtp.mailfrom=baylibre.com; dkim=pass (2048-bit key) header.d=baylibre.com header.i=@baylibre.com header.b=FPfqc06J; arc=none smtp.client-ip=209.85.208.43 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=baylibre.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=baylibre.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=baylibre.com header.i=@baylibre.com header.b="FPfqc06J" Received: by mail-ed1-f43.google.com with SMTP id 4fb4d7f45d1cf-6a38098734bso4955053a12.1 for ; Sun, 23 Aug 2026 15:12:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre.com; s=google; t=1787523160; x=1788127960; darn=lists.linux.dev; h=in-reply-to:content-disposition:content-type:mime-version :references:message-id:subject:cc:to:from:date:from:to:cc:subject :date:message-id:reply-to:content-type; bh=//7iEXuM0dwaErrYwlxiIsbco7Xb10BSWAJJRQqIeEQ=; b=FPfqc06Jb3ITFgV1DG3qV2CPOcxOxTNhFSrjBwOPkCMCz17ZRp2+6V4ZbQ7XLsPcTO R9V+oRekps23w4ZcqeUA/y9rlEwc3KNa9ansJxDTz07/jmKAI8p+Nn0iMZ+DLU5KvqaS taIQxLGjXIJfNOK9CX40J4vLOtu6zKpzgO0RMTbjZCQMBdk1Lsae7fP3EMqgTxu/ggju E2Q2vtWA5pqCjAt3KkpzWycNCJqqwIDrur4h4E7Z2+3n1n3X0uF6TUFmCl/FDYiV34iz KGpEShIqs4vS7RNaGkqwNTjm1V5otMFKFYo0df0tl3zH2/l7yzYKHt/Ftv8hxAMFG9R5 kICw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1787523160; x=1788127960; h=in-reply-to:content-disposition:content-type: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 :content-type; bh=//7iEXuM0dwaErrYwlxiIsbco7Xb10BSWAJJRQqIeEQ=; b=CAK0ZOR2RnIzuuL3lMm6zMNA//AHM6sY+rKR5sFe+UuZBl7hD60nXbfW3srx8fb1xV OuRjGkYMg7QGxNwXvItbcGCQX1U72B17r/Ruz0AinONE6AQfnWTrNKnx/gC/NH3nW+Fd Jl8ocUQwmdG2V1knSqYAIN3VXsl27cR30uWfDolSlbEdPXAYKdGEtpKSaBPBJTBQDOOD HFjQMDvZL0ZuIyfubCOKi3SkaSAJoMVlWvrKOQIkVEywTgW/fR3LJLrvDbyZpHihJZ6V Dst69d2OIvZVQ53/zjkY/6Vcz83eS9tOjLWrTBuDKkpf9O0YBAckHSc4Vr3EKI3abClZ arVA== X-Forwarded-Encrypted: i=1; AHgh+Rps39Ngb1DXZ46v6pwTs8jg5o9ETUC8PBb71P6BO8XW7EFEC+1Wprxnjw+6c1aQU8Uqxn9Pm7Qx8AEOfmiQCQ==@lists.linux.dev X-Gm-Message-State: AFuF++m85JP2DmDABngW8POASRxHTP3nOot45gyE8bjWkE6EI4n9XiQH QQvfSbLOUxdvS269RRYRdIrCqtefkj8yWHOx2+nL2DK636pH71CaOkuGNR8nR8amEPc= X-Gm-Gg: AR+sD11xnpBaOa8SeNAnZKJOr61BAqcr+yLddhx9BtCZkP+p3B3H/CdY6Cr+ILq8ZgC 0uiajBxgB1jV9+ftE49GJbbzuvex9LWIGOiw/AcoqPlkxc0P9SPQha0oMMWsf9UUWIKBSJzud7v XVwR2qzHVmLX+rnkJiHecuNF1j5aWgDLYJdvaGOG90t43wZYwS+yAYHa1ZIFf2dV2Mk2zOvHRW4 JoDXdYMXtRo0S2K7jN/A+sCSc37wpiHStCqj9rQYVJhbWh/U/pmXijvS2bBL0B8lzKIEpo7qds/ 34auggFWzBomH12iyNcPnm9Dvf2+fHhoRWNHqzfXGIoOhsJRl//NwriVyR0Gz4Nuj0BR64UYGep W3u2+edd3wMLNMDUWE8V5699WHwaeAUL3djOMOC4UhuV6GsKLSIxJfmlP0/GbyxWe1bI0vwB63t 9Ep30KHyPstIvTpfiwSTdcmvT8sFI/aJYBnZtj3waIUH6OF527kGnDYsQcbupxAfXwCSHbd8+Dg qwD X-Received: by 2002:a05:6402:505b:b0:69c:811f:8f5 with SMTP id 4fb4d7f45d1cf-6a42f1b9325mr25356134a12.6.1787523160405; Sun, 23 Aug 2026 15:12:40 -0700 (PDT) Received: from localhost ([2a02:8071:56d1:2de0:1d24:d58d:2b65:c291]) by smtp.gmail.com with UTF8SMTPSA id 4fb4d7f45d1cf-6a59e00108asm7547158a12.2.2026.08.23.15.12.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 23 Aug 2026 15:12:39 -0700 (PDT) Date: Mon, 24 Aug 2026 00:12:38 +0200 From: Uwe =?utf-8?Q?Kleine-K=C3=B6nig?= To: Mauricio Faria de Oliveira Cc: Kees Cook , Joel Granados , Nathan Chancellor , Nicolas Schier , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Simon Horman , kernel-dev@igalia.com, linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org, fsverity@lists.linux.dev, keyrings@vger.kernel.org, bpf@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-kbuild@vger.kernel.org, netdev@vger.kernel.org, linux-wpan@vger.kernel.org, lvs-devel@vger.kernel.org, netfilter-devel@vger.kernel.org, coreteam@netfilter.org, linux-sctp@vger.kernel.org, linux-rdma@vger.kernel.org, linux-s390@vger.kernel.org, bridge@lists.linux.dev, mptcp@lists.linux.dev, rds-devel@oss.oracle.com, virtualization@lists.linux.dev Subject: Re: [PATCH RFC v3 03/13] sysctl, mod_devicetable: add macro MODULE_SYSCTL_TABLE Message-ID: References: <20260819-sysctl-module-aliases-v3-0-aab90569365d@igalia.com> <20260819-sysctl-module-aliases-v3-3-aab90569365d@igalia.com> <4e3eaf1d3419e808be046035f114bf6c@igalia.com> Precedence: bulk X-Mailing-List: virtualization@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="6dsww6grbwx7uy7i" Content-Disposition: inline In-Reply-To: <4e3eaf1d3419e808be046035f114bf6c@igalia.com> --6dsww6grbwx7uy7i Content-Type: text/plain; protected-headers=v1; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Subject: Re: [PATCH RFC v3 03/13] sysctl, mod_devicetable: add macro MODULE_SYSCTL_TABLE MIME-Version: 1.0 Hello Mauricio, On Sat, Aug 22, 2026 at 01:57:24PM -0300, Mauricio Faria de Oliveira wrote: > On 2026-08-22 10:41, Uwe Kleine-K=F6nig wrote: > > On Wed, Aug 19, 2026 at 03:16:16PM -0300, Mauricio Faria de Oliveira wr= ote: > >> The MODULE_SYSCTL_TABLE macro emits a struct module_sysctl_table varia= ble > >> with pointers to a sysctl table's path and entries, and table/entry si= zes. > >=20 > > That new struct doesn't seem to contain any pointer? >=20 > The struct module_sysctl_table fields .path and .table are pointers, > although with kernel_ulong_t type so that the same 32/64-bit size is > used in file2alias.c based on KERNEL_ELFCLASS (and not on the host, > which might differ with CROSS_COMPILE). Cross compilation isn't an issue for the already existing device id structures; many of them also contain pointers. (While modpost doesn't use the pointers, the size of the structures must be known to correctly interpret the arrays.) Also sizeof(long) differs between architectures and I can compile for arm(32) just fine on amd64. Additionally there is hardware out there that has sizeof(void *) =3D 16 but sizeof(long) =3D 8. Up until recently I worked on mainlining that (and it has business reasons only I stopped, so I guess and hope I will continue at some point in the future). See https://lwn.net/Articles/1037974/ for some details if you're interested. I would be great if your series didn't introduce a new obstacle for that. > >> That symbol will be handled by file2alias.c (modpost) with the changes= in > >> mod_devicetable.h and devicetable-offsets.c. > >>=20 > >> The option macros MODULE_SYSCTL_TABLE_{DISABLE,UNIQUE_ID} can be used = on > >> a per-file basis to disable the macro and change the symbol name patte= rn. > >>=20 > >> Signed-off-by: Mauricio Faria de Oliveira > >> --- > >> include/linux/mod_devicetable.h | 7 +++++++ > >> include/linux/sysctl.h | 42 ++++++++++++++++++++++++++++++= +++++++++ > >> scripts/mod/devicetable-offsets.c | 6 ++++++ > >> 3 files changed, 55 insertions(+) > >=20 > > Please put the new struct in a separate header. Apart from not being > > about a device table, I'm currently work on removing > > . See commit > > ad428f5811bd7fb3d91fa002174de533f9da94d7 for more details. >=20 > Sure; I looked at that earlier (thanks for the instructive commit > message, by the way) and found the new struct to be similar to "struct > cpu_feature isn't really a device_id struct" (not moved), but apparently > missed the trailing "fow now", which is clearer now. Fixed for v4. Yeah, I didn't move that because it was an outlier in the header as it's not a device id. IMHO it should go to something like include/linux/cpu_feature.h. Best regards Uwe --6dsww6grbwx7uy7i Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAABCgAdFiEEP4GsaTp6HlmJrf7Tj4D7WH0S/k4FAmqLcFMACgkQj4D7WH0S /k74fgf+L2E+C5s7/Uv60MggM8SluqqYOIYVRQMrJ0YZ292Po2lSpcrxuhUuQU2B oXhO4fsc1HgZsK331x/O/bMuTOPLltQaKOsxLiMi24UglNQqmujyzSUFLnsr9NlL 1xjI1icd6tMaie8k1PK7ynotnvtfYE9Fbl/52MAUgNFbTbWqnaXhNv+fzm/C72Cc xjp+GuDi0DimbriiFBYP3aUccUEUCgsrwh3Zwss3iQSaV2gZ3Y+jYlUBB3YlBSZQ +m5a8ZWC4FeqCD+8NXyqc01adbOF9gkilqmoa2KsUhRY9+jPqn0pQhpfPxEl6Lf9 /YNG96sk855Er0BHcQ1R8Pg+AcsRrg== =t37g -----END PGP SIGNATURE----- --6dsww6grbwx7uy7i--