From owner-svn-src-all@FreeBSD.ORG Mon May 25 16:39:22 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id DB3AA552; Mon, 25 May 2015 16:39:22 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 636CA51; Mon, 25 May 2015 16:39:22 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from tom.home (kostik@localhost [127.0.0.1]) by kib.kiev.ua (8.14.9/8.14.9) with ESMTP id t4PGdFuP008053 (version=TLSv1/SSLv3 cipher=DHE-RSA-CAMELLIA256-SHA bits=256 verify=NO); Mon, 25 May 2015 19:39:15 +0300 (EEST) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.9.2 kib.kiev.ua t4PGdFuP008053 Received: (from kostik@localhost) by tom.home (8.14.9/8.14.9/Submit) id t4PGdFhf008052; Mon, 25 May 2015 19:39:15 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Mon, 25 May 2015 19:39:15 +0300 From: Konstantin Belousov To: Chagin Dmitry Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r283479 - in head/sys: amd64/amd64 amd64/ia32 arm/arm i386/i386 mips/mips powerpc/powerpc sparc64/sparc64 Message-ID: <20150525163915.GP2499@kib.kiev.ua> References: <201505241756.t4OHu3ot035613@svn.freebsd.org> <20150524182515.GF2499@kib.kiev.ua> <20150524193448.GA2729@dchagin.static.corbina.net> <20150525082302.GJ2499@kib.kiev.ua> <20150525154816.GA3524@dchagin.static.corbina.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20150525154816.GA3524@dchagin.static.corbina.net> User-Agent: Mutt/1.5.23 (2014-03-12) X-Spam-Status: No, score=-2.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FREEMAIL_FROM,NML_ADSP_CUSTOM_MED autolearn=no autolearn_force=no version=3.4.1 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on tom.home X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 May 2015 16:39:23 -0000 On Mon, May 25, 2015 at 06:48:17PM +0300, Chagin Dmitry wrote: > 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 What I stated (use of the modern FreeBSD layout for the signal frame when delivered to iBCS2 process) is the consequence of the usage of sendsig(). > 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 I am not sure this is would be a fix of anything. iBCS2 should grow its own sendsig(), like svr4 and other ABIs. I tried to find an information for the frame layout on signal delivery for iBCS2, but was unable to get anything. Basically, I need sys/signal.h and machine/sigframe.h from SCO OpenServer, or whatever the files were called there.