Received: by 2002:a25:d7c1:0:0:0:0:0 with SMTP id o184csp3742805ybg; Mon, 28 Oct 2019 18:33:08 -0700 (PDT) X-Google-Smtp-Source: APXvYqxkieQHe4S3KkGSstmCfRe618d2r4PakC5Em7RNsnXZ7ttbJOcMZ03oowWRR90bbhqnVkeI X-Received: by 2002:a05:6402:1006:: with SMTP id c6mr23058578edu.2.1572312787905; Mon, 28 Oct 2019 18:33:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1572312787; cv=none; d=google.com; s=arc-20160816; b=k6RR84/fhaL8/P6+ARgchHJk9Ede3vPsC904H2mcXIIxP0lorpO5n20euHS7+djVRh rfe72sPxMtxY1MJ6/qJun/OcWVWXMKzMFQY9kiMZ8IoaKY3knbgYdY4JBxkfRO4Celgc /JvlrsQHisuEWwNLgjZSC7eZhk5yeQcoTwixJoSk3Kn9+OWKkTYEAhtfbbvEEAZ/niqV kuRtiYg08L/aGwCmJjc3wT6zicd1rdWBEirF1tcuKQTuIgnqbK9L86Fl+eX7hs8UEa1t yGsIn8REV8m+bczRSAUniYT9oo1aQyYpGh9G+wna3POOzZt/Z1qIHmhFWXgH0KxAmgTp C+Vw== 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 :robot-unsubscribe:robot-id:message-id:mime-version:references :in-reply-to:cc:subject:to:reply-to:from:date; bh=+hu+UZ56xSzpkUHrYrSrmnKLIORi42zhsp01VdL2orQ=; b=qkiEsVbVdY81wvpqPKMY5mILTm4AcgjWa4YJZOi1WYPwRG5edCJAv7UzBguBdSiviv 5CExTWYVueGYoN3KUTwYB1hjcxdl/Mht/GCooLj0G6e7IihrbIirZ/Kbnfv9+acIxdMD DR2XaKWn0KYOR6OKszbuLfHVxFpuAjfFLkA6hqotT8BgdaSOkf8eY32W+uCyg56YWULk q5O+8utYW0tGtlFDjYOPBpj0Kw4kVFq5jg9effxO+I+RBuawb6hhJzRlPYfynobV7kJd vSL4wp8NdI7RBOCcT9nrvKo0pvOCBjX8MYBMc2DHBidQbwntf/9ziIOoZLXxY+pgjjMa Jyrg== 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 k39si9446538edb.99.2019.10.28.18.32.44; Mon, 28 Oct 2019 18:33:07 -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; 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 S2388597AbfJ1LmQ (ORCPT + 99 others); Mon, 28 Oct 2019 07:42:16 -0400 Received: from Galois.linutronix.de ([193.142.43.55]:44338 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388276AbfJ1LmE (ORCPT ); Mon, 28 Oct 2019 07:42:04 -0400 Received: from [5.158.153.53] (helo=tip-bot2.lab.linutronix.de) by Galois.linutronix.de with esmtpsa (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1iP3PB-0001GH-9V; Mon, 28 Oct 2019 12:41:49 +0100 Received: from [127.0.1.1] (localhost [IPv6:::1]) by tip-bot2.lab.linutronix.de (Postfix) with ESMTP id E718C1C047C; Mon, 28 Oct 2019 12:41:48 +0100 (CET) Date: Mon, 28 Oct 2019 11:41:48 -0000 From: "tip-bot2 for Alexander Shishkin" Reply-to: linux-kernel@vger.kernel.org To: linux-tip-commits@vger.kernel.org Subject: [tip: perf/urgent] perf/core: Start rejecting the syscall with attr.__reserved_2 set Cc: Alexander Shishkin , "Peter Zijlstra (Intel)" , Arnaldo Carvalho de Melo , Jiri Olsa , Linus Torvalds , Mark Rutland , Namhyung Kim , Stephane Eranian , Thomas Gleixner , Vince Weaver , adrian.hunter@intel.com, mathieu.poirier@linaro.org, Ingo Molnar , Borislav Petkov , linux-kernel@vger.kernel.org In-Reply-To: <20191025121636.75182-1-alexander.shishkin@linux.intel.com> References: <20191025121636.75182-1-alexander.shishkin@linux.intel.com> MIME-Version: 1.0 Message-ID: <157226290868.29376.3945306919973708358.tip-bot2@tip-bot2> X-Mailer: tip-git-log-daemon Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit X-Linutronix-Spam-Score: -1.0 X-Linutronix-Spam-Level: - X-Linutronix-Spam-Status: No , -1.0 points, 5.0 required, ALL_TRUSTED=-1,SHORTCIRCUIT=-0.0001 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The following commit has been merged into the perf/urgent branch of tip: Commit-ID: 8c7e975667fbc3b7c816119dd56104739899f125 Gitweb: https://git.kernel.org/tip/8c7e975667fbc3b7c816119dd56104739899f125 Author: Alexander Shishkin AuthorDate: Fri, 25 Oct 2019 15:16:36 +03:00 Committer: Ingo Molnar CommitterDate: Mon, 28 Oct 2019 11:01:59 +01:00 perf/core: Start rejecting the syscall with attr.__reserved_2 set Commit: 1a5941312414c ("perf: Add wakeup watermark control to the AUX area") added attr.__reserved_2 padding, but forgot to add an ABI check to reject attributes with this field set. Fix that. Signed-off-by: Alexander Shishkin Signed-off-by: Peter Zijlstra (Intel) Cc: Arnaldo Carvalho de Melo Cc: Jiri Olsa Cc: Linus Torvalds Cc: Mark Rutland Cc: Namhyung Kim Cc: Stephane Eranian Cc: Thomas Gleixner Cc: Vince Weaver Cc: adrian.hunter@intel.com Cc: mathieu.poirier@linaro.org Link: https://lkml.kernel.org/r/20191025121636.75182-1-alexander.shishkin@linux.intel.com Signed-off-by: Ingo Molnar --- kernel/events/core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/events/core.c b/kernel/events/core.c index bb3748d..aec8dba 100644 --- a/kernel/events/core.c +++ b/kernel/events/core.c @@ -10635,7 +10635,7 @@ static int perf_copy_attr(struct perf_event_attr __user *uattr, attr->size = size; - if (attr->__reserved_1) + if (attr->__reserved_1 || attr->__reserved_2) return -EINVAL; if (attr->sample_type & ~(PERF_SAMPLE_MAX-1))