You are viewing content from a past/completed QCon -

SESSION + Live Q&A

Coccinelle: 10 Years of Automated Evolution in the Linux Kernel

Over the last 10+ years, we have been developing the Coccinelle C-program matching and transformation tool. Coccinelle allows developers to match and transform C code via a generalization of the familiar patch syntax. As Coccinelle is independent of the C preprocessor, Coccinelle rules can be applied across a code base, regardless of configuration constraints. Over the years, Coccinelle has been extensively used in Linux kernel development, resulting in over 7000 commits to the Linux kernel, and has found its place as part of the Linux kernel development process. This talk gives an introduction to the use of Coccinelle and gives an overview of its impact on the Linux kernel.


Tell us a little bit about the work that you're doing today.

Mostly I'm interested in the maintenance of very large codebases. I would like to make it easier for people to understand the code, to get a good feeling about the code, to change the code and especially to understand the history of the code and how they can use the history to help them go forward in the future.

What is the goal of the talk?

I want to make it easier for people to update their code in a good way. For example, some code may be written in a certain way. Maybe it was a good idea at the time, but one can see that it's not a good idea anymore, and one would like to update it. But then one may think to onesself, oh, I'm going to have to go through 500 files and change 600 lines of code or something like that. There's a very high chance of making a mistake. It would be also extremely boring. And so I'm not going to do it. I'm just going to live with the way things are and maybe things will be okay somehow in the future.

Can Coccinelle be used for other languages than C/Linux?

Today it's targeted mainly to C code. We've developed it with Linux kernel in mind, but it has been used for plenty of other C codebases. There's some issues with respect to macros and you have to configure it with the macros that are using your codebase, but it's usually pretty easy to get it to work pretty well on most C codebases as long as they are written in a reasonable manner. We also support some aspects of C++. If you want to update the part of your C++ code that looks like C, then it may work on that as well. And we also have a prototype for Java that hasn't been explored very much, but if people are interested in using it, then we would be happy to have feedback at least and to improve it if necessary.

What is the persona targeted by this talk?

Most of our users so far have been developers, that is the people actually touching the code and have some recurring change that they need to automate. Coccinelle can also be used for finding certain patterns of code, maybe patterns that might have bugs. And so a target would be people who need to find those kinds of issues. In coming to QCon, I hope also to be able to talk maybe a bit more to higher level managers who might be interested in supporting further development of Coccinelle or just using it maybe on a wider scale in the projects that they're working on.

And perhaps expanding it into the Java language.

We're also interested in expanding it to other languages, but we don't have the manpower for that at the moment. The Java port took about three months, so maybe other languages would not take too long either. I don't know.

What would be some takeaways from your talk?

The main point is the methodology of how you can use the tool. So in the talk, I will be going through that methodology, it's quite simple. You just take an extract of code that represents the thing that you want to change, and then you extract the code and make it a bit more abstract and then you just run with it. So I would like people to come away from the talk feeling that they can download the tool and they can know how to use it pretty much on their own. Maybe just based on the slides of the talk, they shouldn't have to spend a lot of time studying documentation and so on. It should be hopefully just ready to go immediately.


Speaker

Julia Lawall

Senior Researcher @Inria

Julia Lawall is a Senior Research Scientist at Inria. Her research is at the intersection of programming languages and operating systems. She develops the tool Coccinelle and has over 2000 patches in the Linux kernel based on this work.

Read more

Location

Westminster, 4th flr.

Track

Modern CS in the Real World

Topics

Interview AvailableLinuxBugs and Hotfixes

Share

From the same track

SESSION + Live Q&A Database Design

Infinite Parallel Universes: State at the Edge

Databases and other systems of state often rely on abstractions that break down at large physical scale. In this talk I'll describe the problems with some of these traditional assumptions, and suggest better approaches for effectively managing data in geographically large networks. With...

Peter Bourgon

Principal Engineer @fastly

SESSION + Live Q&A Serverless

Cloudstate—Towards Stateful Serverless

Serverless experience is revolutionary and will grow to dominate the future of Cloud. Function-as-a-Service (FaaS) however—with its ephemeral, stateless, and short-lived functions—is only the first step. FaaS is great for processing-intensive, parallelizable workloads, moving data...

Sean Walsh

Field CTO @Lightbend

SESSION + Live Q&A Debugging

Record, Replay, Rinse, & Repeat: Easily Rebuilding Programmatic State

Join this talk to learn about the various implementations of record and replay systems that can be used to debug software applications. The talk begins with a discussion of the current state of the art, from both academia and the real world. We then provide an overview of the pros and cons,...

Greg Law

Co-founder & CTO @undo_io

SESSION + Live Q&A Apache Kafka

Kafka: a Modern Distributed System

You may have heard that Apache Kafka plays a central role in modern event-driven architectures. It lies at the heart of successful microservices implementations -- its loyal following is well versed in Kafka's key APIs: the Producer and Consumer, Kafka Streams, and maybe even KSQL. But have...

Tim Berglund

Senior Director of Developer Experience @Confluent

SESSION + Live Q&A Silicon Valley

Applying AI/ML for Trusted Commerce Connections @Facebook Marketplace

Facebook Marketplace is aimed at making buying and selling seamless for people locally within their communities and open up economic opportunity through social commerce. Given that Trust is a key driver of consumer decisions in Commerce, it is important for Facebook to build trust amongst buyers...

Liza Fireman

Engineering Manager @Facebook Marketplace Trust & Safety

View full Schedule