<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/scripts/genksyms/lex.l, branch linux-5.1.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.</subtitle>
<id>https://universe.0xinfinity.dev/distro/kernel/atom?h=linux-5.1.y</id>
<link rel='self' href='https://universe.0xinfinity.dev/distro/kernel/atom?h=linux-5.1.y'/>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/'/>
<updated>2017-09-08T21:32:34Z</updated>
<entry>
<title>genksyms: fix gperf removal conversion</title>
<updated>2017-09-08T21:32:34Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2017-09-08T21:32:34Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=3aea311c1b4002bd730a09530f80f2f2ad3bf495'/>
<id>urn:sha1:3aea311c1b4002bd730a09530f80f2f2ad3bf495</id>
<content type='text'>
I had stupidly missed one special use of 'is_reserved_word()' when I
converted the code to avoid gperf.

I had changed that function to return the token ID directly rather than
a pointer to the token descriptor structure, but that meant that the
test for "is this a reserved word" changed from checking the return
value against NULL, to checking that it wasn't negative.

And while I had converted the main token parser over, I missed the
special case of the typeof phrase handling.  And since our dependency
chain for genksyms does not include the genksyms program itself
changing, my kernel rebuild didn't show the problem.

Fixes: bb3290d91695 ("Remove gperf usage from toolchain")
Reported-by: Masahiro Yamada &lt;yamada.masahiro@socionext.com&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>Remove gperf usage from toolchain</title>
<updated>2017-08-19T18:02:53Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2017-08-19T17:17:02Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=bb3290d91695bb1ae78ab86f18fb4d7ad8e5ebcc'/>
<id>urn:sha1:bb3290d91695bb1ae78ab86f18fb4d7ad8e5ebcc</id>
<content type='text'>
It turns out that gperf-3.1 changed types in the generated code in ways
that aren't even trivially detectable without having to generate a test-file.

It's just not worth using tools and libraries from clowns that don't
understand or care about compatibility.  So get rid of gperf.

Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>kbuild: genksyms fix for typeof handling</title>
<updated>2016-08-25T16:55:37Z</updated>
<author>
<name>Nicholas Piggin</name>
<email>npiggin@gmail.com</email>
</author>
<published>2016-08-25T09:53:08Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=4fab91605a6bcd0c303bcbc292a8bffcf27b3a27'/>
<id>urn:sha1:4fab91605a6bcd0c303bcbc292a8bffcf27b3a27</id>
<content type='text'>
The tokenizer misses counting an open-parenthesis when parsing a
non-trivial typeof beginning with an open-parenthesis. This function
in include/linux/ceph/libceph.h

static type *lookup_##name(struct rb_root *root,
                           typeof(((type *)0)-&gt;keyfld) key)

When instantiated in net/ceph/mon_client.c, causes subsequent symbols
including an EXPORT_SYMBOL in that file to be lost.

Signed-off-by: Nicholas Piggin &lt;npiggin@gmail.com&gt;
Signed-off-by: Michal Marek &lt;mmarek@suse.com&gt;
</content>
</entry>
<entry>
<title>genksyms: fix typeof() handling</title>
<updated>2014-04-03T23:20:52Z</updated>
<author>
<name>Jan Beulich</name>
<email>JBeulich@suse.com</email>
</author>
<published>2014-04-03T21:46:37Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=dc53324060f324e8af6867f57bf4891c13c6ef18'/>
<id>urn:sha1:dc53324060f324e8af6867f57bf4891c13c6ef18</id>
<content type='text'>
Recent increased use of typeof() throughout the tree resulted in a
number of symbols (25 in a typical distro config of ours) not getting a
proper CRC calculated for them anymore, due to the parser in genksyms
not coping with several of these uses (interestingly in the majority of
[if not all] cases the problem is due to the use of typeof() in code
preceding a certain export, not in the declaration/definition of the
exported function/object itself; I wasn't able to find a way to address
this more general parser shortcoming).

The use of parameter_declaration is a little more relaxed than would be
ideal (permitting not just a bare type specification, but also one with
identifier), but since the same code is being passed through an actual
compiler, there's no apparent risk of allowing through any broken code.

Otoh using parameter_declaration instead of the ad hoc
"decl_specifier_seq '*'" / "decl_specifier_seq" pair allows all types to
be handled rather than just plain ones and pointers to plain ones.

Signed-off-by: Jan Beulich &lt;jbeulich@suse.com&gt;
Cc: Michal Marek &lt;mmarek@suse.cz&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>genksyms: Do not expand internal types</title>
<updated>2011-10-11T10:00:39Z</updated>
<author>
<name>Michal Marek</name>
<email>mmarek@suse.cz</email>
</author>
<published>2011-10-07T23:18:35Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=2c5925d6b7fedc8f1c325f4f85451f505ec69aca'/>
<id>urn:sha1:2c5925d6b7fedc8f1c325f4f85451f505ec69aca</id>
<content type='text'>
Consider structures, unions and enums defined in the source file as
internal and do not expand them. This way, changes to e.g. struct
serial_private in drivers/tty/serial/8250_pci.c will not affect the
checksum of the pciserial_* exports.
</content>
</entry>
<entry>
<title>genksyms: migrate parser to implicit rules</title>
<updated>2011-06-09T18:04:41Z</updated>
<author>
<name>Arnaud Lacombe</name>
<email>lacombar@gmail.com</email>
</author>
<published>2011-05-23T04:05:28Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=880f4499bb4f6883095965bdd3b9237d927e24d8'/>
<id>urn:sha1:880f4499bb4f6883095965bdd3b9237d927e24d8</id>
<content type='text'>
Signed-off-by: Arnaud Lacombe &lt;lacombar@gmail.com&gt;
</content>
</entry>
<entry>
<title>genksyms: Track changes to enum constants</title>
<updated>2011-03-17T14:13:56Z</updated>
<author>
<name>Michal Marek</name>
<email>mmarek@suse.cz</email>
</author>
<published>2011-02-03T22:57:09Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=e37ddb82500393cb417c3ab0fe0726d9a8652372'/>
<id>urn:sha1:e37ddb82500393cb417c3ab0fe0726d9a8652372</id>
<content type='text'>
Enum constants can be used as array sizes; if the enum itself does not
appear in the symbol expansion, a change in the enum constant will go
unnoticed. Example patch that changes the ABI but does not change the
checksum with current genksyms:

| enum e {
|	E1,
|	E2,
|+	E3,
|	E_MAX
| };
|
| struct s {
|	int a[E_MAX];
| }
|
| int f(struct s *s) { ... }
| EXPORT_SYMBOL(f)

Therefore, remember the value of each enum constant and
expand each occurence to &lt;constant&gt; &lt;value&gt;. The value is not actually
computed, but instead an expression in the form
(last explicitly assigned value) + N
is used. This avoids having to parse and semantically understand whole
of C.

Note: The changes won't take effect until the lexer and parser are
rebuilt by the next patch.

Signed-off-by: Michal Marek &lt;mmarek@suse.cz&gt;
Acked-by: Sam Ravnborg &lt;sam@ravnborg.org&gt;
</content>
</entry>
<entry>
<title>genksyms: simplify usage of find_symbol()</title>
<updated>2011-03-17T14:13:55Z</updated>
<author>
<name>Michal Marek</name>
<email>mmarek@suse.cz</email>
</author>
<published>2011-02-15T14:11:36Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=01762c4ec5f6f62c550304b9c70e824293cefdd0'/>
<id>urn:sha1:01762c4ec5f6f62c550304b9c70e824293cefdd0</id>
<content type='text'>
Allow searching for symbols of an exact type. The lexer does this and a
subsequent patch will add one more usage.

Signed-off-by: Michal Marek &lt;mmarek@suse.cz&gt;
Acked-by: Sam Ravnborg &lt;sam@ravnborg.org&gt;
</content>
</entry>
<entry>
<title>genksyms: Simplify lexer</title>
<updated>2011-03-17T14:13:55Z</updated>
<author>
<name>Michal Marek</name>
<email>mmarek@suse.cz</email>
</author>
<published>2011-01-20T15:19:58Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=95f1d639ade8fdf9572ac8a926f62b29dd66eaba'/>
<id>urn:sha1:95f1d639ade8fdf9572ac8a926f62b29dd66eaba</id>
<content type='text'>
The V2_TOKENS state is active all the time.

Signed-off-by: Michal Marek &lt;mmarek@suse.cz&gt;
Acked-by: Sam Ravnborg &lt;sam@ravnborg.org&gt;
</content>
</entry>
<entry>
<title>kbuild: scripts/genksyms/lex.l: add %option noinput</title>
<updated>2008-07-30T20:31:02Z</updated>
<author>
<name>Adrian Bunk</name>
<email>bunk@kernel.org</email>
</author>
<published>2008-07-16T23:08:12Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=11ddad396086f8d1dfcb0056dc9d65d228f755c1'/>
<id>urn:sha1:11ddad396086f8d1dfcb0056dc9d65d228f755c1</id>
<content type='text'>
gcc 4.3 correctly determines that input() is unused and gives the
following warning:

&lt;--  snip  --&gt;

...
  HOSTCC  scripts/genksyms/lex.o
scripts/genksyms/lex.c:1487: warning: ‘input’ defined but not used
...

&lt;--  snip  --&gt;

Fix it by adding %option noinput to scripts/genksyms/lex.l and
regeneration of scripts/genksyms/lex.c_shipped.

Signed-off-by: Adrian Bunk &lt;bunk@kernel.org&gt;
Signed-off-by: Sam Ravnborg &lt;sam@ravnborg.org&gt;
</content>
</entry>
</feed>
