Received: by 2002:a25:f815:0:0:0:0:0 with SMTP id u21csp2245516ybd; Mon, 24 Jun 2019 03:13:25 -0700 (PDT) X-Google-Smtp-Source: APXvYqzZjMmS/QG6OQnjUdsCe4Wyye2935JyZoZ3RSK2rf7wIdd5cMbLL4DTW4cdjSkfJ6J5amJZ X-Received: by 2002:a17:902:2ac1:: with SMTP id j59mr74630764plb.156.1561371205027; Mon, 24 Jun 2019 03:13:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1561371205; cv=none; d=google.com; s=arc-20160816; b=xONGzy5V80k2mRjtDoVlGndwr0dToAyz8DJtCDtCokxxmne5F56tMYmJLYr/sHqjfu r9pZ36ti4o4/4lJ4mUXE2ucPg3Qki7pvyxp252/CHdRZPThk+AIe6gDLIuW6/Bu4Per5 4xC+V06Z2I3yUZbLj1vhSzEG39/9lBxS5pDj+c+t89IJQ56Me8oJy22gznbVIbqG7xHa /sNUHHwxqvjcqN56275dZsdzJy2DarmZnnpJXtNV64YEZnF7B/HBn8q8sY2876mdMkFU RrhXbvcSiT3u229OwNqYabULEEdSzJmHVd+zrEk0SkYN3xUQebD9uMuSKn+kJpN5qMlN El2w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=gVRZuMqrd9LtNC20hRMi6XdrEEA5Jl82JTZLSi94R5Y=; b=QykqSFx/XXexjKW54HFAvjX/oov8kchzqwNgAwlG+B//IJQ3RO3x3iEh3vWMBO1nmk mq+lvcwGoom5T8S5bL+TeekvuWQ/hHmuQFwO3goW0IDTON5CQ3zLKoHEEy4WSOsAAnYE mR39BfKTnvdbvlppEaNpyyCFrXyKHR3f7kponLT32c+cmjac7BskX8BtTZSt5t0o5JLc MFKKgNk1sLfYoaswSTF0tP/r2+7P6bjCzXSdajfLp6N6HSI1vJI4+e1Cvhz6OJngdZys nnqDSfh2u9ANwgYgg2wH3KGizXClzUSgLRFjSjpCM30MYDDVn2//zEkPSsnftOAdsvQa 5+ZQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=ej6siDs5; 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 5si10956782pfv.231.2019.06.24.03.13.09; Mon, 24 Jun 2019 03:13:25 -0700 (PDT) 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; dkim=pass header.i=@kernel.org header.s=default header.b=ej6siDs5; 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 S1729818AbfFXKF5 (ORCPT + 99 others); Mon, 24 Jun 2019 06:05:57 -0400 Received: from mail.kernel.org ([198.145.29.99]:37970 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728846AbfFXKFx (ORCPT ); Mon, 24 Jun 2019 06:05:53 -0400 Received: from localhost (f4.8f.5177.ip4.static.sl-reverse.com [119.81.143.244]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id D11D32145D; Mon, 24 Jun 2019 10:05:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1561370752; bh=J3lk6Rg+8MdhODyh01OhUMDKDNclpoK0P14pEu19wDc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ej6siDs5ms4gJ0R5tFjBZpR9fTcz7JP8V3LsqQTnjLcwcZ4uy7r5j1VGh6fsJ55Sr ikFEJbxep1L5hbyhbMrn0SGVAXKlScfBLAusi5t6uzdECFwUijZzpYE51/RiRK/7IX 20OF1zoT+QPBQ2/4ZXLQDICT5jxobQG4HTE3pEIs= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Dave Martin , Anisse Astier , Will Deacon Subject: [PATCH 4.19 77/90] arm64/sve: should not depend on Date: Mon, 24 Jun 2019 17:57:07 +0800 Message-Id: <20190624092319.002811331@linuxfoundation.org> X-Mailer: git-send-email 2.22.0 In-Reply-To: <20190624092313.788773607@linuxfoundation.org> References: <20190624092313.788773607@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Anisse Astier commit 35341ca0614ab13e1ef34ad4f29a39e15ef31fa8 upstream. Pulling linux/prctl.h into asm/ptrace.h in the arm64 UAPI headers causes userspace build issues for any program (e.g. strace and qemu) that includes both and when using musl libc: | error: redefinition of 'struct prctl_mm_map' | struct prctl_mm_map { See https://github.com/foundriesio/meta-lmp/commit/6d4a106e191b5d79c41b9ac78fd321316d3013c0 for a public example of people working around this issue. Although it's a bit grotty, fix this breakage by duplicating the prctl constant definitions. Since these are part of the kernel ABI, they cannot be changed in future and so it's not the end of the world to have them open-coded. Fixes: 43d4da2c45b2 ("arm64/sve: ptrace and ELF coredump support") Cc: stable@vger.kernel.org Acked-by: Dave Martin Signed-off-by: Anisse Astier Signed-off-by: Will Deacon Signed-off-by: Greg Kroah-Hartman --- arch/arm64/include/uapi/asm/ptrace.h | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) --- a/arch/arm64/include/uapi/asm/ptrace.h +++ b/arch/arm64/include/uapi/asm/ptrace.h @@ -64,8 +64,6 @@ #ifndef __ASSEMBLY__ -#include - /* * User structures for general purpose, floating point and debug registers. */ @@ -112,10 +110,10 @@ struct user_sve_header { /* * Common SVE_PT_* flags: - * These must be kept in sync with prctl interface in + * These must be kept in sync with prctl interface in */ -#define SVE_PT_VL_INHERIT (PR_SVE_VL_INHERIT >> 16) -#define SVE_PT_VL_ONEXEC (PR_SVE_SET_VL_ONEXEC >> 16) +#define SVE_PT_VL_INHERIT ((1 << 17) /* PR_SVE_VL_INHERIT */ >> 16) +#define SVE_PT_VL_ONEXEC ((1 << 18) /* PR_SVE_SET_VL_ONEXEC */ >> 16) /*