Skip to contentSkip to conversation

"virtual rule patch not supported"

Cocci Brice Goglin 3 participants 9 messages Mar 11, 2013 – Mar 15, 2013

lore
Share & tools
lore
#0 lore raw

Hello,
I am running the kernel 3.9-rc2 coccicheck script on some of my module, and I get the following message:
virtual rule patch not supported
Things seem to work fine aside of this message. Anything to be worried about?
I already upgraded to coccinelle 1.0-rc16 (from Debian experimental) since rc12 didn't accept orplus.cocci. Anything else to upgrade to avoid the message?
Thanks
Brice

#1 lore raw
Quoted 4 lines · Brice Goglin

Hello,
I am running the kernel 3.9-rc2 coccicheck script on some of my module, and I get the following message:
virtual rule patch not supported

I guess it doesn't crash? It is possible that some semantic patch just doesn't support the patch option. I don't remember if it is possible to specify several options, and to have them tried in order? That could be a nice feature. If not, I think that there is an option that tries all of the options in a fixed order. Nicolas?

julia

Quoted 13 lines

Things seem to work fine aside of this message. Anything to be worried about?
I already upgraded to coccinelle 1.0-rc16 (from Debian experimental) since rc12 didn't accept orplus.cocci. Anything else to upgrade to avoid the message?
Thanks
Brice

_______________________________________________
Cocci mailing list
Cocci at systeme.lip6.fr
https://systeme.lip6.fr/mailman/listinfo/cocci

#2 lore raw

Hi,

Quoted 7 lines · Julia Lawall
Quoted 4 lines · Brice Goglin

Hello,
I am running the kernel 3.9-rc2 coccicheck script on some of my module, and I get the following message:
virtual rule patch not supported

Quoted 6 lines

I guess it doesn't crash? It is possible that some semantic patch just doesn't support the patch option. I don't remember if it is possible to specify several options, and to have them tried in order? That could be a nice feature. If not, I think that there is an option that tries all of the options in a fixed order. Nicolas?

According to the cocci files, every coccicheck mode could not be proposed. It is indeed some time impossible to propose a bug correction because several options are available for a single bug report and the semantic patch is not designed to choose one.

The current basic modes are: patch, report, context, org
The 'chain' mode tries the following mode is order: patch || report || context || org.
Recently, the 'rep+ctxt' mode have been added for report and context modes.

If you haven't specify the mode, it defaults to chain. The patch mode is thus tried first.
If it fails, coccicheck falls back to the report mode.

The following command will give you the available modes for each cocci file distributed with the Linux kernel

      find scripts/coccinelle -name *.cocci -exec grep -H virtual \{} \;

Hope it helps.

Regards.

Quoted 19 lines

julia

Quoted 8 lines

Things seem to work fine aside of this message. Anything to be worried about?
I already upgraded to coccinelle 1.0-rc16 (from Debian experimental) since rc12 didn't accept orplus.cocci. Anything else to upgrade to avoid the message?
Thanks
Brice

Quoted 5 lines

_______________________________________________
Cocci mailing list
Cocci at systeme.lip6.fr
https://systeme.lip6.fr/mailman/listinfo/cocci

_______________________________________________
Cocci mailing list
Cocci at systeme.lip6.fr
https://systeme.lip6.fr/mailman/listinfo/cocci

Signature · 1 line
Nicolas Palix
#3 lore raw

Le 15/03/2013 15:49, Nicolas Palix a ?crit :

Quoted 20 lines

Hi,

Quoted 6 lines · Julia Lawall
Quoted 4 lines · Brice Goglin

Hello,
I am running the kernel 3.9-rc2 coccicheck script on some of my module, and I get the following message:
virtual rule patch not supported

Quoted 6 lines

I guess it doesn't crash? It is possible that some semantic patch just doesn't support the patch option. I don't remember if it is possible to specify several options, and to have them tried in order? That could be a nice feature. If not, I think that there is an option that tries all of the options in a fixed order. Nicolas?

According to the cocci files, every coccicheck mode could not be proposed. It is indeed some time impossible to propose a bug correction because several options are available for a single bug report and the semantic patch is not designed to choose one.

Quoted 9 lines

The current basic modes are: patch, report, context, org
The 'chain' mode tries the following mode is order: patch || report || context || org.
Recently, the 'rep+ctxt' mode have been added for report and context modes.

If you haven't specify the mode, it defaults to chain. The patch mode is thus tried first.
If it fails, coccicheck falls back to the report mode.

In short, this warning is harmless ?

Should it be disabled in the kernel by default ? Most people that uses coccicheck in the kernel don't know much about it, and they don't write the rules directly, so they may be afraid by the warning just like me.

Brice

#4 lore raw
Quoted 26 lines · Brice Goglin

Le 15/03/2013 15:49, Nicolas Palix a ?crit :

Quoted 25 lines

Hi,

Quoted 6 lines · Julia Lawall
Quoted 4 lines · Brice Goglin

Hello,
I am running the kernel 3.9-rc2 coccicheck script on some of my module, and I get the following message:
virtual rule patch not supported

Quoted 6 lines

I guess it doesn't crash? It is possible that some semantic patch just doesn't support the patch option. I don't remember if it is possible to specify several options, and to have them tried in order? That could be a nice feature. If not, I think that there is an option that tries all of the options in a fixed order. Nicolas?

According to the cocci files, every coccicheck mode could not be proposed. It is indeed some time impossible to propose a bug correction because several options are available for a single bug report and the semantic patch is not designed to choose one.

The current basic modes are: patch, report, context, org
The 'chain' mode tries the following mode is order: patch || report || context || org.
Recently, the 'rep+ctxt' mode have been added for report and context modes.

Quoted 6 lines
Quoted 4 lines

If you haven't specify the mode, it defaults to chain. The patch mode is thus tried first.
If it fails, coccicheck falls back to the report mode.

In short, this warning is harmless ?

Indeed. But you will have various kind of output.

Quoted 4 lines

Should it be disabled in the kernel by default ? Most people that uses coccicheck in the kernel don't know much about it, and they don't write the rules directly, so they may be afraid by the warning just like me.

One may improve the handling of the chain mode, and skip unavailable modes instead of falling back to the next one in case of error...

Do you volunteer ?

By the way, thank you for the report.

Quoted 3 lines

Brice

Signature · 1 line
Nicolas Palix
#5 lore raw

Alternatively, you could use 'make coccicheck MODE=report' as every cocci file currently provide at least this mode
or we could swap patch and report for the chain mode.

linux $ find scripts/coccinelle -name *.cocci | wc -l

      42
npalix at lig-yttrium linux $ find scripts/coccinelle -name *.cocci -exec
grep -H 'virtual context' \{} \; | wc -l
      36
npalix at lig-yttrium linux $ find scripts/coccinelle -name *.cocci -exec
grep -H 'virtual report' \{} \; | wc -l
      42
npalix at lig-yttrium linux $ find scripts/coccinelle -name *.cocci -exec
grep -H 'virtual org' \{} \; | wc -l
      40
npalix at lig-yttrium linux $ find scripts/coccinelle -name *.cocci -exec
grep -H 'virtual patch' \{} \; | wc -l
      24
Quoted 56 lines · Nicolas Palix
Quoted 26 lines · Brice Goglin

Le 15/03/2013 15:49, Nicolas Palix a ?crit :

Quoted 25 lines

Hi,

Quoted 6 lines · Julia Lawall
Quoted 4 lines · Brice Goglin

Hello,
I am running the kernel 3.9-rc2 coccicheck script on some of my module, and I get the following message:
virtual rule patch not supported

Quoted 6 lines

I guess it doesn't crash? It is possible that some semantic patch just doesn't support the patch option. I don't remember if it is possible to specify several options, and to have them tried in order? That could be a nice feature. If not, I think that there is an option that tries all of the options in a fixed order. Nicolas?

According to the cocci files, every coccicheck mode could not be proposed. It is indeed some time impossible to propose a bug correction because several options are available for a single bug report and the semantic patch is not designed to choose one.

The current basic modes are: patch, report, context, org
The 'chain' mode tries the following mode is order: patch || report || context || org.
Recently, the 'rep+ctxt' mode have been added for report and context modes.

Quoted 6 lines
Quoted 4 lines

If you haven't specify the mode, it defaults to chain. The patch mode is thus tried first.
If it fails, coccicheck falls back to the report mode.

In short, this warning is harmless ?

Indeed. But you will have various kind of output.

Quoted 4 lines

Should it be disabled in the kernel by default ? Most people that uses coccicheck in the kernel don't know much about it, and they don't write the rules directly, so they may be afraid by the warning just like me.

One may improve the handling of the chain mode, and skip unavailable modes instead of falling back to the next one in case of error...

Do you volunteer ?

By the way, thank you for the report.

Quoted 3 lines

Brice

--
Nicolas Palix

Signature · 1 line
Nicolas Palix
#6 lore raw

Le 15/03/2013 16:14, Nicolas Palix a ?crit :

Quoted 2 lines

Alternatively, you could use 'make coccicheck MODE=report' as every cocci file currently provide at least this mode

Yes that works thanks.

Quoted 1 line

or we could swap patch and report for the chain mode.

[...]

Quoted 5 lines

One may improve the handling of the chain mode, and skip unavailable modes instead of falling back to the next one in case of error...

Do you volunteer ?

If it's just a matter of adding grep before run_cmd, the attached patch seems to work.

But I don't have enough knowledge about all this to decide what's the best thing to do among everything you said above.

Brice

-------------- next part --------------
A non-text attachment was scrubbed...
Name: coccichain.patch
Type: text/x-patch
Size: 1854 bytes
Desc: not available
URL: <https://systeme.lip6.fr/pipermail/cocci/attachments/20130315/a868b193/attachment-0001.bin>

#7 lore raw
In reply to Nicolas Palix
Quoted 3 lines · Nicolas Palix

Alternatively, you could use 'make coccicheck MODE=report' as every cocci file currently provide at least this mode
or we could swap patch and report for the chain mode.

If you do that, it should be the same as report, because every semantic patch should provide report...

julia

Quoted 78 lines

linux $ find scripts/coccinelle -name *.cocci | wc -l

      42
npalix at lig-yttrium linux $ find scripts/coccinelle -name *.cocci -exec
grep -H 'virtual context' \{} \; | wc -l
      36
npalix at lig-yttrium linux $ find scripts/coccinelle -name *.cocci -exec
grep -H 'virtual report' \{} \; | wc -l
      42
npalix at lig-yttrium linux $ find scripts/coccinelle -name *.cocci -exec
grep -H 'virtual org' \{} \; | wc -l
      40
npalix at lig-yttrium linux $ find scripts/coccinelle -name *.cocci -exec
grep -H 'virtual patch' \{} \; | wc -l
      24
Quoted 49 lines · Nicolas Palix
Quoted 26 lines · Brice Goglin

Le 15/03/2013 15:49, Nicolas Palix a ?crit :

Quoted 25 lines

Hi,

Quoted 6 lines · Julia Lawall
Quoted 4 lines · Brice Goglin

Hello,
I am running the kernel 3.9-rc2 coccicheck script on some of my module, and I get the following message:
virtual rule patch not supported

Quoted 6 lines

I guess it doesn't crash? It is possible that some semantic patch just doesn't support the patch option. I don't remember if it is possible to specify several options, and to have them tried in order? That could be a nice feature. If not, I think that there is an option that tries all of the options in a fixed order. Nicolas?

According to the cocci files, every coccicheck mode could not be proposed. It is indeed some time impossible to propose a bug correction because several options are available for a single bug report and the semantic patch is not designed to choose one.

The current basic modes are: patch, report, context, org
The 'chain' mode tries the following mode is order: patch || report || context || org.
Recently, the 'rep+ctxt' mode have been added for report and context modes.

Quoted 6 lines
Quoted 4 lines

If you haven't specify the mode, it defaults to chain. The patch mode is thus tried first.
If it fails, coccicheck falls back to the report mode.

In short, this warning is harmless ?

Indeed. But you will have various kind of output.

Quoted 4 lines

Should it be disabled in the kernel by default ? Most people that uses coccicheck in the kernel don't know much about it, and they don't write the rules directly, so they may be afraid by the warning just like me.

One may improve the handling of the chain mode, and skip unavailable modes instead of falling back to the next one in case of error...

Do you volunteer ?

By the way, thank you for the report.

Quoted 1 line
Quoted 7 lines
Quoted 2 lines

Brice

--
Nicolas Palix

--
Nicolas Palix

#8 lore raw
In reply to Brice Goglin

Maybe the kernel should just use report mode by default?

julia

Quoted 40 lines · Brice Goglin

Le 15/03/2013 15:49, Nicolas Palix a ?crit :

Quoted 20 lines

Hi,

Quoted 6 lines · Julia Lawall
Quoted 4 lines · Brice Goglin

Hello,
I am running the kernel 3.9-rc2 coccicheck script on some of my module, and I get the following message:
virtual rule patch not supported

Quoted 6 lines

I guess it doesn't crash? It is possible that some semantic patch just doesn't support the patch option. I don't remember if it is possible to specify several options, and to have them tried in order? That could be a nice feature. If not, I think that there is an option that tries all of the options in a fixed order. Nicolas?

According to the cocci files, every coccicheck mode could not be proposed. It is indeed some time impossible to propose a bug correction because several options are available for a single bug report and the semantic patch is not designed to choose one.

Quoted 9 lines

The current basic modes are: patch, report, context, org
The 'chain' mode tries the following mode is order: patch || report || context || org.
Recently, the 'rep+ctxt' mode have been added for report and context modes.

If you haven't specify the mode, it defaults to chain. The patch mode is thus tried first.
If it fails, coccicheck falls back to the report mode.

In short, this warning is harmless ?

Should it be disabled in the kernel by default ? Most people that uses coccicheck in the kernel don't know much about it, and they don't write the rules directly, so they may be afraid by the warning just like me.

Brice