SlideShare a Scribd company logo
1 of 49
Download to read offline
Introduction Machine Memory octrng(4) octrtc(4) brswphy(4) octhci(4) CFI Conclusions
Making OpenBSD Useful on the Octeon Network
Gear
Paul Irofti
pirofti@openbsd.org
EuroBSDcon, Sofia
September 2014
Introduction Machine Memory octrng(4) octrtc(4) brswphy(4) octhci(4) CFI Conclusions
Outline
1 Introduction
2 Machine Memory
3 octrng(4)
4 octrtc(4)
5 brswphy(4)
6 octhci(4)
7 CFI
8 Conclusions
Introduction Machine Memory octrng(4) octrtc(4) brswphy(4) octhci(4) CFI Conclusions
About Me
Who Am I?
Reverse Engineer (6 years in the AV industry)
anti-virus engines
emulators: static and dynamic analysis research
OpenBSD Hacker:
power management, ACPI
mips64: Loongson and Octeon
compat linux(8) maintainer
porter
Research Assistant and PhD student:
Faculty of Automatic Control and Computers at the
Polytechnic University of Bucharest
PhD on parallel signal processing algorithms using GPGPU
(OpenCL, CUDA)
Introduction Machine Memory octrng(4) octrtc(4) brswphy(4) octhci(4) CFI Conclusions
About Me
My connection to Octeon
played with other mips64 ports in the past
mostly worked on the Loongson architecture
first contact while sitting next to jasper@ at t2k13
mentioned it in the undeadly report after the hackathon
article led to a kind donation from Diana Eichert
Introduction Machine Memory octrng(4) octrtc(4) brswphy(4) octhci(4) CFI Conclusions
First Contact
Dealing with U-Boot
After a bit of reading, the magic tftpboot’ing uboot commands are:
D-Link DSR-500 bootloader# dhcp
D-Link DSR-500 bootloader# tftpboot 0 bsd
D-Link DSR-500 bootloader# bootoctlinux ./bsd
Introduction Machine Memory octrng(4) octrtc(4) brswphy(4) octhci(4) CFI Conclusions
First Contact
Copyright Crash
Kernel crashed after copyright:
Copyright (c) 1982, 1986, 1989, 1991, 1993
The Regents of the University of California.
All rights reserved.
Copyright (c) 1995-2013 OpenBSD. All rights reserved.
http://www.OpenBSD.org
Introduction Machine Memory octrng(4) octrtc(4) brswphy(4) octhci(4) CFI Conclusions
First Contact
Octeon Memory
In-depth investigations pointed to the memory setup routines.
This is how Octeon memory is organized:
PA Chunks From To
1st 256 MB DR0 0000 0000 0000 0000 0000 0000 0FFF FFFF
2nd 256 MB DR1 0000 0004 1000 0000 0000 0004 1FFF FFFF
Over 512MB DR2 0000 0000 2000 0000 0000 0003 FFFF FFFF
Introduction Machine Memory octrng(4) octrtc(4) brswphy(4) octhci(4) CFI Conclusions
First Contact
First Encounter: Too small
The DSR-500 has 128MB of memory.
the smallest system memory so far
octeon memory init() assumed at least 256MB
BUG: start of the 2nd bank after 256MB
phys avail[1] = OCTEON DRAM FIRST 256 END;
realmem bytes -= OCTEON DRAM FIRST 256 END;
FIX: cap to realmem if less than 256MB
phys avail[1] = realmem byte
Introduction Machine Memory octrng(4) octrtc(4) brswphy(4) octhci(4) CFI Conclusions
First Contact
Userland
After the fix I got a big reward:
OpenBSD 5.4-current (GENERIC) #32:
Fri Aug 30 14:19:07 EEST 2013
[...]
scsibus0 at vscsi0: 256 targets
softraid0 at root
scsibus1 at softraid0: 256 targets
root device:
Introduction Machine Memory octrng(4) octrtc(4) brswphy(4) octhci(4) CFI Conclusions
First Contact
Dmesg
Inspecting the very short dmesg there were some obvious
problems:
octcf at iobus0 not configured
0:0:0: mem address conflict 0xf8000000/0x8000000
ukphy0 at cnmac0 phy 0
/dev/ksyms: Symbol table not valid.
Introduction Machine Memory octrng(4) octrtc(4) brswphy(4) octhci(4) CFI Conclusions
First Contact
Where to?
Going forward my plans were to:
enrich the platform by adding new drivers
add storage support through internal cf and umass
enable networking
help jasper@ to improve the 2nd-stage bootloader
make the port able to stand on its own
Introduction Machine Memory octrng(4) octrtc(4) brswphy(4) octhci(4) CFI Conclusions
First Contact
Dissapointment
The SDK license made me sad:
This Software, including technical data, may be subject
to U.S. export control laws, including the U.S. Export
Administration Act and its associated regulations, and
may be subject to export or import regulations in other
countries.
Introduction Machine Memory octrng(4) octrtc(4) brswphy(4) octhci(4) CFI Conclusions
Random Number Generator
Warm-up driver
I decided to write a simple driver to get to know the platform.
Introduction Machine Memory octrng(4) octrtc(4) brswphy(4) octhci(4) CFI Conclusions
Random Number Generator
Why the RNG?
I chose the random-numbers generator because it seemed:
easy to initialize
simple output
clean integration with the OpenBSD random subsystem
Introduction Machine Memory octrng(4) octrtc(4) brswphy(4) octhci(4) CFI Conclusions
Random Number Generator
RNG Setup
Initialization is done through a control register:
read the control register
set the output flag
set the entropy flag
write-back the control register
The above should start producing randomness in a few seconds.
Introduction Machine Memory octrng(4) octrtc(4) brswphy(4) octhci(4) CFI Conclusions
Random Number Generator
Fetching
Random numbers are written in the entropy register.
read 8-bytes from the register address
feed it to add true randomness()
schedule another read after 10ms
That’s it!
Introduction Machine Memory octrng(4) octrtc(4) brswphy(4) octhci(4) CFI Conclusions
Random Number Generator
Lessons Learned
Obstacles:
endianess confusion when dealing with register addresses
required read after write when setting the control register
get 8-bytes, feed only 4 to the random subsystem
Introduction Machine Memory octrng(4) octrtc(4) brswphy(4) octhci(4) CFI Conclusions
Real-time Clock
Itching
NFS-booting was annoying me everytime with this:
WARNING: file system time much less than clock time
WARNING: CHECK AND RESET THE DATE!
It had to stop!
Introduction Machine Memory octrng(4) octrtc(4) brswphy(4) octhci(4) CFI Conclusions
Real-time Clock
Available clocks
Some boards have an RTC that can be used as a TOD clock:
DS1337 clock model
resolution of 1 second
provide gettime and settime routines
register them to be used as the system TOD clock
Introduction Machine Memory octrng(4) octrtc(4) brswphy(4) octhci(4) CFI Conclusions
Real-time Clock
Two-Wire Serial Interface
Time is read through the TWS registers:
uint64_t v:1; /* Valid bit */
uint64_t slonly:1; /* Slave Only Mode */
uint64_t eia:1; /* Extended Internal Address */
uint64_t op:4; /* Opcode field */
uint64_t r:1; /* Read bit or result */
uint64_t sovr:1; /* Size Override */
uint64_t size:3; /* Size in bytes */
uint64_t scr:2; /* Scratch, unused */
uint64_t a:10; /* Address field */
uint64_t ia:5; /* Internal Address */
uint64_t eop_ia:3; /* Extra opcode */
uint64_t d:32; /* Data Field */
Introduction Machine Memory octrng(4) octrtc(4) brswphy(4) octhci(4) CFI Conclusions
Real-time Clock
How TWS Access Works
Operating the TOD clock:
set the address field to the RTC register
afterwards use current internal address across calls
set the operation type by setting/clearing the read flag
read from or write to the data field
Introduction Machine Memory octrng(4) octrtc(4) brswphy(4) octhci(4) CFI Conclusions
Real-time Clock
Reads(1)
1st step:
set RTC register address
set the read bit
set the valid bit
set op to use the current address if a read was done before
write the TWS register
Introduction Machine Memory octrng(4) octrtc(4) brswphy(4) octhci(4) CFI Conclusions
Real-time Clock
Reads(2)
2nd step:
read-back the TWS register
keep reading until the valid bit is cleared
if cleared, the operation was completed
fetch clock data from the 1st byte in the data field
Introduction Machine Memory octrng(4) octrtc(4) brswphy(4) octhci(4) CFI Conclusions
Real-time Clock
Writes(1)
1st step:
set RTC register address
clear the read bit
set the valid bit
fill the data field
write the TWS register
Introduction Machine Memory octrng(4) octrtc(4) brswphy(4) octhci(4) CFI Conclusions
Real-time Clock
Writes(2)
2nd step:
read-back the TWS register
keep reading until the valid bit is cleared
do an extra read-back after the operation was completed
Introduction Machine Memory octrng(4) octrtc(4) brswphy(4) octhci(4) CFI Conclusions
Real-time Clock
RTC Format
The clock information is BCD-coded as follows:
tt->year = ((tod[5] & 0x80) ? 100 : 0) + FROMBCD(tod[6]);
tt->mon = FROMBCD(tod[5] & 0x1f);
tt->day = FROMBCD(tod[4] & 0x3f);
tt->dow = (tod[3] & 0x7);
tt->hour = FROMBCD(tod[2] & 0x3f);
tt->min = FROMBCD(tod[1] & 0x7f);
tt->sec = FROMBCD(tod[0] & 0x7f);
Introduction Machine Memory octrng(4) octrtc(4) brswphy(4) octhci(4) CFI Conclusions
Real-time Clock
TOD Routines
The settime and gettime routines:
pack/unpack the time data into/from BCD form
read/write each packet through the TWS registers
Introduction Machine Memory octrng(4) octrtc(4) brswphy(4) octhci(4) CFI Conclusions
Real-time Clock
Issues
The TWSI is very fragile and needs a lot of integrity checks.
Besides, some models have an RTC clock:
D-Link DSR-500
Portwell CAM-0100.
Others don’t:
Ubiquiti Networks EdgeRouter Lite.
Introduction Machine Memory octrng(4) octrtc(4) brswphy(4) octhci(4) CFI Conclusions
Broadcom PHY
Njetwork
Even though I used tftpboot and NFS-root on boot...
# ifconfig cnmac0
cnmac0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST>
lladdr 00:de:ad:20:75:00
priority: 0
media: Ethernet autoselect (none)
status: no carrier
inet 192.168.1.9 netmask 0xffffff00 broadcast
# ping k.ro
ping: unknown host: k.ro
Introduction Machine Memory octrng(4) octrtc(4) brswphy(4) octhci(4) CFI Conclusions
Broadcom PHY
BCM53XX
Missing Broadcom PHY driver for the chip 53XX-family
resulted in cnmac0 at ukphy
looked at OpenWrt for the proper registers
wrote a minimal PHY driver with dumb-mode only switch
support
Introduction Machine Memory octrng(4) octrtc(4) brswphy(4) octhci(4) CFI Conclusions
Broadcom PHY
Status Routine
The key was the status PHY routine which reads the:
link state
duplex mode
port’s speed
via corresponding registers from the status page.
Introduction Machine Memory octrng(4) octrtc(4) brswphy(4) octhci(4) CFI Conclusions
Broadcom PHY
Reads(1)
1st step:
set the page number if the current one differs
set the register address
read-back to check for operation completion
Introduction Machine Memory octrng(4) octrtc(4) brswphy(4) octhci(4) CFI Conclusions
Broadcom PHY
Reads(2)
Once the page-register tuple is in place:
read 2 bytes from the first data register
if needed go on with the 2nd, 3rd and 4th data registers
Introduction Machine Memory octrng(4) octrtc(4) brswphy(4) octhci(4) CFI Conclusions
Broadcom PHY
Results
With that in place the network seems better:
# ifconfig cnmac0
cnmac0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST>
lladdr 00:de:ad:20:75:00
priority: 0
groups: egress
media: Ethernet autoselect (1000baseT master)
status: active
inet 192.168.1.9 netmask 0xffffff00
# ping k.ro
PING k.ro (194.102.255.23): 56 data bytes
64 bytes from 194.102.255.23: icmp_seq=0 time=60.132 ms
64 bytes from 194.102.255.23: icmp_seq=1 time=63.555 ms
Introduction Machine Memory octrng(4) octrtc(4) brswphy(4) octhci(4) CFI Conclusions
Broadcom PHY
Switch Support
In the future I plan to add switch support.
Existing kernel switch frameworks:
ZRouter solution from Aleksandr Rybalko
IIJ solution from Kazuya Goda
Introduction Machine Memory octrng(4) octrtc(4) brswphy(4) octhci(4) CFI Conclusions
USB Host Controller
Existing Work
Cavium SDK
IIJ driver for the CN30XX boards
WIP driver I wrote that no longer fries sticks
Introduction Machine Memory octrng(4) octrtc(4) brswphy(4) octhci(4) CFI Conclusions
USB Host Controller
USB Initialization
Started by implemneting device specific initialization routines:
clock setup
host-mode setup
core setup
dma setup
interrupt routine
Introduction Machine Memory octrng(4) octrtc(4) brswphy(4) octhci(4) CFI Conclusions
USB Host Controller
Attachment
Adding basic bus and root hub routines enabled attachment:
octhci0 at iobus0 irq 56 core version 2 pass 3.5
usb0 at octhci0: USB revision 2.0
uhub0 at usb0 " octHCI root hub" rev 2.00/1.00 addr 1
uhub0: cannot open interrupt pipe
usb0: root device is not a hub
Introduction Machine Memory octrng(4) octrtc(4) brswphy(4) octhci(4) CFI Conclusions
USB Host Controller
Interrupts
Add basic interrupt support matching other implementations:
add octhci intr1() routine
modify octhci intr() to call octhci intr1()
schedule the actual work for the soft interrupt
fill in the octhci poll() routine
Silenced attach errors:
octhci0 at iobus0 irq 56: core version 2 pass 3.5
usb0 at octhci0: USB revision 2.0
uhub0 at usb0 " octHCI root hub" rev 2.00/1.00 addr 1
Introduction Machine Memory octrng(4) octrtc(4) brswphy(4) octhci(4) CFI Conclusions
USB Host Controller
Root Hub
I stopped frying USB sticks after supporting:
clear feature requests
get hub descriptor requests
get port status requests
set port feature request
And doing:
proper USB 2.0 descriptors
command acknowledgements
Introduction Machine Memory octrng(4) octrtc(4) brswphy(4) octhci(4) CFI Conclusions
USB Host Controller
Port and Channel Interrupts
Basic support for port and channel/endpoint interrupts:
keep track of port connections and port resets.
notify upstream when a port finished reseting
notify upstream about connection status changes.
acknowledge and clear events to avoid interrupt storms
Gets things further along: pipe device transfer and control
methods are required.
Introduction Machine Memory octrng(4) octrtc(4) brswphy(4) octhci(4) CFI Conclusions
USB Host Controller
octhci(4) Status
Figure : Green: implemented, blue: in progress, red: not implemented
Introduction Machine Memory octrng(4) octrtc(4) brswphy(4) octhci(4) CFI Conclusions
USB Host Controller
Show-Stoppers
can’t use the SDK: U.S. export control
SDK and IIJ register poking logic is completely different
can’t reuse IIJ’s code as it doesn’t work on my D-Link
USB is hard
USB w/o documentation is harder
writing a driver requires time, which is the worst
Introduction Machine Memory octrng(4) octrtc(4) brswphy(4) octhci(4) CFI Conclusions
Compact Flash Interface
Flash Memory
OpenBSD doesn’t support the DSR-500 flash memory:
octcf at iobus0 base 0x1d000800 irq 0 not configured
FreeBSD does through CFI:
cfi0: <AMD/Fujitsu - 32MB> on ciu0
cfi0:
cfi0: [256x128KB]
cfid0 on cfi0
Introduction Machine Memory octrng(4) octrtc(4) brswphy(4) octhci(4) CFI Conclusions
Compact Flash Interface
Plans
Discussed with David Gwynne (dlg@):
write a small ATA driver
plug it into the rest of the system via atascsi
no multiple concurrent commands
no port multipliers
Introduction Machine Memory octrng(4) octrtc(4) brswphy(4) octhci(4) CFI Conclusions
Compact Flash Interface
Implementation
Writing a driver was slower than I expected:
it’s my first disk driver
atascsi has too many abstractions
the reference drivers ahci(4) and sili(4) are complex
cf doesn’t even do dma, it does bus space reads/writes
wdc(4)/pciide(4) is messy
Introduction Machine Memory octrng(4) octrtc(4) brswphy(4) octhci(4) CFI Conclusions
Compact Flash Interface
Work In Progress
I just started working on the driver. Unsure about:
mimicking the FreeBSD abstraction: cfid → cfi → atascsi
keeping the driver MD or making it MI
supporting the entire CFI specification
including the Intel mess
StrataFlash?
Introduction Machine Memory octrng(4) octrtc(4) brswphy(4) octhci(4) CFI Conclusions
OpenBSD/Octeon
Mostly Harmless
Conclusions
a lot of work was put into OpenBSD/Octeon
lack of documentation is slowing progress
SDK copyright capped the pace even further
open problems: USB, switch framework, CFI
work continues to make this port complete
Introduction Machine Memory octrng(4) octrtc(4) brswphy(4) octhci(4) CFI Conclusions
OpenBSD/Octeon
So Long, and Thanks for All the Fish
Questions?

More Related Content

What's hot

from Binary to Binary: How Qemu Works
from Binary to Binary: How Qemu Worksfrom Binary to Binary: How Qemu Works
from Binary to Binary: How Qemu WorksZhen Wei
 
Advanced cfg bypass on adobe flash player 18 defcon russia 23
Advanced cfg bypass on adobe flash player 18 defcon russia 23Advanced cfg bypass on adobe flash player 18 defcon russia 23
Advanced cfg bypass on adobe flash player 18 defcon russia 23DefconRussia
 
An Open Discussion of RISC-V BitManip, trends, and comparisons _ Claire
 An Open Discussion of RISC-V BitManip, trends, and comparisons _ Claire An Open Discussion of RISC-V BitManip, trends, and comparisons _ Claire
An Open Discussion of RISC-V BitManip, trends, and comparisons _ ClaireRISC-V International
 
Patterns of 64-bit errors in games
Patterns of 64-bit errors in gamesPatterns of 64-bit errors in games
Patterns of 64-bit errors in gamesAndrey Karpov
 
Learn How to Develop Embedded System for ARM @ 2014.12.22 JuluOSDev
Learn How to Develop Embedded System for ARM @ 2014.12.22 JuluOSDevLearn How to Develop Embedded System for ARM @ 2014.12.22 JuluOSDev
Learn How to Develop Embedded System for ARM @ 2014.12.22 JuluOSDevJian-Hong Pan
 
BKK16-503 Undefined Behavior and Compiler Optimizations – Why Your Program St...
BKK16-503 Undefined Behavior and Compiler Optimizations – Why Your Program St...BKK16-503 Undefined Behavior and Compiler Optimizations – Why Your Program St...
BKK16-503 Undefined Behavior and Compiler Optimizations – Why Your Program St...Linaro
 
Cs423 raw sockets_bw
Cs423 raw sockets_bwCs423 raw sockets_bw
Cs423 raw sockets_bwjktjpc
 
Specializing the Data Path - Hooking into the Linux Network Stack
Specializing the Data Path - Hooking into the Linux Network StackSpecializing the Data Path - Hooking into the Linux Network Stack
Specializing the Data Path - Hooking into the Linux Network StackKernel TLV
 
PVS-Studio, a solution for resource intensive applications development
PVS-Studio, a solution for resource intensive applications developmentPVS-Studio, a solution for resource intensive applications development
PVS-Studio, a solution for resource intensive applications developmentOOO "Program Verification Systems"
 
Scale17x buffer overflows
Scale17x buffer overflowsScale17x buffer overflows
Scale17x buffer overflowsjohseg
 
SFO15-202: Towards Multi-Threaded Tiny Code Generator (TCG) in QEMU
SFO15-202: Towards Multi-Threaded Tiny Code Generator (TCG) in QEMUSFO15-202: Towards Multi-Threaded Tiny Code Generator (TCG) in QEMU
SFO15-202: Towards Multi-Threaded Tiny Code Generator (TCG) in QEMULinaro
 
Python by Martin Geisler
Python by Martin GeislerPython by Martin Geisler
Python by Martin GeislerAberla
 
Vectorization on x86: all you need to know
Vectorization on x86: all you need to knowVectorization on x86: all you need to know
Vectorization on x86: all you need to knowRoberto Agostino Vitillo
 
Secure coding for developers
Secure coding for developersSecure coding for developers
Secure coding for developerssluge
 
Online test program generator for RISC-V processors
Online test program generator for RISC-V processorsOnline test program generator for RISC-V processors
Online test program generator for RISC-V processorsRISC-V International
 
44CON London 2015 - Reverse engineering and exploiting font rasterizers: the ...
44CON London 2015 - Reverse engineering and exploiting font rasterizers: the ...44CON London 2015 - Reverse engineering and exploiting font rasterizers: the ...
44CON London 2015 - Reverse engineering and exploiting font rasterizers: the ...44CON
 
Let's Play STM32
Let's Play STM32Let's Play STM32
Let's Play STM32Jay Chen
 

What's hot (20)

from Binary to Binary: How Qemu Works
from Binary to Binary: How Qemu Worksfrom Binary to Binary: How Qemu Works
from Binary to Binary: How Qemu Works
 
Advanced cfg bypass on adobe flash player 18 defcon russia 23
Advanced cfg bypass on adobe flash player 18 defcon russia 23Advanced cfg bypass on adobe flash player 18 defcon russia 23
Advanced cfg bypass on adobe flash player 18 defcon russia 23
 
An Open Discussion of RISC-V BitManip, trends, and comparisons _ Claire
 An Open Discussion of RISC-V BitManip, trends, and comparisons _ Claire An Open Discussion of RISC-V BitManip, trends, and comparisons _ Claire
An Open Discussion of RISC-V BitManip, trends, and comparisons _ Claire
 
Patterns of 64-bit errors in games
Patterns of 64-bit errors in gamesPatterns of 64-bit errors in games
Patterns of 64-bit errors in games
 
Learn How to Develop Embedded System for ARM @ 2014.12.22 JuluOSDev
Learn How to Develop Embedded System for ARM @ 2014.12.22 JuluOSDevLearn How to Develop Embedded System for ARM @ 2014.12.22 JuluOSDev
Learn How to Develop Embedded System for ARM @ 2014.12.22 JuluOSDev
 
BKK16-503 Undefined Behavior and Compiler Optimizations – Why Your Program St...
BKK16-503 Undefined Behavior and Compiler Optimizations – Why Your Program St...BKK16-503 Undefined Behavior and Compiler Optimizations – Why Your Program St...
BKK16-503 Undefined Behavior and Compiler Optimizations – Why Your Program St...
 
Cs423 raw sockets_bw
Cs423 raw sockets_bwCs423 raw sockets_bw
Cs423 raw sockets_bw
 
Specializing the Data Path - Hooking into the Linux Network Stack
Specializing the Data Path - Hooking into the Linux Network StackSpecializing the Data Path - Hooking into the Linux Network Stack
Specializing the Data Path - Hooking into the Linux Network Stack
 
PVS-Studio, a solution for resource intensive applications development
PVS-Studio, a solution for resource intensive applications developmentPVS-Studio, a solution for resource intensive applications development
PVS-Studio, a solution for resource intensive applications development
 
Qemu JIT Code Generator and System Emulation
Qemu JIT Code Generator and System EmulationQemu JIT Code Generator and System Emulation
Qemu JIT Code Generator and System Emulation
 
Scale17x buffer overflows
Scale17x buffer overflowsScale17x buffer overflows
Scale17x buffer overflows
 
SFO15-202: Towards Multi-Threaded Tiny Code Generator (TCG) in QEMU
SFO15-202: Towards Multi-Threaded Tiny Code Generator (TCG) in QEMUSFO15-202: Towards Multi-Threaded Tiny Code Generator (TCG) in QEMU
SFO15-202: Towards Multi-Threaded Tiny Code Generator (TCG) in QEMU
 
Python by Martin Geisler
Python by Martin GeislerPython by Martin Geisler
Python by Martin Geisler
 
Vectorization on x86: all you need to know
Vectorization on x86: all you need to knowVectorization on x86: all you need to know
Vectorization on x86: all you need to know
 
Secure coding for developers
Secure coding for developersSecure coding for developers
Secure coding for developers
 
Online test program generator for RISC-V processors
Online test program generator for RISC-V processorsOnline test program generator for RISC-V processors
Online test program generator for RISC-V processors
 
44CON London 2015 - Reverse engineering and exploiting font rasterizers: the ...
44CON London 2015 - Reverse engineering and exploiting font rasterizers: the ...44CON London 2015 - Reverse engineering and exploiting font rasterizers: the ...
44CON London 2015 - Reverse engineering and exploiting font rasterizers: the ...
 
Let's Play STM32
Let's Play STM32Let's Play STM32
Let's Play STM32
 
Linux Device Tree
Linux Device TreeLinux Device Tree
Linux Device Tree
 
Machine Trace Metrics
Machine Trace MetricsMachine Trace Metrics
Machine Trace Metrics
 

Similar to Making OpenBSD Useful on the Octeon Network Gear by Paul Irofti

Revelation pyconuk2016
Revelation pyconuk2016Revelation pyconuk2016
Revelation pyconuk2016Sarah Mount
 
Building Network Functions with eBPF & BCC
Building Network Functions with eBPF & BCCBuilding Network Functions with eBPF & BCC
Building Network Functions with eBPF & BCCKernel TLV
 
Cauldron_2022_ctf_frame at gcc cauldron 2022 in prague
Cauldron_2022_ctf_frame at gcc cauldron 2022 in pragueCauldron_2022_ctf_frame at gcc cauldron 2022 in prague
Cauldron_2022_ctf_frame at gcc cauldron 2022 in praguessuser866937
 
BKK16-103 OpenCSD - Open for Business!
BKK16-103 OpenCSD - Open for Business!BKK16-103 OpenCSD - Open for Business!
BKK16-103 OpenCSD - Open for Business!Linaro
 
Track c-High speed transaction-based hw-sw coverification -eve
Track c-High speed transaction-based hw-sw coverification -eveTrack c-High speed transaction-based hw-sw coverification -eve
Track c-High speed transaction-based hw-sw coverification -evechiportal
 
Let's trace Linux Lernel with KGDB @ COSCUP 2021
Let's trace Linux Lernel with KGDB @ COSCUP 2021Let's trace Linux Lernel with KGDB @ COSCUP 2021
Let's trace Linux Lernel with KGDB @ COSCUP 2021Jian-Hong Pan
 
Comp 129 final exam 100% correct answers
Comp 129 final exam 100% correct answersComp 129 final exam 100% correct answers
Comp 129 final exam 100% correct answersProfessorLance
 
May2010 hex-core-opt
May2010 hex-core-optMay2010 hex-core-opt
May2010 hex-core-optJeff Larkin
 
Comp 129 final exam 100% correct answers
Comp 129 final exam 100% correct answersComp 129 final exam 100% correct answers
Comp 129 final exam 100% correct answersProfessorLance
 
Video decoding: SDI interface implementation &H.264/AVC bitstreamdecoder hard...
Video decoding: SDI interface implementation &H.264/AVC bitstreamdecoder hard...Video decoding: SDI interface implementation &H.264/AVC bitstreamdecoder hard...
Video decoding: SDI interface implementation &H.264/AVC bitstreamdecoder hard...Vicheka Phor
 
Stm32 f4 first touch
Stm32 f4 first touchStm32 f4 first touch
Stm32 f4 first touchBenux Wei
 
44CON London - Attacking VxWorks: from Stone Age to Interstellar
44CON London - Attacking VxWorks: from Stone Age to Interstellar44CON London - Attacking VxWorks: from Stone Age to Interstellar
44CON London - Attacking VxWorks: from Stone Age to Interstellar44CON
 
OSSNA 2017 Performance Analysis Superpowers with Linux BPF
OSSNA 2017 Performance Analysis Superpowers with Linux BPFOSSNA 2017 Performance Analysis Superpowers with Linux BPF
OSSNA 2017 Performance Analysis Superpowers with Linux BPFBrendan Gregg
 
A Speculative Technique for Auto-Memoization Processor with Multithreading
A Speculative Technique for Auto-Memoization Processor with MultithreadingA Speculative Technique for Auto-Memoization Processor with Multithreading
A Speculative Technique for Auto-Memoization Processor with MultithreadingMatsuo and Tsumura lab.
 
HKG18-TR14 - Postmortem Debugging with Coresight
HKG18-TR14 - Postmortem Debugging with CoresightHKG18-TR14 - Postmortem Debugging with Coresight
HKG18-TR14 - Postmortem Debugging with CoresightLinaro
 
CSW2017 Henry li how to find the vulnerability to bypass the control flow gua...
CSW2017 Henry li how to find the vulnerability to bypass the control flow gua...CSW2017 Henry li how to find the vulnerability to bypass the control flow gua...
CSW2017 Henry li how to find the vulnerability to bypass the control flow gua...CanSecWest
 

Similar to Making OpenBSD Useful on the Octeon Network Gear by Paul Irofti (20)

Inside Winnyp
Inside WinnypInside Winnyp
Inside Winnyp
 
Revelation pyconuk2016
Revelation pyconuk2016Revelation pyconuk2016
Revelation pyconuk2016
 
Building Network Functions with eBPF & BCC
Building Network Functions with eBPF & BCCBuilding Network Functions with eBPF & BCC
Building Network Functions with eBPF & BCC
 
Cauldron_2022_ctf_frame at gcc cauldron 2022 in prague
Cauldron_2022_ctf_frame at gcc cauldron 2022 in pragueCauldron_2022_ctf_frame at gcc cauldron 2022 in prague
Cauldron_2022_ctf_frame at gcc cauldron 2022 in prague
 
BKK16-103 OpenCSD - Open for Business!
BKK16-103 OpenCSD - Open for Business!BKK16-103 OpenCSD - Open for Business!
BKK16-103 OpenCSD - Open for Business!
 
Track c-High speed transaction-based hw-sw coverification -eve
Track c-High speed transaction-based hw-sw coverification -eveTrack c-High speed transaction-based hw-sw coverification -eve
Track c-High speed transaction-based hw-sw coverification -eve
 
Let's trace Linux Lernel with KGDB @ COSCUP 2021
Let's trace Linux Lernel with KGDB @ COSCUP 2021Let's trace Linux Lernel with KGDB @ COSCUP 2021
Let's trace Linux Lernel with KGDB @ COSCUP 2021
 
Comp 129 final exam 100% correct answers
Comp 129 final exam 100% correct answersComp 129 final exam 100% correct answers
Comp 129 final exam 100% correct answers
 
May2010 hex-core-opt
May2010 hex-core-optMay2010 hex-core-opt
May2010 hex-core-opt
 
Comp 129 final exam 100% correct answers
Comp 129 final exam 100% correct answersComp 129 final exam 100% correct answers
Comp 129 final exam 100% correct answers
 
Video decoding: SDI interface implementation &H.264/AVC bitstreamdecoder hard...
Video decoding: SDI interface implementation &H.264/AVC bitstreamdecoder hard...Video decoding: SDI interface implementation &H.264/AVC bitstreamdecoder hard...
Video decoding: SDI interface implementation &H.264/AVC bitstreamdecoder hard...
 
Stm32 f4 first touch
Stm32 f4 first touchStm32 f4 first touch
Stm32 f4 first touch
 
44CON London - Attacking VxWorks: from Stone Age to Interstellar
44CON London - Attacking VxWorks: from Stone Age to Interstellar44CON London - Attacking VxWorks: from Stone Age to Interstellar
44CON London - Attacking VxWorks: from Stone Age to Interstellar
 
OSSNA 2017 Performance Analysis Superpowers with Linux BPF
OSSNA 2017 Performance Analysis Superpowers with Linux BPFOSSNA 2017 Performance Analysis Superpowers with Linux BPF
OSSNA 2017 Performance Analysis Superpowers with Linux BPF
 
A Speculative Technique for Auto-Memoization Processor with Multithreading
A Speculative Technique for Auto-Memoization Processor with MultithreadingA Speculative Technique for Auto-Memoization Processor with Multithreading
A Speculative Technique for Auto-Memoization Processor with Multithreading
 
ARM 64bit has come!
ARM 64bit has come!ARM 64bit has come!
ARM 64bit has come!
 
Are CPUs VMs Like Any Others? v1.0
Are CPUs VMs Like Any Others? v1.0Are CPUs VMs Like Any Others? v1.0
Are CPUs VMs Like Any Others? v1.0
 
HKG18-TR14 - Postmortem Debugging with Coresight
HKG18-TR14 - Postmortem Debugging with CoresightHKG18-TR14 - Postmortem Debugging with Coresight
HKG18-TR14 - Postmortem Debugging with Coresight
 
Debugging 2013- Jesper Brouer
Debugging 2013- Jesper BrouerDebugging 2013- Jesper Brouer
Debugging 2013- Jesper Brouer
 
CSW2017 Henry li how to find the vulnerability to bypass the control flow gua...
CSW2017 Henry li how to find the vulnerability to bypass the control flow gua...CSW2017 Henry li how to find the vulnerability to bypass the control flow gua...
CSW2017 Henry li how to find the vulnerability to bypass the control flow gua...
 

More from eurobsdcon

EuroBSDCon 2014 Program Front
EuroBSDCon 2014 Program FrontEuroBSDCon 2014 Program Front
EuroBSDCon 2014 Program Fronteurobsdcon
 
EuroBSDCon 2014 tutorials program Thursday & Friday
EuroBSDCon 2014 tutorials program Thursday & FridayEuroBSDCon 2014 tutorials program Thursday & Friday
EuroBSDCon 2014 tutorials program Thursday & Fridayeurobsdcon
 
EuroBSDCon 2014 Sofia Welcome
EuroBSDCon 2014 Sofia WelcomeEuroBSDCon 2014 Sofia Welcome
EuroBSDCon 2014 Sofia Welcomeeurobsdcon
 
EuroBSDCon 2014 Sofia Closing talk
EuroBSDCon 2014 Sofia Closing talkEuroBSDCon 2014 Sofia Closing talk
EuroBSDCon 2014 Sofia Closing talkeurobsdcon
 
Submitting documents anonymously by Atanas Chobanov
Submitting documents anonymously by Atanas ChobanovSubmitting documents anonymously by Atanas Chobanov
Submitting documents anonymously by Atanas Chobanoveurobsdcon
 
Porting the drm/kms graphic drivers to DragonFlyBSD by Francois Tigeot
Porting the drm/kms graphic drivers to DragonFlyBSD by Francois TigeotPorting the drm/kms graphic drivers to DragonFlyBSD by Francois Tigeot
Porting the drm/kms graphic drivers to DragonFlyBSD by Francois Tigeoteurobsdcon
 
University of Oslo's TSD service - storing sensitive & restricted data by D...
  University of Oslo's TSD service - storing sensitive & restricted data by D...  University of Oslo's TSD service - storing sensitive & restricted data by D...
University of Oslo's TSD service - storing sensitive & restricted data by D...eurobsdcon
 
secure lazy binding, and the 64bit time_t development process by Philip Guenther
secure lazy binding, and the 64bit time_t development process by Philip Guenthersecure lazy binding, and the 64bit time_t development process by Philip Guenther
secure lazy binding, and the 64bit time_t development process by Philip Guenthereurobsdcon
 
The entropic principle: /dev/u?random and NetBSD by Taylor R Campbell
  The entropic principle: /dev/u?random and NetBSD by Taylor R Campbell  The entropic principle: /dev/u?random and NetBSD by Taylor R Campbell
The entropic principle: /dev/u?random and NetBSD by Taylor R Campbelleurobsdcon
 
The LLDB Debugger in FreeBSD by Ed Maste
The LLDB Debugger in FreeBSD by Ed MasteThe LLDB Debugger in FreeBSD by Ed Maste
The LLDB Debugger in FreeBSD by Ed Masteeurobsdcon
 
Porting Valgrind to NetBSD and OpenBSD by Masao Uebayashi
Porting Valgrind to NetBSD and OpenBSD by Masao UebayashiPorting Valgrind to NetBSD and OpenBSD by Masao Uebayashi
Porting Valgrind to NetBSD and OpenBSD by Masao Uebayashieurobsdcon
 
Multiplatform JIT Code Generator for NetBSD by Alexander Nasonov
Multiplatform JIT Code Generator for NetBSD by Alexander NasonovMultiplatform JIT Code Generator for NetBSD by Alexander Nasonov
Multiplatform JIT Code Generator for NetBSD by Alexander Nasonoveurobsdcon
 
OpenStack and OpenContrail for FreeBSD platform by Michał Dubiel
OpenStack and OpenContrail for FreeBSD platform by Michał DubielOpenStack and OpenContrail for FreeBSD platform by Michał Dubiel
OpenStack and OpenContrail for FreeBSD platform by Michał Dubieleurobsdcon
 
Porting NetBSD to the LatticeMico32 open source CPU by Yann Sionneau
Porting NetBSD to the LatticeMico32 open source CPU by Yann SionneauPorting NetBSD to the LatticeMico32 open source CPU by Yann Sionneau
Porting NetBSD to the LatticeMico32 open source CPU by Yann Sionneaueurobsdcon
 
Smartcom's control plane software, a customized version of FreeBSD by Boris A...
Smartcom's control plane software, a customized version of FreeBSD by Boris A...Smartcom's control plane software, a customized version of FreeBSD by Boris A...
Smartcom's control plane software, a customized version of FreeBSD by Boris A...eurobsdcon
 
Bugs Ex Ante by Kristaps Dzonsons
Bugs Ex Ante by Kristaps DzonsonsBugs Ex Ante by Kristaps Dzonsons
Bugs Ex Ante by Kristaps Dzonsonseurobsdcon
 
Cross Building the FreeBSD ports tree by Baptiste Daroussin
Cross Building the FreeBSD ports tree by Baptiste DaroussinCross Building the FreeBSD ports tree by Baptiste Daroussin
Cross Building the FreeBSD ports tree by Baptiste Daroussineurobsdcon
 
Building packages through emulation by Sean Bruno
Building packages through emulation by Sean BrunoBuilding packages through emulation by Sean Bruno
Building packages through emulation by Sean Brunoeurobsdcon
 
A Reimplementation of NetBSD Based on a Microkernel by Andrew S. Tanenbaum
A Reimplementation of NetBSD Based on a Microkernel by Andrew S. TanenbaumA Reimplementation of NetBSD Based on a Microkernel by Andrew S. Tanenbaum
A Reimplementation of NetBSD Based on a Microkernel by Andrew S. Tanenbaumeurobsdcon
 
Using routing domains / routing tables in a production network by Peter Hessler
Using routing domains / routing tables in a production network by Peter HesslerUsing routing domains / routing tables in a production network by Peter Hessler
Using routing domains / routing tables in a production network by Peter Hesslereurobsdcon
 

More from eurobsdcon (20)

EuroBSDCon 2014 Program Front
EuroBSDCon 2014 Program FrontEuroBSDCon 2014 Program Front
EuroBSDCon 2014 Program Front
 
EuroBSDCon 2014 tutorials program Thursday & Friday
EuroBSDCon 2014 tutorials program Thursday & FridayEuroBSDCon 2014 tutorials program Thursday & Friday
EuroBSDCon 2014 tutorials program Thursday & Friday
 
EuroBSDCon 2014 Sofia Welcome
EuroBSDCon 2014 Sofia WelcomeEuroBSDCon 2014 Sofia Welcome
EuroBSDCon 2014 Sofia Welcome
 
EuroBSDCon 2014 Sofia Closing talk
EuroBSDCon 2014 Sofia Closing talkEuroBSDCon 2014 Sofia Closing talk
EuroBSDCon 2014 Sofia Closing talk
 
Submitting documents anonymously by Atanas Chobanov
Submitting documents anonymously by Atanas ChobanovSubmitting documents anonymously by Atanas Chobanov
Submitting documents anonymously by Atanas Chobanov
 
Porting the drm/kms graphic drivers to DragonFlyBSD by Francois Tigeot
Porting the drm/kms graphic drivers to DragonFlyBSD by Francois TigeotPorting the drm/kms graphic drivers to DragonFlyBSD by Francois Tigeot
Porting the drm/kms graphic drivers to DragonFlyBSD by Francois Tigeot
 
University of Oslo's TSD service - storing sensitive & restricted data by D...
  University of Oslo's TSD service - storing sensitive & restricted data by D...  University of Oslo's TSD service - storing sensitive & restricted data by D...
University of Oslo's TSD service - storing sensitive & restricted data by D...
 
secure lazy binding, and the 64bit time_t development process by Philip Guenther
secure lazy binding, and the 64bit time_t development process by Philip Guenthersecure lazy binding, and the 64bit time_t development process by Philip Guenther
secure lazy binding, and the 64bit time_t development process by Philip Guenther
 
The entropic principle: /dev/u?random and NetBSD by Taylor R Campbell
  The entropic principle: /dev/u?random and NetBSD by Taylor R Campbell  The entropic principle: /dev/u?random and NetBSD by Taylor R Campbell
The entropic principle: /dev/u?random and NetBSD by Taylor R Campbell
 
The LLDB Debugger in FreeBSD by Ed Maste
The LLDB Debugger in FreeBSD by Ed MasteThe LLDB Debugger in FreeBSD by Ed Maste
The LLDB Debugger in FreeBSD by Ed Maste
 
Porting Valgrind to NetBSD and OpenBSD by Masao Uebayashi
Porting Valgrind to NetBSD and OpenBSD by Masao UebayashiPorting Valgrind to NetBSD and OpenBSD by Masao Uebayashi
Porting Valgrind to NetBSD and OpenBSD by Masao Uebayashi
 
Multiplatform JIT Code Generator for NetBSD by Alexander Nasonov
Multiplatform JIT Code Generator for NetBSD by Alexander NasonovMultiplatform JIT Code Generator for NetBSD by Alexander Nasonov
Multiplatform JIT Code Generator for NetBSD by Alexander Nasonov
 
OpenStack and OpenContrail for FreeBSD platform by Michał Dubiel
OpenStack and OpenContrail for FreeBSD platform by Michał DubielOpenStack and OpenContrail for FreeBSD platform by Michał Dubiel
OpenStack and OpenContrail for FreeBSD platform by Michał Dubiel
 
Porting NetBSD to the LatticeMico32 open source CPU by Yann Sionneau
Porting NetBSD to the LatticeMico32 open source CPU by Yann SionneauPorting NetBSD to the LatticeMico32 open source CPU by Yann Sionneau
Porting NetBSD to the LatticeMico32 open source CPU by Yann Sionneau
 
Smartcom's control plane software, a customized version of FreeBSD by Boris A...
Smartcom's control plane software, a customized version of FreeBSD by Boris A...Smartcom's control plane software, a customized version of FreeBSD by Boris A...
Smartcom's control plane software, a customized version of FreeBSD by Boris A...
 
Bugs Ex Ante by Kristaps Dzonsons
Bugs Ex Ante by Kristaps DzonsonsBugs Ex Ante by Kristaps Dzonsons
Bugs Ex Ante by Kristaps Dzonsons
 
Cross Building the FreeBSD ports tree by Baptiste Daroussin
Cross Building the FreeBSD ports tree by Baptiste DaroussinCross Building the FreeBSD ports tree by Baptiste Daroussin
Cross Building the FreeBSD ports tree by Baptiste Daroussin
 
Building packages through emulation by Sean Bruno
Building packages through emulation by Sean BrunoBuilding packages through emulation by Sean Bruno
Building packages through emulation by Sean Bruno
 
A Reimplementation of NetBSD Based on a Microkernel by Andrew S. Tanenbaum
A Reimplementation of NetBSD Based on a Microkernel by Andrew S. TanenbaumA Reimplementation of NetBSD Based on a Microkernel by Andrew S. Tanenbaum
A Reimplementation of NetBSD Based on a Microkernel by Andrew S. Tanenbaum
 
Using routing domains / routing tables in a production network by Peter Hessler
Using routing domains / routing tables in a production network by Peter HesslerUsing routing domains / routing tables in a production network by Peter Hessler
Using routing domains / routing tables in a production network by Peter Hessler
 

Recently uploaded

08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationSafe Software
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024Scott Keck-Warren
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsMemoori
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Allon Mureinik
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure servicePooja Nehwal
 

Recently uploaded (20)

08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial Buildings
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping Elbows
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
 

Making OpenBSD Useful on the Octeon Network Gear by Paul Irofti

  • 1. Introduction Machine Memory octrng(4) octrtc(4) brswphy(4) octhci(4) CFI Conclusions Making OpenBSD Useful on the Octeon Network Gear Paul Irofti pirofti@openbsd.org EuroBSDcon, Sofia September 2014
  • 2. Introduction Machine Memory octrng(4) octrtc(4) brswphy(4) octhci(4) CFI Conclusions Outline 1 Introduction 2 Machine Memory 3 octrng(4) 4 octrtc(4) 5 brswphy(4) 6 octhci(4) 7 CFI 8 Conclusions
  • 3. Introduction Machine Memory octrng(4) octrtc(4) brswphy(4) octhci(4) CFI Conclusions About Me Who Am I? Reverse Engineer (6 years in the AV industry) anti-virus engines emulators: static and dynamic analysis research OpenBSD Hacker: power management, ACPI mips64: Loongson and Octeon compat linux(8) maintainer porter Research Assistant and PhD student: Faculty of Automatic Control and Computers at the Polytechnic University of Bucharest PhD on parallel signal processing algorithms using GPGPU (OpenCL, CUDA)
  • 4. Introduction Machine Memory octrng(4) octrtc(4) brswphy(4) octhci(4) CFI Conclusions About Me My connection to Octeon played with other mips64 ports in the past mostly worked on the Loongson architecture first contact while sitting next to jasper@ at t2k13 mentioned it in the undeadly report after the hackathon article led to a kind donation from Diana Eichert
  • 5. Introduction Machine Memory octrng(4) octrtc(4) brswphy(4) octhci(4) CFI Conclusions First Contact Dealing with U-Boot After a bit of reading, the magic tftpboot’ing uboot commands are: D-Link DSR-500 bootloader# dhcp D-Link DSR-500 bootloader# tftpboot 0 bsd D-Link DSR-500 bootloader# bootoctlinux ./bsd
  • 6. Introduction Machine Memory octrng(4) octrtc(4) brswphy(4) octhci(4) CFI Conclusions First Contact Copyright Crash Kernel crashed after copyright: Copyright (c) 1982, 1986, 1989, 1991, 1993 The Regents of the University of California. All rights reserved. Copyright (c) 1995-2013 OpenBSD. All rights reserved. http://www.OpenBSD.org
  • 7. Introduction Machine Memory octrng(4) octrtc(4) brswphy(4) octhci(4) CFI Conclusions First Contact Octeon Memory In-depth investigations pointed to the memory setup routines. This is how Octeon memory is organized: PA Chunks From To 1st 256 MB DR0 0000 0000 0000 0000 0000 0000 0FFF FFFF 2nd 256 MB DR1 0000 0004 1000 0000 0000 0004 1FFF FFFF Over 512MB DR2 0000 0000 2000 0000 0000 0003 FFFF FFFF
  • 8. Introduction Machine Memory octrng(4) octrtc(4) brswphy(4) octhci(4) CFI Conclusions First Contact First Encounter: Too small The DSR-500 has 128MB of memory. the smallest system memory so far octeon memory init() assumed at least 256MB BUG: start of the 2nd bank after 256MB phys avail[1] = OCTEON DRAM FIRST 256 END; realmem bytes -= OCTEON DRAM FIRST 256 END; FIX: cap to realmem if less than 256MB phys avail[1] = realmem byte
  • 9. Introduction Machine Memory octrng(4) octrtc(4) brswphy(4) octhci(4) CFI Conclusions First Contact Userland After the fix I got a big reward: OpenBSD 5.4-current (GENERIC) #32: Fri Aug 30 14:19:07 EEST 2013 [...] scsibus0 at vscsi0: 256 targets softraid0 at root scsibus1 at softraid0: 256 targets root device:
  • 10. Introduction Machine Memory octrng(4) octrtc(4) brswphy(4) octhci(4) CFI Conclusions First Contact Dmesg Inspecting the very short dmesg there were some obvious problems: octcf at iobus0 not configured 0:0:0: mem address conflict 0xf8000000/0x8000000 ukphy0 at cnmac0 phy 0 /dev/ksyms: Symbol table not valid.
  • 11. Introduction Machine Memory octrng(4) octrtc(4) brswphy(4) octhci(4) CFI Conclusions First Contact Where to? Going forward my plans were to: enrich the platform by adding new drivers add storage support through internal cf and umass enable networking help jasper@ to improve the 2nd-stage bootloader make the port able to stand on its own
  • 12. Introduction Machine Memory octrng(4) octrtc(4) brswphy(4) octhci(4) CFI Conclusions First Contact Dissapointment The SDK license made me sad: This Software, including technical data, may be subject to U.S. export control laws, including the U.S. Export Administration Act and its associated regulations, and may be subject to export or import regulations in other countries.
  • 13. Introduction Machine Memory octrng(4) octrtc(4) brswphy(4) octhci(4) CFI Conclusions Random Number Generator Warm-up driver I decided to write a simple driver to get to know the platform.
  • 14. Introduction Machine Memory octrng(4) octrtc(4) brswphy(4) octhci(4) CFI Conclusions Random Number Generator Why the RNG? I chose the random-numbers generator because it seemed: easy to initialize simple output clean integration with the OpenBSD random subsystem
  • 15. Introduction Machine Memory octrng(4) octrtc(4) brswphy(4) octhci(4) CFI Conclusions Random Number Generator RNG Setup Initialization is done through a control register: read the control register set the output flag set the entropy flag write-back the control register The above should start producing randomness in a few seconds.
  • 16. Introduction Machine Memory octrng(4) octrtc(4) brswphy(4) octhci(4) CFI Conclusions Random Number Generator Fetching Random numbers are written in the entropy register. read 8-bytes from the register address feed it to add true randomness() schedule another read after 10ms That’s it!
  • 17. Introduction Machine Memory octrng(4) octrtc(4) brswphy(4) octhci(4) CFI Conclusions Random Number Generator Lessons Learned Obstacles: endianess confusion when dealing with register addresses required read after write when setting the control register get 8-bytes, feed only 4 to the random subsystem
  • 18. Introduction Machine Memory octrng(4) octrtc(4) brswphy(4) octhci(4) CFI Conclusions Real-time Clock Itching NFS-booting was annoying me everytime with this: WARNING: file system time much less than clock time WARNING: CHECK AND RESET THE DATE! It had to stop!
  • 19. Introduction Machine Memory octrng(4) octrtc(4) brswphy(4) octhci(4) CFI Conclusions Real-time Clock Available clocks Some boards have an RTC that can be used as a TOD clock: DS1337 clock model resolution of 1 second provide gettime and settime routines register them to be used as the system TOD clock
  • 20. Introduction Machine Memory octrng(4) octrtc(4) brswphy(4) octhci(4) CFI Conclusions Real-time Clock Two-Wire Serial Interface Time is read through the TWS registers: uint64_t v:1; /* Valid bit */ uint64_t slonly:1; /* Slave Only Mode */ uint64_t eia:1; /* Extended Internal Address */ uint64_t op:4; /* Opcode field */ uint64_t r:1; /* Read bit or result */ uint64_t sovr:1; /* Size Override */ uint64_t size:3; /* Size in bytes */ uint64_t scr:2; /* Scratch, unused */ uint64_t a:10; /* Address field */ uint64_t ia:5; /* Internal Address */ uint64_t eop_ia:3; /* Extra opcode */ uint64_t d:32; /* Data Field */
  • 21. Introduction Machine Memory octrng(4) octrtc(4) brswphy(4) octhci(4) CFI Conclusions Real-time Clock How TWS Access Works Operating the TOD clock: set the address field to the RTC register afterwards use current internal address across calls set the operation type by setting/clearing the read flag read from or write to the data field
  • 22. Introduction Machine Memory octrng(4) octrtc(4) brswphy(4) octhci(4) CFI Conclusions Real-time Clock Reads(1) 1st step: set RTC register address set the read bit set the valid bit set op to use the current address if a read was done before write the TWS register
  • 23. Introduction Machine Memory octrng(4) octrtc(4) brswphy(4) octhci(4) CFI Conclusions Real-time Clock Reads(2) 2nd step: read-back the TWS register keep reading until the valid bit is cleared if cleared, the operation was completed fetch clock data from the 1st byte in the data field
  • 24. Introduction Machine Memory octrng(4) octrtc(4) brswphy(4) octhci(4) CFI Conclusions Real-time Clock Writes(1) 1st step: set RTC register address clear the read bit set the valid bit fill the data field write the TWS register
  • 25. Introduction Machine Memory octrng(4) octrtc(4) brswphy(4) octhci(4) CFI Conclusions Real-time Clock Writes(2) 2nd step: read-back the TWS register keep reading until the valid bit is cleared do an extra read-back after the operation was completed
  • 26. Introduction Machine Memory octrng(4) octrtc(4) brswphy(4) octhci(4) CFI Conclusions Real-time Clock RTC Format The clock information is BCD-coded as follows: tt->year = ((tod[5] & 0x80) ? 100 : 0) + FROMBCD(tod[6]); tt->mon = FROMBCD(tod[5] & 0x1f); tt->day = FROMBCD(tod[4] & 0x3f); tt->dow = (tod[3] & 0x7); tt->hour = FROMBCD(tod[2] & 0x3f); tt->min = FROMBCD(tod[1] & 0x7f); tt->sec = FROMBCD(tod[0] & 0x7f);
  • 27. Introduction Machine Memory octrng(4) octrtc(4) brswphy(4) octhci(4) CFI Conclusions Real-time Clock TOD Routines The settime and gettime routines: pack/unpack the time data into/from BCD form read/write each packet through the TWS registers
  • 28. Introduction Machine Memory octrng(4) octrtc(4) brswphy(4) octhci(4) CFI Conclusions Real-time Clock Issues The TWSI is very fragile and needs a lot of integrity checks. Besides, some models have an RTC clock: D-Link DSR-500 Portwell CAM-0100. Others don’t: Ubiquiti Networks EdgeRouter Lite.
  • 29. Introduction Machine Memory octrng(4) octrtc(4) brswphy(4) octhci(4) CFI Conclusions Broadcom PHY Njetwork Even though I used tftpboot and NFS-root on boot... # ifconfig cnmac0 cnmac0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> lladdr 00:de:ad:20:75:00 priority: 0 media: Ethernet autoselect (none) status: no carrier inet 192.168.1.9 netmask 0xffffff00 broadcast # ping k.ro ping: unknown host: k.ro
  • 30. Introduction Machine Memory octrng(4) octrtc(4) brswphy(4) octhci(4) CFI Conclusions Broadcom PHY BCM53XX Missing Broadcom PHY driver for the chip 53XX-family resulted in cnmac0 at ukphy looked at OpenWrt for the proper registers wrote a minimal PHY driver with dumb-mode only switch support
  • 31. Introduction Machine Memory octrng(4) octrtc(4) brswphy(4) octhci(4) CFI Conclusions Broadcom PHY Status Routine The key was the status PHY routine which reads the: link state duplex mode port’s speed via corresponding registers from the status page.
  • 32. Introduction Machine Memory octrng(4) octrtc(4) brswphy(4) octhci(4) CFI Conclusions Broadcom PHY Reads(1) 1st step: set the page number if the current one differs set the register address read-back to check for operation completion
  • 33. Introduction Machine Memory octrng(4) octrtc(4) brswphy(4) octhci(4) CFI Conclusions Broadcom PHY Reads(2) Once the page-register tuple is in place: read 2 bytes from the first data register if needed go on with the 2nd, 3rd and 4th data registers
  • 34. Introduction Machine Memory octrng(4) octrtc(4) brswphy(4) octhci(4) CFI Conclusions Broadcom PHY Results With that in place the network seems better: # ifconfig cnmac0 cnmac0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> lladdr 00:de:ad:20:75:00 priority: 0 groups: egress media: Ethernet autoselect (1000baseT master) status: active inet 192.168.1.9 netmask 0xffffff00 # ping k.ro PING k.ro (194.102.255.23): 56 data bytes 64 bytes from 194.102.255.23: icmp_seq=0 time=60.132 ms 64 bytes from 194.102.255.23: icmp_seq=1 time=63.555 ms
  • 35. Introduction Machine Memory octrng(4) octrtc(4) brswphy(4) octhci(4) CFI Conclusions Broadcom PHY Switch Support In the future I plan to add switch support. Existing kernel switch frameworks: ZRouter solution from Aleksandr Rybalko IIJ solution from Kazuya Goda
  • 36. Introduction Machine Memory octrng(4) octrtc(4) brswphy(4) octhci(4) CFI Conclusions USB Host Controller Existing Work Cavium SDK IIJ driver for the CN30XX boards WIP driver I wrote that no longer fries sticks
  • 37. Introduction Machine Memory octrng(4) octrtc(4) brswphy(4) octhci(4) CFI Conclusions USB Host Controller USB Initialization Started by implemneting device specific initialization routines: clock setup host-mode setup core setup dma setup interrupt routine
  • 38. Introduction Machine Memory octrng(4) octrtc(4) brswphy(4) octhci(4) CFI Conclusions USB Host Controller Attachment Adding basic bus and root hub routines enabled attachment: octhci0 at iobus0 irq 56 core version 2 pass 3.5 usb0 at octhci0: USB revision 2.0 uhub0 at usb0 " octHCI root hub" rev 2.00/1.00 addr 1 uhub0: cannot open interrupt pipe usb0: root device is not a hub
  • 39. Introduction Machine Memory octrng(4) octrtc(4) brswphy(4) octhci(4) CFI Conclusions USB Host Controller Interrupts Add basic interrupt support matching other implementations: add octhci intr1() routine modify octhci intr() to call octhci intr1() schedule the actual work for the soft interrupt fill in the octhci poll() routine Silenced attach errors: octhci0 at iobus0 irq 56: core version 2 pass 3.5 usb0 at octhci0: USB revision 2.0 uhub0 at usb0 " octHCI root hub" rev 2.00/1.00 addr 1
  • 40. Introduction Machine Memory octrng(4) octrtc(4) brswphy(4) octhci(4) CFI Conclusions USB Host Controller Root Hub I stopped frying USB sticks after supporting: clear feature requests get hub descriptor requests get port status requests set port feature request And doing: proper USB 2.0 descriptors command acknowledgements
  • 41. Introduction Machine Memory octrng(4) octrtc(4) brswphy(4) octhci(4) CFI Conclusions USB Host Controller Port and Channel Interrupts Basic support for port and channel/endpoint interrupts: keep track of port connections and port resets. notify upstream when a port finished reseting notify upstream about connection status changes. acknowledge and clear events to avoid interrupt storms Gets things further along: pipe device transfer and control methods are required.
  • 42. Introduction Machine Memory octrng(4) octrtc(4) brswphy(4) octhci(4) CFI Conclusions USB Host Controller octhci(4) Status Figure : Green: implemented, blue: in progress, red: not implemented
  • 43. Introduction Machine Memory octrng(4) octrtc(4) brswphy(4) octhci(4) CFI Conclusions USB Host Controller Show-Stoppers can’t use the SDK: U.S. export control SDK and IIJ register poking logic is completely different can’t reuse IIJ’s code as it doesn’t work on my D-Link USB is hard USB w/o documentation is harder writing a driver requires time, which is the worst
  • 44. Introduction Machine Memory octrng(4) octrtc(4) brswphy(4) octhci(4) CFI Conclusions Compact Flash Interface Flash Memory OpenBSD doesn’t support the DSR-500 flash memory: octcf at iobus0 base 0x1d000800 irq 0 not configured FreeBSD does through CFI: cfi0: <AMD/Fujitsu - 32MB> on ciu0 cfi0: cfi0: [256x128KB] cfid0 on cfi0
  • 45. Introduction Machine Memory octrng(4) octrtc(4) brswphy(4) octhci(4) CFI Conclusions Compact Flash Interface Plans Discussed with David Gwynne (dlg@): write a small ATA driver plug it into the rest of the system via atascsi no multiple concurrent commands no port multipliers
  • 46. Introduction Machine Memory octrng(4) octrtc(4) brswphy(4) octhci(4) CFI Conclusions Compact Flash Interface Implementation Writing a driver was slower than I expected: it’s my first disk driver atascsi has too many abstractions the reference drivers ahci(4) and sili(4) are complex cf doesn’t even do dma, it does bus space reads/writes wdc(4)/pciide(4) is messy
  • 47. Introduction Machine Memory octrng(4) octrtc(4) brswphy(4) octhci(4) CFI Conclusions Compact Flash Interface Work In Progress I just started working on the driver. Unsure about: mimicking the FreeBSD abstraction: cfid → cfi → atascsi keeping the driver MD or making it MI supporting the entire CFI specification including the Intel mess StrataFlash?
  • 48. Introduction Machine Memory octrng(4) octrtc(4) brswphy(4) octhci(4) CFI Conclusions OpenBSD/Octeon Mostly Harmless Conclusions a lot of work was put into OpenBSD/Octeon lack of documentation is slowing progress SDK copyright capped the pace even further open problems: USB, switch framework, CFI work continues to make this port complete
  • 49. Introduction Machine Memory octrng(4) octrtc(4) brswphy(4) octhci(4) CFI Conclusions OpenBSD/Octeon So Long, and Thanks for All the Fish Questions?