SlideShare a Scribd company logo
1 of 16
Download to read offline
Analyzing Linux Kernel
interface changes by
looking at binaries
Dodji Seketeli <dodji@redhat.com>
Kernel Recipes, Paris 2016
2
What if we could see ...
● Changes in interfaces between vmlinux and its
modules
● Just by looking at:
– Two versions of vmlinux
– Two versions of a given kernel module
● A kind of diff
– For (ELF) binaries
– That shows changes in a meaningful way for programmers
3
There is tooling for almost that
● abidiff works on userspace ELF binaries
● Reads:
– Basic information from ELF (symbols, etc)
– Semantic information from ELF debug information
● Functions, variables
● Type hierarchies
● Source locations of definitions
● Builds internal representation of an ABI Corpus
– Globally defined functions and variables of a binary
– Including their types
● Builds internal representation of differences between ABI Corpora
4
Action: semantic diffs of binaries
$ abidiff libtest-v0.so libtest-v1.so
Functions changes summary: 0 Removed, 1 Changed, 0 Added function
Variables changes summary: 0 Removed, 0 Changed, 0 Added variable
1 function with some indirect sub-type change:
[C]'function int foo(struct_type*)' at test-v1.c:10:1 has some indirect sub-type changes:
return type changed:
type name changed from 'int' to 'char'
type size changed from 32 to 8 bits
parameter 1 of type 'struct_type*' has sub-type changes:
in pointed to type 'typedef struct_type' at test-v1.h:9:1:
underlying type 'struct S' at test-v1.h:4:1 changed:
1 data member change:
type of 'priv_type* S::priv' changed:
in pointed to type 'typedef priv_type' at test-v1.h:2:1:
underlying type 'struct priv' at test-v1.c:3:1 changed:
type size changed from 64 to 96 bits
1 data member insertion:
'unsigned int priv::added_in_between', at offset 32 (in bits) at test-v1.c:6:1
1 data member change:
'char priv::m2' offset changed from 32 to 64 (in bits)
$
5
And the flat source code diff was ...
$ diff -u test-v0.c test-v1.c
--- test-v0.c 2016-09-29 12:11:12.688336271 +0200
+++ test-v1.c 2016-09-29 12:28:04.275719322 +0200
@@ -1,12 +1,13 @@
-#include "include1/test-v0.h"
+#include "include2/test-v1.h"
struct priv
{
int m1;
+ unsigned added_in_between;
char m2;
};
-int foo(struct_type *s)
+char foo(struct_type *s)
{
return s->priv->m2;
}
$ diff -u include1/test-v0.h include2/test-v1.h
--- include1/test-v0.h 2016-09-29 11:32:06.363637581 +0200
+++ include2/test-v1.h 2016-09-29 11:31:27.870003380 +0200
@@ -8,4 +8,4 @@
typedef struct S struct_type;
-int foo(struct_type *s);
+char foo(struct_type *s);
$
6
Less noise
$ abidiff --headers-dir1 include1 --headers-dir2 include2 libtest-v0.so libtest-v1.so
Functions changes summary: 0 Removed, 1 Changed, 0 Added function
Variables changes summary: 0 Removed, 0 Changed, 0 Added variable
1 function with some indirect sub-type change:
[C]'function int foo(struct_type*)' at test-v1.c:10:1 has some indirect sub-type changes:
return type changed:
type name changed from 'int' to 'char'
type size changed from 32 to 8 bits
$
7
Choose your differences! [1/2]
$ abidiff libtest2-v0.so libtest2-v1.so
Functions changes summary: 1 Removed, 1 Changed, 1 Added functions
Variables changes summary: 0 Removed, 0 Changed, 0 Added variable
1 Removed function:
'function void function_to_remove()' {function_to_remove}
1 Added function:
'function void function_added()' {function_added}
1 function with some indirect sub-type change:
[C]'function void function(int, char)' at test2-v1.c:1:1 has some indirect sub-type changes:
return type changed:
type name changed from 'void' to 'int'
type size changed from 0 to 32 bits
parameter 2 of type 'char' was removed
$
8
Choose your differences! [2/2]
$ cat libtest2.abignore
[suppress_function]
change_kind = added-function
$ abidiff --suppr libtest2.abignore libtest2-v0.so libtest2-v1.so
Functions changes summary: 1 Removed, 1 Changed, 0 Added functions (1 filtered out)
Variables changes summary: 0 Removed, 0 Changed, 0 Added variable
1 Removed function:
'function void function_to_remove()' {function_to_remove}
1 function with some indirect sub-type change:
[C]'function void function(int, char)' at test2-v1.c:1:1 has some indirect sub-type changes:
return type changed:
type name changed from 'void' to 'int'
type size changed from 0 to 32 bits
parameter 2 of type 'char' was removed
$
9
Save binary interfaces
$ abidw libtest-v0.so > libtest-v0.so.abi
10
Other tools in the family
● abipkgdiff: compare binaries in two packages
– RPMs and DEBs
● fedabipkgdiff: compare binaries in remote packages
– Queries packages built in the remote Fedora build
system
– This works just for Fedora
● Automatic ABI change review of Fedora package
updates
11
Nothing for the
Linux Kernel!
(Yet)
12
Pipe dream
What if we had hypothetical tools to analyze kernel/modules interface changes?
$ kabidiff usr/lib/debug/lib/modules/4.8.0-0.rc7.git1.1.local.fc26.x86_64/vmlinux 
usr/lib/debug/lib/modules/4.8.0-0.rc8.git1.1.local.fc26.x86_64/vmlinux
$ kabipkgdiff linux.git/master/build-dir/ linux.git/my-hack-branch/build-dir/
13
What it would take
● Handle special Linux/ELF symbol sections
– __export_symbol, __export_symbol_gpl sections
● Support augmenting a (vmlinux) ABI Corpus
– With ABI artifacts coming from modules
● More memory consumption optimizations
14
Work has just started ...
● In the dodji/kabidiff branch of the Git repo
– git clone -b dodji/kabidiff git://sourceware.org/git/libabigail.git
● So far:
– Added a –linux-kernel-mode to abidw
– people.redhat.com/~dseketel/kabidiff/vmlinux.abi.txt
– people.redhat.com/~dseketel/kabidiff/tun.ko.abi.txt
– people.redhat.com/~dseketel/kabidiff/uio.ko.abi.txt
15
What do you think?
● irc://irc.oftc.net#libabigail
● https://sourceware.org/libabigail/manual/
● https://sourceware.org/libabigail/apidoc/
● https://sourceware.org/libabigail/wiki/
● https://sourceware.org/bugzilla/enter_bug.cgi?product=libabigail
● https://sourceware.org/libabigail/wiki/SubscribeToMailingList
● https://www.sourceware.org/libabigail/
16
Thank you
And
Enjoy Paris!

More Related Content

What's hot

Virtualization which isn't: LXC (Linux Containers)
Virtualization which isn't: LXC (Linux Containers)Virtualization which isn't: LXC (Linux Containers)
Virtualization which isn't: LXC (Linux Containers)
Dobrica Pavlinušić
 
AOS Lab 2: Hello, xv6!
AOS Lab 2: Hello, xv6!AOS Lab 2: Hello, xv6!
AOS Lab 2: Hello, xv6!
Zubair Nabi
 
AOS Lab 1: Hello, Linux!
AOS Lab 1: Hello, Linux!AOS Lab 1: Hello, Linux!
AOS Lab 1: Hello, Linux!
Zubair Nabi
 

What's hot (20)

Driver_linux
Driver_linuxDriver_linux
Driver_linux
 
FreeBSD: The Next 10 Years (MeetBSD 2014)
FreeBSD: The Next 10 Years (MeetBSD 2014)FreeBSD: The Next 10 Years (MeetBSD 2014)
FreeBSD: The Next 10 Years (MeetBSD 2014)
 
Python on FreeBSD
Python on FreeBSDPython on FreeBSD
Python on FreeBSD
 
BDM29: AdamCloud Project - Part I
BDM29: AdamCloud Project - Part IBDM29: AdamCloud Project - Part I
BDM29: AdamCloud Project - Part I
 
Virtualization which isn't: LXC (Linux Containers)
Virtualization which isn't: LXC (Linux Containers)Virtualization which isn't: LXC (Linux Containers)
Virtualization which isn't: LXC (Linux Containers)
 
Container Torture: Run any binary, in any container
Container Torture: Run any binary, in any containerContainer Torture: Run any binary, in any container
Container Torture: Run any binary, in any container
 
AOS Lab 2: Hello, xv6!
AOS Lab 2: Hello, xv6!AOS Lab 2: Hello, xv6!
AOS Lab 2: Hello, xv6!
 
Container & kubernetes
Container & kubernetesContainer & kubernetes
Container & kubernetes
 
Fluentd vs. Logstash for OpenStack Log Management
Fluentd vs. Logstash for OpenStack Log ManagementFluentd vs. Logstash for OpenStack Log Management
Fluentd vs. Logstash for OpenStack Log Management
 
Docker / Ansible
Docker / AnsibleDocker / Ansible
Docker / Ansible
 
Red Teaming macOS Environments with Hermes the Swift Messenger
Red Teaming macOS Environments with Hermes the Swift MessengerRed Teaming macOS Environments with Hermes the Swift Messenger
Red Teaming macOS Environments with Hermes the Swift Messenger
 
AOS Lab 1: Hello, Linux!
AOS Lab 1: Hello, Linux!AOS Lab 1: Hello, Linux!
AOS Lab 1: Hello, Linux!
 
introduction to linux kernel tcp/ip ptocotol stack
introduction to linux kernel tcp/ip ptocotol stack introduction to linux kernel tcp/ip ptocotol stack
introduction to linux kernel tcp/ip ptocotol stack
 
Practical Glusto Example
Practical Glusto ExamplePractical Glusto Example
Practical Glusto Example
 
Java in containers
Java in containersJava in containers
Java in containers
 
OpenZFS at LinuxCon
OpenZFS at LinuxConOpenZFS at LinuxCon
OpenZFS at LinuxCon
 
Cgroups, namespaces, and beyond: what are containers made from? (DockerCon Eu...
Cgroups, namespaces, and beyond: what are containers made from? (DockerCon Eu...Cgroups, namespaces, and beyond: what are containers made from? (DockerCon Eu...
Cgroups, namespaces, and beyond: what are containers made from? (DockerCon Eu...
 
An Updated Performance Comparison of Virtual Machines and Linux Containers
An Updated Performance Comparison of Virtual Machines and Linux ContainersAn Updated Performance Comparison of Virtual Machines and Linux Containers
An Updated Performance Comparison of Virtual Machines and Linux Containers
 
Linux Kernel Development
Linux Kernel DevelopmentLinux Kernel Development
Linux Kernel Development
 
OpenZFS novel algorithms: snapshots, space allocation, RAID-Z - Matt Ahrens
OpenZFS novel algorithms: snapshots, space allocation, RAID-Z - Matt AhrensOpenZFS novel algorithms: snapshots, space allocation, RAID-Z - Matt Ahrens
OpenZFS novel algorithms: snapshots, space allocation, RAID-Z - Matt Ahrens
 

Viewers also liked

Viewers also liked (6)

Introduction to spartakus and how it can help fight linux kernel ABI breakages
Introduction to spartakus and how it can help fight linux kernel ABI breakagesIntroduction to spartakus and how it can help fight linux kernel ABI breakages
Introduction to spartakus and how it can help fight linux kernel ABI breakages
 
Abi capabilities
Abi capabilitiesAbi capabilities
Abi capabilities
 
Controlling Memory Footprint at All Layers: Linux Kernel, Applications, Libra...
Controlling Memory Footprint at All Layers: Linux Kernel, Applications, Libra...Controlling Memory Footprint at All Layers: Linux Kernel, Applications, Libra...
Controlling Memory Footprint at All Layers: Linux Kernel, Applications, Libra...
 
FISL XIV - The ELF File Format and the Linux Loader
FISL XIV - The ELF File Format and the Linux LoaderFISL XIV - The ELF File Format and the Linux Loader
FISL XIV - The ELF File Format and the Linux Loader
 
Linux binary analysis and exploitation
Linux binary analysis and exploitationLinux binary analysis and exploitation
Linux binary analysis and exploitation
 
AWS Black Belt Online Seminar 2017 Auto Scaling
AWS Black Belt Online Seminar 2017 Auto ScalingAWS Black Belt Online Seminar 2017 Auto Scaling
AWS Black Belt Online Seminar 2017 Auto Scaling
 

Similar to Kernel Recipes 2016 - Would an ABI changes visualization tool be useful to Linux Kernel maintenance?

c programming L-1.pdf43333333544444444444444444444
c programming L-1.pdf43333333544444444444444444444c programming L-1.pdf43333333544444444444444444444
c programming L-1.pdf43333333544444444444444444444
PurvaShyama
 

Similar to Kernel Recipes 2016 - Would an ABI changes visualization tool be useful to Linux Kernel maintenance? (20)

Good news, everybody! Guile 2.2 performance notes (FOSDEM 2016)
Good news, everybody! Guile 2.2 performance notes (FOSDEM 2016)Good news, everybody! Guile 2.2 performance notes (FOSDEM 2016)
Good news, everybody! Guile 2.2 performance notes (FOSDEM 2016)
 
Kernel Recipes 2019 - Analyzing changes to the binary interface exposed by th...
Kernel Recipes 2019 - Analyzing changes to the binary interface exposed by th...Kernel Recipes 2019 - Analyzing changes to the binary interface exposed by th...
Kernel Recipes 2019 - Analyzing changes to the binary interface exposed by th...
 
HKG15-207: Advanced Toolchain Usage Part 3
HKG15-207: Advanced Toolchain Usage Part 3HKG15-207: Advanced Toolchain Usage Part 3
HKG15-207: Advanced Toolchain Usage Part 3
 
HKG15-211: Advanced Toolchain Usage Part 4
HKG15-211: Advanced Toolchain Usage Part 4HKG15-211: Advanced Toolchain Usage Part 4
HKG15-211: Advanced Toolchain Usage Part 4
 
C++ Constructs.pptx
C++ Constructs.pptxC++ Constructs.pptx
C++ Constructs.pptx
 
C++ Interview Question And Answer
C++ Interview Question And AnswerC++ Interview Question And Answer
C++ Interview Question And Answer
 
C++ questions And Answer
C++ questions And AnswerC++ questions And Answer
C++ questions And Answer
 
02 functions, variables, basic input and output of c++
02   functions, variables, basic input and output of c++02   functions, variables, basic input and output of c++
02 functions, variables, basic input and output of c++
 
User defined functions
User defined functionsUser defined functions
User defined functions
 
Beginner's guide to linkers
Beginner's guide to linkersBeginner's guide to linkers
Beginner's guide to linkers
 
嵌入式Linux課程-GNU Toolchain
嵌入式Linux課程-GNU Toolchain嵌入式Linux課程-GNU Toolchain
嵌入式Linux課程-GNU Toolchain
 
c programming L-1.pdf43333333544444444444444444444
c programming L-1.pdf43333333544444444444444444444c programming L-1.pdf43333333544444444444444444444
c programming L-1.pdf43333333544444444444444444444
 
Nicola Iarocci - Git stories from the front line - Codemotion Milan 2017
Nicola Iarocci - Git stories from the front line - Codemotion Milan 2017Nicola Iarocci - Git stories from the front line - Codemotion Milan 2017
Nicola Iarocci - Git stories from the front line - Codemotion Milan 2017
 
C++ Boot Camp Part 2
C++ Boot Camp Part 2C++ Boot Camp Part 2
C++ Boot Camp Part 2
 
1183 c-interview-questions-and-answers
1183 c-interview-questions-and-answers1183 c-interview-questions-and-answers
1183 c-interview-questions-and-answers
 
Stoop 305-reflective programming5
Stoop 305-reflective programming5Stoop 305-reflective programming5
Stoop 305-reflective programming5
 
Functions in c++
Functions in c++Functions in c++
Functions in c++
 
Qe Reference
Qe ReferenceQe Reference
Qe Reference
 
Intro to c++
Intro to c++Intro to c++
Intro to c++
 
embedded C.pptx
embedded C.pptxembedded C.pptx
embedded C.pptx
 

More from Anne Nicolas

Kernel Recipes 2019 - GNU poke, an extensible editor for structured binary data
Kernel Recipes 2019 - GNU poke, an extensible editor for structured binary dataKernel Recipes 2019 - GNU poke, an extensible editor for structured binary data
Kernel Recipes 2019 - GNU poke, an extensible editor for structured binary data
Anne Nicolas
 

More from Anne Nicolas (20)

Kernel Recipes 2019 - Driving the industry toward upstream first
Kernel Recipes 2019 - Driving the industry toward upstream firstKernel Recipes 2019 - Driving the industry toward upstream first
Kernel Recipes 2019 - Driving the industry toward upstream first
 
Kernel Recipes 2019 - No NMI? No Problem! – Implementing Arm64 Pseudo-NMI
Kernel Recipes 2019 - No NMI? No Problem! – Implementing Arm64 Pseudo-NMIKernel Recipes 2019 - No NMI? No Problem! – Implementing Arm64 Pseudo-NMI
Kernel Recipes 2019 - No NMI? No Problem! – Implementing Arm64 Pseudo-NMI
 
Kernel Recipes 2019 - Hunting and fixing bugs all over the Linux kernel
Kernel Recipes 2019 - Hunting and fixing bugs all over the Linux kernelKernel Recipes 2019 - Hunting and fixing bugs all over the Linux kernel
Kernel Recipes 2019 - Hunting and fixing bugs all over the Linux kernel
 
Kernel Recipes 2019 - Metrics are money
Kernel Recipes 2019 - Metrics are moneyKernel Recipes 2019 - Metrics are money
Kernel Recipes 2019 - Metrics are money
 
Kernel Recipes 2019 - Kernel documentation: past, present, and future
Kernel Recipes 2019 - Kernel documentation: past, present, and futureKernel Recipes 2019 - Kernel documentation: past, present, and future
Kernel Recipes 2019 - Kernel documentation: past, present, and future
 
Embedded Recipes 2019 - Knowing your ARM from your ARSE: wading through the t...
Embedded Recipes 2019 - Knowing your ARM from your ARSE: wading through the t...Embedded Recipes 2019 - Knowing your ARM from your ARSE: wading through the t...
Embedded Recipes 2019 - Knowing your ARM from your ARSE: wading through the t...
 
Kernel Recipes 2019 - GNU poke, an extensible editor for structured binary data
Kernel Recipes 2019 - GNU poke, an extensible editor for structured binary dataKernel Recipes 2019 - GNU poke, an extensible editor for structured binary data
Kernel Recipes 2019 - GNU poke, an extensible editor for structured binary data
 
Embedded Recipes 2019 - Remote update adventures with RAUC, Yocto and Barebox
Embedded Recipes 2019 - Remote update adventures with RAUC, Yocto and BareboxEmbedded Recipes 2019 - Remote update adventures with RAUC, Yocto and Barebox
Embedded Recipes 2019 - Remote update adventures with RAUC, Yocto and Barebox
 
Embedded Recipes 2019 - Making embedded graphics less special
Embedded Recipes 2019 - Making embedded graphics less specialEmbedded Recipes 2019 - Making embedded graphics less special
Embedded Recipes 2019 - Making embedded graphics less special
 
Embedded Recipes 2019 - Linux on Open Source Hardware and Libre Silicon
Embedded Recipes 2019 - Linux on Open Source Hardware and Libre SiliconEmbedded Recipes 2019 - Linux on Open Source Hardware and Libre Silicon
Embedded Recipes 2019 - Linux on Open Source Hardware and Libre Silicon
 
Embedded Recipes 2019 - From maintaining I2C to the big (embedded) picture
Embedded Recipes 2019 - From maintaining I2C to the big (embedded) pictureEmbedded Recipes 2019 - From maintaining I2C to the big (embedded) picture
Embedded Recipes 2019 - From maintaining I2C to the big (embedded) picture
 
Embedded Recipes 2019 - Testing firmware the devops way
Embedded Recipes 2019 - Testing firmware the devops wayEmbedded Recipes 2019 - Testing firmware the devops way
Embedded Recipes 2019 - Testing firmware the devops way
 
Embedded Recipes 2019 - Herd your socs become a matchmaker
Embedded Recipes 2019 - Herd your socs become a matchmakerEmbedded Recipes 2019 - Herd your socs become a matchmaker
Embedded Recipes 2019 - Herd your socs become a matchmaker
 
Embedded Recipes 2019 - LLVM / Clang integration
Embedded Recipes 2019 - LLVM / Clang integrationEmbedded Recipes 2019 - LLVM / Clang integration
Embedded Recipes 2019 - LLVM / Clang integration
 
Embedded Recipes 2019 - Introduction to JTAG debugging
Embedded Recipes 2019 - Introduction to JTAG debuggingEmbedded Recipes 2019 - Introduction to JTAG debugging
Embedded Recipes 2019 - Introduction to JTAG debugging
 
Embedded Recipes 2019 - Pipewire a new foundation for embedded multimedia
Embedded Recipes 2019 - Pipewire a new foundation for embedded multimediaEmbedded Recipes 2019 - Pipewire a new foundation for embedded multimedia
Embedded Recipes 2019 - Pipewire a new foundation for embedded multimedia
 
Kernel Recipes 2019 - ftrace: Where modifying a running kernel all started
Kernel Recipes 2019 - ftrace: Where modifying a running kernel all startedKernel Recipes 2019 - ftrace: Where modifying a running kernel all started
Kernel Recipes 2019 - ftrace: Where modifying a running kernel all started
 
Kernel Recipes 2019 - Suricata and XDP
Kernel Recipes 2019 - Suricata and XDPKernel Recipes 2019 - Suricata and XDP
Kernel Recipes 2019 - Suricata and XDP
 
Kernel Recipes 2019 - Marvels of Memory Auto-configuration (SPD)
Kernel Recipes 2019 - Marvels of Memory Auto-configuration (SPD)Kernel Recipes 2019 - Marvels of Memory Auto-configuration (SPD)
Kernel Recipes 2019 - Marvels of Memory Auto-configuration (SPD)
 
Kernel Recipes 2019 - Formal modeling made easy
Kernel Recipes 2019 - Formal modeling made easyKernel Recipes 2019 - Formal modeling made easy
Kernel Recipes 2019 - Formal modeling made easy
 

Recently uploaded

%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
masabamasaba
 
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
masabamasaba
 
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
masabamasaba
 
Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...
Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...
Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...
chiefasafspells
 
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
Health
 
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
masabamasaba
 
Abortion Pills In Pretoria ](+27832195400*)[ 🏥 Women's Abortion Clinic In Pre...
Abortion Pills In Pretoria ](+27832195400*)[ 🏥 Women's Abortion Clinic In Pre...Abortion Pills In Pretoria ](+27832195400*)[ 🏥 Women's Abortion Clinic In Pre...
Abortion Pills In Pretoria ](+27832195400*)[ 🏥 Women's Abortion Clinic In Pre...
Medical / Health Care (+971588192166) Mifepristone and Misoprostol tablets 200mg
 

Recently uploaded (20)

Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
 
WSO2CON 2024 - Freedom First—Unleashing Developer Potential with Open Source
WSO2CON 2024 - Freedom First—Unleashing Developer Potential with Open SourceWSO2CON 2024 - Freedom First—Unleashing Developer Potential with Open Source
WSO2CON 2024 - Freedom First—Unleashing Developer Potential with Open Source
 
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
 
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
 
WSO2Con2024 - Enabling Transactional System's Exponential Growth With Simplicity
WSO2Con2024 - Enabling Transactional System's Exponential Growth With SimplicityWSO2Con2024 - Enabling Transactional System's Exponential Growth With Simplicity
WSO2Con2024 - Enabling Transactional System's Exponential Growth With Simplicity
 
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
 
WSO2Con204 - Hard Rock Presentation - Keynote
WSO2Con204 - Hard Rock Presentation - KeynoteWSO2Con204 - Hard Rock Presentation - Keynote
WSO2Con204 - Hard Rock Presentation - Keynote
 
VTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learnVTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learn
 
WSO2CON2024 - It's time to go Platformless
WSO2CON2024 - It's time to go PlatformlessWSO2CON2024 - It's time to go Platformless
WSO2CON2024 - It's time to go Platformless
 
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
 
tonesoftg
tonesoftgtonesoftg
tonesoftg
 
Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...
Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...
Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...
 
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
 
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
 
WSO2CON 2024 - Navigating API Complexity: REST, GraphQL, gRPC, Websocket, Web...
WSO2CON 2024 - Navigating API Complexity: REST, GraphQL, gRPC, Websocket, Web...WSO2CON 2024 - Navigating API Complexity: REST, GraphQL, gRPC, Websocket, Web...
WSO2CON 2024 - Navigating API Complexity: REST, GraphQL, gRPC, Websocket, Web...
 
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
 
%in Midrand+277-882-255-28 abortion pills for sale in midrand
%in Midrand+277-882-255-28 abortion pills for sale in midrand%in Midrand+277-882-255-28 abortion pills for sale in midrand
%in Midrand+277-882-255-28 abortion pills for sale in midrand
 
Direct Style Effect Systems - The Print[A] Example - A Comprehension Aid
Direct Style Effect Systems -The Print[A] Example- A Comprehension AidDirect Style Effect Systems -The Print[A] Example- A Comprehension Aid
Direct Style Effect Systems - The Print[A] Example - A Comprehension Aid
 
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital TransformationWSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
 
Abortion Pills In Pretoria ](+27832195400*)[ 🏥 Women's Abortion Clinic In Pre...
Abortion Pills In Pretoria ](+27832195400*)[ 🏥 Women's Abortion Clinic In Pre...Abortion Pills In Pretoria ](+27832195400*)[ 🏥 Women's Abortion Clinic In Pre...
Abortion Pills In Pretoria ](+27832195400*)[ 🏥 Women's Abortion Clinic In Pre...
 

Kernel Recipes 2016 - Would an ABI changes visualization tool be useful to Linux Kernel maintenance?

  • 1. Analyzing Linux Kernel interface changes by looking at binaries Dodji Seketeli <dodji@redhat.com> Kernel Recipes, Paris 2016
  • 2. 2 What if we could see ... ● Changes in interfaces between vmlinux and its modules ● Just by looking at: – Two versions of vmlinux – Two versions of a given kernel module ● A kind of diff – For (ELF) binaries – That shows changes in a meaningful way for programmers
  • 3. 3 There is tooling for almost that ● abidiff works on userspace ELF binaries ● Reads: – Basic information from ELF (symbols, etc) – Semantic information from ELF debug information ● Functions, variables ● Type hierarchies ● Source locations of definitions ● Builds internal representation of an ABI Corpus – Globally defined functions and variables of a binary – Including their types ● Builds internal representation of differences between ABI Corpora
  • 4. 4 Action: semantic diffs of binaries $ abidiff libtest-v0.so libtest-v1.so Functions changes summary: 0 Removed, 1 Changed, 0 Added function Variables changes summary: 0 Removed, 0 Changed, 0 Added variable 1 function with some indirect sub-type change: [C]'function int foo(struct_type*)' at test-v1.c:10:1 has some indirect sub-type changes: return type changed: type name changed from 'int' to 'char' type size changed from 32 to 8 bits parameter 1 of type 'struct_type*' has sub-type changes: in pointed to type 'typedef struct_type' at test-v1.h:9:1: underlying type 'struct S' at test-v1.h:4:1 changed: 1 data member change: type of 'priv_type* S::priv' changed: in pointed to type 'typedef priv_type' at test-v1.h:2:1: underlying type 'struct priv' at test-v1.c:3:1 changed: type size changed from 64 to 96 bits 1 data member insertion: 'unsigned int priv::added_in_between', at offset 32 (in bits) at test-v1.c:6:1 1 data member change: 'char priv::m2' offset changed from 32 to 64 (in bits) $
  • 5. 5 And the flat source code diff was ... $ diff -u test-v0.c test-v1.c --- test-v0.c 2016-09-29 12:11:12.688336271 +0200 +++ test-v1.c 2016-09-29 12:28:04.275719322 +0200 @@ -1,12 +1,13 @@ -#include "include1/test-v0.h" +#include "include2/test-v1.h" struct priv { int m1; + unsigned added_in_between; char m2; }; -int foo(struct_type *s) +char foo(struct_type *s) { return s->priv->m2; } $ diff -u include1/test-v0.h include2/test-v1.h --- include1/test-v0.h 2016-09-29 11:32:06.363637581 +0200 +++ include2/test-v1.h 2016-09-29 11:31:27.870003380 +0200 @@ -8,4 +8,4 @@ typedef struct S struct_type; -int foo(struct_type *s); +char foo(struct_type *s); $
  • 6. 6 Less noise $ abidiff --headers-dir1 include1 --headers-dir2 include2 libtest-v0.so libtest-v1.so Functions changes summary: 0 Removed, 1 Changed, 0 Added function Variables changes summary: 0 Removed, 0 Changed, 0 Added variable 1 function with some indirect sub-type change: [C]'function int foo(struct_type*)' at test-v1.c:10:1 has some indirect sub-type changes: return type changed: type name changed from 'int' to 'char' type size changed from 32 to 8 bits $
  • 7. 7 Choose your differences! [1/2] $ abidiff libtest2-v0.so libtest2-v1.so Functions changes summary: 1 Removed, 1 Changed, 1 Added functions Variables changes summary: 0 Removed, 0 Changed, 0 Added variable 1 Removed function: 'function void function_to_remove()' {function_to_remove} 1 Added function: 'function void function_added()' {function_added} 1 function with some indirect sub-type change: [C]'function void function(int, char)' at test2-v1.c:1:1 has some indirect sub-type changes: return type changed: type name changed from 'void' to 'int' type size changed from 0 to 32 bits parameter 2 of type 'char' was removed $
  • 8. 8 Choose your differences! [2/2] $ cat libtest2.abignore [suppress_function] change_kind = added-function $ abidiff --suppr libtest2.abignore libtest2-v0.so libtest2-v1.so Functions changes summary: 1 Removed, 1 Changed, 0 Added functions (1 filtered out) Variables changes summary: 0 Removed, 0 Changed, 0 Added variable 1 Removed function: 'function void function_to_remove()' {function_to_remove} 1 function with some indirect sub-type change: [C]'function void function(int, char)' at test2-v1.c:1:1 has some indirect sub-type changes: return type changed: type name changed from 'void' to 'int' type size changed from 0 to 32 bits parameter 2 of type 'char' was removed $
  • 9. 9 Save binary interfaces $ abidw libtest-v0.so > libtest-v0.so.abi
  • 10. 10 Other tools in the family ● abipkgdiff: compare binaries in two packages – RPMs and DEBs ● fedabipkgdiff: compare binaries in remote packages – Queries packages built in the remote Fedora build system – This works just for Fedora ● Automatic ABI change review of Fedora package updates
  • 11. 11 Nothing for the Linux Kernel! (Yet)
  • 12. 12 Pipe dream What if we had hypothetical tools to analyze kernel/modules interface changes? $ kabidiff usr/lib/debug/lib/modules/4.8.0-0.rc7.git1.1.local.fc26.x86_64/vmlinux usr/lib/debug/lib/modules/4.8.0-0.rc8.git1.1.local.fc26.x86_64/vmlinux $ kabipkgdiff linux.git/master/build-dir/ linux.git/my-hack-branch/build-dir/
  • 13. 13 What it would take ● Handle special Linux/ELF symbol sections – __export_symbol, __export_symbol_gpl sections ● Support augmenting a (vmlinux) ABI Corpus – With ABI artifacts coming from modules ● More memory consumption optimizations
  • 14. 14 Work has just started ... ● In the dodji/kabidiff branch of the Git repo – git clone -b dodji/kabidiff git://sourceware.org/git/libabigail.git ● So far: – Added a –linux-kernel-mode to abidw – people.redhat.com/~dseketel/kabidiff/vmlinux.abi.txt – people.redhat.com/~dseketel/kabidiff/tun.ko.abi.txt – people.redhat.com/~dseketel/kabidiff/uio.ko.abi.txt
  • 15. 15 What do you think? ● irc://irc.oftc.net#libabigail ● https://sourceware.org/libabigail/manual/ ● https://sourceware.org/libabigail/apidoc/ ● https://sourceware.org/libabigail/wiki/ ● https://sourceware.org/bugzilla/enter_bug.cgi?product=libabigail ● https://sourceware.org/libabigail/wiki/SubscribeToMailingList ● https://www.sourceware.org/libabigail/