Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp2330331imu; Thu, 10 Jan 2019 12:13:32 -0800 (PST) X-Google-Smtp-Source: ALg8bN4N+RIcwdkjBn/sRYpG8dgom43dCP7EuXBr/EhcfuyEyCNqcADksl0BQzPRB5I0HJiqxcqi X-Received: by 2002:a63:981:: with SMTP id 123mr10723400pgj.444.1547151212591; Thu, 10 Jan 2019 12:13:32 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1547151212; cv=none; d=google.com; s=arc-20160816; b=El/zyYQGN0qJNJF/W7u4YGFDuQ7TAwCrt0m4Ol8Cw7LHYiIwfFfvjS3n9TjNJ9N4bw S6CUuo/NOBlHPnJRb8BbPpFs1iVT6R4R+ADiDCRPCF7v3OuNw+VH1/3yTT0ohW0kO7pL sgzuRolr+7GxTOVE34ivGt3YO4yPAQISNytAX27PixvWJyo1gYzFcfNq9AOS20/LOI7I LhzR4DCR0gpczLv2/frS83oel4MEWTIonQPOOUD+8tnUdNcuC2/2pkRD564uMuRloaFJ C4u4yC2Q6b728iCg+tNwq17oAELwXDpmfZ1Qkkv5HT+G5Jb6JiHpV5brLFvjL4g054WS FlOA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :message-id:in-reply-to:subject:cc:to:date:from:dkim-signature; bh=AG6V4lRzJB107s+d99RRgxHAzIRM6UdIwyiG3MNrIGE=; b=zxjovubhLv7f5hr81p78ANOQqiBe+4ddpBoGF3daMZQ7AQFm7BukPm3OqbIIwvRJ8T FIy5JnF99RoJ51LZ7M/OYQVdy4OxwF42apRZJTmOE+86OaBBzjI/NLCMpwyBsY4rgS9Q qUsbuBPz+EyK0rjzi611oJ8MAR8uGbmgc7bFmmFYOhUBRfkMqiOgqnB6IkOCTJytyMNQ g01kfQM844CDxVJxywmBbyfUY3S+VAUzvUDCTJPOJeOvTCyzh0KNzqWRI5AvclW69sQ9 5AaSd4Zv9ZA9l5t6oahgW90T4fuO1gbw3JePglNUXysYZz2tb6nvgNhPTNmmMGbyUx4f D8Rw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@maine.edu header.s=google header.b="GX/Xho8Z"; 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 bh5si6342726plb.42.2019.01.10.12.13.17; Thu, 10 Jan 2019 12:13:32 -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; dkim=pass header.i=@maine.edu header.s=google header.b="GX/Xho8Z"; 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 S1730612AbfAJRu4 (ORCPT + 99 others); Thu, 10 Jan 2019 12:50:56 -0500 Received: from mail-qt1-f169.google.com ([209.85.160.169]:34590 "EHLO mail-qt1-f169.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729480AbfAJRu4 (ORCPT ); Thu, 10 Jan 2019 12:50:56 -0500 Received: by mail-qt1-f169.google.com with SMTP id r14so14326320qtp.1 for ; Thu, 10 Jan 2019 09:50:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=maine.edu; s=google; h=from:date:to:cc:subject:in-reply-to:message-id:references :user-agent:mime-version; bh=AG6V4lRzJB107s+d99RRgxHAzIRM6UdIwyiG3MNrIGE=; b=GX/Xho8Zvxg8LB0OqwvGMI/+gjIWobqV5CbVTN/R9p/CliA/KjJ0i2ymVGlfVbHDOU Bw47V5F3hbtkfvTI8YRAHKlc7tDum4MSKw1Xd4GCNOyCnp74Fp8jD/rjupVCZNreuA7H 2Z34d+zea62sx4mbK3GEBaZ99nooxQqMVrnXM= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:date:to:cc:subject:in-reply-to:message-id :references:user-agent:mime-version; bh=AG6V4lRzJB107s+d99RRgxHAzIRM6UdIwyiG3MNrIGE=; b=psUhb25sWNU/Nl/+Y2dswBbfNAUxhmIsE8WMMWd9EuJtxWAE9rtJokc11dP+RV6DX7 8BrB5Lfi4cdCtL7b9wqR24glxOFlpl0rNHP3BEN9N/cLsp6W/xWwGUvuL6NXkbb11TBq Nl9qG+cnBlaBpqR6jccfGWmcKfZFQSkZSf+J1JpOp4HFs1igp8Gx+u3XCoD37Rvmc3+5 yZ26/Vcz7WbfxXPHvRd5Vk4k3/U02C5BFVwq7nWKId3x0sH2+aiTrwUvCvqVWnY9PaZh 6mN6kckhxdPvhvYNBFX840mEvxQpZJ73ILH5lpQCViGEbGA35YkscDZjoC9LnuwDGDKU DKZw== X-Gm-Message-State: AJcUuke5tgQePwM7+wncIjrylUJFFSwXuOkMCL2MgESTNNscH0eWb6qW YqGZC9P6ZIQH31NjShlqLq79MQ== X-Received: by 2002:a0c:d2f7:: with SMTP id x52mr10710778qvh.35.1547142655542; Thu, 10 Jan 2019 09:50:55 -0800 (PST) Received: from macbook-air (weaver.eece.maine.edu. [130.111.218.23]) by smtp.gmail.com with ESMTPSA id z8sm45990322qth.34.2019.01.10.09.50.54 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 10 Jan 2019 09:50:54 -0800 (PST) From: Vince Weaver X-Google-Original-From: Vince Weaver Date: Thu, 10 Jan 2019 12:50:53 -0500 (EST) X-X-Sender: vince@macbook-air To: Peter Zijlstra cc: linux-kernel@vger.kernel.org, Ingo Molnar , Arnaldo Carvalho de Melo Subject: Re: perf: rdpmc bug when viewing all procs on remote cpu In-Reply-To: Message-ID: References: User-Agent: Alpine 2.21 (DEB 202 2017-01-01) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 10 Jan 2019, Vince Weaver wrote: > However if you create an all-process attached to CPU event: > perf_event_open(attr, -1, X, -1, 0); > the mmap event index is set as if this were a valid event and so the rdpmc > succeeds even though it shouldn't (we're trying to read an event value > on a remote cpu with a local rdpmc). For a test case, try the tests/rdpmc/rdpmc_attach_other_cpu test found in my perf_event_tests suite git clone https://github.com/deater/perf_event_tests I can trigger it with current git on an intel machine, but not on an AMD machine. Possibly because it is defaulting to one of the fixed counter slots? Vince