From patchwork Tue Nov 3 04:09:37 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Collingbourne X-Patchwork-Id: 11875887 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.7 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_ADSP_CUSTOM_MED,DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 41460C388F2 for ; Tue, 3 Nov 2020 04:11:43 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id A14C62074F for ; Tue, 3 Nov 2020 04:11:42 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="cFr4kMso"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=google.com header.i=@google.com header.b="MdN/swhJ" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org A14C62074F Authentication-Results: mail.kernel.org; dmarc=fail (p=reject dis=none) header.from=google.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:To:From:Subject:References:Mime-Version:Message-Id: In-Reply-To:Date:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=3//bMydej4dMXWwsZB/gBf6runuRQ+OWczlP7xtJdp0=; b=cFr4kMsoPfO5UrFmEIPCDM/se bF025ZOlIYdktO6lGX3AOyOaHIqVXhODaSwgannDdjnycju7pyJx/05/+2EjPn4GwOLZ/aP7zlSVJ 1mDEvF+mU5qAbOkGnCfgYjP1xGRJcW15poR6XnfcFis6WIbnLZBoM1Z05aqRw093pVBbRBXrYzPC9 8pq+lmb8Kdk0RJTYKUrhXTNvLHLLsVU+vP3/G4JBcIpZsE18ezUjxLkbjJL/YGacbCqx31bFZ3y/R THupeoKXAvck0Bcm0xk+K2lDIEeHcFdvAKOjU3derX7DfwPUjCPrTzKwaKODomShP06I3VcQvzJht k1safxqUw==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kZne6-0001Ym-IL; Tue, 03 Nov 2020 04:10:10 +0000 Received: from mail-pf1-x44a.google.com ([2607:f8b0:4864:20::44a]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kZne3-0001XO-Cp for linux-arm-kernel@lists.infradead.org; Tue, 03 Nov 2020 04:10:08 +0000 Received: by mail-pf1-x44a.google.com with SMTP id z22so5462578pfj.15 for ; Mon, 02 Nov 2020 20:10:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=sender:date:in-reply-to:message-id:mime-version:references:subject :from:to:cc; bh=C0TIbQB7eewXGq+mkhd2tlN81pQlKE4q4NIfExPeYcU=; b=MdN/swhJbVZmU2L45sgheMs89SJkwKosV9dEveiUjIyhLKzWtBpoVwVKe3Fmw7y014 g3net6srkCWA4cL0AZ/La1DYQYetohJR2tu1HvZN7NY65nusfo97AXvaouvHNGzaVIHO uFPIQ/r4kOPhQynf3xGnWFew6z8+hlsrbhe+5fvR/EFrU6eyl4WhwWvpkSXV8L8UFSwS bWkxcMvR8URArlldkISwlzpkzJp98bnLGjAKEc8vVWYvbZwy6cniePQgthRljTX644gj ZgYD9YSKRGKFBqH9qwuoTImd/Py0JDBE9vtx58oxTFTya7FTk4oUuwJfWbJpzldS8oL/ CAkw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:date:in-reply-to:message-id:mime-version :references:subject:from:to:cc; bh=C0TIbQB7eewXGq+mkhd2tlN81pQlKE4q4NIfExPeYcU=; b=oewoS8humrrBGkHYrSYTtxX0Ww8LAeFD6dQlgrkj9nNvYFkM/hLRT7BUQWKb5pRGqu J0E878288p1wFYMveSPmxII3WePTpYXvl2TxMLMED6btBwtCdl2PIIjKu6EH8o8C/ZYz JsHnnUlRIU3KuJqNulpc8EItaeYe8HZu4ay/bJ4qFeRZahKbrsjC9Gn3a5rtXfz9Dcct AAusKxBbfIK9fT6kmAi8RQiSQdprYFNA3y6GxAHUKFMtw1ChVYNSM6x+mb7d+8Q4zHoV 6lrt14+vFyGeEUV14XOmSVOKPjppJwvua1sgxFP4Sv1wewBThAkj/5XydS4yiLdfDNnR GtMg== X-Gm-Message-State: AOAM533j5188go1ZDckjpzMTrIIhBOtk5G1Qvtm3d18t4vvjTIdHN2Yl alOyxAd+AFFKGHe5egV9udXnTTc= X-Google-Smtp-Source: ABdhPJyGzPg5saVpLYjXlfgiW1QNWjNEIs7vXynV+qWn/lgpC5rG5mAj/PFowByubg5FhkBneJ/f+LY= X-Received: from pcc-desktop.svl.corp.google.com ([2620:15c:2ce:0:7220:84ff:fe09:385a]) (user=pcc job=sendgmr) by 2002:a17:90b:602:: with SMTP id gb2mr1667259pjb.12.1604376603688; Mon, 02 Nov 2020 20:10:03 -0800 (PST) Date: Mon, 2 Nov 2020 20:09:37 -0800 In-Reply-To: Message-Id: <7e26600459cb08c5016611b37fe88c23098b40eb.1604376407.git.pcc@google.com> Mime-Version: 1.0 References: X-Mailer: git-send-email 2.29.1.341.ge80a0c044ae-goog Subject: [PATCH v13 1/8] parisc: Drop parisc special case for __sighandler_t From: Peter Collingbourne To: Catalin Marinas , Evgenii Stepanov , Kostya Serebryany , Vincenzo Frascino , Dave Martin , Will Deacon , Oleg Nesterov , "Eric W. Biederman" , "James E.J. Bottomley" X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20201102_231007_487989_4BEDE6D6 X-CRM114-Status: GOOD ( 14.52 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Andrey Konovalov , Helge Deller , Kevin Brodsky , linux-api@vger.kernel.org, David Spickett , Peter Collingbourne , Linux ARM , Richard Henderson Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org From: Helge Deller I believe we can and *should* drop this parisc-specific typedef for __sighandler_t when compiling a 64-bit kernel. The reasons: 1. We don't have a 64-bit userspace yet, so nothing (on userspace side) can break. 2. Inside the Linux kernel, this is only used in kernel/signal.c, in function kernel_sigaction() where the signal handler is compared against SIG_IGN. SIG_IGN is defined as (__sighandler_t)1), so only the pointers are compared. 3. Even when a 64-bit userspace gets added at some point, I think __sighandler_t should be defined what it is: a function pointer struct. I compiled kernel/signal.c with and without the patch, and the produced code is identical in both cases. Signed-off-by: Helge Deller Reviewed-by: Peter Collingbourne Link: https://linux-review.googlesource.com/id/I21c43f21b264f339e3aa395626af838646f62d97 Acked-by: "Eric W. Biederman" --- arch/parisc/include/uapi/asm/signal.h | 8 -------- 1 file changed, 8 deletions(-) diff --git a/arch/parisc/include/uapi/asm/signal.h b/arch/parisc/include/uapi/asm/signal.h index e605197b462c..d9c51769851a 100644 --- a/arch/parisc/include/uapi/asm/signal.h +++ b/arch/parisc/include/uapi/asm/signal.h @@ -85,16 +85,8 @@ struct siginfo; /* Type of a signal handler. */ -#if defined(__LP64__) -/* function pointers on 64-bit parisc are pointers to little structs and the - * compiler doesn't support code which changes or tests the address of - * the function in the little struct. This is really ugly -PB - */ -typedef char __user *__sighandler_t; -#else typedef void __signalfn_t(int); typedef __signalfn_t __user *__sighandler_t; -#endif typedef struct sigaltstack { void __user *ss_sp;