From patchwork Tue Dec 11 19:55:50 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adhemerval Zanella X-Patchwork-Id: 153510 Delivered-To: patch@linaro.org Received: by 2002:a2e:299d:0:0:0:0:0 with SMTP id p29-v6csp1023857ljp; Tue, 11 Dec 2018 11:56:12 -0800 (PST) X-Google-Smtp-Source: AFSGD/WOlgFYca8rO/5lZofj2a5Ut4JpfS/j2nrRnJGNLQUKGJwxAuf4bvMDpHAP9n9MvCuYQJHK X-Received: by 2002:a63:dc54:: with SMTP id f20mr15932882pgj.410.1544558172317; Tue, 11 Dec 2018 11:56:12 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1544558172; cv=none; d=google.com; s=arc-20160816; b=W4yHAtaW8wTF/uWqqBZJiAJWjt7IxQFemQqyMX5JOKstuRT/O+B2XpF0amh3PHfONp 5O+id+PQStqExrMRIGdd/xilmKBhU5XOttptb5u83AIRAGsK8LeE6r6jX6zQQ2mB0CbK 4R7Dvspn2LeF+NZKMs2Q8i73uGvsjNMz5WxlIq51FZJMU7EX/Knlivblraqw76pQ61Aa GFnO8L1kmHI/k0VN8iBkHX/b88HEQ413liyYUGZ2JD30Vq7qLQs16Jp/fsj5qK0hM/56 lFr46W3IhYiKRcvRFMku6Q37gdK7/nydDfAnW2dS1aDCZPnYbtMnNSzEXPIz6ir95JvL NFLA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=message-id:date:subject:to:from:dkim-signature:delivered-to:sender :list-help:list-post:list-archive:list-subscribe:list-unsubscribe :list-id:precedence:mailing-list:dkim-signature:domainkey-signature; bh=SPYqflY6whUJNPfOJZiKPTkCilabel2dfCjdlSDk8VI=; b=Jejghchb6p0Ums+PcgP8An1g2Cyj7eecliIUe3Kacn2DPb8yQerZolxq1beiRghwSw jRSGSHEuhmsey/foim9p7FMadHJAOoqLCXGLjKYcwXfubplG01lb6NUOGMg2A8h9UFco XoQC4efCF/nQAPJd6MzV01Adz/AzNW3ODKj2+YcEXttjJR9oovK+LfXSUVCHVLhIc8uv YVCtdXfWE5GzvWvfjH97x5nv9ievawdDioNiMszwQMC9WII+L26aRxYi8nFWV5x4Sn+E MNfh4lyTZ25I/qemQBKXfMPp9+gZadeq4+O0uG4nbZkwPfLQ2euhd+ZdcNkGBIbE7f4A dP/A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@sourceware.org header.s=default header.b=PiupL8Xo; dkim=pass header.i=@linaro.org header.s=google header.b=Xkkm7Fph; spf=pass (google.com: domain of libc-alpha-return-98228-patch=linaro.org@sourceware.org designates 209.132.180.131 as permitted sender) smtp.mailfrom="libc-alpha-return-98228-patch=linaro.org@sourceware.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from sourceware.org (server1.sourceware.org. [209.132.180.131]) by mx.google.com with ESMTPS id m9si12723518pll.349.2018.12.11.11.56.11 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 11 Dec 2018 11:56:12 -0800 (PST) Received-SPF: pass (google.com: domain of libc-alpha-return-98228-patch=linaro.org@sourceware.org designates 209.132.180.131 as permitted sender) client-ip=209.132.180.131; Authentication-Results: mx.google.com; dkim=pass header.i=@sourceware.org header.s=default header.b=PiupL8Xo; dkim=pass header.i=@linaro.org header.s=google header.b=Xkkm7Fph; spf=pass (google.com: domain of libc-alpha-return-98228-patch=linaro.org@sourceware.org designates 209.132.180.131 as permitted sender) smtp.mailfrom="libc-alpha-return-98228-patch=linaro.org@sourceware.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:from:to:subject:date:message-id; q=dns; s= default; b=Ykq4uFcnYmiv1Kr9xHF+AMX9koz4R9T1vtcjuSs6hH4UeuhnzqCR5 AV1NqVbhE9UcAB7jySeTRpxQzUCpFfmnNinLmrmx+W6xNWe/LLvL3IDj2FMjxmog rYN/HhzIwbd04+pNxx6hxBJzjiPiU3scd9FkMcjbGX/IdJEq1PKwks= 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:from:to:subject:date:message-id; s=default; bh=YNAaJhvoxxu2vOw7Wu60pW5f/co=; b=PiupL8XohSHrAXOQ6s9L28Yoq6L5 zgEfk0mZyZVdfnrFCFl+47bEdr+mdHwzFn6vW5xJI7WliUGtq9321ea9rwi+x+xA 9P6a2kjtJRUkX+8oHrOaDENL871aeediN1vUXeQXy9eM1Y3Bij5lGtYS+X6GkM4q zx9/fVDoM1iJEmY= Received: (qmail 71309 invoked by alias); 11 Dec 2018 19:56:03 -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 Delivered-To: mailing list libc-alpha@sourceware.org Received: (qmail 71288 invoked by uid 89); 11 Dec 2018 19:56:02 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-26.9 required=5.0 tests=BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, RCVD_IN_DNSWL_NONE, SPF_PASS autolearn=ham version=3.3.2 spammy=act X-HELO: mail-qt1-f194.google.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:subject:date:message-id; bh=SPYqflY6whUJNPfOJZiKPTkCilabel2dfCjdlSDk8VI=; b=Xkkm7Fph3ASlKFCx1VeIMkX3+HBBFgmUlVChQ8cd+biAIVWWVl5mZ4LJjFC1fcB4e9 OjqNh4FrIAeykkWDI5a8kBw2+kS2eew33M9xGAiSxqGwfOPQLkdCUOaIsXnoIlCvjiJv Z86A48zpNwhrQ+axf5EdknnlEcJoWKsGJyGMo= Return-Path: From: Adhemerval Zanella To: libc-alpha@sourceware.org Subject: [PATCH 1/5] m68k: Fix sigaction kernel definition (BZ #23960) Date: Tue, 11 Dec 2018 17:55:50 -0200 Message-Id: <20181211195554.3377-1-adhemerval.zanella@linaro.org> Commit b4a5d26d883 (linux: Consolidate sigaction implementation) added a wrong kernel_sigaction definition for m68k, meant for __NR_sigaction instead of __NR_rt_sigaction as used on generic Linux sigaction implementation. This patch fixes it by using the Linux generic definition meant for the RT kernel ABI. Checked the signal tests on emulated m68-linux-gnu (Aranym). It fixes the faulty signal/tst-sigaction and man works as expected. James Clarke Adhemerval Zanella [BZ #23960] * sysdeps/unix/sysv/linux/kernel_sigaction.h (kernel_sigaction): Add comment about the difference due glibc definition. * sysdeps/unix/sysv/linux/m68k/kernel_sigaction.h (kernel_sigaction): Use Linux generic definition. --- ChangeLog | 9 +++++++++ sysdeps/unix/sysv/linux/kernel_sigaction.h | 2 ++ .../unix/sysv/linux/m68k/kernel_sigaction.h | 18 ++---------------- 3 files changed, 13 insertions(+), 16 deletions(-) -- 2.17.1 diff --git a/sysdeps/unix/sysv/linux/kernel_sigaction.h b/sysdeps/unix/sysv/linux/kernel_sigaction.h index 2dbec08099..b7359054b2 100644 --- a/sysdeps/unix/sysv/linux/kernel_sigaction.h +++ b/sysdeps/unix/sysv/linux/kernel_sigaction.h @@ -9,6 +9,8 @@ struct kernel_sigaction #ifdef SA_RESTORER void (*sa_restorer) (void); #endif + /* glibc sigset is larger than kernel expected one, however sigaction + passes the kernel expected size on rt_sigaction syscall. */ sigset_t sa_mask; }; diff --git a/sysdeps/unix/sysv/linux/m68k/kernel_sigaction.h b/sysdeps/unix/sysv/linux/m68k/kernel_sigaction.h index 54972feb13..eef4bb9b65 100644 --- a/sysdeps/unix/sysv/linux/m68k/kernel_sigaction.h +++ b/sysdeps/unix/sysv/linux/m68k/kernel_sigaction.h @@ -1,22 +1,8 @@ -#ifndef _KERNEL_SIGACTION_H -# define _KERNEL_SIGACTION_H - -#include - +/* m68k uses the generic Linux UAPI but defines SA_RESTORER. */ #define SA_RESTORER 0x04000000 - -/* This is the sigaction structure from the Linux 3.2 kernel. */ -struct kernel_sigaction -{ - __sighandler_t k_sa_handler; - sigset_t sa_mask; - unsigned long sa_flags; - void (*sa_restorer) (void); -}; +#include #define SET_SA_RESTORER(kact, act) \ (kact)->sa_restorer = (act)->sa_restorer #define RESET_SA_RESTORER(act, kact) \ (act)->sa_restorer = (kact)->sa_restorer - -#endif From patchwork Tue Dec 11 19:55:51 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adhemerval Zanella X-Patchwork-Id: 153513 Delivered-To: patch@linaro.org Received: by 2002:a2e:299d:0:0:0:0:0 with SMTP id p29-v6csp1024210ljp; Tue, 11 Dec 2018 11:56:37 -0800 (PST) X-Google-Smtp-Source: AFSGD/W2kYOGBKqei2+a62pckPWYAQWP3PzhaH53x7hlBp/8p55Y1yzCLQ2XVS6ym4JvDd17YsUC X-Received: by 2002:a65:65c9:: with SMTP id y9mr16186347pgv.438.1544558197733; Tue, 11 Dec 2018 11:56:37 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1544558197; cv=none; d=google.com; s=arc-20160816; b=mjK7VIsmHUO3yTIaDZ2nBFoFH8A8v6J8tqf1I0dzIsDXqk5ubyCGjR+KsxD11oeQNQ 8ZbeMYtRUjTWQsq38xFlRbgDUtdeAABgL364QW7Q6JjEeP2JTJvWtS1uwhorE12Y4Znv ZdZPVBIJcVSCdFZQJdk69z/L3efC4m6Jcs6MhdxyWYc7phpjt2V5deFPlWtQJxqRl4C3 pOy/QI60YsveIwwViV/9Mrwvz6RVFOvrOOfAPigDBzRly74RYB8WMvWx7TMieQHT0G// CqYk7qIhpCpcc03s+c9JlnFFbAXWePXz16tEWqiXLNk+nNo2QvSTxhbcluMIp4jnP/FL pBSA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=references:in-reply-to:message-id:date:subject:to:from :dkim-signature:delivered-to:sender:list-help:list-post:list-archive :list-subscribe:list-unsubscribe:list-id:precedence:mailing-list :dkim-signature:domainkey-signature; bh=l7/WX+ugOHZX8lXlhq9fi981j9fvgyX7AeFRYT5MG/A=; b=TKQNGThROtNzBH0PXUZw2rB5c6oIbKmksmmqwhugWL/SZvHSUEswc7k2Cx8+8H4UtL eUYm/orfuQ+Q/lwec8MEthcyWXxmUU5a+DyIzRVaykIWsqaiqzN00OYstx1+Kzs9411n QnoiBSrwe+ujXRURz+QfyCDZt5j2OLG0wmCmBN3r46uHqE/2V088PxYkMvmCbBhXc/u3 QDC6jwdeQVjqaq333vrIBt1+SQvVi43qyfaNMyrcTqy/BUhrDLWUw4KFFr1rXX6su4zI /U9GKswcg76ANEM1Q1lYwklV1UcC2eA7/M3gyo7n3z+4Ep8q8AQ1fStevs3arUUiYFTz W9pA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@sourceware.org header.s=default header.b=BDZskWme; dkim=pass header.i=@linaro.org header.s=google header.b=CddEMdpM; spf=pass (google.com: domain of libc-alpha-return-98231-patch=linaro.org@sourceware.org designates 209.132.180.131 as permitted sender) smtp.mailfrom="libc-alpha-return-98231-patch=linaro.org@sourceware.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from sourceware.org (server1.sourceware.org. [209.132.180.131]) by mx.google.com with ESMTPS id r11si13276077pli.175.2018.12.11.11.56.37 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 11 Dec 2018 11:56:37 -0800 (PST) Received-SPF: pass (google.com: domain of libc-alpha-return-98231-patch=linaro.org@sourceware.org designates 209.132.180.131 as permitted sender) client-ip=209.132.180.131; Authentication-Results: mx.google.com; dkim=pass header.i=@sourceware.org header.s=default header.b=BDZskWme; dkim=pass header.i=@linaro.org header.s=google header.b=CddEMdpM; spf=pass (google.com: domain of libc-alpha-return-98231-patch=linaro.org@sourceware.org designates 209.132.180.131 as permitted sender) smtp.mailfrom="libc-alpha-return-98231-patch=linaro.org@sourceware.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:from:to:subject:date:message-id:in-reply-to :references; q=dns; s=default; b=S0b67vxvnPoE4u3Mrz7sV8294MRkBlt EpXRFJ+YCBPw62o7k/m+RrGRzMTrOWD3AcTz+Lv5FzoBWb3BdZwdwlIFpCp8T5Ft utJqTaIotm1j4pHZsgeujIe2cr3Zp9SqB+zu3Z72A89LTX1TZR9mzswTXWA2Uiic hQvrWADA3xes= 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:from:to:subject:date:message-id:in-reply-to :references; s=default; bh=a6cG7nvHYcL0IVIL4szrY7x3KBI=; b=BDZsk WmejT08qumnwIjGNdzUEAcCoH4eXx8Q3qYM9uQ1NXL1n0CXuJmj2VL29I+jwkvkR Ek2Mu6IfSMtpBi7UxZdtnFaFHFumr2quF5OxT+uizfoW4bxlZZi1m1jkXAYte2cR tq8ftGnpTHvMr2Y4mvO+C3woa/wNGtaWIKW7AY= Received: (qmail 72049 invoked by alias); 11 Dec 2018 19:56:08 -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 Delivered-To: mailing list libc-alpha@sourceware.org Received: (qmail 71881 invoked by uid 89); 11 Dec 2018 19:56:07 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-26.9 required=5.0 tests=BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, KAM_SHORT, RCVD_IN_DNSWL_NONE, SPF_PASS autolearn=ham version=3.3.2 spammy=prof, Alpha, 5th X-HELO: mail-qk1-f196.google.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:subject:date:message-id:in-reply-to:references; bh=l7/WX+ugOHZX8lXlhq9fi981j9fvgyX7AeFRYT5MG/A=; b=CddEMdpM0acbOZKNUe1MG38L1218zhSRnI/NQvtQN7Soc43dvd3cFNHdypUEy25RFG q//oCmlsAO1xPl5vgaSNT17+kNOCVcDtCmZ03j1S9KSBiy68yKbftYby5UzfEwGkQ9No gwd+4/ilu5TIRZLH3hBVAwgHaET64h94Yo5bA= Return-Path: From: Adhemerval Zanella To: libc-alpha@sourceware.org Subject: [PATCH 2/5] alpha: Use Linux generic sigaction implementation Date: Tue, 11 Dec 2018 17:55:51 -0200 Message-Id: <20181211195554.3377-2-adhemerval.zanella@linaro.org> In-Reply-To: <20181211195554.3377-1-adhemerval.zanella@linaro.org> References: <20181211195554.3377-1-adhemerval.zanella@linaro.org> Alpha rt_sigaction syscall uses a slight different kernel ABI than generic one: arch/alpha/kernel/signal.c 90 SYSCALL_DEFINE5(rt_sigaction, int, sig, const struct sigaction __user *, act, 91 struct sigaction __user *, oact, 92 size_t, sigsetsize, void __user *, restorer) Similar as sparc, the syscall expects a restorer function. However different than sparc, alpha defines the restorer as the 5th argument (sparc defines as the 4th). This patch removes the arch-specific alpha sigaction implementation, adapt the Linux generic one to different restore placements (through STUB macro), and make alpha use the Linux generic kernel_sigaction definition. Checked on alpha-linux-gnu and x86_64-linux-gnu (for sanity). * sysdeps/unix/sysv/linux/alpha/Makefile: Update comment about __syscall_rt_sigaction. * sysdeps/unix/sysv/linux/alpha/kernel_sigaction.h (kernel_sigaction): Use Linux generic defintion. (STUB): Define. (__syscall_rt_sigreturn, __syscall_sigreturn): Add prototype. * sysdeps/unix/sysv/linux/alpha/rt_sigaction.S (__syscall_rt_sigaction): Remove implementation. (__syscall_sigreturn, __syscall_rt_sigreturn): Define as global and hidden. * sysdeps/unix/sysv/linux/alpha/sigaction.c: Remove file. * sysdeps/unix/sysv/linux/alpha/sysdep.h (INLINE_SYSCALL, INTERNAL_SYSCALL): Remove definitions. * sysdeps/unix/sysv/linux/sigaction.c: Define STUB to accept both the action and signal set size. * sysdeps/unix/sysv/linux/sparc/sparc32/sigaction.c (STUB): Redefine. * sysdeps/unix/sysv/linux/sparc/sparc64/sigaction.c (STUB): Likewise. --- ChangeLog | 20 +++++++++ sysdeps/unix/sysv/linux/alpha/Makefile | 2 +- .../unix/sysv/linux/alpha/kernel_sigaction.h | 19 ++++----- sysdeps/unix/sysv/linux/alpha/rt_sigaction.S | 41 ++----------------- sysdeps/unix/sysv/linux/alpha/sigaction.c | 38 ----------------- sysdeps/unix/sysv/linux/alpha/sysdep.h | 23 ----------- sysdeps/unix/sysv/linux/sigaction.c | 4 +- .../unix/sysv/linux/sparc/sparc32/sigaction.c | 5 ++- .../unix/sysv/linux/sparc/sparc64/sigaction.c | 5 ++- 9 files changed, 42 insertions(+), 115 deletions(-) delete mode 100644 sysdeps/unix/sysv/linux/alpha/sigaction.c -- 2.17.1 diff --git a/sysdeps/unix/sysv/linux/alpha/Makefile b/sysdeps/unix/sysv/linux/alpha/Makefile index 50f4fb1183..fdd089af71 100644 --- a/sysdeps/unix/sysv/linux/alpha/Makefile +++ b/sysdeps/unix/sysv/linux/alpha/Makefile @@ -31,7 +31,7 @@ libm-routines += multc3 divtc3 endif # math ifeq ($(subdir),nptl) -# pull in __syscall_error routine, __sigprocmask, __syscall_rt_sigaction +# pull in __syscall_error routine, __sigprocmask, sigaction stubs. libpthread-routines += sysdep sigprocmask rt_sigaction libpthread-shared-only-routines += sysdep sigprocmask rt_sigaction endif diff --git a/sysdeps/unix/sysv/linux/alpha/kernel_sigaction.h b/sysdeps/unix/sysv/linux/alpha/kernel_sigaction.h index 25180ff9c9..679179b563 100644 --- a/sysdeps/unix/sysv/linux/alpha/kernel_sigaction.h +++ b/sysdeps/unix/sysv/linux/alpha/kernel_sigaction.h @@ -1,12 +1,11 @@ -#ifndef _KERNEL_SIGACTION_H -# define _KERNEL_SIGACTION_H +#include -/* This is the sigaction structure from the Linux 3.2 kernel. */ -struct kernel_sigaction -{ - __sighandler_t k_sa_handler; - unsigned int sa_flags; - sigset_t sa_mask; -}; +void __syscall_rt_sigreturn (void) attribute_hidden; +void __syscall_sigreturn (void) attribute_hidden; -#endif +#define STUB(act, sigsetsize) \ + (sigsetsize), \ + (act) ? ((unsigned long)((act->sa_flags & SA_SIGINFO) \ + ? &__syscall_rt_sigreturn \ + : &__syscall_sigreturn)) \ + : 0 diff --git a/sysdeps/unix/sysv/linux/alpha/rt_sigaction.S b/sysdeps/unix/sysv/linux/alpha/rt_sigaction.S index ca25eee611..17e55239fe 100644 --- a/sysdeps/unix/sysv/linux/alpha/rt_sigaction.S +++ b/sysdeps/unix/sysv/linux/alpha/rt_sigaction.S @@ -18,43 +18,6 @@ #include -/* On Alpha we desparately want to avoid having to issue an imb. Ordinarily - the kernel would have to issue one after setting up the signal return - stack, but the Linux rt_sigaction syscall is prepared to accept a pointer - to the sigreturn syscall, instead of inlining it on the stack. - - This just about halves signal delivery time. */ - - .text - -ENTRY(__syscall_rt_sigaction) - cfi_startproc - ldgp gp,0(pv) -#ifdef PROF - .set noat - lda AT, _mcount - jsr AT, (AT), _mcount - .set at -#endif - .prologue 1 - - beq a1, 0f - ldl t0, 8(a1) # sa_flags - - ldah a4, __syscall_sigreturn(gp) !gprelhigh - ldah t1, __syscall_rt_sigreturn(gp) !gprelhigh - lda a4, __syscall_sigreturn(a4) !gprellow - lda t1, __syscall_rt_sigreturn(t1) !gprellow - and t0, 0x40, t0 # SA_SIGINFO - cmovne t0, t1, a4 - -0: ldi v0, __NR_rt_sigaction - callsys - bne a3, SYSCALL_ERROR_LABEL - ret - cfi_endproc -PSEUDO_END(__syscall_rt_sigaction) - /* To enable unwinding through the signal frame without special hackery elsewhere, describe the entire struct sigcontext with unwind info. @@ -104,6 +67,8 @@ __syscall_sigreturn: callsys .size __syscall_sigreturn, .-__syscall_sigreturn .type __syscall_sigreturn, @function + .global __syscall_sigreturn; + .hidden __syscall_sigreturn; /* See above wrt including the nop. */ cfi_def_cfa_offset (176 + 648) @@ -116,5 +81,7 @@ __syscall_rt_sigreturn: callsys .size __syscall_rt_sigreturn, .-__syscall_rt_sigreturn .type __syscall_rt_sigreturn, @function + .global __syscall_rt_sigreturn; + .hidden __syscall_rt_sigreturn; cfi_endproc diff --git a/sysdeps/unix/sysv/linux/alpha/sigaction.c b/sysdeps/unix/sysv/linux/alpha/sigaction.c deleted file mode 100644 index 8051043587..0000000000 --- a/sysdeps/unix/sysv/linux/alpha/sigaction.c +++ /dev/null @@ -1,38 +0,0 @@ -/* Copyright (C) 2003-2018 Free Software Foundation, Inc. - This file is part of the GNU C Library. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library. If not, see - . */ - -#include -#include -#include - -/* - * In order to get the hidden arguments for rt_sigaction set up - * properly, we need to call the assembly version. Detect this in the - * INLINE_SYSCALL macro, and fail to expand inline in that case. - */ - -#undef INLINE_SYSCALL -#define INLINE_SYSCALL(name, nr, args...) \ - (__NR_##name == __NR_rt_sigaction \ - ? __syscall_rt_sigaction(args) \ - : INLINE_SYSCALL1(name, nr, args)) - -struct kernel_sigaction; -extern int __syscall_rt_sigaction (int, const struct kernel_sigaction *, - struct kernel_sigaction *, size_t); - -#include diff --git a/sysdeps/unix/sysv/linux/alpha/sysdep.h b/sysdeps/unix/sysv/linux/alpha/sysdep.h index 080405021f..9148b4793b 100644 --- a/sysdeps/unix/sysv/linux/alpha/sysdep.h +++ b/sysdeps/unix/sysv/linux/alpha/sysdep.h @@ -72,27 +72,4 @@ #define SINGLE_THREAD_BY_GLOBAL 1 -/* - * In order to get the hidden arguments for rt_sigaction set up - * properly, we need to call the assembly version. This shouldn't - * happen except for inside sigaction.c, where we handle this - * specially. Catch other uses and error. - */ - -#undef INLINE_SYSCALL -#define INLINE_SYSCALL(name, nr, args...) \ -({ \ - extern char ChEcK[__NR_##name == __NR_rt_sigaction ? -1 : 1] \ - __attribute__((unused)); \ - INLINE_SYSCALL1(name, nr, args); \ -}) - -#undef INTERNAL_SYSCALL -#define INTERNAL_SYSCALL(name, err_out, nr, args...) \ -({ \ - extern char ChEcK[__NR_##name == __NR_rt_sigaction ? -1 : 1] \ - __attribute__((unused)); \ - INTERNAL_SYSCALL1(name, err_out, nr, args); \ -}) - #endif /* _LINUX_ALPHA_SYSDEP_H */ diff --git a/sysdeps/unix/sysv/linux/sigaction.c b/sysdeps/unix/sysv/linux/sigaction.c index 0e6851a148..233ab1fcb5 100644 --- a/sysdeps/unix/sysv/linux/sigaction.c +++ b/sysdeps/unix/sysv/linux/sigaction.c @@ -33,7 +33,7 @@ /* SPARC passes the restore function as an argument to rt_sigaction. */ #ifndef STUB -# define STUB(act) +# define STUB(act, sigsetsize) (sigsetsize) #endif /* If ACT is not NULL, change the action for SIG to *ACT. @@ -57,7 +57,7 @@ __libc_sigaction (int sig, const struct sigaction *act, struct sigaction *oact) real size of the user-level sigset_t. */ result = INLINE_SYSCALL_CALL (rt_sigaction, sig, act ? &kact : NULL, - oact ? &koact : NULL, STUB(act) _NSIG / 8); + oact ? &koact : NULL, STUB (act, _NSIG / 8)); if (oact && result >= 0) { diff --git a/sysdeps/unix/sysv/linux/sparc/sparc32/sigaction.c b/sysdeps/unix/sysv/linux/sparc/sparc32/sigaction.c index 191f58729e..9f1a31a3b3 100644 --- a/sysdeps/unix/sysv/linux/sparc/sparc32/sigaction.c +++ b/sysdeps/unix/sysv/linux/sparc/sparc32/sigaction.c @@ -27,11 +27,12 @@ static void __rt_sigreturn_stub (void); static void __sigreturn_stub (void); -#define STUB(act) \ +#define STUB(act, sigsetsize) \ (act) ? ((unsigned long)((act->sa_flags & SA_SIGINFO) \ ? &__rt_sigreturn_stub \ : &__sigreturn_stub) - 8) \ - : 0, + : 0, \ + (sigsetsize) #include diff --git a/sysdeps/unix/sysv/linux/sparc/sparc64/sigaction.c b/sysdeps/unix/sysv/linux/sparc/sparc64/sigaction.c index cfbbc6e7b4..acc76b1bf9 100644 --- a/sysdeps/unix/sysv/linux/sparc/sparc64/sigaction.c +++ b/sysdeps/unix/sysv/linux/sparc/sparc64/sigaction.c @@ -24,8 +24,9 @@ static void __rt_sigreturn_stub (void); -#define STUB(act) \ - (((unsigned long) &__rt_sigreturn_stub) - 8), +#define STUB(act, sigsetsize) \ + (((unsigned long) &__rt_sigreturn_stub) - 8), \ + (sigsetsize) #include From patchwork Tue Dec 11 19:55:52 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adhemerval Zanella X-Patchwork-Id: 153511 Delivered-To: patch@linaro.org Received: by 2002:a2e:299d:0:0:0:0:0 with SMTP id p29-v6csp1023968ljp; Tue, 11 Dec 2018 11:56:20 -0800 (PST) X-Google-Smtp-Source: AFSGD/XL96L6FSToEv0C1ZjitnJLcXGjJ89rnZPP6XEG0hraigrYavqqXn90AgNGsD7hGgfY/PZa X-Received: by 2002:a62:7f94:: with SMTP id a142mr17695195pfd.96.1544558180709; Tue, 11 Dec 2018 11:56:20 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1544558180; cv=none; d=google.com; s=arc-20160816; b=byDEB7Xo5nnz4gQlu5QTs2762Jkl0F3DcE0Ar6aJZMc9t5ZEGA5j0Y4q3pdwtIIaxV qAiIAevh0R6BqSpnKkm0pwuxURXQVGvvhcIdxthYqBXLHYqd+RQHtf88mpHpLoGoK6QY yf1BUN/Qcz48QGzASTGxpkHQ9w7e3VhRVHpPktxSjPANlRrIgszHkYVxxpZjvXqMKann sHxnOg5jO2fQOBPoCN8XYpbIDPzK07nXayNs9X4RPw7kBVBdUUGWhWvWqI4g1emE5cvK r+XXPoqNx4aZroGrLVyjZD+BvJWuxQdRxsyCYLn4M8c2O1jQYEuA9sah/qArwIHLWPDF DqsA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=references:in-reply-to:message-id:date:subject:to:from :dkim-signature:delivered-to:sender:list-help:list-post:list-archive :list-subscribe:list-unsubscribe:list-id:precedence:mailing-list :dkim-signature:domainkey-signature; bh=8/yHmCFpo9dg9jJhFw3bUPDGezyorJEWUT8du0tJ1BY=; b=kZy3ZoZnwI1n7+MVshD3q6F+bBLr7NhbXfFPZlIgLwPWV5FHhqiVjci7doiV/Z6sLK 9IgwSzWZmE5ZoQ3p5yqSZ2uhPfgi9U6HkskLC9PoSluFlsoKZLcaMnwuPeA9Uu1LYOfa lMQkLyZRTScwrS939Cnj90AeNUKDQI/6OuxKU10a93fbt0lTihDioiit7ZgHOpsE82e/ UBT5v0t4mTCbulZ0+u/jFBoO0FQDDEm/qoadz5WeujCj0GW7KoK2vNI0qqfXYLN7OSzm aRk8UEh5rA2MMKUljbpHxrheR4GLQJ4gvs90hUqlFzRxn0xb6gqtUDHoHPXYeXr5cA1L sWhw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@sourceware.org header.s=default header.b=Mi6q+rsX; dkim=pass header.i=@linaro.org header.s=google header.b=ePCu0Wqi; spf=pass (google.com: domain of libc-alpha-return-98229-patch=linaro.org@sourceware.org designates 209.132.180.131 as permitted sender) smtp.mailfrom="libc-alpha-return-98229-patch=linaro.org@sourceware.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from sourceware.org (server1.sourceware.org. [209.132.180.131]) by mx.google.com with ESMTPS id 7si15526652pfb.226.2018.12.11.11.56.20 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 11 Dec 2018 11:56:20 -0800 (PST) Received-SPF: pass (google.com: domain of libc-alpha-return-98229-patch=linaro.org@sourceware.org designates 209.132.180.131 as permitted sender) client-ip=209.132.180.131; Authentication-Results: mx.google.com; dkim=pass header.i=@sourceware.org header.s=default header.b=Mi6q+rsX; dkim=pass header.i=@linaro.org header.s=google header.b=ePCu0Wqi; spf=pass (google.com: domain of libc-alpha-return-98229-patch=linaro.org@sourceware.org designates 209.132.180.131 as permitted sender) smtp.mailfrom="libc-alpha-return-98229-patch=linaro.org@sourceware.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:from:to:subject:date:message-id:in-reply-to :references; q=dns; s=default; b=CBKNKo2oD7Y6MYnf7RNLIXQdKB6VLwd DRCIRcX1WWHxalhGATDe3Pjh4f9T6b9ZY4yAEj3pPyK2zgBhtVDXg4KjfE0h4z7U eX0Fk0UfVlJIpYGgN0eOoWEhxVEgT9BYZgPnWdGvTsoF9qKGQkbf89vgMhUHI0An RldKvzP5iHSM= 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:from:to:subject:date:message-id:in-reply-to :references; s=default; bh=TkIA+zDqjRGZX2DIY1Nv3TlXHWk=; b=Mi6q+ rsXKZcknLsWzc7YPwhDvWsr/MbHu2lwFAhNjREInY3EDt/PJIkn0Tg62gi3r1mXB xL5eumryx2z4c6umbbi9G8rGnHRiiWesZPvCOUOoiST8Bsqezw5Pl2faZ0HjcRbv 5m3lNEcFzyXd3o/vpv3UON9SI2LEpmAUwsyOWU= Received: (qmail 71648 invoked by alias); 11 Dec 2018 19:56:05 -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 Delivered-To: mailing list libc-alpha@sourceware.org Received: (qmail 71499 invoked by uid 89); 11 Dec 2018 19:56:04 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-26.9 required=5.0 tests=BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, RCVD_IN_DNSWL_NONE, SPF_PASS autolearn=ham version=3.3.2 spammy= X-HELO: mail-qt1-f193.google.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:subject:date:message-id:in-reply-to:references; bh=8/yHmCFpo9dg9jJhFw3bUPDGezyorJEWUT8du0tJ1BY=; b=ePCu0Wqig6gLe7Q/xGwH0mcz6IaAlsgt5ZhRpITp+3rlg8PxK9WmgKm0Ez1XXVp3bz 50xmBpaVx1AZTivAlkLaj8ffIqWXpV9SfHj2SGPvvQZ9CUwIDE1G8iPNGJM2H1IstrBe aOf6pPQJazoeFC8Go/QNjyHXEyIz/Lqiq7sDY= Return-Path: From: Adhemerval Zanella To: libc-alpha@sourceware.org Subject: [PATCH 3/5] hppa: Remove kernel_sigaction.h Date: Tue, 11 Dec 2018 17:55:52 -0200 Message-Id: <20181211195554.3377-3-adhemerval.zanella@linaro.org> In-Reply-To: <20181211195554.3377-1-adhemerval.zanella@linaro.org> References: <20181211195554.3377-1-adhemerval.zanella@linaro.org> HPPA kernel_sigaction.h definition is the sama as the Linux generic one and old_kernel_sigaction is not used. Checked on hppa-linux-gnu. * sysdeps/unix/sysv/linux/hppa/kernel_sigaction.h: Remove file. --- ChangeLog | 2 ++ .../unix/sysv/linux/hppa/kernel_sigaction.h | 18 ------------------ 2 files changed, 2 insertions(+), 18 deletions(-) delete mode 100644 sysdeps/unix/sysv/linux/hppa/kernel_sigaction.h -- 2.17.1 diff --git a/sysdeps/unix/sysv/linux/hppa/kernel_sigaction.h b/sysdeps/unix/sysv/linux/hppa/kernel_sigaction.h deleted file mode 100644 index af048cbe7d..0000000000 --- a/sysdeps/unix/sysv/linux/hppa/kernel_sigaction.h +++ /dev/null @@ -1,18 +0,0 @@ -/* We have a separate header file here because we do not support - SA_RESTORER on hppa. */ - -/* This is the sigaction struction from the Linux 2.1.20 kernel. */ -/* Blah. This is bogus. We don't ever use it. */ -struct old_kernel_sigaction { - __sighandler_t k_sa_handler; - unsigned long sa_mask; - unsigned long sa_flags; -}; - -/* This is the sigaction structure from the Linux 2.1.68 kernel. */ - -struct kernel_sigaction { - __sighandler_t k_sa_handler; - unsigned long sa_flags; - sigset_t sa_mask; -}; From patchwork Tue Dec 11 19:55:53 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adhemerval Zanella X-Patchwork-Id: 153512 Delivered-To: patch@linaro.org Received: by 2002:a2e:299d:0:0:0:0:0 with SMTP id p29-v6csp1024088ljp; Tue, 11 Dec 2018 11:56:29 -0800 (PST) X-Google-Smtp-Source: AFSGD/X8/oC9FcSgmV+3UV0I58H/kSjDF4FQJiedVe7UyLkiv51vnIBHklSEN0K/oa9t45YJhJtZ X-Received: by 2002:a62:15c3:: with SMTP id 186mr18209642pfv.240.1544558189064; Tue, 11 Dec 2018 11:56:29 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1544558189; cv=none; d=google.com; s=arc-20160816; b=HG0QZwoxc/BTpwEOVEGFh7rZmdG16z+G7GaLF7jdVxMg+SNyRL73T56OenvjZ1LMcw Imzb9bsy6k7lCe7nHLts1YNgxdrYNwB/vVJiuqYLF12e6N6IoX4Qmr1mmxMLpha8RD8a DntrIB+N1L2oZWxc8RFeTD/XqYoylGUXzBWF/rXGa+cBDcgU0HTP7WfBrYaqKS4B4Ck3 bJ2GyLpDi8pGuaa8QP4gDA3bQDyIRWiFjdsczUEYchStafKjxdJCEHFwiJYTpfe9k3i4 4sAJo6Iop8XJvIBulA1BH0XirtfQrEPXeNQhbDyecdJkhAuTahI26Wdjd0dcOKCDk3xz dWOw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=references:in-reply-to:message-id:date:subject:to:from :dkim-signature:delivered-to:sender:list-help:list-post:list-archive :list-subscribe:list-unsubscribe:list-id:precedence:mailing-list :dkim-signature:domainkey-signature; bh=blLF8aWDfc9QRvBV4qVZBxK2xWCLhal6pvQYGZT2b/8=; b=VhCE1w9JxpC1A8xsbCwS+hFrDlFsMK7EkVrQJ6Ax/74eYZ0cf1fs1G353zjYmUajMV sLMHZN5RCtuagEdxOA4Whs25oSaT07NPikYpJGKREJcD4R9D13JbxRdwuMmiGL8OoF3a Trz1x56RiwwmX0rehowtCpsOqdPvy5/FRQFODhv9JUoq/WRrouKd1sIClLJedqaMHdc3 7FYbY/iz+I7VXNwKhRW1a8xxqwSFSLInaibzXA2pRQjEfJBIstF8gDeDmWYt6ziMcvms fp/kYweUwroZ9XDig5NME57d+E2dmWCmKBWuW0G6a9wc41sIBbiNXFevX55+vaoOifGD rxCw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@sourceware.org header.s=default header.b=MZI4Lplh; dkim=pass header.i=@linaro.org header.s=google header.b="a1/eJQci"; spf=pass (google.com: domain of libc-alpha-return-98230-patch=linaro.org@sourceware.org designates 209.132.180.131 as permitted sender) smtp.mailfrom="libc-alpha-return-98230-patch=linaro.org@sourceware.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from sourceware.org (server1.sourceware.org. [209.132.180.131]) by mx.google.com with ESMTPS id j22si13627028pfi.252.2018.12.11.11.56.28 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 11 Dec 2018 11:56:29 -0800 (PST) Received-SPF: pass (google.com: domain of libc-alpha-return-98230-patch=linaro.org@sourceware.org designates 209.132.180.131 as permitted sender) client-ip=209.132.180.131; Authentication-Results: mx.google.com; dkim=pass header.i=@sourceware.org header.s=default header.b=MZI4Lplh; dkim=pass header.i=@linaro.org header.s=google header.b="a1/eJQci"; spf=pass (google.com: domain of libc-alpha-return-98230-patch=linaro.org@sourceware.org designates 209.132.180.131 as permitted sender) smtp.mailfrom="libc-alpha-return-98230-patch=linaro.org@sourceware.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:from:to:subject:date:message-id:in-reply-to :references; q=dns; s=default; b=U0zapqHOiztqmFMfq8bEIsFv85CiBvw oqxW9rCOKHgw4sIgjmPtp1HbwMwVbZyp1JtOQd6hEHu4aM+MabcDb5cqsxoF92Vs Cx8vXe/v6pHzZj7AyuTGh0BmYzVA+eDxxaSt91qi+hS38jT41Xc6OHSED3eYsKNx IP62SgPBcdjs= 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:from:to:subject:date:message-id:in-reply-to :references; s=default; bh=kjBZA5a+htcUO6xjrMOPxyNhm3w=; b=MZI4L plhHCytgN82IfpO2WinLaNq1odMVpL56tt+VKMUsRLTR2xd6B13KjA9EfdBKS9gG pzYj5xbaRFhWzCSpEutAFrELI4PyLVafUFbcZ/00QUOZ30pRPfgy0mcurOxLtWcQ 3hP3H8sk4P2RWDH3POyQ1hXg63NQ5q4L/PrSIA= Received: (qmail 71823 invoked by alias); 11 Dec 2018 19:56:06 -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 Delivered-To: mailing list libc-alpha@sourceware.org Received: (qmail 71665 invoked by uid 89); 11 Dec 2018 19:56:05 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-26.9 required=5.0 tests=BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, RCVD_IN_DNSWL_NONE, SPF_PASS autolearn=ham version=3.3.2 spammy=Hx-languages-length:878 X-HELO: mail-qk1-f196.google.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:subject:date:message-id:in-reply-to:references; bh=blLF8aWDfc9QRvBV4qVZBxK2xWCLhal6pvQYGZT2b/8=; b=a1/eJQciw5GdMH0Q/pitsLeNdP0zdTD0XQ6PkaPXQNAP+52hLG5++iqXcEjVkKSQeD 6m+I/qF7l2dRAFWkVog7MQ2qgxOeWlP+1bePtJH99uyQMnyHphYamfeSZQaQeMYjCJvX bTykp2tXi2iomUmG1dCZ9/sXC7jcdXQkGpN0Q= Return-Path: From: Adhemerval Zanella To: libc-alpha@sourceware.org Subject: [PATCH 4/5] ia64: Remove kernel_sigaction.h Date: Tue, 11 Dec 2018 17:55:53 -0200 Message-Id: <20181211195554.3377-4-adhemerval.zanella@linaro.org> In-Reply-To: <20181211195554.3377-1-adhemerval.zanella@linaro.org> References: <20181211195554.3377-1-adhemerval.zanella@linaro.org> IA64 kernel_sigaction.h definition is the sama as the Linux generic one. Checked on hppa-linux-gnu. * sysdeps/unix/sysv/linux/ia64/kernel_sigaction.h: Remove file. --- ChangeLog | 2 ++ sysdeps/unix/sysv/linux/ia64/kernel_sigaction.h | 7 ------- 2 files changed, 2 insertions(+), 7 deletions(-) delete mode 100644 sysdeps/unix/sysv/linux/ia64/kernel_sigaction.h -- 2.17.1 diff --git a/sysdeps/unix/sysv/linux/ia64/kernel_sigaction.h b/sysdeps/unix/sysv/linux/ia64/kernel_sigaction.h deleted file mode 100644 index fc9f29603c..0000000000 --- a/sysdeps/unix/sysv/linux/ia64/kernel_sigaction.h +++ /dev/null @@ -1,7 +0,0 @@ -/* This is the sigaction structure from the Linux 3.2 kernel. */ -struct kernel_sigaction -{ - __sighandler_t k_sa_handler; - unsigned long sa_flags; - sigset_t sa_mask; /* mask last for extensibility */ -}; From patchwork Tue Dec 11 19:55:54 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adhemerval Zanella X-Patchwork-Id: 153514 Delivered-To: patch@linaro.org Received: by 2002:a2e:299d:0:0:0:0:0 with SMTP id p29-v6csp1024299ljp; Tue, 11 Dec 2018 11:56:46 -0800 (PST) X-Google-Smtp-Source: AFSGD/X6YeDiLmVFBiC0ZJKH3F9ZJrW867Y0QaWMWj4Z/qzJDlwPRuL0JJQORnn4RYsXjspBJ91l X-Received: by 2002:a63:ed15:: with SMTP id d21mr15641285pgi.305.1544558205997; Tue, 11 Dec 2018 11:56:45 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1544558205; cv=none; d=google.com; s=arc-20160816; b=NeIZf/kQW4ZUwHEbCx+Y2QUCaknLjkpYe17QT2uxJzvMG7sGq9m1FRkKqqoykLr+Jf BUHKVlKNGztpGfq0qpG7mggIBXXirmIKhFVLoxewxedDK7boyrcYXy2yxT2SUznileCS FrsDd3m6IU6eofMc6ex9IQIsuGKVv2Vgy/Gsl0IHyjtbRtxne9FbMJf5jZGTkuoCcdXD PJNBHtem/2FU/ks2HKF8ip7lEL26CN9MQQgJ8FR/kFcoq8AL4RbHKicPdLvZcrO1G4be S9tE4cfYk+gFbiuy+f2vs/3OWpqonMV2Ot4nJX0S1DCwfu1ULWFHItgLfJGzQU8cOXhi 5hmQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=references:in-reply-to:message-id:date:subject:to:from :dkim-signature:delivered-to:sender:list-help:list-post:list-archive :list-subscribe:list-unsubscribe:list-id:precedence:mailing-list :dkim-signature:domainkey-signature; bh=pTg/WszlcDFxFRc2viUpIz5JslRt2tRt/dPuiXmUNNs=; b=kCAoRDVSkuvjS3SbcPSyqmRqsG1QhTQRD8PS10j/fEdxZphBcpc5hc9u6GEzOtczvE mhbPNQ3ZFubdGfe/bV1Okg2zxWzk3fxE4KstsCPRIBzQtQwPtRP+W2A8FaQfWnX2gGDv yQfktyyE3JTkDJMzq+nCPiF0zdU31jrBYIj3rklHl3sIrb1ZlUEKl0a1nVHF/smztdF8 MAC2KRSAxoYbnY1ZDbDdg3WaqhdjivNJVYGHxtN2mdWcVwzRlKIawPIGIKf6OAEGHAb/ xr02CRdar5tqOR+Eok9LW0UzThyJWTIp0e9nGrvtGsDpMph8pa9RTuYX94npRYJ2gwPl 0/BQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@sourceware.org header.s=default header.b=FqYrY456; dkim=pass header.i=@linaro.org header.s=google header.b=dhl6FPTq; spf=pass (google.com: domain of libc-alpha-return-98232-patch=linaro.org@sourceware.org designates 209.132.180.131 as permitted sender) smtp.mailfrom="libc-alpha-return-98232-patch=linaro.org@sourceware.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from sourceware.org (server1.sourceware.org. [209.132.180.131]) by mx.google.com with ESMTPS id u186si12201733pgd.131.2018.12.11.11.56.45 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 11 Dec 2018 11:56:45 -0800 (PST) Received-SPF: pass (google.com: domain of libc-alpha-return-98232-patch=linaro.org@sourceware.org designates 209.132.180.131 as permitted sender) client-ip=209.132.180.131; Authentication-Results: mx.google.com; dkim=pass header.i=@sourceware.org header.s=default header.b=FqYrY456; dkim=pass header.i=@linaro.org header.s=google header.b=dhl6FPTq; spf=pass (google.com: domain of libc-alpha-return-98232-patch=linaro.org@sourceware.org designates 209.132.180.131 as permitted sender) smtp.mailfrom="libc-alpha-return-98232-patch=linaro.org@sourceware.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:from:to:subject:date:message-id:in-reply-to :references; q=dns; s=default; b=gaMIp1Y3AEIhLqNVh+i6XdmENEHHs1i whf5ny91Bh5DgLvuJSiBxcgORfSO+47hct2rlTAUH5dRZpkB+q1ZDaQJT1TGrAsM vP/kPy6XU2HkG6YNu5lfdL/Vx5DW3JhBjZMsZdtlfwTVMagBXOn2Mh79QlKfC9+A XxNCMxC40lTM= 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:from:to:subject:date:message-id:in-reply-to :references; s=default; bh=xW1EtsKlscVredF4h/0PVDnWyf8=; b=FqYrY 45692P5Ih9bmyU6c6yH8qIW7RTYfe5nAkiFhuN9llr861rGvIpQnWTNdasA1duOd lexMj4Cfs/kU78q33AaXdrOzmoqKqxvc9EoO99Rt/l/eNym6YawAPGEADnvw2ed1 oUgjOgNgfqC6sRHEyv7nZRthCfA9sZoyTZ+uNg= Received: (qmail 72128 invoked by alias); 11 Dec 2018 19:56:08 -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 Delivered-To: mailing list libc-alpha@sourceware.org Received: (qmail 71968 invoked by uid 89); 11 Dec 2018 19:56:07 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-26.9 required=5.0 tests=BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, RCVD_IN_DNSWL_NONE, SPF_PASS autolearn=ham version=3.3.2 spammy=act X-HELO: mail-qk1-f196.google.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:subject:date:message-id:in-reply-to:references; bh=pTg/WszlcDFxFRc2viUpIz5JslRt2tRt/dPuiXmUNNs=; b=dhl6FPTqVDq9JjA5iBXVH50KN73riFIe49hFCH8SF6JexeQx1GnbOnX2jMUoT3Y7Sv NvtMXf3woTf6ix9Xaetqk+eG+gFCI1a/mxgKqeJhkCD29keLIMh/64AV+a9GnClmWOEw 0WAU8Aq+tsGwYhhj3qp0HhrimxWNmmW0Pv56M= Return-Path: From: Adhemerval Zanella To: libc-alpha@sourceware.org Subject: [PATCH 5/5] s390: Use generic kernel_sigaction.h Date: Tue, 11 Dec 2018 17:55:54 -0200 Message-Id: <20181211195554.3377-5-adhemerval.zanella@linaro.org> In-Reply-To: <20181211195554.3377-1-adhemerval.zanella@linaro.org> References: <20181211195554.3377-1-adhemerval.zanella@linaro.org> S390 kernel sigaction is the same as the Linux generic one. Checked with a s390-linux-gnu and s390x-linux-gnu build. * sysdeps/unix/sysv/linux/s390/kernel_sigaction.h: Use Linux generic kernel_sigction definition. --- ChangeLog | 3 ++ .../unix/sysv/linux/s390/kernel_sigaction.h | 28 ++----------------- 2 files changed, 5 insertions(+), 26 deletions(-) -- 2.17.1 diff --git a/sysdeps/unix/sysv/linux/s390/kernel_sigaction.h b/sysdeps/unix/sysv/linux/s390/kernel_sigaction.h index 7a6a2c4f29..18000a62cc 100644 --- a/sysdeps/unix/sysv/linux/s390/kernel_sigaction.h +++ b/sysdeps/unix/sysv/linux/s390/kernel_sigaction.h @@ -1,30 +1,6 @@ -#include - +/* S390 uses the generic Linux UAPI but defines SA_RESTORER. */ #define SA_RESTORER 0x04000000 - -/* This is the sigaction structure from the Linux 3.2 kernel. */ -struct kernel_sigaction -{ - union - { - __sighandler_t _sa_handler; - void (*_sa_sigaction)(int, siginfo_t *, void *); - } _u; -#define k_sa_handler _u._sa_handler - /* The 'struct sigaction' definition in s390 kernel header - arch/s390/include/uapi/asm/signal.h is used for __NR_rt_sigaction - on 64 bits and for __NR_sigaction for 31 bits. - - The expected layout for __NR_rt_sigaction for 31 bits is either - 'struct sigaction' from include/linux/signal_types.h or - 'struct compat_sigaction' from include/linux/compat.h. - - So for __NR_rt_sigaction we can use the same layout for both s390x - and s390. */ - unsigned long sa_flags; - void (*sa_restorer)(void); - sigset_t sa_mask; -}; +#include #define SET_SA_RESTORER(kact, act) \ (kact)->sa_restorer = (act)->sa_restorer