/* * netsniff-ng - the packet sniffing beast * By Daniel Borkmann * Copyright 2012 Daniel Borkmann , * Swiss federal institute of technology (ETH Zurich) * Subject to the GPL, version 2. */ /* lex-func-prefix: yy */ %{ #include #include #include #include #include "bpf_parser.tab.h" #include "xmalloc.h" extern void yyerror(const char *); %} %option align %option nounput %option noyywrap %option noreject %option 8bit %option caseless %option noinput %option nodefault number_oct ([0][0-9]+) number_hex ([0][x][a-fA-F0-9]+) number_bin ([0][b][0-1]+) number_dec (([0])|([-+]?[1-9][0-9]*)) label [a-zA-Z_][a-zA-Z0-9_]+ %% "ldb" { return OP_LDB; } "ldh" { return OP_LDH; } "ld" { return OP_LD; } "ldi" { return OP_LDI; } "ldx" { return OP_LDX; } "ldxi" { return OP_LDXI; } "ldxb" { return OP_LDXB; } "st" { return OP_ST; } "stx" { return OP_STX; } "jmp"|"ja" { return OP_JMP; } "jeq" { return OP_JEQ; } "jneq"|"jne" { return OP_JNEQ; } "jlt" { return OP_JLT; } "jle" { return OP_JLE; } "jgt" { return OP_JGT; } "jge" { return OP_JGE; } "jset" { return OP_JSET; } "add" { return OP_ADD; } "sub" { return OP_SUB; } "mul" { return OP_MUL; } "div" { return OP_DIV; } "mod" { return OP_MOD; } "neg" { return OP_NEG; } "and" { return OP_AND; } "xor" { return OP_XOR; } "or" { return OP_OR; } "lsh" { return OP_LSH; } "rsh" { return OP_RSH; } "ret" { return OP_RET; } "tax" { return OP_TAX; } "txa" { return OP_TXA; } "#"?("len"|"pktlen") { return K_PKT_LEN; } "#"?("pto"|"proto") { return K_PROTO; } "#"?("type") { return K_TYPE; } "#"?("poff") { return K_POFF; } "#"?("ifx"|"ifidx") { return K_IFIDX; } "#"?("nla") { return K_NLATTR; } "#"?("nlan") { return K_NLATTR_NEST; } "#"?("mark") { return K_MARK; } "#"?("que"|"queue"|"Q") { return K_QUEUE; } "#"?("hat"|"hatype") { return K_HATYPE; } "#"?("rxh"|"rxhash") { return K_RXHASH; } "#"?("cpu") { return K_CPU; } "#"?("vlant"|"vlan_tci") { return K_VLANT; } "#"?("vlana"|"vlan_acc") { return K_VLANP; } "#"?("vlanp") { return K_VLANP; } ":" { return ':'; } "," { return ','; } "#" { return '#'; } "%" { return '%'; } "[" { return '['; } "]" { return ']'; } "(" { return '('; } ")" { return ')'; } "x" { return 'x'; } "a" { return 'a'; } "+" { return '+'; } "M" { return 'M'; } "*" { return '*'; } "&" { return '&'; } {number_hex} { yylval.number = strtoul(yytext, NULL, 16); return number; } {number_oct} { yylval.number = strtol(yytext + 1, NULL, 8); return number; } {number_bin} { yylval.number = strtol(yytext + 2, NULL, 2); return number; } {number_dec} { yylval.number = strtol(yytext, NULL, 10); return number; } {label} { yylval.label = xstrdup(yytext); return label; } "/*"([^\*]|\*[^/])*"*/" { /* NOP */ } ";"[^\n]* {/* NOP */} ^#.* {/* NOP */} "\n" { yylineno++; } [ \t]+ {/* NOP */ } . { printf("Unknown character '%s'", yytext); yyerror("lex Unknown character"); } %% >arch
diff options
context:
space:
mode:
authorLarry Finger <Larry.Finger@lwfinger.net>2016-12-22 21:06:53 -0600
committerLinus Torvalds <torvalds@linux-foundation.org>2016-12-25 16:12:20 -0800
commit8ae679c4bc2ea2d16d92620da8e3e9332fa4039f (patch)
treed029362dda3867b59c44480a5ac58d1d0d7a0f16 /arch
parentd33d5a6c88fcd53fec329a1521010f1bc55fa191 (diff)
powerpc: Fix build warning on 32-bit PPC
I am getting the following warning when I build kernel 4.9-git on my PowerBook G4 with a 32-bit PPC processor: AS arch/powerpc/kernel/misc_32.o arch/powerpc/kernel/misc_32.S:299:7: warning: "CONFIG_FSL_BOOKE" is not defined [-Wundef] This problem is evident after commit 989cea5c14be ("kbuild: prevent lib-ksyms.o rebuilds"); however, this change in kbuild only exposes an error that has been in the code since 2005 when this source file was created. That was with commit 9994a33865f4 ("powerpc: Introduce entry_{32,64}.S, misc_{32,64}.S, systbl.S"). The offending line does not make a lot of sense. This error does not seem to cause any errors in the executable, thus I am not recommending that it be applied to any stable versions. Thanks to Nicholas Piggin for suggesting this solution. Fixes: 9994a33865f4 ("powerpc: Introduce entry_{32,64}.S, misc_{32,64}.S, systbl.S") Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Cc: Nicholas Piggin <npiggin@gmail.com> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org> Cc: Paul Mackerras <paulus@samba.org> Cc: Michael Ellerman <mpe@ellerman.id.au> Cc: linuxppc-dev@lists.ozlabs.org Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'arch')