Skip to contentSkip to conversation

New reliability technique

DISCUSSION Victor Porton 6 participants 9 messages Feb 25, 2006 – Feb 26, 2006

lore
Share & tools
lore
#0 lore raw

A minute ago I invented a new reliability enhancing technique.

In idle cycles (or periodically in expense of some performance) Linux can calculate MD5 or CRC sums of _unused_ (free) memory areas and compare these sums with previously calculated sums.

Additionally it can be done for allocated memory, if it will be write protected before the first actual write. Moreover, all memory may be made write-protected if it is not written e.g. more than a second. (When it is written kernel would unlock it and allow to write, by a techniqie like to how swap works.) If write-protected memory appears to be modified by a check sum, this likewise indicates a bug.

If a sum is inequal, it would notice a bug in kernel or in hardware.

I suggest to add "Check free memory control sums" in config.

Signature · 1 line
Victor Porton ([email protected]) - http://porton.ex-code.com
#1 lore raw
Quoted 13 lines · Victor Porton

A minute ago I invented a new reliability enhancing technique.

In idle cycles (or periodically in expense of some performance) Linux can calculate MD5 or CRC sums of _unused_ (free) memory areas and compare these sums with previously calculated sums.

Additionally it can be done for allocated memory, if it will be write protected before the first actual write. Moreover, all memory may be made write-protected if it is not written e.g. more than a second. (When it is written kernel would unlock it and allow to write, by a techniqie like to how swap works.) If write-protected memory appears to be modified by a check sum, this likewise indicates a bug.

Quoted 4 lines

If a sum is inequal, it would notice a bug in kernel or in hardware.

I suggest to add "Check free memory control sums" in config.

Implement it then and send a patch.

--
Jesper Juhl <[email protected]>
Don't top-post http://www.catb.org/~esr/jargon/html/T/top-post.html
Plain text mails only, please http://www.expita.com/nomime.html

#2 lore raw
Quoted 14 lines · Jesper Juhl
Quoted 13 lines · Victor Porton

A minute ago I invented a new reliability enhancing technique.

In idle cycles (or periodically in expense of some performance) Linux can calculate MD5 or CRC sums of _unused_ (free) memory areas and compare these sums with previously calculated sums.

Additionally it can be done for allocated memory, if it will be write protected before the first actual write. Moreover, all memory may be made write-protected if it is not written e.g. more than a second. (When it is written kernel would unlock it and allow to write, by a techniqie like to how swap works.) If write-protected memory appears to be modified by a check sum, this likewise indicates a bug.

Quoted 7 lines
Quoted 4 lines

If a sum is inequal, it would notice a bug in kernel or in hardware.

I suggest to add "Check free memory control sums" in config.

Implement it then and send a patch.

But, doesn't slab poisoning and the like already cover this ground somewhat?

--
Jesper Juhl <[email protected]>
Don't top-post http://www.catb.org/~esr/jargon/html/T/top-post.html
Plain text mails only, please http://www.expita.com/nomime.html

#3 lore raw
Quoted 25 lines · Jesper Juhl
Quoted 22 lines · Jesper Juhl
Quoted 19 lines · Victor Porton

A minute ago I invented a new reliability enhancing technique.

In idle cycles (or periodically in expense of some performance) Linux can calculate MD5 or CRC sums of _unused_ (free) memory areas and compare these sums with previously calculated sums.

Additionally it can be done for allocated memory, if it will be write protected before the first actual write. Moreover, all memory may be made write-protected if it is not written e.g. more than a second. (When it is written kernel would unlock it and allow to write, by a techniqie like to how swap works.) If write-protected memory appears to be modified by a check sum, this likewise indicates a bug.

If a sum is inequal, it would notice a bug in kernel or in hardware.

I suggest to add "Check free memory control sums" in config.

Quoted 9 lines
Quoted 4 lines

Implement it then and send a patch.

But, doesn't slab poisoning and the like already cover this ground somewhat?

No, they don't. They cover only a very small percentage of memory.

On the other hand, ECC memory and caches do this in hardware.

Signature · 1 line
Do not meddle in the internals of kernels, for they are subtle and quick to panic.
#4 lore raw
Quoted 32 lines · Avi Kivity
Quoted 30 lines · Jesper Juhl
Quoted 26 lines · Jesper Juhl
Quoted 13 lines · Victor Porton

A minute ago I invented a new reliability enhancing technique.

In idle cycles (or periodically in expense of some performance) Linux can calculate MD5 or CRC sums of _unused_ (free) memory areas and compare these sums with previously calculated sums.

Additionally it can be done for allocated memory, if it will be write protected before the first actual write. Moreover, all memory may be made write-protected if it is not written e.g. more than a second. (When it is written kernel would unlock it and allow to write, by a techniqie like to how swap works.) If write-protected memory appears to be modified by a check sum, this likewise indicates a bug.

Quoted 6 lines

If a sum is inequal, it would notice a bug in kernel or in hardware.

I suggest to add "Check free memory control sums" in config.

Implement it then and send a patch.

Quoted 6 lines
Quoted 4 lines

But, doesn't slab poisoning and the like already cover this ground somewhat?

No, they don't. They cover only a very small percentage of memory.

Ohh, ok, then it makes sense as a debug thing.

Let's see an implementation then.

--
Jesper Juhl <[email protected]>
Don't top-post http://www.catb.org/~esr/jargon/html/T/top-post.html
Plain text mails only, please http://www.expita.com/nomime.html

#5 lore raw
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines · Victor Porton
Quoted 5 lines

A minute ago I invented a new reliability enhancing technique.

In idle cycles (or periodically in expense of some performance) Linux can calculate MD5 or CRC sums of _unused_ (free) memory areas and compare these sums with previously calculated sums.

Quoted 3 lines · Jesper Juhl

Ohh, ok, then it makes sense as a debug thing.

Let's see an implementation then.

http://www.ussg.iu.edu/hypermail/linux/kernel/9701.1/0058.html

At least a variation of it, maybe not from a minute ago :)

#6 lore raw
In reply to Avi Kivity
Quoted 1 line · On 25-Feb-2006 Avi Kivity wrote:

Jesper Juhl wrote:

...

Quoted 14 lines
Quoted 14 lines
Quoted 14 lines · Victor Porton
Quoted 13 lines

In idle cycles (or periodically in expense of some performance) Linux can calculate MD5 or CRC sums of _unused_ (free) memory areas and compare these sums with previously calculated sums.

Additionally it can be done for allocated memory, if it will be write protected before the first actual write. Moreover, all memory may be made write-protected if it is not written e.g. more than a second. (When it is written kernel would unlock it and allow to write, by a techniqie like to how swap works.) If write-protected memory appears to be modified by a check sum, this likewise indicates a bug.

Quoted 7 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines

If a sum is inequal, it would notice a bug in kernel or in hardware.

I suggest to add "Check free memory control sums" in config.

No, they don't. They cover only a very small percentage of memory.

On the other hand, ECC memory and caches do this in hardware.

Isn't it better to double check (especially after such risky things as e.g. software suspend)?

We need to check not only for damaged hardware, but also for kernel/modules bugs. For this ECC and cache reliability is useless.

Signature · 1 line
Victor Porton ([email protected]) - http://porton.ex-code.com
#7 lore raw
Quoted 5 lines · Victor Porton

Isn't it better to double check (especially after such risky things as e.g. software suspend)?

We need to check not only for damaged hardware, but also for kernel/modules bugs. For this ECC and cache reliability is useless.

What kernel bugs do you want to catch with double-checking free memory? For use-after-free, we already have slab poisoning.

Pekka

#8 lore raw
Quoted 5 lines · Pekka Enberg
Quoted 3 lines · Victor Porton

Isn't it better to double check (especially after such risky things as e.g. software suspend)?

Quoted 7 lines
Quoted 2 lines

We need to check not only for damaged hardware, but also for kernel/modules bugs. For this ECC and cache reliability is useless.

What kernel bugs do you want to catch with double-checking free memory? For use-after-free, we already have slab poisoning.

And for !slab, we unmap kernel virtual addresses with page debugging, which seems like a better solution.

Signature · 2 lines
SUSE Labs, Novell Inc.
Send instant messages to your online friends http://au.messenger.yahoo.com