From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: AS31976 209.132.180.0/23 X-Spam-Status: No, score=-4.3 required=3.0 tests=AWL,BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,SPF_HELO_PASS,SPF_PASS shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dcvr.yhbt.net (Postfix) with ESMTPS id 1CE2B1F803 for ; Wed, 9 Jan 2019 21:50:10 +0000 (UTC) DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:subject:to:cc:references:from:message-id:date :mime-version:in-reply-to:content-type :content-transfer-encoding; q=dns; s=default; b=E7/o31TQBY7diQ+q H0KV3IDnpnMqNGl3slVPnsdNqmC/ZOKrAF7WxWPorpFrDhzHoiZEFqtXwAHFUyqU j3mPDcGAOhLPyRX+QE+9GRhmO2lJ7i1sPMvaXQt8tn4nEfMdfCveWgVyFAhxT8v5 n0b87+lD2zaiVRtTGXl2APBpzBA= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:subject:to:cc:references:from:message-id:date :mime-version:in-reply-to:content-type :content-transfer-encoding; s=default; bh=Cwn52K+ufbDNeC4JQvAGCD s+pac=; b=Zoe3xOG4iTNMLc3BPmb9KLJC6QgHpnuKyXd5SlS2ddNq9/78ffM0NS yKu9BmK8dAlkYUOScHNM5yNidQK2xh+9sRvuX9ASB0PI40yjz0dPO3u00v74n7iZ koPmYd/ICKrMX7y91r76NWXdFWQjfFsq7eM4f72nYK89Na6dBBsWo= Received: (qmail 128091 invoked by alias); 9 Jan 2019 21:50:07 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Received: (qmail 128061 invoked by uid 89); 9 Jan 2019 21:50:06 -0000 Authentication-Results: sourceware.org; auth=none X-HELO: smtprelay.synopsys.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=synopsys.com; s=mail; t=1547070603; bh=kLgfwFwjm53j/6x/sNkLJAjT1ewcLsE4OcBRBa5YZj4=; h=Subject:To:CC:References:From:Date:In-Reply-To:From; b=WeTkKLdxRkWkvnQZsV6C2CnLjnobl6L+EWk2Gcqqjb7bkNvab7FC2Rs1Mi3yl2JXV YKquTbCZLbR6biMcf+BI1tLdHfmA+Ym1ISG0OWcmD4QDBhai/O6GQVRd7rKpu7NXnd +03yRqDmDOlr7OlWEA+InXoseoDompvDzy/FsdDHhmcMD5bsEJ/p5XwE2AkkyoaJ/3 EjviJpiNSoA2BYwJx7s2NV5Jv2NcXnVYSyLAZT1eXuPOY/MKVdn4LfEndRJVeQ0BNe AjS53uQpycUq94G6gB48przjg6ca0uBOhqOmiove/bI9FmRg6xPhZNHJieOKCZ+rsf ELpj6CsOacRdg== Subject: Re: ARC vs. generic sigaction (was Re: [PATCH 08/21] ARC: Linux Syscall Interface) To: Adhemerval Zanella , Joseph Myers CC: , Newsgroups: gmane.comp.lib.glibc.alpha,gmane.linux.kernel.arc References: <1545167083-16764-1-git-send-email-vgupta@synopsys.com> <1545167083-16764-9-git-send-email-vgupta@synopsys.com> <5f512e48-e7fc-2233-febd-2e6a8bc2311b@synopsys.com> <05069752-0a66-d6ca-e249-5c702eec4e99@synopsys.com> <17fcd9f0-9843-8700-c936-7ab1eb8f2fd2@linaro.org> <906931a6-a281-8994-718f-da203890e7e9@synopsys.com> <4c3af320-cf35-f914-8bc3-a4c290b8e12b@linaro.org> <1e84ae34-0091-aedf-d198-fa5d2a91ad67@linaro.org> <6a793c13-5c05-cd46-4d59-e23d762ed353@synopsys.com> From: Vineet Gupta Openpgp: preference=signencrypt Message-ID: <793c4b24-d8a8-d142-5fa5-301794df613b@synopsys.com> Date: Wed, 9 Jan 2019 13:49:44 -0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.2.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit On 12/21/18 4:05 AM, Adhemerval Zanella wrote: >> Thing is ARC signal return depends on a restorer. Meaning !SA_RESTORER doesn't >> effectively exist (between libc and kernel). We currently honor user provided >> value, instead we could simply overwrite it with default_rt_restorer and on the >> way out, zero it out to avoid leaking the glibc guts to curious users. >> > Yes, this is what I suggest ARC should do. So I was able to (1) switch ARC to __sigset_t [2] vs. [128] (2) create a generic patch to breakout struct sigaction into bits/sigaction-arch.h (3) update generic __libc_sigaction to avoid itemized copy if sa_mask, sa_flags et al offsets matched for struct kernel_signal and struct sigaction (4) create arc/bits/sigaction-arch.h However it turned out to be futile as the passthru won't work anyways :-( @act in sigaction(sig, act, oact) is a const and can't be modified in place for sticking in sa_restorer for kernel, thus needs to be copied over anyways. This means we have [1] but have to drop [2-4]. Oh well !