From patchwork Fri Nov 13 02:53:31 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Collingbourne X-Patchwork-Id: 11902433 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 14471C5519F for ; Fri, 13 Nov 2020 02:55:15 +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 8C5D920B80 for ; Fri, 13 Nov 2020 02:55:14 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="G8q/qORp"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=google.com header.i=@google.com header.b="BUBvf88l" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 8C5D920B80 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=DjB2nb/rFISeDTOjjzWFrYYl1PcM5BwYEaq8JDXO2ts=; b=G8q/qORpXdmxje6O8c6gy+OPQ cmGD5jnd6GL/ax/2xxjAk1WLFRoLza9PYTfQSm+SVik8C+mS287yRljH1k8Me/DDusvrX9JCwcr8i FMYTpWiqPpytJXtYO1IueYoLAg1oM2gClw/eEusyGsHM5SO9oHJ4FR2GksUoGXH+81qgQxupzNwyX Q1kbvPdZcO088fh5IL/nbqdv03ud84xr6ZO8tfTlXgqATBWKVWdw7DfP15HW1A6PkttzRl2DSYWpj G9zez25MlrTWnBXMod1/G0RDdLCNSK/vehy1axmxaZ+59z223nyKGNFIK9yrtr5sglQd4VXVUi9YB dliR+lf1w==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kdPDo-0004nB-C8; Fri, 13 Nov 2020 02:53:56 +0000 Received: from mail-qk1-x74a.google.com ([2607:f8b0:4864:20::74a]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kdPDg-0004jX-2x for linux-arm-kernel@lists.infradead.org; Fri, 13 Nov 2020 02:53:49 +0000 Received: by mail-qk1-x74a.google.com with SMTP id c18so5744468qkl.15 for ; Thu, 12 Nov 2020 18:53:45 -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=ygGnL3mRCd+dIJRzIWujb3ScKZ0x4r/fVg2nxqC4gq4=; b=BUBvf88lOW0IMOoQ8xVYrgKOAKGBusN3/e0T2JacIxSORJQSXrBSQwKtd1VphzpOjn xykRXI74C0uU03oA4rOYZOaKVin9DNgdWI4NK/uGGqaG9iUBtgsGPFTatRk7G75jRbLP aUSLw/K0puXR7pIpBy1jle9yVkIjdMOwvaSD43cIib63C+8TcUN5qffGDr/UQTnIxk9R SPHhbia+VR0t+h2UxJF6JusbPqKJ8cHpbPrWkEOK0EkaKNITWJlO7QLXTcD7IT3edQg+ XYVTZC+S7BHg6YWizm89jGfcW2yZHq9IdAbQR1I2firDp+6XAsXGrBdcOg0RamMhduDK wOpQ== 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=ygGnL3mRCd+dIJRzIWujb3ScKZ0x4r/fVg2nxqC4gq4=; b=Ge8wF5N6hAtSU61NqfrExq9FJDKY8WURmGhIU89YpivrHm9BLMApihMvPJS2gYWId4 Q4/PyWhyUQLuHJtkvExLeMxTs5QdnPox62dyWvtf8VfpgZcYJ4Dd5egWLknBXEOpX3u+ KHGy6ZUeXs8vczFBNk2Zu3ipSJaef/aqGPVcmUNGVUAyLqhEjOtZ5ds2opJcZibLNA3I ekO/Rfh8zsWPyD7MwDVZW+67v4eZ+E6ml6je0van+H4pIlZmB3qsERuuACPaGqyyjwlz +r57QAXcguL8ndxi0E12AWKQqceOP8rq1reblMy+wkJTqvfI1eUG/oQIFi5OAwtfUwBk 3ZEg== X-Gm-Message-State: AOAM533wQ3KQJ3LARnlejnMM9pFEbvtOr/3xU0VzsvZY1KNJalGh0nqP r8bfHhfQ7IT3D4xnVHc/peVt534= X-Google-Smtp-Source: ABdhPJwMI6AYBkl5OpDGhN5m9DC1SS+CDVziLDgBOmaHQAc3EQ/ztzIhyENSGvm1Gv1hUBkFAVbFVs0= X-Received: from pcc-desktop.svl.corp.google.com ([2620:15c:2ce:0:7220:84ff:fe09:385a]) (user=pcc job=sendgmr) by 2002:ad4:53c8:: with SMTP id k8mr402399qvv.40.1605236024196; Thu, 12 Nov 2020 18:53:44 -0800 (PST) Date: Thu, 12 Nov 2020 18:53:31 -0800 In-Reply-To: Message-Id: Mime-Version: 1.0 References: X-Mailer: git-send-email 2.29.2.299.gdc1121823c-goog Subject: [PATCH v16 1/6] 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-20201112_215348_149426_A2D44FC0 X-CRM114-Status: GOOD ( 14.34 ) 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 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 Signed-off-by: Peter Collingbourne Acked-by: "Eric W. Biederman" Reviewed-by: Peter Collingbourne Link: https://linux-review.googlesource.com/id/I21c43f21b264f339e3aa395626af838646f62d97 --- 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;