Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp2385035imu; Thu, 10 Jan 2019 13:15:09 -0800 (PST) X-Google-Smtp-Source: ALg8bN4gotw9HDOS6iUBsP0EGPiVGnyuyhbim3+G88j2HURDj6HIS1aTeJ65OUENmj/mYaSTfFs2 X-Received: by 2002:a63:9b11:: with SMTP id r17mr10929541pgd.416.1547154909855; Thu, 10 Jan 2019 13:15:09 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1547154909; cv=none; d=google.com; s=arc-20160816; b=qFHoNYLp8Uytm2e0mHS6p7+Ly1kC+g2SKvaUVJqXRMnG1AK5V3D0FDY98LyuiMGoJJ DY6kPk96Gm6M1QYc1jyu7AzLWbz7y4Jv9cJf8ps2tvglxxShxavsiOT7XuXtgW1Bbdj3 Bjn3DW39Lu1roxK3yrLdlXj+16tKan8gKLUoO8Dmhla7g0Hs57CEYHFKC1CuxTTko4n5 MoszTlAjfit4NRdFaDmKI3llXou0sW7a4EeRrucMrIvEHvY2jhFnn1NPG+rmusBmEmHT EpaSi/qCNnyW3kdaiMdj7doWezijHVqEhwqCNKeFir3GpWY+7EtP0QviPZ2cTznUPBHC An8w== 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=zZz6iFxFd0zHVciM6mZTeJ3dcHBk0+YQR+R9eHIq71M=; b=MYs1PDMjnP/TjXfRLtuLSmgoQtKvLaVl6bFS9FWQgFwaP+s6mp4jQlhJuPEUBOPYDv 8c+WxxTBNj0VFzxn0so0s/6S8hMAe3XiLJJB+OHoYYvflrCs2ev+VBkhq69bSuRv8PT4 Q4IkLYK7cNPazG02t4I8qsEN0DPSECquP2vZceYrktwUjV4gJ7rKzKUQATSZoynhcsZQ Ee55XYTeQEGGYzO/sV+0z1cV89y38sqyw9LGEaQ0Sfn2FPEhBJtn5lMC+j2T+cdSqZEl t+JifTh8TFLGmAWPG7shvErqC5iudUxzIJmO6lYfHe5oaoOJ/Mh297nqQ8turkaN3Gv8 J6Ww== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@maine.edu header.s=google header.b=Mfxapa+m; 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 g1si642103pgu.149.2019.01.10.13.14.55; Thu, 10 Jan 2019 13:15:09 -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=Mfxapa+m; 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 S1728064AbfAJUAQ (ORCPT + 99 others); Thu, 10 Jan 2019 15:00:16 -0500 Received: from mail-qt1-f196.google.com ([209.85.160.196]:39103 "EHLO mail-qt1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726242AbfAJUAQ (ORCPT ); Thu, 10 Jan 2019 15:00:16 -0500 Received: by mail-qt1-f196.google.com with SMTP id u47so15065865qtj.6 for ; Thu, 10 Jan 2019 12:00:15 -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=zZz6iFxFd0zHVciM6mZTeJ3dcHBk0+YQR+R9eHIq71M=; b=Mfxapa+mz3Nh1ecJCPgldeskv/PAxvmTX6s6tHxIQeuoki+/JbkquSTQ3FcjKznlJC o151a6O399J9bkqSh3XpDi9tK/lPAXO1YlBTgz3TMfj3J5YamcUUBHii3IZ8rT8Gn3PF KnFGxd7r4exHkb45NEGVuAcajWS7WVTAtLX/0= 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=zZz6iFxFd0zHVciM6mZTeJ3dcHBk0+YQR+R9eHIq71M=; b=NhxzwjDaI0LveWocqBN332kpm1eCLdbBlQcRFGa4WD3VSlo+YRTvbx3mc3FtGP7Qby ILZqCgVz0Pa1KnDrB2/cy5CG0J4A08sZ+Sqq0gDA9PKxYMeq/75JuflxnPJ8yxtxHFJ0 /b9bJQrClBbdXsKnkzHqb4ledz9m53+4bPJcoq4iIv0b8cX+JkWC5ZywZOZWMZmGaZnu IgLYAq5uPGhbAtex0q2Q4gCN5dTCqD+3tO2dnUpkHgQMJf166EUN+OwBVNp8oEq3vzga UugfORRjf8sLoyQg2qOpwuOQn8+c+DRHDqauMKL3aP3WSwJac9oeovHtX68akMUsfcip shXQ== X-Gm-Message-State: AJcUukdBUmZAPa15f+l6BRBssmcXmOemLkPkL4/0PZqGVu8NAUZD1k3x Vo9WNBbB6ghmirWJmmDmYnLjMg== X-Received: by 2002:aed:36c1:: with SMTP id f59mr10998453qtb.250.1547150415518; Thu, 10 Jan 2019 12:00:15 -0800 (PST) Received: from macbook-air (weaver.eece.maine.edu. [130.111.218.23]) by smtp.gmail.com with ESMTPSA id 32sm51810396qto.55.2019.01.10.12.00.14 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 10 Jan 2019 12:00:14 -0800 (PST) From: Vince Weaver X-Google-Original-From: Vince Weaver Date: Thu, 10 Jan 2019 15:00:11 -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: > 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 and that was a cut-and-paste error, I meant tests/rdpmc/rdpmc_attach_global_cpu and I was wrong, it does affect AMD machines too. Vince