Memory safe computer languages

Go To Last Post
13 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Embedded

Achieving memory safety without compromise

by  (Senior Research Engineer at Galois, a cybersecurity R&D organization)

MARCH 13, 2018

https://www.embedded.com/electronics-blogs/say-what-/4460422/Achieving-memory-safety-without-compromise

Summary:

  • C and C++ are primary in embedded systems
  • C and C++ buffer overflows are prevalent in CVE
  • C and C++ : compiler, lint, static analysis (false positives, false negatives)
  • Memory-safe computer languages - Python, Java, C#, JavaScript
  • Embedded memory-safe computer languages - Ivory, Rust
  • Ivory by Galois, domain-specific, toolchain generates safe C
  • Rust by Mozilla, general-purpose
  • Memory-safety by static analysis with reduction of computational complexity
  • Small UAV flight control software implemented in Ivory
  • Autonomous systems cooperative control (?) implemented in Rust on Windows and embedded Linux by C++ to Rust conversion
  • Rust:
  1. stack and heap operations are automatic (iow managed)
  2. run-time per compiler (iow no run-time library)
  3. no garbage collection
  4. stable as of May'15
  5. robust on embedded Linux
  6. maturing on bare metal and RTOS
  7. Tock RTOS

Conclusion: consider Ivory and Rust for safety-critical applications.

 

"Dare to be naïve." - Buckminster Fuller

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Galois: Trust in your most critical systems.

https://galois.com/

 

"Dare to be naïve." - Buckminster Fuller

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Someone else is having quiche for tea ...

 

laugh

Top Tips:

  1. How to properly post source code - see: https://www.avrfreaks.net/comment... - also how to properly include images/pictures
  2. "Garbage" characters on a serial terminal are (almost?) invariably due to wrong baud rate - see: https://learn.sparkfun.com/tutorials/serial-communication
  3. Wrong baud rate is usually due to not running at the speed you thought; check by blinking a LED to see if you get the speed you expected
  4. Difference between a crystal, and a crystal oscillatorhttps://www.avrfreaks.net/comment...
  5. When your question is resolved, mark the solution: https://www.avrfreaks.net/comment...
  6. Beginner's "Getting Started" tips: https://www.avrfreaks.net/comment...
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Tock Logo

Tock Embedded Operating System

Features

https://www.tockos.org/features

Tock Logo

Tock Embedded Operating System

Hardware

https://www.tockos.org/hardware/

...

Both Hail and imix were design at Universities for our own purposes, but we’re able to make them available with small-run productions funded with grad student rent money. This means they’re not as cheap as they could be.

...

 

Hail

...

SAM4L

(Nordic Semiconductor BLE)

...

... (0.8" x 1.44") (20mm x 36.6mm)

 

imix

Imix on a table

...

SAM4L

(Microchip by Atmel 802.15.4)

(Nordic Semiconductor BLE or ANT)

(True RNG)

(Li-Po charger with clips for 18650)

...

https://github.com/helena-project/imix#imix

 

"Dare to be naïve." - Buckminster Fuller

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

No though for today am considering some Texas BBQ with iced tea wink

 

"Dare to be naïve." - Buckminster Fuller

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

awneil wrote:
Someone else is having quiche for tea ...

Takes me back...

Real Programmers Don’t Use Pascal

Back in the Golden Era of computers, it was easy to separate the men from the boys
(sometimes called “Real Men” and “Quiche Eaters,” respectively). During this period,
the Real Men were the ones who understood computer programming, and the Quiche
Eaters were the ones who didn’t.
...

A previous work, B. Feirstein’s Real Men Don’t Eat Quiche, a 1982 Pocket Books publication, points out that Real Men don’t “relate” to anything and aren’t afraid of being impersonal.
 

from http://www.usm.uni-muenchen.de/~...

You can put lipstick on a pig, but it is still a pig.

I've never met a pig I didn't like, as long as you have some salt and pepper.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

yep - that's the reference.

 

Also: https://www.avrfreaks.net/commen...

Top Tips:

  1. How to properly post source code - see: https://www.avrfreaks.net/comment... - also how to properly include images/pictures
  2. "Garbage" characters on a serial terminal are (almost?) invariably due to wrong baud rate - see: https://learn.sparkfun.com/tutorials/serial-communication
  3. Wrong baud rate is usually due to not running at the speed you thought; check by blinking a LED to see if you get the speed you expected
  4. Difference between a crystal, and a crystal oscillatorhttps://www.avrfreaks.net/comment...
  5. When your question is resolved, mark the solution: https://www.avrfreaks.net/comment...
  6. Beginner's "Getting Started" tips: https://www.avrfreaks.net/comment...
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hopefully this thread will fare better than

Lets talk about RUST [language]
https://www.avrfreaks.net/forum/lets-talk-about-rust-language

I'm a neophyte at riding herd wink

 

More on AVR LLVM Rust :

 LLVM Logo

LLVM 5 documentation

LLVM 5.0.0 Release Notes

Changes to the AVR Target

http://releases.llvm.org/5.0.1/docs/ReleaseNotes.html#changes-to-the-avr-target

This release consists mainly of bugfixes and implementations of features required for compiling basic Rust programs.

...

  • Support zero-sized types in argument lists; this is impossible in C, but possible in Rust

LLVM 6 was released 08-Mar-2018 though couldn't find any AVR changes; am assuming there are defect corrections :

http://releases.llvm.org/6.0.0/docs/ReleaseNotes.html via http://releases.llvm.org/

 


Rust logo

The Rust Programming Language

https://www.rust-lang.org/en-US/

@avr-rust

GitHub

The AVR-Rust project

https://github.com/avr-rust

 

"Dare to be naïve." - Buckminster Fuller

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I always thought The Story of Mel was a fine example of memory unsafe programming. I sent a copy to a grizzled veteran of machines from that era and he said it was authentic.

- John

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Rust Internals

Rust Internals

announcements 

Announcing the Embedded Devices Working Group

by japaric

2018-Feb-27

https://internals.rust-lang.org/t/announcing-the-embedded-devices-working-group/6839/1

...

On the team we have people to look over the ARM Cortex-M, AVR, MSP430 and RISCV ecosystems; ...

...

via https://barrgroup.com/resources/firmware-update/v1803 (last section)

 

"Dare to be naïve." - Buckminster Fuller

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 1

This thread remind me of a song by Bob Kanefsky:

 

http://www.prometheus-music.com/...

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 1

jgalak wrote:

This thread remind me of a song by Bob Kanefsky:

 

http://www.prometheus-music.com/...

Lyrics can be found https://www.gnu.org/fun/jokes/et...

You can put lipstick on a pig, but it is still a pig.

I've never met a pig I didn't like, as long as you have some salt and pepper.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

"Dare to be naïve." - Buckminster Fuller