The Register Home Page

* Posts by fg_swe

1478 publicly visible posts • joined 20 Nov 2021

Dump C++ and in Rust you should trust, Five Eyes agencies urge

fg_swe Silver badge

False

Just because you separate code and data does very little to make your system more secure.

Proof: if you can overwrite function pointers(which are "data") you can raise lots of hell inside a program.

fg_swe Silver badge

False

Large Scale Systems such as HP MPE or Apple LISA were built with Pascal-like languages.

HP MPE was highly successful and LISA is essentially the predecessor of all GUI computers we use today.

fg_swe Silver badge

ALGOL

Algol compiled itself in the 1970s. Entire systems were built in Algol - from kernel to applications.

fg_swe Silver badge

False

Proving a system "safe for life-critical applications" is only to a minor degree dependent on "certified tools".

What you must do is to prove that the system you built with the toolchain is "safe". This is done with processes like V-Model, ASPICE, ISO26262 or DO178. The railway folks have their equivalent standard and the medical folks, too.

Essentially: test the h3ll out of your system. If you have a relevant compiler bug, it will most likely crop up in this process. Of course you will track the issue down to assembly level.

So you can safely use Rust for ABS or flight control, IF your engineering processes are robust and faithfully executed. Today.

fg_swe Silver badge

Or

...maybe America and friends are currently hit very hard in the crown jewels.

I see reports left and right how foreign actors are hitting NATO government institutions really hard. Some mid-level government entities completely encrypted or their laundry hang out to dry.

Having said that, indeed, one man's security is another man's security risk. That even applies to two men inside NSA.

Some government workers go back to paper for critical stuff(HR security), as far as I can see.

fg_swe Silver badge

"unsafe" "Inline_cpp"

Judicious use of a small number of unsafe code parts is Good Engineering. Ideally, limit the unsafe code to system libraries such as File handling, TCP/IP, GUI and so on.

Much better than 100% unsafe C code. Or "modern" C++ code with some "accidental multithreaded sharing".

Engineering that has "life in hands" is about minimizing risk in an economic fashion. If 99% of your code is memory safe, that is much better than 100% unsafe C or C++.

fg_swe Silver badge

Re: Complexity

Bingo. NEVER use the latest C++ feature, just because you have read about it. In extremis, write "C with classes" if that is the only way you know how to work reliably.

fg_swe Silver badge

Not Really

The compiler of my memory safe language is about 10 000 lines of C++ code and takes about one second to compile 10000 loc on an RPI. Memory Safety is not expensive for the compiler.

Also, in the 70s they already had ALGOL, which was in many ways memory-safe.

C "won", because it was "given away for free".

Turning Turbo Pascal 3 in a single-threaded, memory safe language would be not hard either. It runs on an 80286, 8Mhz like a lightning.

fg_swe Silver badge

Bull$hit

Memory Safety is an important tool in the toolbox, but it does not absolve you from executing a test battery from Unit to HIL Tests. Most importantly, it does not absolve you from cheating on test cases.

But that is true with each and every engineering product. If you test a car by opening and closing doors, you still don't know how it acts in a curve, how it acts over a pothole etc etc.

fg_swe Silver badge

Handling Compiler Bugs

There are ways of controlling this risk. Not exactly cheap, but cheaper than losing a €100 000 000 aircraft and a man piloting it.

Use brains and drop penny-pinching. Then you find out.

fg_swe Silver badge

Integer Overflow

Ideally, integer over- or underflows should terminate program(or at least thread) execution. In Ada and Pascal, you can have this.

Your program just exposes the dirty side of C.

Also see POLYSPACE, it is a way to find such perversions.

fg_swe Silver badge

Missing return Value and Type Safety

A proper memory safe language will not allow this. See my language SAPPEUR as an example.

C++ compilers have been traditionally weak on this, for no good reason.

fg_swe Silver badge

Explanation

"Memory Safety" is not a silver bullet. It only assures that memory errors are "locally contained" and do not propagate from one module to other modules. Like an ABS brake is not a silver bullet, either. You can still kill yourself with an ABS brake, if you try hard enough.

fg_swe Silver badge

Not Entirely True

1.) Ada by itself is not fully memory safe. SPARK Ada could be said to be.

2.) There have been Ada programs which were carefully built, but produced an exception when lots of money was at stake. Ariane V, first flight is premier example.

3.) Exhaustive testing according to the V Model will bring you the confidence that your carefully designed and written system is also doing what it is supposed to do. Unit Testing, Software Testing, System Testing, HIL testing, careful operationalisation, massive datalogging/analysis and a bunch of other validation measures used by premier projects such as Jäger 90.

Of course, if you start cheating on testing, all bets are off. Tests must be first and foremost REALISTIC. And somehow "complete" according to the system use cases.

4.) Memory safe languages can detect quite a few "hidden" bugs during 3. That is exactly when you want to learn about them. Not when an airman's life depends on it.

fg_swe Silver badge

Wrong

HP MPE was a successful multi-user, transactional OS written in a Pascal variant. Pascal itself is NOT memory safe, but you can of course limit yourself to not using pointers. Turn on bounds checking. Then you have sort-of-memory-safety. Still no support for multithreading, which is a critical feature these days.

Entire corporations ran their business systems on HP MPE and most of them loved it for reliability and security. It was axed because HP was run by people who preferred to be resellers of other companies such as SAP, Oracle and Microsoft. It would still exist(and make money for HP and customers) if it were not for these surrender monkeys.

MPE ran on powerful PA RISC servers with 16 or more CPUs. Thousands of parallel users. A mainframe OS in all but name.

fg_swe Silver badge

False

First, PASCAL is a very good language, especially for students. Strong typing, simplicity, good string facilities. I like it a lot for its spirit.

BUT - it is not memory safe. heap memory is managed essentially the same way as C does, with consequentially the same "bug modes" such as "use after free".

You could create a memory-safe Pascal variant, complete with "smart pointers everywhere" and multithreading-aware type system. But that would no longer be Pascal, but something else.

fg_swe Silver badge

No

Memory-Safe languages provide fine-grained protection of variables in the order of 10 to 100 octets. MMU pages are in the order of 1000 or more octets. Also, MMUs cannot reliably protect against randomly false pointers and "use after free".

fg_swe Silver badge

False

There have been quite a few successful computers based on Pascal and Algol. Any Turing-complete language can perform self-hosting (compiling itself to binary code). And that is practice, not theory. The Algol mainframes and the C# based OS Singularity were (mostly) memory-safe in the kernel.

fg_swe Silver badge

Jäger 90 / Typhoon

Apparently the most safe flight control software is written in Ada. Also see Spark Ada, which is a very interesting approach to safety.

The others you can find on youtube, crashing on landing. F22, Gripen, Su27, you name them.

fg_swe Silver badge

Wrong

Algol was memory-safe around the same time C was invented. Actually quite similar to Java, with the VM being a specialized CPU. See ICL and Burroughs mainframes.

fg_swe Silver badge

Memory Safety != Garbage Collection

Instead of GC, ARC can be used. I have done it, works nicely and is very efficient(almost no delays from heap memory). See http://sappeur.ddnss.de/

fg_swe Silver badge

Wrong

Memory Safe Languages can be extremely compact in their implementation. My language SAPPEUR has about 10 000 loc in the compiler and about 5000 loc in the "base libraries". Just because Java and .Net are bloated means nothing.

Memory-safe languages so hot right now, agrees Lazarus Group as it slings DLang malware

fg_swe Silver badge

Re: Lazy Meta-Curry

Why LISP ? I always though it being a C++ competitor, which means it is an imperative language. LISP and derivatives are functional.

fg_swe Silver badge

Maybe

...they fear to be counter-hacked and want to eliminate their share of the 70% of exploits which come from the lack of memory safety of C and C++.

Elon is the bakery owner swearing in the street about Yelp critics canceling him

fg_swe Silver badge
Mushroom

Tshekists

HITLER learned mass murder from commies ULJANOV. TROTZKY and TSHERSHINSKY. They had already murdered 20 million people before 1933.

fg_swe Silver badge
FAIL

Re: Balneum tempus

He is running operations that are easily 10000x more complex. Real Rocket Science, for example. Doing things nobody else did before him, like reusing launchers.

fg_swe Silver badge
Flame

No, Actual

If Musk did an intelligent liquidation of his assets, he would be easily worth $50 billion.

fg_swe Silver badge
Go

Re: The witch hunt of the leftist mob

There are quite a few more censorship-resistant platforms such as

+ Telegram (ironically build+run by Russians "in Dubai")

+ Rumble

+ IRC

+ qwant search engine

+ YaCy distributed search engine

+ Conservapedia

+ private webserver

+ bittorrent scalable file sharing

+ crowdpowered video services such as PeerTube

The idea that average people are now locked into the FAANG golden cages is actually very wrong. Let's venture out !

fg_swe Silver badge
Mushroom

Re: Losing $45 billion

Electric cars on large scale, reusable rockets and mega satellite constellations are worth more than a smartphone discussion app. But yeah, destroying a billion dollar brand does not go down easily with the financiers.

More importantly, if the smartphone app is just to bring serious flak to the oligarchy, there will be blowback through all of the mainstream media they control. Which is about 100%.

fg_swe Silver badge
Stop

Playing Inside Minefield

Mr Musk clearly shows some Cojones for marching into this minefield. Somebody should tell him, that this should be done with caution and skill, though. Free Speech is very important and critical to the proper function of ANY democratic republic*, governed by rule of law. As opposed to the rule of (oligarchy or other) mobs.

The Covid Corruption (making dangerous quick+dirty injections mandatory) clearly demonstrated this. Nutterish government policies related to the the Gender Thing would be another example. Iraq war for nothing, etc.

I still consider Mr Musk a highly skilled man, given his achievements in cars and reusable rocket launchers, mega-satellite constellations,...

He now found out that PROPER censorship is the critical skill. It is somewhere between "you cannot criticize wokeism" and "let's call for mass murder".

*or constitutional monarchy with elected government

China's Loongson debuts processor that 'matches Intel silicon circa 2020'

fg_swe Silver badge

India Did NOT Fail

India yearned for true sovereignty, including nuclear weapons. They did not wanted to be bossed around by other nuclear powers.

That is why they needed a secure supply of indigenous computers. Depending on the US and IBM was too risky.

From a beancounting perspective they failed, but from a political-military perspective they rose to a semi-superpower by means of their homemade computers and the homemade nuclear weapon.

There are many aspects of looking at an elephant. Don't focus on the backside, also look at the trunk, the big ears, the mighty tusks !

fg_swe Silver badge

And

Japan learned to live without babies. All human energy and friendliness spent on flooding the world with great cars, great cameras, binoculars and video recorders. Facilitated by a bonfire of giant monetary expansion.

Future archeologists will call it the "Toyota Episode" followed by the "Phillipine phase". The latter is when a foreign people take over Japan, because the Japanese died of age and lack of children.

fg_swe Silver badge

GNSS

Apparently they use this CPU also for GNSS and other sovereign/mil applications. For obvious reasons of security.

HPE targets enterprises with Nvidia-powered platform for tuning AI

fg_swe Silver badge

Human Brain

100E9 Neurons

Each Neuron 10000 Synapses

That makes 100E13 "Parameters". That is 1E15 == 100 000 Billion Parameters. About 1000x more than the model they mention.

In other words, the "AI" is on the level of a worm or the like.

Free your best employees of the Hyped Nonsense*, use Common Sense and you will win. Also, do not allow newspapers and TVs on campus.

Treat your people well, respect them, nurture their innovative skills. Human brains need 1000x less power than grafic cards for the same number of neurons.

* e.g. "COVID", "UFOs", "MBA leader", "man and woman are socially defined", "eternal guilt from the 18th century", "windmills", "solar cells", "corium melting to middle of earth", ...

fg_swe Silver badge

Artificial Intelligence vs Natural Stupor

"If you do not buy into the latest hype, bad things will happen to you".

Yours Once-A-Great-Company

Ransomware-hit British Library: Too open for business, or not open enough?

fg_swe Silver badge

Change Of Mind Required

There must be a very serious discussion in the applied computer science sphere about this kind of issues. Security must be the topmost priority and "the latest hot craze" (such as running everything on a hugely complex(read: questionable security) JavaScript VM) must be questioned.

We must question the use of C and C++, as 70% of CVE exploits could be neutered by Memory Safe Languages.

Projects such as seL4 and CompCert should be considered the ideal to be emulated in things such as web servers, databases. Especially RDBMS servers have a history of being extremely insecure. Pushing out a new release, improving benchmarks was long considered imperative. Security was an afterthought.

The KISS principle should be employed wherever possible, as only simplicity makes certain security proofs possible.

Convoluted and highly insecure stuff such as OpenSSL should be questioned at the concept level. Do we really need these complex hairballs ?

Best practices such as formal scanners, parsers, regex checking should be written.

fg_swe Silver badge

Dangerous Development

How long will "average" people trust us "computer wizards", if this kind of cr4p keeps repeating ?

Europe's Ariane 6 rocket rated 'ready to rumble' after passing hot fire test

fg_swe Silver badge

Re: ESA suffers from the same disease as NASA

The Ariane launchers were quite succesful and reliable until Musk entered the business.

fg_swe Silver badge

Well

The EU is a bunch of weaklings who need Uncle Sam to protect them from ANY REAL threat. Like the Russkies or the Turks.

They will degrade defense capabilities to zero* while talking childish-pacifist nonsense. When the threat pops up, they cannot even organize a Common European Defence Exercise. Easy to play Divide Et Impera with said weaklings.

So the lack of a satellite launcher is much less of an issue than LACK OF COJONES.

*Look up SENIOR GUARDIAN, Heeresfunkgeräte, EADS Barracuda, EuroHAWK, "Kampfdrohnen völkerrechtlich nicht verboten"

Revival of Medley/Interlisp: Elegant weapon for a more civilized age sharpened up again

fg_swe Silver badge

Excellent Work !

Now, if somebody could also take care of

+ ALGOL Mainframes from ICL, Unisys and Moscow Precision*, a precursor of the JVM runtime and Memory Safe Kernels

+ Wirth's systems from Modula-2 to Oberon

+ Smalltalk-based systems of many shades.

Why ? Because these systems are still leading-edge in some aspects, especially security and simplicity.

The second reason is that the hard work, which went into these systems, should be somehow preserved for future engineers and scientists to study. Maybe there is even some social-science knowledge to be found in the future. Currently we preserve Greek scriptures, but we throw away important inventions of just a few decades ago. That's sad.

* now MCST

Post-IPO, Arm to push purpose-built almost-processors

fg_swe Silver badge
Go

Silicon As A Service

I can see a huge market in web-based services which allow engineers to drag and drop ready-made silicon components into their design, simulate the design, enter a credit card number and have a fab such as TSMC or GF produce the System On Chip for them. Get the SOC back in a matter of weeks for lab verification.

Today these components are soldered onto a PCB. Soldering itself is stressful to all components and the soldering joints are prone to fail on the long run of temperature cycles.

fg_swe Silver badge
Go

Don't Try To Force Anybody

Apple has been developing a great(very fast, energy efficient) CPU based on the ARM ISA. This reflects back on the ARM idea very nicely. Instead provide the best compiler, the best debugger etc. Then Apple and others will come back to do business with ARM.

Selling ready-to-use "silicon components" is of course a very useful idea. The processor world is much bigger than just "IT". For example, the automotive world needs highly reliable "MCUs", which are a combination of CPU, Flash, RAM, ADC, DAC, Timers, PWM, Crypto engines and so on. They run a version of the AUTOSAR OS on less than 3MByte of RAM and similar amount of Flash. These MCUs control things like ABS brakes, the "comfort" devices inside a car, or DCDC converters.

The Silicon Components would therefore include mixed signal and application-specific circuits such as crypto, hashing, CRC, content addressable memory(CAM) and the like.

Huge potential business. Can eat into NXP, STM, TI and Infineon market share ;-)

Europe's Ariane 6 takes rocket science seriously by testing patience before engines

fg_swe Silver badge

Governments

It was Hitler and Stalin who made spaceflight happen.

No need to like them for this, but these are the facts.

Likewise, Admiral Rickover designed and developed the PWR reactor.

Silicon Valley grew out of electronic warfare...

The world seems so loopy. But at least someone's written a memory-safe sudo in Rust

fg_swe Silver badge

Re: C++ Template Worshipping

Use the simple m4 features. Essentially just the replace mechanics.

fg_swe Silver badge
Alert

WASM, Sappeur, Rust

As this is an important subject, I have written a page about it:

http://sappeur.ddnss.de/SappeurComparedToWASM.html

fg_swe Silver badge
Mushroom

FAIL 2

I responded to "Even writing in assembly "allowed" programmers to write perfectly safe code". Now you start writing about JS.

Also, you implicitly call WASM-Programs "memory safe", which again demonstrates you lack of understanding of Memory Safety.

A C++ program compiled to WASM will have almost exactly the same/equivalent security bugs as the same program compiled to x86 or ARM machine code. If you lock down these programs using LSM, you have practically the same security properties as WASM provides. Sans the JS VM overhead.

Read here: https://www.williamjbowman.com/blog/2023/05/18/in-what-sense-is-webassembly-memory-safe/

There are very good reasons for the type systems of Sappeur and Rust, both in terms of security and in terms of efficiency. Low-level constructs such as VMs or CPUs are hard-pressed to replicate these capabilities and will consume many transistors or runtime to do so.

Musk's mighty missile is ready for launch once FAA says OK

fg_swe Silver badge

No

The idiotic approach of launch-testing does not work well anywhere.

Systematic simulation, HIL testing, expensive ground test rigs are the way to go.

Then launch with lots of telemetry.

Musk has the education to make this happen, unlike many others.