On Thursday 11 September 2008 13:42, Timo Teräs wrote:
> Denys Vlasenko wrote:
> > On Tue, Sep 9, 2008 at 3:55 PM, Timo Teräs <[EMAIL PROTECTED]> wrote:
> >> Timo Teräs wrote:
> >>> Vladimir, can you post an incremental patch to fix the modprobe-small.c.
> >>> I can then merge them to one cumulative patch for commit.
> >> Thanks Vladimir.
> >>
> >> A new version is at http://solidboot.com/~fabled/bb-modprobe-v10.diff
> > 
> > Timo, can you make it so that modprobe-small.c is not touched?
> > I want at least one modprobe to remain sort-of-stable in the process.
> > Then I can apply it.
> 
> Umm... You want two patches: one for modutils vanilla, and other on
> top of that doing the modprobe-small? There's kind of important stuff
> for modprobe-small too. So it should be updated sooner or later.
> 
> Were you planning to have a "settling period" before committing the
> modprobe-small changes?

Well, I took a deeper look at it and - what is this?

# hexdump -vC modules.dep.bb | head -20
00000000  36 00 00 00 74 77 6f 66  69 73 68 5f 78 38 36 5f  |6...twofish_x86_|
00000010  36 34 00 74 77 6f 66 69  73 68 2d 78 38 36 5f 36  |64.twofish-x86_6|
00000020  34 2e 6b 6f 00 74 77 6f  66 69 73 68 2d 61 73 6d  |4.ko.twofish-asm|
00000030  00 74 77 6f 66 69 73 68  00 00 10 00 00 00 74 77  |.twofish......tw|
                                         ^^^^^^^^^^^
00000040  6f 66 69 73 68 5f 63 6f  6d 6d 6f 6e 00 00 01 00  |ofish_common....|
00000050  00 00 00 10 00 00 00 63  70 75 69 64 00 63 70 75  |.......cpuid.cpu|
00000060  69 64 2e 6b 6f 00 00 01  00 00 00 00 01 00 00 00  |id.ko...........|

That is an unaligned 32-bit integer. The code which reads it:

        size_t len;
...
                for (int i = 3; --i >= 0;) {
                        ptr += len;
                        len = *((unsigned *)ptr);
                        ptr += sizeof(len);
                }

and this one writes it:

struct globals {
        int stringbuf_idx;
...
#define stringbuf               (G.stringbuf)
...
static void dump(void)
{
        appendz();
        write(STDOUT_FILENO, &stringbuf_idx, 4);
        write(STDOUT_FILENO, stringbuf, stringbuf_idx);
}

There are several things which are wrong here.

I dropped all changes to MODPROBE_SMALL, and applied the rest.

This is just basic rule - do not combine two unrelated (or loosely-related)
changes. And here MODPROBE_SMALL are changing the format of modules.dep.bb
and definitely have to be discussed.

Thanks!
--
vda
_______________________________________________
busybox mailing list
[email protected]
http://busybox.net/cgi-bin/mailman/listinfo/busybox

Reply via email to