From mboxrd@z Thu Jan 1 00:00:00 1970 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=-2.9 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,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 04F0EC5CFFE for ; Tue, 11 Dec 2018 19:26:55 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 9A38520811 for ; Tue, 11 Dec 2018 19:26:54 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 9A38520811 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=arm.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726625AbeLKT0x (ORCPT ); Tue, 11 Dec 2018 14:26:53 -0500 Received: from usa-sjc-mx-foss1.foss.arm.com ([217.140.101.70]:55970 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726340AbeLKT0x (ORCPT ); Tue, 11 Dec 2018 14:26:53 -0500 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id E0CB4EBD; Tue, 11 Dec 2018 11:26:52 -0800 (PST) Received: from e103592.cambridge.arm.com (usa-sjc-imap-foss1.foss.arm.com [10.72.51.249]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id D0A173F6A8; Tue, 11 Dec 2018 11:26:51 -0800 (PST) From: Dave Martin To: linux-arm-kernel@lists.infradead.org Cc: linux-kernel@vger.kernel.org, Will Deacon , Alan Hayward , Szabolcs Nagy Subject: [PATCH 0/3] arm64/sve: UAPI: Disentangle ptrace.h from sigcontext.h Date: Tue, 11 Dec 2018 19:26:44 +0000 Message-Id: <1544556407-19897-1-git-send-email-Dave.Martin@arm.com> X-Mailer: git-send-email 2.1.4 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This patch refactors the UAPI header definitions for the Arm SVE extension to avoid multiple-definition problems when userspace mixes its own sigcontext.h definitions with the kernel's ptrace.h (which is apparently routine). A common backend header is created to hold common definitions, suitably namespaced, and with an appropriate header guard. See the commit message in patch 3 for further explanation of why this is needed. Because of the non-trivial header guard in the new sve_context.h, patch 1 adds support to headers_install.sh to munge #if defined(_UAPI_FOO) in a similar way to the current handling of #ifndef _UAPI_FOO. Dave Martin (3): kbuild: install_headers.sh: Strip _UAPI from #if-defined() guards arm64/sve: ptrace: Fix SVE_PT_REGS_OFFSET definition arm64/sve: Disentangle from arch/arm64/include/uapi/asm/ptrace.h | 39 ++++++++++----------- arch/arm64/include/uapi/asm/sigcontext.h | 56 +++++++++++++++---------------- arch/arm64/include/uapi/asm/sve_context.h | 50 +++++++++++++++++++++++++++ scripts/headers_install.sh | 1 + 4 files changed, 97 insertions(+), 49 deletions(-) create mode 100644 arch/arm64/include/uapi/asm/sve_context.h -- 2.1.4 From mboxrd@z Thu Jan 1 00:00:00 1970 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=-3.1 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,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 43ADCC5CFFE for ; Tue, 11 Dec 2018 19:27:20 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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 EC79720811 for ; Tue, 11 Dec 2018 19:27:19 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="Uz+qm2dR" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org EC79720811 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=arm.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+infradead-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=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To: References:List-Owner; bh=o1cvQcWj0INGuRiFMGM9I+R3S7x0PJblWlOyp8Q8vAk=; b=Uz+ qm2dRwFw5U5pASGb0GbbrxK03yVGyB62Brm36LhnQNCroiwqKKKnCVS0P1KwHXJys+3VZMHWu2tR8 clYeh6Ei8XiKTm+VMps3SUkF98b0Lz3KDYYxyT4hxTkqM+tvCpQwSyyfuzvppnMTMXDzsdbEinwWg qLE9/F+X1WbQMHMl5VyB+iSXja9nbUvDbgG+pTys1ZqP2+w1R0s1vvzjMTDAmVOK8vrWQicerkWVY dyUcyIcEcZa4peQNwxjcSyzQAFld/22M8hxAYMTiHCiy2mmKNf9EoVqfYTpCxQL7e4vyJztUbkMoQ R8oOB0oaOr0QwUfOgesdFB+vCgveB1w==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1gWnga-0005dy-8O; Tue, 11 Dec 2018 19:27:16 +0000 Received: from foss.arm.com ([217.140.101.70]) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1gWngN-0005S4-8b for linux-arm-kernel@lists.infradead.org; Tue, 11 Dec 2018 19:27:04 +0000 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id E0CB4EBD; Tue, 11 Dec 2018 11:26:52 -0800 (PST) Received: from e103592.cambridge.arm.com (usa-sjc-imap-foss1.foss.arm.com [10.72.51.249]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id D0A173F6A8; Tue, 11 Dec 2018 11:26:51 -0800 (PST) From: Dave Martin To: linux-arm-kernel@lists.infradead.org Subject: [PATCH 0/3] arm64/sve: UAPI: Disentangle ptrace.h from sigcontext.h Date: Tue, 11 Dec 2018 19:26:44 +0000 Message-Id: <1544556407-19897-1-git-send-email-Dave.Martin@arm.com> X-Mailer: git-send-email 2.1.4 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20181211_112703_375310_DC107F52 X-CRM114-Status: UNSURE ( 9.63 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Szabolcs Nagy , Will Deacon , linux-kernel@vger.kernel.org, Alan Hayward MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org This patch refactors the UAPI header definitions for the Arm SVE extension to avoid multiple-definition problems when userspace mixes its own sigcontext.h definitions with the kernel's ptrace.h (which is apparently routine). A common backend header is created to hold common definitions, suitably namespaced, and with an appropriate header guard. See the commit message in patch 3 for further explanation of why this is needed. Because of the non-trivial header guard in the new sve_context.h, patch 1 adds support to headers_install.sh to munge #if defined(_UAPI_FOO) in a similar way to the current handling of #ifndef _UAPI_FOO. Dave Martin (3): kbuild: install_headers.sh: Strip _UAPI from #if-defined() guards arm64/sve: ptrace: Fix SVE_PT_REGS_OFFSET definition arm64/sve: Disentangle from arch/arm64/include/uapi/asm/ptrace.h | 39 ++++++++++----------- arch/arm64/include/uapi/asm/sigcontext.h | 56 +++++++++++++++---------------- arch/arm64/include/uapi/asm/sve_context.h | 50 +++++++++++++++++++++++++++ scripts/headers_install.sh | 1 + 4 files changed, 97 insertions(+), 49 deletions(-) create mode 100644 arch/arm64/include/uapi/asm/sve_context.h -- 2.1.4 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel