lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20210413090400.GA5477@agape.jhs>
Date:   Tue, 13 Apr 2021 11:04:01 +0200
From:   Fabio Aiuto <fabioaiuto83@...il.com>
To:     gregkh@...uxfoundation.org, joe@...ches.com, julia.lawall@...ia.fr
Cc:     linux-staging@...ts.linux.dev, linux-kernel@...r.kernel.org
Subject: cocci script hints request

Hi,

I would like to improve the following coccinelle script:

@@
expression a, fmt;
expression list var_args;
@@

-       DBG_871X_LEVEL(a, fmt, var_args);
+       printk(fmt, var_args);

I would  replace the DBG_871X_LEVEL macro with printk, but
I can't find a way to add KERN_* constant prefix to the fmt
argument in the + code line. If i try this

@@
expression a, fmt;
expression list var_args;
@@

-       DBG_871X_LEVEL(a, fmt, var_args);
+       printk(KERN_DEBUG fmt, var_args);

plus: parse error: 
  File "../test.cocci", line 94, column 20, charpos = 1171
  around = 'fmt',
  whole content = +	printk(KERN_DEBUG fmt, var_args);

how could I do this?

thank you in advance,

fabio

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ