Date: Tue, 3 Apr 2018 17:17:42 -0400 From: Ali Mashtizadeh <mashtizadeh@gmail.com> To: Brooks Davis <brooks@freebsd.org> Cc: FreeBSD Hackers <freebsd-hackers@freebsd.org>, Ali Mashtizadeh <ali@mashtizadeh.com> Subject: Re: getlogin caching and setlogin issues Message-ID: <CAFL8=tiqmfLBHX_sm9wUFvzZcP=V_SfnmP43RKfS1DL3UA-9ng@mail.gmail.com> In-Reply-To: <20180403170721.GC8598@spindle.one-eyed-alien.net> References: <20180403170721.GC8598@spindle.one-eyed-alien.net>
next in thread | previous in thread | raw e-mail | index | archive | help
In addition, I couldn't find a reason for sigreturn() to be custom assembly in i386/amd64/arm/aarch64. Best, Ali On Tue, Apr 3, 2018 at 1:07 PM, Brooks Davis <brooks@freebsd.org> wrote: > [Ali found this issue while looking at pulling syscalls out of libc.] > > getlogin() is a wrapper around _getlogin() which caches the value > returned and sets a and internal _logname_valid flag. Some > implementations of setlogin() clear that flag on return, the arm, mips, > and riscv ones use the default assembly and do not. This leaves me two > questions: > > 1) Does this cache make sense? Sure login rarely changes, but is > getlogin called frequently in real software? > > 2) If the cache makes sense, does clearing the cache belong in > __sys_setlogin() or should it be done in a C wrapper in setlogin() or > _setlogin()? I think it should likely be pulled up to _setlogin(). > > 3) If yes to 1 and no to 2, do we need to fix arm, mips, and riscv? > > -- Brooks
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAFL8=tiqmfLBHX_sm9wUFvzZcP=V_SfnmP43RKfS1DL3UA-9ng>