svn commit: r283479 - in head/sys: amd64/amd64 amd64/ia32 arm/arm i386/i386 mips/mips powerpc/powerpc sparc64/sparc64

Chagin Dmitry dchagin at freebsd.org
Mon May 25 15:48:23 UTC 2015


On Mon, May 25, 2015 at 11:23:02AM +0300, Konstantin Belousov wrote:
> On Sun, May 24, 2015 at 10:34:48PM +0300, Chagin Dmitry wrote:
> > On Sun, May 24, 2015 at 09:25:15PM +0300, Konstantin Belousov wrote:
> > > On Sun, May 24, 2015 at 05:56:03PM +0000, Dmitry Chagin wrote:
> > > > Author: dchagin
> > > > Date: Sun May 24 17:56:02 2015
> > > > New Revision: 283479
> > > > URL: https://svnweb.freebsd.org/changeset/base/283479
> > > > 
> > > > Log:
> > > >   The kernel sends signals to the processes via ABI specific sv_sendsig method.
> > > >   Native ABI do not need signal conversion, only emulators may want this. Usually
> > > >   emulators implements its own sv_sendsig method. For now only ibcs2 emulator does
> > > >   not have own sv_sendsig implementation and depends on native sendsig() method.
> > > >   So, remove any extra attempts to convert signal numbers from native sendsig()
> > > >   methods except from i386 where ibsc2 is living.
> > > > 
> > > > Modified:
> > > >   head/sys/amd64/amd64/machdep.c
> > > >   head/sys/amd64/ia32/ia32_signal.c
> > > >   head/sys/arm/arm/machdep.c
> > > >   head/sys/i386/i386/machdep.c
> > > >   head/sys/mips/mips/freebsd32_machdep.c
> > > >   head/sys/mips/mips/pm_machdep.c
> > > >   head/sys/powerpc/powerpc/exec_machdep.c
> > > >   head/sys/sparc64/sparc64/machdep.c
> > > > 
> > > > Modified: head/sys/amd64/amd64/machdep.c
> > > > ==============================================================================
> > > > --- head/sys/amd64/amd64/machdep.c	Sun May 24 17:53:48 2015	(r283478)
> > > > +++ head/sys/amd64/amd64/machdep.c	Sun May 24 17:56:02 2015	(r283479)
> > > > @@ -398,10 +398,6 @@ sendsig(sig_t catcher, ksiginfo_t *ksi, 
> > > >  	/* Align to 16 bytes. */
> > > >  	sfp = (struct sigframe *)((unsigned long)sp & ~0xFul);
> > > >  
> > > > -	/* Translate the signal if appropriate. */
> > > > -	if (p->p_sysent->sv_sigtbl && sig <= p->p_sysent->sv_sigsize)
> > > > -		sig = p->p_sysent->sv_sigtbl[_SIG_IDX(sig)];
> > > > -
> > > Does struct sysent still need sv_sigtbl and sv_sigsize members then ?
> > ubsc2 share sendsig with i386, so this members still used
> You mean, iBCS2 uses current FreeBSD signal frame layout ?
no, I mean ibsc2 uses i386 sendsig() method, unfortunatelly
I know nothing  about ibsc2.

> 
> Indeed, and I do not see how this is not broken. The SysV R3 definitely
> did not knew about things like SSE or AVX, and I am sure that the layout
> of the signal frame for i386 even in its non-extended part on FreeBSD
> mutated without looking back to the iBCS2 requirements. But this is a
> different issue.
> 
> That said, could iBCS2 use a wrapper around some internal variant of the
> sendsig() which would take both ksi and translated signal number ?  The
> signal number would be used to set sf_signum.
hm, ok, I write it

-- 
Have fun!
chd


More information about the svn-src-head mailing list