Received: by 2002:ab2:7855:0:b0:1f9:5764:f03e with SMTP id m21csp1062640lqp; Thu, 23 May 2024 08:02:15 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWZCrB4aDhKJVTtUffsKesi81hp/peE6Zy7CLPVRfsNphfAWasBApw8IKGVVlKcmLhln45lwqlfhQcr8CvHyqyd/vAtdwpE/rxodeDFVg== X-Google-Smtp-Source: AGHT+IFYkHk7Wl1Fgct0OWYtahpX1eq4eAxBd2a8PvbbO+HFfUXvBt1cYEynhlcwJR4GABiJOLO7 X-Received: by 2002:a05:6402:3224:b0:578:350f:6a7a with SMTP id 4fb4d7f45d1cf-578350f6ademr4032266a12.20.1716476534824; Thu, 23 May 2024 08:02:14 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1716476534; cv=pass; d=google.com; s=arc-20160816; b=f89deySrEBH0KeICZrnKuaht0KrriXIEfiIfCrgYFUaRZoDChQQPIpObdR7lApEXnB SLs1g16PhAheGPBeBj1QqKpIZ8H5K8d2aXtKF/IaOOMpeB7K7mdkFRPx9sz6xdM4kvAX XlLJ/7e0lniuNZoJe4icjC0tKhxOwrTsXaGQSCdQnXkBE4ekgpYUh2SoibeZFDIvX/Br fV63zS9qkKOjwoV/5KSHvEjp4NpaE/Q6p0fmGs2864RHUdFvEsaCUvZHxYZRlOCd0pRQ PLvDDTzrYV8SO0Kx1xyyNe8vAcTGHVlkkMeRgqkGa/BPJJOkXnanWySvIjj2yAl7lK+C 4Yvw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=subject:cc:to:from:message-id:date:content-transfer-encoding :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :dkim-signature; bh=l+cRRUI079mQjYRYGL5X49JV8C2BEv35e9AQy/XB5R4=; fh=1By0FnqnIGMm9FvOQXY45vLMU9MwKA2ZZVSWvCjwqC4=; b=Okb8avFTfYup5VJw0gLnHiKvJ7kyQorEvKCc2isHa5T7IQ8JGYGodPpVWdcwqDLbHa bQ/fEbeK0l6sqm7HNJB1B7zVYU6suKSt8d6jYmxXcQ2XkrO+uZ15kYWWYpMJfL4ekLMI rHdpFwWNnK7nkMgBlVysV+4+dmpt2BZimu+LaYLzE94qVr27HNIcgGBUNfdOTlRPQq47 8dKuRV6fIfCc7zEkEhXU9AiJSHm9/C3nxf+gPmrBC92AYBa9sVzEm/RYVhtmkWmp6B31 L0Ob9z0FdPeb7kQe5F2BdiiAjUVCw7A1E9LLBTWOxBPClZsVbEnN7jyxFPAdOycvO4J+ S2Cw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=pFRp+sUa; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-crypto+bounces-4363-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-crypto+bounces-4363-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id 4fb4d7f45d1cf-5733c3271e2si16204393a12.388.2024.05.23.08.02.14 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 23 May 2024 08:02:14 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-crypto+bounces-4363-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=pFRp+sUa; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-crypto+bounces-4363-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-crypto+bounces-4363-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 8C6571F224BD for ; Thu, 23 May 2024 15:02:14 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id A7954125A9; Thu, 23 May 2024 15:01:53 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="pFRp+sUa" X-Original-To: linux-crypto@vger.kernel.org Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 602131170F; Thu, 23 May 2024 15:01:53 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716476513; cv=none; b=OT+2KIDziOKHemeuO/qEryfwk5WQ3TLNv/YRs5cdpJVNmZLnj7DNJF7lpHtA/fftFhuuVVQbQdq6eKNyTScuU5YwXUXlOlyOE0q8aTCLnOGU7aCQ3CKdHbVVMpE/JksbQNMKnwaudyfzDvFIQzyZ6+p3ekZSo+PjjsmYd2mpe0M= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716476513; c=relaxed/simple; bh=gcY/hpUgGlbWTO7iFEHxWUYAgr45cIvkuGeBIW4nKhU=; h=Mime-Version:Content-Type:Date:Message-Id:From:To:Cc:Subject; b=PB+FXWbaHNnXaG7cMWFUEHLQbobtH7c9CssPTIgVQAAkG6irlPxHWz2Wu2fPs4sZrSb2r6SNu5h9+Xg3GMNy8U9XtJuaypM+bhKjdG72xaV3viNe8tnzgLJ+G8rjBhtCPuQavn0J1I7TZBUZn6ctC79NNlLbgKPCkwbOtr4YZFI= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=pFRp+sUa; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id A0910C4AF50; Thu, 23 May 2024 15:01:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1716476513; bh=gcY/hpUgGlbWTO7iFEHxWUYAgr45cIvkuGeBIW4nKhU=; h=Date:From:To:Cc:Subject:From; b=pFRp+sUaL6h39QAKlKhUGL4spDcoS7nRBaqqesiCJDG5stqrQmhVBqvI7SP4A7D0t vH7dYN9B7zvTI0coiNtpYUgQy9U1LdV4XZrG/K7pe48ZengVlRR6jzTjpueXfHgJz2 d92zwuVHgEU/ZxS7JNrb6EjWLb2NGeQP7R+TOv88/FjuScwRJq0BgaxEoqh/2HBQR/ 4/8acQvGVMI7A4Sfu3oaOnqYaS6xViHLSLlaMrbvJaCuYPxw4qHQbafgKyI+w1fbJM S3DPtAGKdx5n87qclQoRwc/1MrjVfWYrAfHxL5ZhUn/RyAOtyFiQpm3dyf07dqvB+0 dRwv5FkEhOJ8A== Precedence: bulk X-Mailing-List: linux-crypto@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=UTF-8 Date: Thu, 23 May 2024 18:01:49 +0300 Message-Id: From: "Jarkko Sakkinen" To: Cc: "Luis Chamberlain" , "Linus Torvalds" , , "Herbert Xu" , Subject: is_module() X-Mailer: aerc 0.17.0 Hi, I just put this here while I still have it on my mind. Possibly I'm ignoring something that already enables this but at least I learn something by doing this then.=20 This came up in a recent discussion albeit for this crypto bug it did not make waves because the bug fix did not require it: https://lore.kernel.org/linux-integrity/D1GXKODMD4S8.1J12D4GOEQWPL@kernel.o= rg/ So the gist of is_module() would be that it would have different semantics than IS_MODULE(): it could be used to e.g. check modules in a loop. Compilation would generate a new ELF section with following entries: <0 or 1> The string would contain module name, and 1 could be marking for being a module, and 0 for being builtin. Also, it would enabled to add lsmod -b to enumerate built-in modules, which would give nice way to carve up more information about a running test kernel. This would obviously need perhaps a new file to procfs for built-in modules (for regular there is /proc/modules). Not fighting for having this, just makig it visible. BR, Jarkko