Re: git: 4f741801d860 - main - t_setrlimit: Adjust resource limit to 20M

From: Marcin Wojtas <mw_at_semihalf.com>
Date: Mon, 20 Dec 2021 16:29:07 UTC
Hi,


pon., 20 gru 2021 o 15:21 Mark Johnston <markj@freebsd.org> napisał(a):
>
> On Mon, Dec 20, 2021 at 01:54:22AM -0600, Kyle Evans wrote:
> > I found the PR that I was thinking of, that you folks might want to
> > join if you haven't already: https://bugs.freebsd.org/260303
>
> I've posted an update there.  I'm in the middle of a move this week and
> will be a slower than usual to follow up, but would be happy to have
> some further discussion of the solution.
>

We're open to discuss.

> > I don't think a revert's necessary, just something to consider if this
> > ends up becoming a non-issue due to other low-level changes.
>
> I'd argue for a revert: the original test is valid and was changed only
> to cope with an incompatibility between the RLIMIT_STACK and stack gap
> implementations.  The WIP I wrote to deal with that does not require
> such a change to the test.  At the moment, the test passes anyway since
> the stack gap was disabled by default.
>

I'll issue a revert patch then.

Best regards,
Marcin

> > Thanks,
> >
> > Kyle Evans
> >
> > On Mon, Dec 20, 2021 at 1:32 AM Wojciech Macek <wma@semihalf.com> wrote:
> > >
> > > Hi Kyle,
> > >
> > > Thanks for the comment, I thought this one is discussed but apparently I was mistaken.
> > > Adding Marcin to handle this on our side. I'm fine with reverting it anyway or do whatever you decide.
> > >
> > > Regards,
> > > Wojtek
> > >
> > > pon., 20 gru 2021 o 07:51 Kyle Evans <kevans@freebsd.org> napisał(a):
> > >>
> > >> On Sun, Dec 19, 2021 at 11:29 PM Wojciech Macek <wma@freebsd.org> wrote:
> > >> >
> > >> > The branch main has been updated by wma:
> > >> >
> > >> > URL: https://cgit.FreeBSD.org/src/commit/?id=4f741801d86089a1c5d631ba1e0f1421cdcf7a7e
> > >> >
> > >> > commit 4f741801d86089a1c5d631ba1e0f1421cdcf7a7e
> > >> > Author:     Dawid Gorecki <dgr@semihalf.com>
> > >> > AuthorDate: 2021-12-20 05:27:12 +0000
> > >> > Commit:     Wojciech Macek <wma@FreeBSD.org>
> > >> > CommitDate: 2021-12-20 05:28:20 +0000
> > >> >
> > >> >     t_setrlimit: Adjust resource limit to 20M
> > >> >
> > >> >     With ASLR enabled by default, RLIMIT_STACK test fails due to the fact
> > >> >     that default stack gap can be as big as 15M. Because of that the
> > >> >     resource limit of 4M results in test program receiving SIGSEGV
> > >> >     immediately after exiting the setrlimit syscall. Since the idea of this
> > >> >     test is to check if rlim_cur does not extend past rlim_max, adjusting
> > >> >     the resource limit to 20M should not invalidate the test results.
> > >> >
> > >>
> > >> I can't seem to find the PR at the moment, but isn't this exactly the
> > >> kind of thing markj@ talked about trying to avoid elsewhere? It seems
> > >> like this probably should've been involved in the discussion rather
> > >> than hacked around independently.
> > >>
> > >> Thanks,
> > >>
> > >> Kyle Evans