Messages in this thread | | | Date | Tue, 12 Nov 1996 10:54:30 +0000 (GMT) | From | Eugenio Jimenez Yguacel <> | Subject | Re: Bug fix for modules-2.1.8 |
| |
On Tue, 12 Nov 1996, Alexander G. Stavitsky wrote:
> > This is the only fix that fixed modules for me... > > The "official patch" still segfaults on some modules (dummy for example). > > On Sun, 10 Nov 1996, Yuri A. Pudgorodsky wrote: > > > Hello! > > > > It seems to me, that the greatest and latest module utils > > has a little typo. > > > > Without the following patch, insmod try to allocate and zero bsssection > > even if the module has zero size bss or has no bss section at all. > > Results: insmod gets segmentation fault and a module been leaved in > > the uninitialized state. > > > > With the patch, almost seems to work fine for me :-) > > > > Knock the wood?... > > > > --- modules-2.1.8/insmod/load_elf.c~ Mon Nov 4 07:56:58 1996 > > +++ modules-2.1.8/insmod/load_elf.c Sun Nov 10 20:47:21 1996 > > @@ -366,7 +366,8 @@ > > } > > > > /* JEJB: zero the bss (now it's actually allocated) */ > > - memset(secref[bss_seg], 0, bss_size); > > + if (bss_size) > > + memset(secref[bss_seg], 0, bss_size); > > > > for (spnt = sections, i = 0; i < epnt->e_shnum; ++i, ++spnt) { > > #ifdef __i386__ > > @@ -622,7 +623,9 @@ > > } > > > > loaded = (char *)(((int)loaded + 3) & ~3); > > - bss_size = loaded - secref[bss_seg]; > > + /* yur: don't change bss_size if no bss in the module */ > > + if (secref[bss_seg]) > > + bss_size = loaded - secref[bss_seg]; > > progsize = codesize = loaded - textseg; > > aout_flag = 0; /* i.e.: if it's not a.out, it _has_ to be ELF... */ > > if (defsym(strncmp, "_GLOBAL_OFFSET_TABLE_", loaded - textseg, N_BSS | N_EXT, TRANSIENT)) > > > > > > > Me too. "Official patch" segfaults when insmoding network modules (8390). Yuri's patch works fine with 2.0.25 AND 2.1.8 (using modules-2.1.8) BTW, "official patch" doesn't work with ipx either,but thanks, Mr. Gelinas ______________________________________________________________________ Eugenio Jimenez Yguacel eugenio@cascorro.teleco.ulpgc.es E.T.S.I. Telecomunicacion Tfno: (+34)-28-452863 Campus de Tafira S/N Fax: (+34)-28-451243 35017 Las Palmas, Spain Beer, breakfast for champions! ----------------------------------------------------------------------
| |