* + checkpatch-add-warning-for-avoiding-l-prefix-symbols-in-assembly-files.patch added to -mm tree
@ 2021-01-24 0:22 akpm
0 siblings, 0 replies; only message in thread
From: akpm @ 2021-01-24 0:22 UTC (permalink / raw)
To: broonie, dwaipayanray1, joe, jpoimboe, lukas.bulwahn, mm-commits,
ndesaulniers, yashsri421
The patch titled
Subject: checkpatch: add warning for avoiding .L prefix symbols in assembly files
has been added to the -mm tree. Its filename is
checkpatch-add-warning-for-avoiding-l-prefix-symbols-in-assembly-files.patch
This patch should soon appear at
https://ozlabs.org/~akpm/mmots/broken-out/checkpatch-add-warning-for-avoiding-l-prefix-symbols-in-assembly-files.patch
and later at
https://ozlabs.org/~akpm/mmotm/broken-out/checkpatch-add-warning-for-avoiding-l-prefix-symbols-in-assembly-files.patch
Before you just go and hit "reply", please:
a) Consider who else should be cc'ed
b) Prefer to cc a suitable mailing list as well
c) Ideally: find the original patch on the mailing list and do a
reply-to-all to that, adding suitable additional cc's
*** Remember to use Documentation/process/submit-checklist.rst when testing your code ***
The -mm tree is included into linux-next and is updated
there every 3-4 working days
------------------------------------------------------
From: Aditya Srivastava <yashsri421@gmail.com>
Subject: checkpatch: add warning for avoiding .L prefix symbols in assembly files
objtool requires that all code must be contained in an ELF symbol. Symbol
names that have a '.L' prefix do not emit symbol table entries, as they
have special meaning for the assembler.
'.L' prefixed symbols can be used within a code region, but should be
avoided for denoting a range of code via 'SYM_*_START/END' annotations.
Add a new check to emit a warning on finding the usage of '.L' symbols for
'.S' files, if it denotes range of code via SYM_*_START/END annotation
pair.
Link: https://lkml.kernel.org/r/20210123190459.9701-1-yashsri421@gmail.com
Link: https://lore.kernel.org/lkml/20210112210154.GI4646@sirena.org.uk
Signed-off-by: Aditya Srivastava <yashsri421@gmail.com>
Suggested-by: Mark Brown <broonie@kernel.org>
Acked-by: Joe Perches <joe@perches.com>
Cc: Aditya Srivastava <yashsri421@gmail.com>
Cc: Lukas Bulwahn <lukas.bulwahn@gmail.com>
Cc: Dwaipayan Ray <dwaipayanray1@gmail.com>
Cc: Nick Desaulniers <ndesaulniers@google.com>
Cc: Josh Poimboeuf <jpoimboe@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---
scripts/checkpatch.pl | 7 +++++++
1 file changed, 7 insertions(+)
--- a/scripts/checkpatch.pl~checkpatch-add-warning-for-avoiding-l-prefix-symbols-in-assembly-files
+++ a/scripts/checkpatch.pl
@@ -3606,6 +3606,13 @@ sub process {
}
}
+# check for .L prefix local symbols in .S files
+ if ($realfile =~ /\.S$/ &&
+ $line =~ /^\+\s*(?:[A-Z]+_)?SYM_[A-Z]+_(?:START|END)(?:_[A-Z_]+)?\s*\(\s*\.L/) {
+ WARN("AVOID_L_PREFIX",
+ "Avoid using '.L' prefixed local symbol names for denoting a range of code via 'SYM_*_START/END' annotations; see Documentation/asm-annotations.rst\n" . $herecurr);
+ }
+
# check we are in a valid source file C or perl if not then ignore this hunk
next if ($realfile !~ /\.(h|c|pl|dtsi|dts)$/);
_
Patches currently in -mm which might be from yashsri421@gmail.com are
checkpatch-add-warning-for-avoiding-l-prefix-symbols-in-assembly-files.patch
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2021-01-24 0:23 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-24 0:22 + checkpatch-add-warning-for-avoiding-l-prefix-symbols-in-assembly-files.patch added to -mm tree akpm
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.