From patchwork Fri Nov 13 02:46:02 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Collingbourne X-Patchwork-Id: 11902411 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 2FD5AC55ABD for ; Fri, 13 Nov 2020 02:46:51 +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 BA80C20B80 for ; Fri, 13 Nov 2020 02:46:50 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="eY2ZfHMc"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=google.com header.i=@google.com header.b="Cn/9D3WN" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org BA80C20B80 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=eY2ZfHMccGZb/XfEg1Z8b0hqu VAJq51RP5vbDFKXxDuJQd2vpl8KTqag0XVAatYWdm3jsVxYxldUksMbs+xxCUmRhiHqhNs4n+p1fQ b/u0e47QgBQRRadP9zYN4UlnUpsFb+htHgQZvB4arz5obCIst3U2uf7KQL/P6BSS2qyta4nR+PEwN WZs3HvHRQCoWS2QGmsEvtezCnhFGzKTk0v6neHAm5BVRtfzbVJd1R+LBV1RpLfeBwP1829b8dMaCU M5Dv2esBFzNCHsq5eL+7sIjK4ckbXKvIfk1SU12jhRF389ATDEgDTDQaxvuCnzIy3pFDtzVC8MLFY IRFHfG/5g==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kdP6U-0002fs-0X; Fri, 13 Nov 2020 02:46:22 +0000 Received: from mail-yb1-xb4a.google.com ([2607:f8b0:4864:20::b4a]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kdP6O-0002dv-M2 for linux-arm-kernel@lists.infradead.org; Fri, 13 Nov 2020 02:46:17 +0000 Received: by mail-yb1-xb4a.google.com with SMTP id h9so8777105ybj.10 for ; Thu, 12 Nov 2020 18:46:14 -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=Cn/9D3WNAZBE7X4G+PG6zFUg4eCliD8JAHztfW+2/RuVatICsGU50UCABOAeCrVCUA Z65WJ9/vr7B9In4uExKDiTY+VsOHjr9qlV+QmPMRq6DNNtT7Gj06fVIVy4C8cR0mHRu9 jdiB6mV0JUc0hxwoW//wwB8peg0ArEnJxaBNNqqP++M4tvMdk6pTpBhuYp0CXgat9E5H vFPBO0B/Uc884GkkVe3F3PEakSNTKDscpVy5pmOPuhYAv/xA83zrN1cNln2MgTatVlsc hLgTSgxFFSiUp97/bNCBdq33F/uTRHskpMlshbwdfcHwIwk8ddSOdu1nv+ylfzG0Vc65 N3tA== 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=OlQpM1YdY0Gu43Qv4fKOisJbOGsQjDv/jEOxFfy6v+SWbZ5+hrhR8bC99ap8PPNsiW fw4JZyZ+cBK0OnI8j2HBhd0yF81HHK+c6+maIrqEv2nrbaLDWnIy9i8c7DhAYyD74ibm noTHaTPb4K0A2AT6F5YK45cYGxhQvkRye6Ts6g1pFV1DzleUcRiUsdHh+r/8fdBX4iUh c7X99BA8g151srsTekDg1gHTjEVOtAMIDp1xp9SQ/GgMJZc9MjJoykcBsAB5hJJmU4yS 32s6UPnRp2lt4iMLr5STxPcwN/JZ0QIVlyv/I2vdVBe8msX/rYqmbs/wJMuZ6mVpXqkJ ebHg== X-Gm-Message-State: AOAM531FN2YPWD3ppkEjMlSZcMAzcgWXbiNZJ+jSxqs6tV2Xs3ReGSL3 +V5I4AJsSBJ/ueOfBvXRsq3RVNk= X-Google-Smtp-Source: ABdhPJw/c1G7e+0UcYC46FTxSIXt5iwxVrv7iFV6TjcbN7r5kualmCR80+cGk7tUP6tMS7SIYX1MoOs= X-Received: from pcc-desktop.svl.corp.google.com ([2620:15c:2ce:0:7220:84ff:fe09:385a]) (user=pcc job=sendgmr) by 2002:a25:4095:: with SMTP id n143mr122463yba.106.1605235573532; Thu, 12 Nov 2020 18:46:13 -0800 (PST) Date: Thu, 12 Nov 2020 18:46:02 -0800 In-Reply-To: Message-Id: Mime-Version: 1.0 References: X-Mailer: git-send-email 2.29.2.299.gdc1121823c-goog Subject: [PATCH v15 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_214616_765877_48B24638 X-CRM114-Status: GOOD ( 14.31 ) 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;