From patchwork Sat Oct 17 00:12:26 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Collingbourne X-Patchwork-Id: 11842463 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 00911C43467 for ; Sat, 17 Oct 2020 00:14:56 +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 8526122210 for ; Sat, 17 Oct 2020 00:14:56 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="cODaWeeI"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=google.com header.i=@google.com header.b="WH2AP0Ak" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 8526122210 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=F5mz3Ph43IFu5JmqO5y/qPe8N+SciBWLvu2qUrx8wn0=; b=cODaWeeIVDGOYoPG2AyFfP0UV OR0xbSYf8g6enK6kuBH4nxHWUMojOEPR/7eGGwpBdAGR8XYIi9n1QU3437K2g6XEuOxiZHZ8YXiAH IaX1521RzDGfpL57L1rY2TQAJ/i9Cug0/buWN/1zzJOxv+WFoYd+HfVP/rm6K8EFLTcEVWtBvBwhP n2NRieOO2O9tLprRlMHkv6VZZ0RqN5x1hiBrIpc52Bjv7SJa8XrQGs7VOjsC36uaqJK1nG9QYBqQG HTZMoC6v/jmH6cj2SCtOaf2Y9G4Qh60Vfmf50YCRPjgBZHmb8q/ySuKkvcLcQ8SMkLK98olf88Ini tctSmIrpg==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kTZqA-0001wy-5l; Sat, 17 Oct 2020 00:12:54 +0000 Received: from mail-qt1-x84a.google.com ([2607:f8b0:4864:20::84a]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kTZq5-0001vg-Du for linux-arm-kernel@lists.infradead.org; Sat, 17 Oct 2020 00:12:50 +0000 Received: by mail-qt1-x84a.google.com with SMTP id z12so2406642qto.4 for ; Fri, 16 Oct 2020 17:12:47 -0700 (PDT) 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=uYcIrQSk4fWbF8fX+2DV0rs7plcXpFRzMpdoSUroJXo=; b=WH2AP0AkCjNMSfLVkc8VhN6QwYCVnbC5vr8npIUN7aHpUCkWkLaZX6gWA41Nn10iJe PoKQ16WoiC1ZLug3cdS4vYH+ZMhM/ZJxdB6C9U/07jIN42fQb4IPlOwUaCYxt4M+OaRV Cg0UeFJog0WhAynf8yP0H6HUuHqMZbMQnkishy/oi65hD++pF7A5RQQ1bZt4cbMHWhkF zMH3cSkfawb4nruNQ0+W+/qLrEA3ulaKV8dqSsriltWoQw3nKm7/CXASTCmG7ShMVVUj JJUH9lgCZ4OtI+CtxgEeprtUyB7h8lMJ+ciKJoOIdE6S/FV/8SLNxOtpBAgGS5pu8boo jyzg== 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=uYcIrQSk4fWbF8fX+2DV0rs7plcXpFRzMpdoSUroJXo=; b=FgsRbff52QT8iCBOAQ22HJu70+UwaUpokLsk7gfRvv+Xr3DG5JarbmEzP/R0zF/VP/ XFuzQ6PPnCBUixMjNLX73FKxAGrbRtc0CrPKsW/nKcDbfqod7niwFr4XT5NlyZlrVzYJ RvVvGudG3fCQEfTMp4fwo8PDpebK16WqWaf6IaRRYsoj5foL/DhSwuaweI8NaRzH1mXC vyA8EBGQ0wn6Yoq+DE0kvQVQB7kAXUjzWspKr/RkFgiz/htD0vZpv5RmEMn1CBqWXA+H mVmyJAvxZ5bOg9veTRA295qB1YrvWFZGgtGmHpbGIlAno9u2avCZwR4ukgygRSfSh+lW wdpQ== X-Gm-Message-State: AOAM530bRkAPaNtFQdvapY+DVcHAGehkMGv/+w7jmO95wqqPEekeFwrM 3rzm+70qIqf4LSNUsp1SvQowq4c= X-Google-Smtp-Source: ABdhPJwt73T6PAA4DUCKDWlDma4y0MLFG6EPJOdVJPSpeE5zz2EnIsFSBs8wyzk82m43uVLWtKZK0OQ= X-Received: from pcc-desktop.svl.corp.google.com ([2620:15c:2ce:0:7220:84ff:fe09:385a]) (user=pcc job=sendgmr) by 2002:a0c:edb1:: with SMTP id h17mr6018821qvr.7.1602893565579; Fri, 16 Oct 2020 17:12:45 -0700 (PDT) Date: Fri, 16 Oct 2020 17:12:26 -0700 In-Reply-To: Message-Id: Mime-Version: 1.0 References: X-Mailer: git-send-email 2.29.0.rc1.297.gfa9743e501-goog Subject: [PATCH v12 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-20201016_201249_500282_DD7D38F0 X-CRM114-Status: GOOD ( 13.51 ) 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 --- 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;