Skip to contentSkip to conversation

fix in-kernel genksyms for parisc symbols

PATCH In review James Bottomley 4 participants 5 messages Jun 23, 2003 – Jul 2, 2003

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 fix in-kernel genksyms for parisc symbols

The problem is that the parisc libgcc.a library contains symbols that look like $$mulI and the like, but genksyms doesn't think $ is legal for a function symbol, so they all get dropped from the output. This means that inserting almost any module on parisc taints the kernel because these symbols have no version.

The fix (attached below) was to allow $ in an identifier in lex.l (and obviously to update the _shipped files as well, but my flex/bison seem to be rather different from the one they were generated with, so I'll leave that to whomever has the correct versions).

James

===== scripts/genksyms/lex.l 1.2 vs edited =====

scripts/genksyms/lex.l +1 -1
@@ -37,7 +37,7 @@
 
 %}
 
-IDENT			[A-Za-z_][A-Za-z0-9_]*
+IDENT			[A-Za-z_\$][A-Za-z0-9_\$]*
 
 O_INT			0[0-7]*
 D_INT			[1-9][0-9]*
#1 lore raw

In message <1056410864.1826.57.camel@mulgrave> you write:

Quoted 10 lines

The problem is that the parisc libgcc.a library contains symbols that look like $$mulI and the like, but genksyms doesn't think $ is legal for a function symbol, so they all get dropped from the output. This means that inserting almost any module on parisc taints the kernel because these symbols have no version.

The fix (attached below) was to allow $ in an identifier in lex.l (and obviously to update the _shipped files as well, but my flex/bison seem to be rather different from the one they were generated with, so I'll leave that to whomever has the correct versions).

Looks fine, but my flex is different, too. Kai?

Cheers,
Rusty.
--
Anyone who quotes me in their sig is an idiot. -- Rusty Russell.

===== scripts/genksyms/lex.l 1.2 vs edited =====

scripts/genksyms/lex.l +1 -1
@@ -37,7 +37,7 @@
 
 %}
 
-IDENT			[A-Za-z_][A-Za-z0-9_]*
+IDENT			[A-Za-z_\$][A-Za-z0-9_\$]*
 
 O_INT			0[0-7]*
 D_INT			[1-9][0-9]*
#2 lore raw
Quoted 7 lines · Rusty Russell

In message <1056410864.1826.57.camel@mulgrave> you write:

Quoted 6 lines

The problem is that the parisc libgcc.a library contains symbols that look like $$mulI and the like, but genksyms doesn't think $ is legal for a function symbol, so they all get dropped from the output. This means that inserting almost any module on parisc taints the kernel because these symbols have no version.

Quoted 6 lines
Quoted 4 lines

The fix (attached below) was to allow $ in an identifier in lex.l (and obviously to update the _shipped files as well, but my flex/bison seem to be rather different from the one they were generated with, so I'll leave that to whomever has the correct versions).

Looks fine, but my flex is different, too. Kai?

I merged it, will submit.

--Kai

#3 lore raw
Quoted 9 lines · Kai Germaschewski
Quoted 7 lines · Rusty Russell

In message <1056410864.1826.57.camel@mulgrave> you write:

Quoted 6 lines

The problem is that the parisc libgcc.a library contains symbols that look like $$mulI and the like, but genksyms doesn't think $ is legal for a function symbol, so they all get dropped from the output. This means that inserting almost any module on parisc taints the kernel because these symbols have no version.

Quoted 8 lines
Quoted 6 lines
Quoted 4 lines

The fix (attached below) was to allow $ in an identifier in lex.l (and obviously to update the _shipped files as well, but my flex/bison seem to be rather different from the one they were generated with, so I'll leave that to whomever has the correct versions).

Looks fine, but my flex is different, too. Kai?

I merged it, will submit.

Could you divulge what version of flex you use, to simplify future changes?

Regards: David Weinehall

Signature · 3 lines
 /) David Weinehall <[email protected]> /) Northern lights wander      (\
//  Maintainer of the v2.0 kernel   //  Dance across the winter sky //
\)  http://www.acc.umu.se/~tao/    (/   Full colour fire           (/
#4 lore raw
Quoted 2 lines · David Weinehall

Could you divulge what version of flex you use, to simplify future changes?

Well, the standard RedHat 7.3 stuff - unfortunately that box is moving currently, so I don't know the versions. But any version should work, the diff may be bigger, but the interesting change is to lex.l, anyway.

--Kai