2002-01-09 13:22:36

by Oleg Drokin

[permalink] [raw]
Subject: [PATCH] certain data corruption may cause reiserfs to panic, fix.

Hello!

Purpose of this patch is to catch events of corrupted ITEM_TYPE fields, and report these to user.
Without this patch, accessing such items will resukt in dereferencing random memory areas in kernel,
and then ooping (most probably).
Please apply.

Bye,
Oleg


Attachments:
(No filename) (285.00 B)
corrupt_items_checks.diff (5.56 kB)
Download all attachments

2002-01-09 18:12:56

by Marcelo Tosatti

[permalink] [raw]
Subject: Re: [PATCH] certain data corruption may cause reiserfs to panic, fix.



On Wed, 9 Jan 2002, Oleg Drokin wrote:

> Hello!
>
> Purpose of this patch is to catch events of corrupted ITEM_TYPE fields, and report these to user.
> Without this patch, accessing such items will resukt in dereferencing random memory areas in kernel,
> and then ooping (most probably).
> Please apply.

Why corruption is happening in the first place ?

2002-01-09 20:53:04

by Chris Mason

[permalink] [raw]
Subject: Re: [PATCH] certain data corruption may cause reiserfs to panic, fix.



On Wednesday, January 09, 2002 02:58:45 PM -0200 Marcelo Tosatti
<[email protected]> wrote:

> On Wed, 9 Jan 2002, Oleg Drokin wrote:
>
>> Hello!
>>
>> Purpose of this patch is to catch events of corrupted ITEM_TYPE
>> fields, and report these to user. Without this patch, accessing such
>> items will resukt in dereferencing random memory areas in kernel,
>> and then ooping (most probably).
>> Please apply.
>
> Why corruption is happening in the first place ?

Oddly, the corruption most often caught by this patch was from the early
redhat gcc 2.96.

-chris

2002-01-11 09:45:40

by Oleg Drokin

[permalink] [raw]
Subject: Re: [reiserfs-dev] Re: [PATCH] certain data corruption may cause reiserfs to panic, fix.

Hello!

On Wed, Jan 09, 2002 at 02:58:45PM -0200, Marcelo Tosatti wrote:

> > Purpose of this patch is to catch events of corrupted ITEM_TYPE fields, and report these to user.
> > Without this patch, accessing such items will resukt in dereferencing random memory areas in kernel,
> > and then ooping (most probably).
> > Please apply.
> Why corruption is happening in the first place ?
As Chris already pointed out, there was a problem with old gcc 2.96.
Also such corruptions might be a fault of a disk, somebody carelessly writing data to reiserfsdisk and so on.
Right now it is way too easy to get reiserfs to panic by mounting specially crafted abd disk image, and this is
bad, I believe, so one of the tasks I am performing is to minimalize such cases. (look at ext2 as an example goal I want to achieve
some time in the future)

Bye,
Oleg