Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 20 Aug 2017 14:18:54 +0300
From:      Konstantin Belousov <kostikbel@gmail.com>
To:        Oliver Pinter <oliver.pinter@hardenedbsd.org>
Cc:        "src-committers@freebsd.org" <src-committers@freebsd.org>, "svn-src-all@freebsd.org" <svn-src-all@freebsd.org>, "svn-src-head@freebsd.org" <svn-src-head@freebsd.org>
Subject:   Re: svn commit: r322720 - head/sys/amd64/amd64
Message-ID:  <20170820111854.GA1700@kib.kiev.ua>
In-Reply-To: <CAPQ4ffu9p5KRyMfa7v_cvVHZr_qSvw0CTji0HF0wsdX%2B6OD0AQ@mail.gmail.com>
References:  <201708200952.v7K9qPP4036384@repo.freebsd.org> <CAPQ4ffu9p5KRyMfa7v_cvVHZr_qSvw0CTji0HF0wsdX%2B6OD0AQ@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sun, Aug 20, 2017 at 12:42:01PM +0200, Oliver Pinter wrote:
> > @@ -412,8 +407,8 @@ trap(struct trapframe *frame)
> >                         fill_frame_regs(frame, &regs);
> >                         if (dtrace_return_probe_ptr != NULL &&
> >                             dtrace_return_probe_ptr(&regs) == 0)
> > -                               goto out;
> > -                       goto userout;
> > +                               return;
> > +                       return;
> 
> 
> This part of code - the double return - looks weird. Probably it was left
> here to document the original "behavior".

Indeed it is weird.

I think that the original code was written at the time when userout and out
were different return paths.  Another possibility was that it actually
wanted to do goto userret instead of goto userout, i.e. to call userret()
before returning to usermode.

Anyway, I cleaned this up without changing the algorithm.



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