From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-ed1-f51.google.com (mail-ed1-f51.google.com [209.85.208.51]) (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 16C50387348 for ; Sun, 23 Aug 2026 22:12:42 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.51 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1787523165; cv=none; b=FwMA5E9GwyAzbudQa9Elafp4xjX5hB/9XXSmIjEAFKsFaa2+hY/GWx8j0KtxZj+VNnmJTctSi91TsOYE2OXaf2ZYobjK60b+fEi02rdJsRW1OqZggoXqzFVQ3/q8WIi2jUqR17r431mWPL+sMiXtfl12hPfwM79DTIne/MD4Tm8= 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=HtAiPHmN; arc=none smtp.client-ip=209.85.208.51 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="HtAiPHmN" Received: by mail-ed1-f51.google.com with SMTP id 4fb4d7f45d1cf-6a378f90555so4621432a12.3 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=vger.kernel.org; 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=HtAiPHmN2cDwcdR57+nVPm79Bqmt5EFmrechceL9eOdPqvtm7XlhCdN90EfvrYvC30 xyiSqLbWFXgRVJ2uF7cDWOuOSFM/OtpL9Jq06wbBN9U7hl0Z1+3VDXlwRWJA1JGakqoF GF5k0u5gF97lYRquh2NIOw3Jj6kZTKKJbn9W1dujbFmfFlYKMGyWLz7i98bVU34bfhD9 FKug+jvyVP1TCFBby0MAFYlfcWF7S2nPMhtwgA1iLzf7NwHw5j3a3vdbQVKQGzaaeqVE UAmGHSVqkpdxdl8cqRT18mdu9gBcHZrbPXo/N9A9zPnVIflAQ5qUJyxZlOEMu5wwzbod 89ng== 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=W8evbjQLN++92GB87/E9WV+ZVN1QrO5o0SnXLSES3O0nYzcVLhHsJNojMUkuzRZkbd Njvdi+xnnLl5wIU8mcycvgCan5f+1hlr64f5Yj3oDX0M6ioKhSJypk3a2mr9+E/2FDqf mCBAm0stfkwd766j+/jMRsazMI1XOqI6tvVDMlsJyAQc530HOOnDqLvg4l8tIMEzLDM3 PyCAfviH2X7E/lKQbk2Ej7/wVf0xCB4DbEBQzyjWYaN4flDlkhwBhsGSv9vHZci8CQZo 3qDJkZEuJPU/a9CIcRT9nCz+cRkvAKgAOcFcaxlEBN1NCZRXoER+3g3MlcwTC+t8/AF8 5APg== X-Forwarded-Encrypted: i=1; AHgh+Rqm81HjyiKTl0L+35aSPyUuq/e8l5ayMADTnAmm77tvdqfPuMAoNXrK6T9rAfr7Cn3Qb/bgm+/QkVkv@vger.kernel.org X-Gm-Message-State: AFuF++n/5yyzdkHwKXdOuQzfJMl2QrMufJFn74HfaXzYFLVTBM5+u5+m TjbU6sis7kSR+jlGiFChXuNjg8jLBcGE37YCKc7174Z5iQAUq7oOXJzbkGf4ZkWsn2A= X-Gm-Gg: AR+sD1239kgXWwix+aPCUZ89Fq2gucbHTSqWxNgKBPd0SPwGcUthccs/HAHSeU7jpPc r/KuCQrU1LS9fdZkLpER3vkp+KQg2hUgex0ezrJaTQZEmHApDhq/X+3ACteclmuA8ThNtnst9+Q GZ2JGjvdfZKzmLtpA6Ogr4NVGIGbXlbEE41pZhFbotcLkGiH7zhclE85N8Va9FiP4lVn0tNhxhS 7ybY868uNZG1j97vvQjd7R3I0UD0HsEgbVGQ+QVtiKY+Ix83XHa/Dwxm8JLWDsjVB4Ggmre3obV VNbJMPLqnC7CNH6fOlSYrY6V2nk8mt6K8br4PUz+MLEk1tTRHvyhoj0KmcxIWNyIWkZqmg4BwI6 Y4AaCy2S9wxococC0zdf7hWXn1fFTQCTLv0oMyXWg5Diho8Ad8FhMw6gJU01EEcs7IHLrqkZRHR 0ejFTccfZrALZUAvlsMJjIKvjLd0i8lDTYwZi3tl4hWeWzR9/BJpnw2Wiy59jYwxYoWXSNKEojs EP4 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: linux-rdma@vger.kernel.org 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--