From owner-svn-src-all@freebsd.org Tue Mar 28 10:20:04 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4AA22D1F9B7; Tue, 28 Mar 2017 10:20:04 +0000 (UTC) (envelope-from melounmichal@gmail.com) Received: from mail-wr0-x22a.google.com (mail-wr0-x22a.google.com [IPv6:2a00:1450:400c:c0c::22a]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id EF06B8B; Tue, 28 Mar 2017 10:20:03 +0000 (UTC) (envelope-from melounmichal@gmail.com) Received: by mail-wr0-x22a.google.com with SMTP id u1so97260544wra.2; Tue, 28 Mar 2017 03:20:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:reply-to:subject:references:to:cc:message-id:date:user-agent :mime-version:in-reply-to:content-transfer-encoding; bh=wiGmeVIP+T0Z1ctPYHoERxFS1ObJrRJfY1degxHTyTs=; b=VPwdfqK7zsmwTXTERUxZvOWcncACIUNUOc9SlQD5U4DUQCqL6SsjSaYQKDhkRH0K2T Kk5gzW70p2r499BwVI9RxZml1sTuBBvToH570EVAcptPZecfgQZoH2BU89iT+c/m5iCF 5WlauktQqHaY3xUWm77J/Tv0xMJj5Ir0j7lsh1hUqL/cwnSAM1xzWwIj1ygInD7r96m/ aoDbaXnLTu8Mq/JSmRaZadYKfPnmRxne4K02YqONI12mIOMFeK/Xd5Ujdof1nOwXISjK tTzr0xnEJ/8YhT6BSp9OMQlf39gxI9l5OwH8XMwVwI/U81jDM/0Ig3LJBaPbEkJ/Z5yi jaRg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:reply-to:subject:references:to:cc :message-id:date:user-agent:mime-version:in-reply-to :content-transfer-encoding; bh=wiGmeVIP+T0Z1ctPYHoERxFS1ObJrRJfY1degxHTyTs=; b=MkUubwYEVG6zr2Pox60ZvHrrpuiMpIXC21ikXJlWtsv8PO025eeGLA/v51ZdFmRY+Q blHlBxygWv2bmfrgfdqDDvqW24CbCtlL5VYUO1T1Tt4dKuJNjFnCbgmA+X0nfJlmeS2U 2SC2UMUncvFsa7e4tziS2McQU/piPL/5nuIOqffQJz6XuHyNcdmbjoE3PigxSSWoxzKv dukqvD9rLytIHX6Eu07lPZ6qXbkfCtWCItujSt6cH5j5vxjybc08STeeiPyNOxHCBCUO oiW69Bm0cMHtIuqizUaTDZG8Imt9Awtn9Hx4vt2zjpxeHYogBB+NJ97QuzyJxg8uvjJB 3A0A== X-Gm-Message-State: AFeK/H0vAKyy3jkDqGnRnadJlQSC46+MbppBxZEVfnqyDTyuNryN9KSjJp1Zs66PqOZNTQ== X-Received: by 10.223.180.86 with SMTP id v22mr25119302wrd.169.1490696402140; Tue, 28 Mar 2017 03:20:02 -0700 (PDT) Received: from [88.208.79.100] (halouny.humusoft.cz. [88.208.79.100]) by smtp.gmail.com with ESMTPSA id v108sm4235779wrc.41.2017.03.28.03.20.01 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 28 Mar 2017 03:20:01 -0700 (PDT) From: Michal Meloun X-Google-Original-From: Michal Meloun Reply-To: mmel@freebsd.org Subject: Re: svn commit: r315974 - in head: lib/libthread_db/arch/arm sys/arm/arm sys/arm/include References: <201703260836.v2Q8auoU069005@repo.freebsd.org> <1579704.6DjZ3RBGJe@ralph.baldwin.cx> To: Warner Losh , John Baldwin Cc: src-committers , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Message-ID: <74bb4fb0-b5d5-4be4-bcfe-4be343c2aee7@freebsd.org> Date: Tue, 28 Mar 2017 12:20:04 +0200 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 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: Tue, 28 Mar 2017 10:20:04 -0000 On 27.03.2017 19:40, Warner Losh wrote: > On Mon, Mar 27, 2017 at 11:07 AM, John Baldwin wrote: >> On Sunday, March 26, 2017 08:36:56 AM Michal Meloun wrote: >>> Author: mmel >>> Date: Sun Mar 26 08:36:56 2017 >>> New Revision: 315974 >>> URL: https://svnweb.freebsd.org/changeset/base/315974 >>> >>> Log: >>> Preserve VFP state across signal delivery. >>> >>> We don't have enouch space to store full VFP context within mcontext >>> stucture. Due to this: >>> - follow i386/amd64 way and store VFP state outside of the mcontext_t >>> but point to it. Use the size of VFP state structure as an 'magic' >>> indicator of the saved VFP state presence. >>> - teach set_mcontext() about this external storage. >>> - for signal delivery, store VFP state to expanded 'struct sigframe'. >>> >>> Submited by: Andrew Gierth (initial version) >>> PR: 217611 >>> MFC after: 2 weeks >>> >>> Modified: >>> head/lib/libthread_db/arch/arm/libpthread_md.c >>> head/sys/arm/arm/machdep.c >>> head/sys/arm/include/frame.h >>> head/sys/arm/include/ucontext.h >>> >>> Modified: head/lib/libthread_db/arch/arm/libpthread_md.c >>> ============================================================================== >>> --- head/lib/libthread_db/arch/arm/libpthread_md.c Sun Mar 26 08:36:20 2017 (r315973) >>> +++ head/lib/libthread_db/arch/arm/libpthread_md.c Sun Mar 26 08:36:56 2017 (r315974) >>> @@ -90,7 +90,9 @@ pt_fpreg_to_ucontext(const struct fpreg >>> mcontext_t *mc = &uc->uc_mcontext; >>> >>> /* XXX */ >>> - memset(&mc->mc_spare, 0, sizeof(mc->mc_spare)); >>> + mc->mc_vfp_size = 0; >>> + mc->mc_vfp_ptr = NULL; >>> + memset(mc->mc_spare, 0, sizeof(mc->mc_spare)); >>> } >> I suspect you don't need this bit? Has FreeBSD/arm ever supported VFP on a release >> that also shipped libkse? (i.e. not libthr but the other thread library) > No. And even if we had, we blew up binary compat when we went from OABI to EABI. > > Warner I just wanted to maintain the status quo, nothing more. All I know is that none of threading libraries maintains VFP state, 'struct fpreg' is badly defined (is to short for fill VFP context), and pre r315974 kernel doesn't initialize _vfp (renamed to mc_spare) part of mcontext_t. So I'm seeking a way how to fix all this. But I'm not familiar with kse -> pthread transition history, so I'm not sure which parts are actively used. Michal