- GRAYBYTE UNDETECTABLE CODES -

403Webshell
Server IP : 184.154.167.98  /  Your IP : 18.117.94.180
Web Server : Apache
System : Linux pink.dnsnetservice.com 4.18.0-553.22.1.lve.1.el8.x86_64 #1 SMP Tue Oct 8 15:52:54 UTC 2024 x86_64
User : puertode ( 1767)
PHP Version : 7.2.34
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : ON  |  Pkexec : ON
Directory :  /usr/src/kernels/4.18.0-553.30.1.lve.el8.x86_64/scripts/coccinelle/misc/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /usr/src/kernels/4.18.0-553.30.1.lve.el8.x86_64/scripts/coccinelle/misc/warn.cocci
/// Use WARN(1,...) rather than printk followed by WARN_ON(1)
///
// Confidence: High
// Copyright: (C) 2012 Julia Lawall, INRIA/LIP6.  GPLv2.
// Copyright: (C) 2012 Gilles Muller, INRIA/LiP6.  GPLv2.
// URL: http://coccinelle.lip6.fr/
// Comments:
// Options: --no-includes --include-headers

virtual patch
virtual context
virtual org
virtual report

@bad1@
position p;
@@

printk(...);
printk@p(...);
WARN_ON(1);

@r1 depends on context || report || org@
position p != bad1.p;
@@

 printk@p(...);
*WARN_ON(1);

@script:python depends on org@
p << r1.p;
@@

cocci.print_main("printk + WARN_ON can be just WARN",p)

@script:python depends on report@
p << r1.p;
@@

msg = "SUGGESTION: printk + WARN_ON can be just WARN"
coccilib.report.print_report(p[0],msg)

@ok1 depends on patch@
expression list es;
position p != bad1.p;
@@

-printk@p(
+WARN(1,
  es);
-WARN_ON(1);

@depends on patch@
expression list ok1.es;
@@

if (...)
- {
  WARN(1,es);
- }

// --------------------------------------------------------------------

@bad2@
position p;
@@

printk(...);
printk@p(...);
WARN_ON_ONCE(1);

@r2 depends on context || report || org@
position p != bad1.p;
@@

 printk@p(...);
*WARN_ON_ONCE(1);

@script:python depends on org@
p << r2.p;
@@

cocci.print_main("printk + WARN_ON_ONCE can be just WARN_ONCE",p)

@script:python depends on report@
p << r2.p;
@@

msg = "SUGGESTION: printk + WARN_ON_ONCE can be just WARN_ONCE"
coccilib.report.print_report(p[0],msg)

@ok2 depends on patch@
expression list es;
position p != bad2.p;
@@

-printk@p(
+WARN_ONCE(1,
  es);
-WARN_ON_ONCE(1);

@depends on patch@
expression list ok2.es;
@@

if (...)
- {
  WARN_ONCE(1,es);
- }

Youez - 2016 - github.com/yon3zu
LinuXploit