From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-ej1-f74.google.com (mail-ej1-f74.google.com [209.85.218.74]) (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 A4BBB1CAA79 for ; Thu, 26 Mar 2026 21:21:35 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.218.74 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1774560097; cv=none; b=peSji95UyiF28hqXU1UZKQCIb5gpeaM6cGtA2Y+cvzdobel66W5EKudx/LKdMwRsX8qKXgx0GmsJnVpvv5EJNisddRXGyjoSm6nV7MaUGuyYIGFRCwbB2ptAEVVQZoCRdnRLhY9t0QDT4tb7joCPD9E0bsURr4O6zHZzli9Umzo= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1774560097; c=relaxed/simple; bh=yxWFKfFkKHmuOpsxGuTO4vPY99a8JR43U1hClfLdqBk=; h=Date:In-Reply-To:Mime-Version:References:Message-ID:Subject:From: To:Cc:Content-Type; b=frb25ManR+Pih0QkRtMTvYzxE0jfxzpfpM1Y4Xgc3A0oZnbrsZpyXn/53i5rfAC2mFjQLd2De6sG4SUxZdrCIoHWP54it06HjODEYewRkasnyo7ue2fuCYWtptU3C1QUrLgMScbD2Guup2OEaV9Oh31NmFHF3YlSZgJbmgyFin4= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com; spf=pass smtp.mailfrom=flex--sidnayyar.bounces.google.com; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b=AZgEaMAL; arc=none smtp.client-ip=209.85.218.74 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=flex--sidnayyar.bounces.google.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="AZgEaMAL" Received: by mail-ej1-f74.google.com with SMTP id a640c23a62f3a-b94062e85f9so201187666b.2 for ; Thu, 26 Mar 2026 14:21:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20251104; t=1774560094; x=1775164894; darn=vger.kernel.org; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:from:to:cc:subject:date:message-id:reply-to; bh=KWI54gUN+/1z0II7jAJ2ytcdqsD5FtTzHZqzZAkbnP4=; b=AZgEaMALaVhgtjYEYzEr4p+GPO+hdQGklRorUAej8OyW1QByEiuxNiIzQjNmSBSCH5 KBNvcJS86tX0zAKxocwgyzZ9H7I/cTgrmgS5QiLLCooq9H+N4pgURNw88nWozqIBbCAH VKsaSBESVQeJ+MegD8aJbnFrAxYGwRriCohKUEX4WxgtnF05p3rN968wYD51AzeyqFCQ d7/IcFyQYYlnHDpl0F5jnVWhmoFy21kJpw8YUGxJUXS4J770beaB+iZXNlHL1PKc+oaf az1la2pLdGkjEatIoXHOfcVnmEAzyiMJEfI2UvYACTVQGQtD5TGWvIcADsugE56Ul3E1 Q3Pg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1774560094; x=1775164894; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=KWI54gUN+/1z0II7jAJ2ytcdqsD5FtTzHZqzZAkbnP4=; b=ooFoGlr4RrHTrwuieDSw3SqaOBtcNHBP+VdkL3l8zFuq59CajwbtkypH1RS3l9C8M7 TztWS5WtK/HS12VYwB8aWN5qxdXdaV6/LtU1PI64B8RKMhWkGZOeZXWepgqpNrugF/Vm 46R316IneumuvL5VpjX++M4rPM7GMKC/aiiy/lgFX30Zbxa1ON4y9DjH3Cv9yJRFUL/B J3L9pFqJlKTIgWA+70g4Un1wANjAp5iHvX+iQgHoVBiY9wcpQea7tenPHA0oiliJL5/3 gEHI6C+A03uPgNZ1STLL4OgvDq75VAVc3NmOhtwPt95nucrO5kyMWfRztvkaXzT+69WL 4fyw== X-Forwarded-Encrypted: i=1; AJvYcCXm0yFpMeLNFdiiWx3ac8J5ioCT61wn5QHAYcebuZkmEmQslOR72YVYZI1zuoGIWTjSs1e318tOpqEe@vger.kernel.org X-Gm-Message-State: AOJu0YxWYCKGFseqyrxy+8Rk594rOyIAL6ujMoBMZhgd+ayLHT2wk63C XU7NfImC4Q/Zc5rZlWQKzhypKlswZwC87JFI2wpQql/vcFj5yas2jHS/2UWjjI01g3p87NLpl0A ZrlfXvpahhXgS4pS0jQ== X-Received: from ejcdp19.prod.google.com ([2002:a17:906:c153:b0:b94:96:8ae4]) (user=sidnayyar job=prod-delivery.src-stubby-dispatcher) by 2002:a17:906:598e:b0:b98:7e20:b25 with SMTP id a640c23a62f3a-b9b502ed0a8mr954766b.20.1774560093907; Thu, 26 Mar 2026 14:21:33 -0700 (PDT) Date: Thu, 26 Mar 2026 21:21:29 +0000 In-Reply-To: <20260326-kflagstab-v5-0-455cd723dddf@google.com> Precedence: bulk X-Mailing-List: linux-arch@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 References: <20260326-kflagstab-v5-0-455cd723dddf@google.com> X-Mailer: b4 0.14.3 Message-ID: <20260326-kflagstab-v5-1-455cd723dddf@google.com> Subject: [PATCH v5 1/7] module: define ksym_flags enumeration to represent kernel symbol flags From: Siddharth Nayyar To: Luis Chamberlain , Petr Pavlu , Daniel Gomez , Sami Tolvanen , Aaron Tomlin , Arnd Bergmann , Nathan Chancellor , Nicolas Schier , Jonathan Corbet , Shuah Khan Cc: linux-modules@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arch@vger.kernel.org, linux-kbuild@vger.kernel.org, linux-doc@vger.kernel.org, Siddharth Nayyar , gprocida@google.com Content-Type: text/plain; charset="utf-8" Symbol flags is an enumeration used to represent flags as a bitset, for example a flag to tell if a symbol is GPL only. The said bitset is introduced in subsequent patches and will contain values of kernel symbol flags. These bitset will then be used to infer flag values rather than fragmenting ksymtab for separating symbols with different flag values, thereby eliminating the need to fragment the ksymtab. Signed-off-by: Siddharth Nayyar Reviewed-by: Petr Pavlu --- include/linux/module_symbol.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/include/linux/module_symbol.h b/include/linux/module_symbol.h index 77c9895b9ddb..574609aced99 100644 --- a/include/linux/module_symbol.h +++ b/include/linux/module_symbol.h @@ -2,6 +2,11 @@ #ifndef _LINUX_MODULE_SYMBOL_H #define _LINUX_MODULE_SYMBOL_H +/* Kernel symbol flags bitset. */ +enum ksym_flags { + KSYM_FLAG_GPL_ONLY = 1 << 0, +}; + /* This ignores the intensely annoying "mapping symbols" found in ELF files. */ static inline bool is_mapping_symbol(const char *str) { -- 2.53.0.1018.g2bb0e51243-goog