Skip to contentSkip to conversation

Reed-Solomon

RFT Vladimir 'φ-coder/phcoder' Serbinenko 5 participants 11 messages Sep 25, 2010 – Sep 28, 2010

lore
Share & tools
lore
#0 lore raw

Hello, all. I've just finished Reed-Solomon and pushedit to branches/solomon. About 8 sectors (including MBR) aren't protected by Reed-Solomon. Obviously it can be improved but that would be for post-1.99

Signature · 2 lines
Regards
Vladimir 'φ-coder/phcoder' Serbinenko
#1 lore raw
Quoted 3 lines · Vladimir 'φ-coder/phcoder' Serbinenko

Hello, all. I've just finished Reed-Solomon and pushedit to branches/solomon. About 8 sectors (including MBR) aren't protected by Reed-Solomon. Obviously it can be improved but that would be for post-1.99

So you are adding bit error detection and correction to the boot loader?
You realize that the hard disk already does reed-solomon right? So a
second layer of it doesn't seem to have much point.

#2 lore raw
Quoted 8 lines · Phillip Susi
Quoted 3 lines · Vladimir 'φ-coder/phcoder' Serbinenko

Hello, all. I've just finished Reed-Solomon and pushedit to branches/solomon. About 8 sectors (including MBR) aren't protected by Reed-Solomon. Obviously it can be improved but that would be for post-1.99

So you are adding bit error detection and correction to the boot loader?
You realize that the hard disk already does reed-solomon right? So a
second layer of it doesn't seem to have much point.

You're missing context.

Signature · 1 line
Colin Watson                                       [[email protected]]
#3 lore raw
Quoted 5 lines · Colin Watson
Quoted 3 lines

So you are adding bit error detection and correction to the boot loader?
You realize that the hard disk already does reed-solomon right? So a
second layer of it doesn't seem to have much point.

You're missing context.

Apparently. Fill me in?

#4 lore raw
Quoted 8 lines · Phillip Susi
Quoted 5 lines · Colin Watson
Quoted 3 lines

So you are adding bit error detection and correction to the boot loader?
You realize that the hard disk already does reed-solomon right? So a
second layer of it doesn't seem to have much point.

You're missing context.

Apparently. Fill me in?

FlexNet and similar like to write to track 0 sectors (outside partitioned space) to store license info. This clobbers part of grub potentially. So to make grub more tolerant of such misbehaviour, the idea suggested was to add error correction to grub so it can survive attacks on its code (and even potential disk errors).

Signature · 1 line
Len Sorensen
#5 lore raw
Quoted 5 lines · Lennart Sorensen

FlexNet and similar like to write to track 0 sectors (outside partitioned space) to store license info. This clobbers part of grub potentially. So to make grub more tolerant of such misbehaviour, the idea suggested was to add error correction to grub so it can survive attacks on its code (and even potential disk errors).

Ahh, neat. Two sectors of ECC can fix one that is completely destroyed?
I was under the impression that you could only fix a few corrupted
bits, not an entire sector, but I suppose if you add enough ECC... I take it that someone has already made sure that the misbehaved software only uses a single sector?

#6 lore raw
Quoted 10 lines · Phillip Susi
Quoted 5 lines · Lennart Sorensen

FlexNet and similar like to write to track 0 sectors (outside partitioned space) to store license info. This clobbers part of grub potentially. So to make grub more tolerant of such misbehaviour, the idea suggested was to add error correction to grub so it can survive attacks on its code (and even potential disk errors).

Ahh, neat. Two sectors of ECC can fix one that is completely destroyed?
I was under the impression that you could only fix a few corrupted
bits, not an entire sector, but I suppose if you add enough ECC...

http://en.wikipedia.org/wiki/Reed-Solomon_error_correction says that t check symbols can correct up to floor(t/2) symbols. (ISTR Vladimir said he had a variant which did better than this, but I haven't looked yet.)

Quoted 2 lines

I take it that someone has already made sure that the misbehaved software only uses a single sector?

All the examples I've seen so far are thus. Of course if you have multiple infections then you're doomed, but hopefully the probability of multiple infections goes down fairly sharply ...

Signature · 1 line
Colin Watson                                       [[email protected]]
#7 lore raw
Quoted 10 lines · Colin Watson
Quoted 8 lines · Phillip Susi
Quoted 6 lines · Lennart Sorensen

FlexNet and similar like to write to track 0 sectors (outside partitioned space) to store license info. This clobbers part of grub potentially. So to make grub more tolerant of such misbehaviour, the idea suggested was to add error correction to grub so it can survive attacks on its code (and even potential disk errors).

Quoted 9 lines
Quoted 4 lines

Ahh, neat. Two sectors of ECC can fix one that is completely destroyed?
I was under the impression that you could only fix a few corrupted
bits, not an entire sector, but I suppose if you add enough ECC...

http://en.wikipedia.org/wiki/Reed-Solomon_error_correction says that t check symbols can correct up to floor(t/2) symbols. (ISTR Vladimir said he had a variant which did better than this, but I haven't looked yet.)

You need one symbol to figure out an error location and one to find the correct value. Since I've chosen to do Reed-Solomon over GF(2^8) our symbols are bytes. Under the supposition that corruption happens in one sector you need only few bytes to figure which sector is corrupted and then 512 bytes to fix it. But I didn't implement this improvement

Quoted 8 lines
Quoted 3 lines

I take it that someone has already made sure that the misbehaved software only uses a single sector?

All the examples I've seen so far are thus. Of course if you have multiple infections then you're doomed, but hopefully the probability of multiple infections goes down fairly sharply ...

My branch uses every available sector for redundancy info. So if you have 2*n sectors left in MBR gap you can survive n corrupted sectors.

Signature · 2 lines
Regards
Vladimir 'φ-coder/phcoder' Serbinenko
#8 lore raw
Quoted 2 lines · Vladimir 'φ-coder/phcoder' Serbinenko

My branch uses every available sector for redundancy info. So if you have 2*n sectors left in MBR gap you can survive n corrupted sectors.

You might want to place a reasonable limit on that. With conventional 62 sector gaps this could be a good idea, but with everyone moving to 1 MB gaps these days, over 2000 sectors of ecc could be overkill ;)

#9 lore raw
Quoted 10 lines · Phillip Susi
Quoted 3 lines · Vladimir 'φ-coder/phcoder' Serbinenko

My branch uses every available sector for redundancy info. So if you have 2*n sectors left in MBR gap you can survive n corrupted sectors.

You might want to place a reasonable limit on that. With conventional 62 sector gaps this could be a good idea, but with everyone moving to 1 MB gaps these days, over 2000 sectors of ecc could be overkill ;)

Yes, limit is that redumdance is never longer as the data.

Signature · 2 lines
Regards
Vladimir 'φ-coder/phcoder' Serbinenko