Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 23 Dec 1996 21:53:01 +1100
From:      Bruce Evans <bde@zeta.org.au>
To:        cvs-all@freefall.freebsd.org, CVS-committers@freefall.freebsd.org, cvs-sys@freefall.freebsd.org, jkh@freefall.freebsd.org
Subject:   Re: cvs commit:  src/sys/i386/linux imgact_linux.c
Message-ID:  <199612231053.VAA19380@godzilla.zeta.org.au>

next in thread | raw e-mail | index | archive | help
>  Modified:    sys/i386/linux  imgact_linux.c
>  Log:
>  *Ahem* - opt_rlimit.h does not exist in the LKM case.  This was another
>  2.2 build-breaker.. :(
>  
>  Revision  Changes    Path
>  1.18      +3 -1      src/sys/i386/linux/imgact_linux.c

The fix is wrong too.  Now the LKM checks a possibly-different limit than
the rest of the kernel.

The correct fix seems to be particularly easy in this case.  Old code:

!   if (a_out->a_text > MAXTSIZ || a_out->a_data + bss_size > MAXDSIZ ||
!	a_out->a_data+bss_size > imgp->proc->p_rlimit[RLIMIT_DATA].rlim_cur)
!	return (ENOMEM);

Just remove the bogus check against MAXDSIZ.  The correct limit (rlim_cur)
is already checked.  rlim_cur <= MAXDSIZ, so checking against MAXDSIZ is
currently a no-op.

Most of the image activators have the same bloat.  imgact_elf.c has a more
bogus limit involving 2*MAXDSIZ and not involving MAXTSIZ or rlimits.

Bruce



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199612231053.VAA19380>