Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp2405915imu; Fri, 14 Dec 2018 10:27:13 -0800 (PST) X-Google-Smtp-Source: AFSGD/X5eFZNWT0NLh9QWwx1Zl9iVaigdPt4N/f4LKsJHOZS66ojS5Y569Cvl/nfOByGmUuO1GIq X-Received: by 2002:a63:101:: with SMTP id 1mr3653029pgb.152.1544812033141; Fri, 14 Dec 2018 10:27:13 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1544812033; cv=none; d=google.com; s=arc-20160816; b=mszfxwSkVxZPi8M5oEOq+TGw2SE/04b203BUEX7w8dKxl/z88XY4VdpscY3/3VSD7E LgzqGvNHDAxEJJdMjIKt5KAWhDE6ZvSk0EZ0su8T/JGLIqj+mVetWlz4WyciwJ/PY60/ jk1Qr1gSNUD0urE+pOchFg+TVl1Pcl8U0jGARAymFNoaYhCzUYT5EKJQaRnlmIZ36QVl gR3A9Kjibg7i9SCacQx7qXlOVIRL2K0bJk15Ao+rCfRmQ9lZF2PgofhuGvvvIkhzl3oq KFp7PfDzlyj9Bev6JR/J61fX7afGfC2hMifxVKD8A9joltBy1Xu1I20D7gQ8YUcmZ1ms MjEA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=D+8/Vwosgk4dqv5RNskRcEy2IOE85TB2cW+NGOdeEjk=; b=XxnUlvAtPPtyZeIX8EP8gf3skPiAbSmtr4wzUrV7DwMSTawZ/i/S1RmmdxoUUP0kp9 i0/K3z839fxOOaJTfOVHyKoc0QgJEDRZ370cIYL/4XN1+2gCCZk/l5ChcMr0U4jQr78c aep5seYsx1EFWDFIB+3u4NRh5DAOunzZ7/lXmVJn0XH3Q6hd7yMq5y12KamP4U36Mr1F XVahfELgL4TqrOHt7e+O26QYu09h+MmkQZ7YpplaRmKpRUhQyUfgnOzI/M5XGn23qIoV 4sOfp+8T4sLO65VrwQN5/9EEOQmrbrgdXg2kbEquJ0ir9+4Cz7FDLc5cbMNgXe0YdsUh cAeg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id c4si4463648pfi.110.2018.12.14.10.26.53; Fri, 14 Dec 2018 10:27:13 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730492AbeLNSZX (ORCPT + 99 others); Fri, 14 Dec 2018 13:25:23 -0500 Received: from usa-sjc-mx-foss1.foss.arm.com ([217.140.101.70]:56170 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729752AbeLNSZW (ORCPT ); Fri, 14 Dec 2018 13:25:22 -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 50698EBD; Fri, 14 Dec 2018 10:25:22 -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 ESMTPSA id 1C1483F575; Fri, 14 Dec 2018 10:25:20 -0800 (PST) Date: Fri, 14 Dec 2018 18:25:18 +0000 From: Dave Martin To: Szabolcs Nagy Cc: "linux-arm-kernel@lists.infradead.org" , nd , Will Deacon , "linux-kernel@vger.kernel.org" , Alan Hayward Subject: Re: [PATCH 0/3] arm64/sve: UAPI: Disentangle ptrace.h from sigcontext.h Message-ID: <20181214182518.GH3505@e103592.cambridge.arm.com> References: <1544556407-19897-1-git-send-email-Dave.Martin@arm.com> <2abbbd29-cc87-a0ad-80b7-e2a1d039235e@arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <2abbbd29-cc87-a0ad-80b7-e2a1d039235e@arm.com> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Dec 14, 2018 at 06:13:33PM +0000, Szabolcs Nagy wrote: > On 11/12/2018 19:26, Dave Martin wrote: > > 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. > > > > thanks for doing this. > > the patches fix the gdb build issue on musl libc with an > additional gdb patch: > https://sourceware.org/ml/gdb-patches/2018-12/msg00152.html > (in userspace i'd expect users relying on signal.h providing > whatever is in asm/sigcontext.h.) > > i think sve_context.h could be made to work with direct include, > even if that's not useful because there is no public api there. > (and then you dont need the first patch) My general view is that if you want the sigframe types userspace should usually include and refer to mcontext_t. Because the prototype for sa_sigaction() specifies a void * for the ucontext argument, I've generally assumed that is not sufficient to get ucontext_t (or mcontext_t) (but maybe I'm too paranoid there). Non-POSIX-flavoured software might include directly. In glibc/musl libc will that conflict with , or can the two coexist? Cheers ---Dave