SlideShare a Scribd company logo
1 of 23
Download to read offline
Abstract Interpretation meets model
checking near the 1000000 LOC
mark
- Finding errors in the Linux Kernel
Source
Peter T. Breuer & Simon Pickin
Universidad Carlos III de Madrid
Goal
•
Apply
Formal Methods
to the
Linux kernel
•
Methods must be
➢ post-hoc
➢ capable of application by non-experts
➢ able to handle 6.5 millions of lines of
rapidly changing C code
Analysis Example -Sleep under
Spinlock Hunt (SluSH)
Output from SluSH run
What is sleep under spinlock?
• Sleep = thread scheduled out of CPU
• Spinlock = busy wait for lock release
• Two CPUs
+ two threads waiting on spinlocks
= one dead machine
Example of bad code
• snd_sb_csp_load() in sb16_csp.c
Another piece of guilty code
• Kernel 2.6.12 sound/oss/sequencer.c midi_outc()
Cox owns up
Output summarises liklihoods
Other classes of problems detected
• Access (read/write) to kfreed memory
• Overflow 4096B of stack
• Spinlock under spinlock
• Call to function that expects non-NULL
parameters with possibly NULL argument
• ...
– Logic is configured, so new tests can be invented
Example of kfree/access
• drivers/scsi/aix7xxx_old.c in kernel 2.6.3
Basic technique
The abstract view
Components of analysis system
• Description of statements as logic transformers
– p .... p[n-1/n]
• Trigger/action system for raising alarms!
• Combining logic NRB
• Guiding abstract interpretation s to state x
x ∈s ∩ p
stops dead code evaluation, etc.
Statement Logic - NRB
• Single code statement
– maintains condition P normally
– empty statement cannot return (F)
– empty statement cannot break (F)
Sequence logic -NRB
• normal exit: traverse A then B
• return exit: return from A
OR traverse A then return from B
• break exit: break from A
OR traverse A then break from B
Loop logic -NRB
• break from body is only normal exit from while(1)
• relax p until it
is invariant
Conditional logic -NRB
Programmable trigger/action engine
• Three rules handle propagation of call graph and
other housekeeping.
– a sleep call while the objective function is
positive causes output:
Using the analyser
• Call with the same arguments as given to the gcc
compiler
Limitations
• Predicates are restricted to unions of n-cubes
• State is not followed well enough:
– x = 1; if (x) A else B;
● treated correctly - only A is evaluated
– if (x) A else B; if (x) C else D;
● over-abstracted - A;C | A;D | B;C | B;D
– possible solution is to push state into the
predicates
((x!=0);A | (x==0);B) ; ((x!=0);C | (x==0);D)
● but we can't follow calculation well - quickly get
to 
Implication of predicates is decidable
• Basic evaluation is C  U Ci
of cubes
– i.e. U Ci
covers C
Summary
• A step towards analyses of 100MLoC.
– No expertise needed
– Fast
– Copes with massive amounts of code
– Soundly based
• Negatives
– Not good tracking program state; model
checking?
– Not yet easy to extend to new problem classes

More Related Content

What's hot

Assembly lab up to 6 up (1)
Assembly lab up to 6 up (1)Assembly lab up to 6 up (1)
Assembly lab up to 6 up (1)ilias ahmed
 
Lec14 Intro to Computer Engineering by Hsien-Hsin Sean Lee Georgia Tech -- Se...
Lec14 Intro to Computer Engineering by Hsien-Hsin Sean Lee Georgia Tech -- Se...Lec14 Intro to Computer Engineering by Hsien-Hsin Sean Lee Georgia Tech -- Se...
Lec14 Intro to Computer Engineering by Hsien-Hsin Sean Lee Georgia Tech -- Se...Hsien-Hsin Sean Lee, Ph.D.
 
Building Efficient and Highly Run-Time Adaptable Virtual Machines
Building Efficient and Highly Run-Time Adaptable Virtual MachinesBuilding Efficient and Highly Run-Time Adaptable Virtual Machines
Building Efficient and Highly Run-Time Adaptable Virtual MachinesGuido Chari
 
The Search for Gravitational Waves
The Search for Gravitational WavesThe Search for Gravitational Waves
The Search for Gravitational Wavesinside-BigData.com
 
IIUG 2016 Gathering Informix data into R
IIUG 2016 Gathering Informix data into RIIUG 2016 Gathering Informix data into R
IIUG 2016 Gathering Informix data into RKevin Smith
 
[Question Paper] Microprocessor and Microcontrollers (Revised Course) [Septem...
[Question Paper] Microprocessor and Microcontrollers (Revised Course) [Septem...[Question Paper] Microprocessor and Microcontrollers (Revised Course) [Septem...
[Question Paper] Microprocessor and Microcontrollers (Revised Course) [Septem...Mumbai B.Sc.IT Study
 
Functional Reactive Programming by Gerold Meisinger
Functional Reactive Programming by Gerold MeisingerFunctional Reactive Programming by Gerold Meisinger
Functional Reactive Programming by Gerold MeisingerGeroldMeisinger
 
CILK/CILK++ and Reducers
CILK/CILK++ and ReducersCILK/CILK++ and Reducers
CILK/CILK++ and ReducersYunming Zhang
 
Q4.11: Using GCC Auto-Vectorizer
Q4.11: Using GCC Auto-VectorizerQ4.11: Using GCC Auto-Vectorizer
Q4.11: Using GCC Auto-VectorizerLinaro
 
Model-counting Approaches For Nonlinear Numerical Constraints
Model-counting Approaches For Nonlinear Numerical ConstraintsModel-counting Approaches For Nonlinear Numerical Constraints
Model-counting Approaches For Nonlinear Numerical ConstraintsQuoc-Sang Phan
 
Topology hiding Multipath Routing Protocol in MANET
Topology hiding Multipath Routing Protocol in MANETTopology hiding Multipath Routing Protocol in MANET
Topology hiding Multipath Routing Protocol in MANETAkshay Phalke
 
Hidden Truths in Dead Software Paths
Hidden Truths in Dead Software PathsHidden Truths in Dead Software Paths
Hidden Truths in Dead Software PathsBen Hermann
 

What's hot (20)

Automata
AutomataAutomata
Automata
 
Assembly lab up to 6 up (1)
Assembly lab up to 6 up (1)Assembly lab up to 6 up (1)
Assembly lab up to 6 up (1)
 
Lec14 Intro to Computer Engineering by Hsien-Hsin Sean Lee Georgia Tech -- Se...
Lec14 Intro to Computer Engineering by Hsien-Hsin Sean Lee Georgia Tech -- Se...Lec14 Intro to Computer Engineering by Hsien-Hsin Sean Lee Georgia Tech -- Se...
Lec14 Intro to Computer Engineering by Hsien-Hsin Sean Lee Georgia Tech -- Se...
 
Building Efficient and Highly Run-Time Adaptable Virtual Machines
Building Efficient and Highly Run-Time Adaptable Virtual MachinesBuilding Efficient and Highly Run-Time Adaptable Virtual Machines
Building Efficient and Highly Run-Time Adaptable Virtual Machines
 
The Search for Gravitational Waves
The Search for Gravitational WavesThe Search for Gravitational Waves
The Search for Gravitational Waves
 
IIUG 2016 Gathering Informix data into R
IIUG 2016 Gathering Informix data into RIIUG 2016 Gathering Informix data into R
IIUG 2016 Gathering Informix data into R
 
[Question Paper] Microprocessor and Microcontrollers (Revised Course) [Septem...
[Question Paper] Microprocessor and Microcontrollers (Revised Course) [Septem...[Question Paper] Microprocessor and Microcontrollers (Revised Course) [Septem...
[Question Paper] Microprocessor and Microcontrollers (Revised Course) [Septem...
 
2_4 Finite Automata.ppt
2_4 Finite Automata.ppt2_4 Finite Automata.ppt
2_4 Finite Automata.ppt
 
Mit cilk
Mit cilkMit cilk
Mit cilk
 
Functional Reactive Programming by Gerold Meisinger
Functional Reactive Programming by Gerold MeisingerFunctional Reactive Programming by Gerold Meisinger
Functional Reactive Programming by Gerold Meisinger
 
CILK/CILK++ and Reducers
CILK/CILK++ and ReducersCILK/CILK++ and Reducers
CILK/CILK++ and Reducers
 
LTO plugin
LTO pluginLTO plugin
LTO plugin
 
Q4.11: Using GCC Auto-Vectorizer
Q4.11: Using GCC Auto-VectorizerQ4.11: Using GCC Auto-Vectorizer
Q4.11: Using GCC Auto-Vectorizer
 
Programmable Piplelines
Programmable PiplelinesProgrammable Piplelines
Programmable Piplelines
 
Flip flops & registers
Flip flops & registersFlip flops & registers
Flip flops & registers
 
Model-counting Approaches For Nonlinear Numerical Constraints
Model-counting Approaches For Nonlinear Numerical ConstraintsModel-counting Approaches For Nonlinear Numerical Constraints
Model-counting Approaches For Nonlinear Numerical Constraints
 
Topology hiding Multipath Routing Protocol in MANET
Topology hiding Multipath Routing Protocol in MANETTopology hiding Multipath Routing Protocol in MANET
Topology hiding Multipath Routing Protocol in MANET
 
Hidden Truths in Dead Software Paths
Hidden Truths in Dead Software PathsHidden Truths in Dead Software Paths
Hidden Truths in Dead Software Paths
 
Automata
AutomataAutomata
Automata
 
SLE2015: Distributed ATL
SLE2015: Distributed ATLSLE2015: Distributed ATL
SLE2015: Distributed ATL
 

Viewers also liked

A Question Of Interpretation: the role of archivists in an online age
A Question Of  Interpretation: the role of archivists in an online ageA Question Of  Interpretation: the role of archivists in an online age
A Question Of Interpretation: the role of archivists in an online ageAmanda Hill
 
Supply Chain Project MCD
Supply Chain Project MCDSupply Chain Project MCD
Supply Chain Project MCDmcdeacon
 
Chapter 6 - Introduction to 12 Lead Interpretation
Chapter 6 - Introduction to 12 Lead InterpretationChapter 6 - Introduction to 12 Lead Interpretation
Chapter 6 - Introduction to 12 Lead Interpretationryanhall911
 
Introduction to Statutory Interpretation
Introduction to Statutory InterpretationIntroduction to Statutory Interpretation
Introduction to Statutory Interpretationthorogl01
 
A Project on Supply Chain Management_1
A Project on Supply Chain Management_1A Project on Supply Chain Management_1
A Project on Supply Chain Management_1Ashok Kond
 
Presentation and analysis and interpretation of data
Presentation and analysis  and interpretation of dataPresentation and analysis  and interpretation of data
Presentation and analysis and interpretation of dataLovely Ann Azanza
 
Writing the 'Discussion and Analysis'
Writing the 'Discussion and Analysis'Writing the 'Discussion and Analysis'
Writing the 'Discussion and Analysis'Aiden Yeh
 
Supply chain management project
Supply chain management projectSupply chain management project
Supply chain management projectMuskan Asnani
 
Correlation and regression
Correlation and regressionCorrelation and regression
Correlation and regressionKhalid Aziz
 

Viewers also liked (13)

A Question Of Interpretation: the role of archivists in an online age
A Question Of  Interpretation: the role of archivists in an online ageA Question Of  Interpretation: the role of archivists in an online age
A Question Of Interpretation: the role of archivists in an online age
 
Supply Chain Project MCD
Supply Chain Project MCDSupply Chain Project MCD
Supply Chain Project MCD
 
Jagger release 2.0
Jagger release 2.0Jagger release 2.0
Jagger release 2.0
 
Chapter 6 - Introduction to 12 Lead Interpretation
Chapter 6 - Introduction to 12 Lead InterpretationChapter 6 - Introduction to 12 Lead Interpretation
Chapter 6 - Introduction to 12 Lead Interpretation
 
Introduction to Statutory Interpretation
Introduction to Statutory InterpretationIntroduction to Statutory Interpretation
Introduction to Statutory Interpretation
 
Data Interpretation
Data Interpretation Data Interpretation
Data Interpretation
 
Data interpretation
Data interpretationData interpretation
Data interpretation
 
A Project on Supply Chain Management_1
A Project on Supply Chain Management_1A Project on Supply Chain Management_1
A Project on Supply Chain Management_1
 
Presentation and analysis and interpretation of data
Presentation and analysis  and interpretation of dataPresentation and analysis  and interpretation of data
Presentation and analysis and interpretation of data
 
Writing the 'Discussion and Analysis'
Writing the 'Discussion and Analysis'Writing the 'Discussion and Analysis'
Writing the 'Discussion and Analysis'
 
Supply chain management project
Supply chain management projectSupply chain management project
Supply chain management project
 
Chapter 4 presentation of data
Chapter 4 presentation of dataChapter 4 presentation of data
Chapter 4 presentation of data
 
Correlation and regression
Correlation and regressionCorrelation and regression
Correlation and regression
 

Similar to Abstract Interpretation meets model checking near the 1000000 LOC mark: Finding errors in the Linux Kernel Source (AVIS '06)

Detecting Deadlock, Double-Free and Other Abuses in a Million Lines of Linux ...
Detecting Deadlock, Double-Free and Other Abuses in a Million Lines of Linux ...Detecting Deadlock, Double-Free and Other Abuses in a Million Lines of Linux ...
Detecting Deadlock, Double-Free and Other Abuses in a Million Lines of Linux ...Peter Breuer
 
07 control+structures
07 control+structures07 control+structures
07 control+structuresbaran19901990
 
Computer Organization1CS1400Feng JiangBoolean al.docx
Computer Organization1CS1400Feng JiangBoolean al.docxComputer Organization1CS1400Feng JiangBoolean al.docx
Computer Organization1CS1400Feng JiangBoolean al.docxladonnacamplin
 
CNIT 127 Ch 2: Stack overflows on Linux
CNIT 127 Ch 2: Stack overflows on LinuxCNIT 127 Ch 2: Stack overflows on Linux
CNIT 127 Ch 2: Stack overflows on LinuxSam Bowne
 
Understanding low latency jvm gcs V2
Understanding low latency jvm gcs V2Understanding low latency jvm gcs V2
Understanding low latency jvm gcs V2Jean-Philippe BEMPEL
 
Efficient Bytecode Analysis: Linespeed Shellcode Detection
Efficient Bytecode Analysis: Linespeed Shellcode DetectionEfficient Bytecode Analysis: Linespeed Shellcode Detection
Efficient Bytecode Analysis: Linespeed Shellcode DetectionGeorg Wicherski
 
Concurrency in Distributed Systems : Leslie Lamport papers
Concurrency in Distributed Systems : Leslie Lamport papersConcurrency in Distributed Systems : Leslie Lamport papers
Concurrency in Distributed Systems : Leslie Lamport papersSubhajit Sahu
 
127 Ch 2: Stack overflows on Linux
127 Ch 2: Stack overflows on Linux127 Ch 2: Stack overflows on Linux
127 Ch 2: Stack overflows on LinuxSam Bowne
 
CNIT 127: Ch 2: Stack overflows on Linux
CNIT 127: Ch 2: Stack overflows on LinuxCNIT 127: Ch 2: Stack overflows on Linux
CNIT 127: Ch 2: Stack overflows on LinuxSam Bowne
 
L3-.pptx
L3-.pptxL3-.pptx
L3-.pptxasdq4
 
k10790 nilesh prajapati control me 6th sem
k10790 nilesh prajapati control me 6th semk10790 nilesh prajapati control me 6th sem
k10790 nilesh prajapati control me 6th semharshprajapati12
 
127 Ch 2: Stack overflows on Linux
127 Ch 2: Stack overflows on Linux127 Ch 2: Stack overflows on Linux
127 Ch 2: Stack overflows on LinuxSam Bowne
 
Using R in remote computer clusters
Using R in remote computer clustersUsing R in remote computer clusters
Using R in remote computer clustersBurak Himmetoglu
 
Pepe Vila - Cache and Syphilis [rooted2019]
Pepe Vila - Cache and Syphilis [rooted2019]Pepe Vila - Cache and Syphilis [rooted2019]
Pepe Vila - Cache and Syphilis [rooted2019]RootedCON
 
HiPEAC'19 Tutorial on Quantum algorithms using QX - 2019-01-23
HiPEAC'19 Tutorial on Quantum algorithms using QX - 2019-01-23HiPEAC'19 Tutorial on Quantum algorithms using QX - 2019-01-23
HiPEAC'19 Tutorial on Quantum algorithms using QX - 2019-01-23Aritra Sarkar
 

Similar to Abstract Interpretation meets model checking near the 1000000 LOC mark: Finding errors in the Linux Kernel Source (AVIS '06) (20)

Detecting Deadlock, Double-Free and Other Abuses in a Million Lines of Linux ...
Detecting Deadlock, Double-Free and Other Abuses in a Million Lines of Linux ...Detecting Deadlock, Double-Free and Other Abuses in a Million Lines of Linux ...
Detecting Deadlock, Double-Free and Other Abuses in a Million Lines of Linux ...
 
Understanding low latency jvm gcs
Understanding low latency jvm gcsUnderstanding low latency jvm gcs
Understanding low latency jvm gcs
 
07 control+structures
07 control+structures07 control+structures
07 control+structures
 
Computer Organization1CS1400Feng JiangBoolean al.docx
Computer Organization1CS1400Feng JiangBoolean al.docxComputer Organization1CS1400Feng JiangBoolean al.docx
Computer Organization1CS1400Feng JiangBoolean al.docx
 
CNIT 127 Ch 2: Stack overflows on Linux
CNIT 127 Ch 2: Stack overflows on LinuxCNIT 127 Ch 2: Stack overflows on Linux
CNIT 127 Ch 2: Stack overflows on Linux
 
Understanding low latency jvm gcs V2
Understanding low latency jvm gcs V2Understanding low latency jvm gcs V2
Understanding low latency jvm gcs V2
 
Efficient Bytecode Analysis: Linespeed Shellcode Detection
Efficient Bytecode Analysis: Linespeed Shellcode DetectionEfficient Bytecode Analysis: Linespeed Shellcode Detection
Efficient Bytecode Analysis: Linespeed Shellcode Detection
 
Concurrency in Distributed Systems : Leslie Lamport papers
Concurrency in Distributed Systems : Leslie Lamport papersConcurrency in Distributed Systems : Leslie Lamport papers
Concurrency in Distributed Systems : Leslie Lamport papers
 
Cryptography
CryptographyCryptography
Cryptography
 
127 Ch 2: Stack overflows on Linux
127 Ch 2: Stack overflows on Linux127 Ch 2: Stack overflows on Linux
127 Ch 2: Stack overflows on Linux
 
CNIT 127: Ch 2: Stack overflows on Linux
CNIT 127: Ch 2: Stack overflows on LinuxCNIT 127: Ch 2: Stack overflows on Linux
CNIT 127: Ch 2: Stack overflows on Linux
 
2017 10 17_quantum_program_v2
2017 10 17_quantum_program_v22017 10 17_quantum_program_v2
2017 10 17_quantum_program_v2
 
L3-.pptx
L3-.pptxL3-.pptx
L3-.pptx
 
k10790 nilesh prajapati control me 6th sem
k10790 nilesh prajapati control me 6th semk10790 nilesh prajapati control me 6th sem
k10790 nilesh prajapati control me 6th sem
 
127 Ch 2: Stack overflows on Linux
127 Ch 2: Stack overflows on Linux127 Ch 2: Stack overflows on Linux
127 Ch 2: Stack overflows on Linux
 
Using R in remote computer clusters
Using R in remote computer clustersUsing R in remote computer clusters
Using R in remote computer clusters
 
13.ppt
13.ppt13.ppt
13.ppt
 
Pepe Vila - Cache and Syphilis [rooted2019]
Pepe Vila - Cache and Syphilis [rooted2019]Pepe Vila - Cache and Syphilis [rooted2019]
Pepe Vila - Cache and Syphilis [rooted2019]
 
HiPEAC'19 Tutorial on Quantum algorithms using QX - 2019-01-23
HiPEAC'19 Tutorial on Quantum algorithms using QX - 2019-01-23HiPEAC'19 Tutorial on Quantum algorithms using QX - 2019-01-23
HiPEAC'19 Tutorial on Quantum algorithms using QX - 2019-01-23
 
Understanding jvm gc advanced
Understanding jvm gc advancedUnderstanding jvm gc advanced
Understanding jvm gc advanced
 

More from Peter Breuer

Avoiding Hardware Aliasing
Avoiding Hardware AliasingAvoiding Hardware Aliasing
Avoiding Hardware AliasingPeter Breuer
 
Empirical Patterns in Google Scholar Citation Counts (CyberPatterns 2014)
Empirical Patterns in Google Scholar Citation Counts (CyberPatterns 2014)Empirical Patterns in Google Scholar Citation Counts (CyberPatterns 2014)
Empirical Patterns in Google Scholar Citation Counts (CyberPatterns 2014)Peter Breuer
 
Certifying (RISC) Machine Code Safe from Aliasing (OpenCert 2013)
Certifying (RISC) Machine Code Safe from Aliasing  (OpenCert 2013)Certifying (RISC) Machine Code Safe from Aliasing  (OpenCert 2013)
Certifying (RISC) Machine Code Safe from Aliasing (OpenCert 2013)Peter Breuer
 
Tutorial: Formal Methods for Hardware Verification - Overview and Application...
Tutorial: Formal Methods for Hardware Verification - Overview and Application...Tutorial: Formal Methods for Hardware Verification - Overview and Application...
Tutorial: Formal Methods for Hardware Verification - Overview and Application...Peter Breuer
 
A Semantic Model for VHDL-AMS (CHARME '97)
A Semantic Model for VHDL-AMS (CHARME '97)A Semantic Model for VHDL-AMS (CHARME '97)
A Semantic Model for VHDL-AMS (CHARME '97)Peter Breuer
 
The mixed-signal modelling language VHDL-AMS and its semantics (ICNACSA 1999)
The mixed-signal modelling language VHDL-AMS and its semantics (ICNACSA 1999)The mixed-signal modelling language VHDL-AMS and its semantics (ICNACSA 1999)
The mixed-signal modelling language VHDL-AMS and its semantics (ICNACSA 1999)Peter Breuer
 
Higher Order Applicative XML (Monterey 2002)
Higher Order Applicative XML (Monterey 2002)Higher Order Applicative XML (Monterey 2002)
Higher Order Applicative XML (Monterey 2002)Peter Breuer
 
Raiding the Noosphere
Raiding the NoosphereRaiding the Noosphere
Raiding the NoospherePeter Breuer
 
Open Source Verification under a Cloud (OpenCert 2010)
Open Source Verification under a Cloud (OpenCert 2010)Open Source Verification under a Cloud (OpenCert 2010)
Open Source Verification under a Cloud (OpenCert 2010)Peter Breuer
 

More from Peter Breuer (9)

Avoiding Hardware Aliasing
Avoiding Hardware AliasingAvoiding Hardware Aliasing
Avoiding Hardware Aliasing
 
Empirical Patterns in Google Scholar Citation Counts (CyberPatterns 2014)
Empirical Patterns in Google Scholar Citation Counts (CyberPatterns 2014)Empirical Patterns in Google Scholar Citation Counts (CyberPatterns 2014)
Empirical Patterns in Google Scholar Citation Counts (CyberPatterns 2014)
 
Certifying (RISC) Machine Code Safe from Aliasing (OpenCert 2013)
Certifying (RISC) Machine Code Safe from Aliasing  (OpenCert 2013)Certifying (RISC) Machine Code Safe from Aliasing  (OpenCert 2013)
Certifying (RISC) Machine Code Safe from Aliasing (OpenCert 2013)
 
Tutorial: Formal Methods for Hardware Verification - Overview and Application...
Tutorial: Formal Methods for Hardware Verification - Overview and Application...Tutorial: Formal Methods for Hardware Verification - Overview and Application...
Tutorial: Formal Methods for Hardware Verification - Overview and Application...
 
A Semantic Model for VHDL-AMS (CHARME '97)
A Semantic Model for VHDL-AMS (CHARME '97)A Semantic Model for VHDL-AMS (CHARME '97)
A Semantic Model for VHDL-AMS (CHARME '97)
 
The mixed-signal modelling language VHDL-AMS and its semantics (ICNACSA 1999)
The mixed-signal modelling language VHDL-AMS and its semantics (ICNACSA 1999)The mixed-signal modelling language VHDL-AMS and its semantics (ICNACSA 1999)
The mixed-signal modelling language VHDL-AMS and its semantics (ICNACSA 1999)
 
Higher Order Applicative XML (Monterey 2002)
Higher Order Applicative XML (Monterey 2002)Higher Order Applicative XML (Monterey 2002)
Higher Order Applicative XML (Monterey 2002)
 
Raiding the Noosphere
Raiding the NoosphereRaiding the Noosphere
Raiding the Noosphere
 
Open Source Verification under a Cloud (OpenCert 2010)
Open Source Verification under a Cloud (OpenCert 2010)Open Source Verification under a Cloud (OpenCert 2010)
Open Source Verification under a Cloud (OpenCert 2010)
 

Recently uploaded

"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...Fwdays
 
Artificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraArtificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraDeakin University
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfAddepto
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationSlibray Presentation
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...shyamraj55
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitecturePixlogix Infotech
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Scott Keck-Warren
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksSoftradix Technologies
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Mark Simos
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Commit University
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupFlorian Wilhelm
 
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024BookNet Canada
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr BaganFwdays
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsRizwan Syed
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebUiPathCommunity
 
Science&tech:THE INFORMATION AGE STS.pdf
Science&tech:THE INFORMATION AGE STS.pdfScience&tech:THE INFORMATION AGE STS.pdf
Science&tech:THE INFORMATION AGE STS.pdfjimielynbastida
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Enterprise Knowledge
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticscarlostorres15106
 

Recently uploaded (20)

"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
 
Artificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraArtificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning era
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdf
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck Presentation
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC Architecture
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other Frameworks
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project Setup
 
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
 
Science&tech:THE INFORMATION AGE STS.pdf
Science&tech:THE INFORMATION AGE STS.pdfScience&tech:THE INFORMATION AGE STS.pdf
Science&tech:THE INFORMATION AGE STS.pdf
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food Manufacturing
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
 

Abstract Interpretation meets model checking near the 1000000 LOC mark: Finding errors in the Linux Kernel Source (AVIS '06)

  • 1. Abstract Interpretation meets model checking near the 1000000 LOC mark - Finding errors in the Linux Kernel Source Peter T. Breuer & Simon Pickin Universidad Carlos III de Madrid
  • 2. Goal • Apply Formal Methods to the Linux kernel • Methods must be ➢ post-hoc ➢ capable of application by non-experts ➢ able to handle 6.5 millions of lines of rapidly changing C code
  • 3. Analysis Example -Sleep under Spinlock Hunt (SluSH)
  • 5. What is sleep under spinlock? • Sleep = thread scheduled out of CPU • Spinlock = busy wait for lock release • Two CPUs + two threads waiting on spinlocks = one dead machine
  • 6. Example of bad code • snd_sb_csp_load() in sb16_csp.c
  • 7. Another piece of guilty code • Kernel 2.6.12 sound/oss/sequencer.c midi_outc()
  • 10. Other classes of problems detected • Access (read/write) to kfreed memory • Overflow 4096B of stack • Spinlock under spinlock • Call to function that expects non-NULL parameters with possibly NULL argument • ... – Logic is configured, so new tests can be invented
  • 11. Example of kfree/access • drivers/scsi/aix7xxx_old.c in kernel 2.6.3
  • 14. Components of analysis system • Description of statements as logic transformers – p .... p[n-1/n] • Trigger/action system for raising alarms! • Combining logic NRB • Guiding abstract interpretation s to state x x ∈s ∩ p stops dead code evaluation, etc.
  • 15. Statement Logic - NRB • Single code statement – maintains condition P normally – empty statement cannot return (F) – empty statement cannot break (F)
  • 16. Sequence logic -NRB • normal exit: traverse A then B • return exit: return from A OR traverse A then return from B • break exit: break from A OR traverse A then break from B
  • 17. Loop logic -NRB • break from body is only normal exit from while(1) • relax p until it is invariant
  • 19. Programmable trigger/action engine • Three rules handle propagation of call graph and other housekeeping. – a sleep call while the objective function is positive causes output:
  • 20. Using the analyser • Call with the same arguments as given to the gcc compiler
  • 21. Limitations • Predicates are restricted to unions of n-cubes • State is not followed well enough: – x = 1; if (x) A else B; ● treated correctly - only A is evaluated – if (x) A else B; if (x) C else D; ● over-abstracted - A;C | A;D | B;C | B;D – possible solution is to push state into the predicates ((x!=0);A | (x==0);B) ; ((x!=0);C | (x==0);D) ● but we can't follow calculation well - quickly get to 
  • 22. Implication of predicates is decidable • Basic evaluation is C  U Ci of cubes – i.e. U Ci covers C
  • 23. Summary • A step towards analyses of 100MLoC. – No expertise needed – Fast – Copes with massive amounts of code – Soundly based • Negatives – Not good tracking program state; model checking? – Not yet easy to extend to new problem classes