Received: by 2002:a25:f815:0:0:0:0:0 with SMTP id u21csp2250520ybd; Mon, 24 Jun 2019 03:18:36 -0700 (PDT) X-Google-Smtp-Source: APXvYqzm5+qqKHlXAsLArBHTZUY37AeVmfwW3AGzqFSToDL61Hx6ECtxWsZ+W/yZiz+fwo9lrhcc X-Received: by 2002:a63:d205:: with SMTP id a5mr31007557pgg.279.1561371515957; Mon, 24 Jun 2019 03:18:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1561371515; cv=none; d=google.com; s=arc-20160816; b=E2xBRnb49omG+wDdbeLpoj9AMHFhxdfSOJJx5nAD1BvPkDbVtVFOnmWH6Gt/h3/aXY 16nmnwCwhq7Zrih8MzpxZ5B9qlExVqnFMI+vSmI74Mgpg3g8nOAqko6+0kaaVfBB7X7r G0cDzn8QCNy7LQ8MhxpfDp27J4gH+8+Pl65UVTPP5z3wfpLExHTrhebJcaL5TVqTWmZP RoMQulS1uQUmmVqlcHJ/DKTAPebagoghnE8i56vTnWKYDJ+aXWSdBlvSRUDk81cra5RV eM/03yPT0pYFNhOe6FyvfM9v1xZxWts8347mOtjSy3oxz4UP3xpsJniA+5Sedec09Hw2 El/Q== 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=jfcYd18G0g/O2DBWGyqp5ZzFcIsbjblLtdKhuuB99vI=; b=ertEYUI9mlR9KW8wYnhWOs01Alh7cLjj2N2T6QDvrLvTZUBijLQOVdCzLD8MPyFJ2S FwWREvFrsMuOgiUx5xazgKzeFSU89iSCECMoM1OdhjTe17uNb2H+1FFLpUdTQD6xWLKU LWyXdAeSn1CB+Y20emQ8idLuFDbnobmHj1BlK1EEFdA1eADKqocrKLHhCyG+h7fETjtt RJqEC57QZyOpeo+x000HlSfkjD3YS2nZskyXWFLIbc8OpAjRJSRiBcQeP232SicFizHe 8S9KuebpIhFZs0fdXRcIMQrmA+ou/UzQfLYwzZ0BEAknpxUgwReKIpYYxxY03As4Pdm5 RaKw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=1vUXopQ0; 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 92si10835468plc.217.2019.06.24.03.18.20; Mon, 24 Jun 2019 03:18:35 -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=1vUXopQ0; 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 S1730948AbfFXKRW (ORCPT + 99 others); Mon, 24 Jun 2019 06:17:22 -0400 Received: from mail.kernel.org ([198.145.29.99]:54940 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730926AbfFXKRT (ORCPT ); Mon, 24 Jun 2019 06:17:19 -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 CFD15205C9; Mon, 24 Jun 2019 10:17:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1561371438; bh=s5a9uuW1oRpZyOUMrHNb36epUClYyXDFss5hfro8qpc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=1vUXopQ056/h59cEV1IXUmHtAvsXl7gxeBFVav9Cthp/DuGdoknDJEJrS6zfz9ygn GdhjnJh0u5KE28oceT/0yquDV4LSEeUTtY+/k+X+3wG9hgA9/4qSRASkLeSFNZFCOq uHIRc64xnQvYmyfY86xU8SrGJrUF2o0yZyX6/aTI= 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 5.1 102/121] arm64/sve: should not depend on Date: Mon, 24 Jun 2019 17:57:14 +0800 Message-Id: <20190624092325.925302207@linuxfoundation.org> X-Mailer: git-send-email 2.22.0 In-Reply-To: <20190624092320.652599624@linuxfoundation.org> References: <20190624092320.652599624@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 @@ -65,8 +65,6 @@ #ifndef __ASSEMBLY__ -#include - /* * User structures for general purpose, floating point and debug registers. */ @@ -113,10 +111,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) /*