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