Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp4925346ybl; Mon, 26 Aug 2019 19:00:06 -0700 (PDT) X-Google-Smtp-Source: APXvYqwgi3+MaMAMjpm1E6BJHJ2u3I+Ox+nBn7J+VpJYTxHTYHKaWIgNErhbVfd+nBXvBJ3uYgtG X-Received: by 2002:aa7:97b7:: with SMTP id d23mr24349112pfq.203.1566871206421; Mon, 26 Aug 2019 19:00:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1566871206; cv=none; d=google.com; s=arc-20160816; b=ShAGJpodsvSvx30RVo0d3jdfpfUBVPNUlCOdIL0jGrDwm1vxwHLSsGrbCueDfQAuES yAUYJbGjcIt2p3KIQG+LMmL4Z8PrB23JKE1Iu8hkIKJNZwH3rD1WYYL/fDSKiZyVJaMS FqUaDTKd4oab2PCCrO+NCSc/uq05ImPOmC/l6O2PslXzVE3kgU1V7CH9+WnBYFQoYLha BQv2zLxIDTHMmaSDRGCDdW0k9cr2ssykXF358qsjjLZaHUixBd7PZsoZojfwN+/xICJA RLzAyCDT8R4iQla7bibMTwqT/1r7hz+qCcaHBBQdiJRdivqbRWepIb0hqFkKsOjuFktn 3zyg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:content-transfer-encoding :content-language:accept-language:in-reply-to:references:message-id :date:thread-index:thread-topic:subject:cc:to:from:dkim-signature; bh=z+bPajNU3NgiGWlepe3Am9VgKE88jtNrKSsMqBenzlo=; b=Oz8Ic/k0VxY7bGKyw0ugSOrQgosKicbWU0BhK58p0lIacUkC8aNU9KTafyH5VkIDh6 mNfTUD8f09HsUwN3I4iV8JZkHCkt1MOOSXNdHWwO2ke1ahc3FCL4O/C2IFdkEAMuh89Q F03sjEs2Vosxl0VOC3vqW213niUx4VS+p2M7I+0GBT+r2a3bOjFUZVlEopej+uR+UPLi mmIsbZSNkosmcA+F1RcVNKxWyJRXbug/+h4K6Y04X14rKp9aZDrKiujRz8VJ5BkOdhiV eB8uqqk9TJhEOgLiAfRl5FU/LskI59JCmRUtwAsrCl9CTGKQxbOQj4duK1dbjRK0E0bb NS4g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@akamai.com header.s=jan2016.eng header.b=euls1GAh; 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; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=akamai.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id m127si10754613pgm.100.2019.08.26.18.59.50; Mon, 26 Aug 2019 19:00:06 -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=@akamai.com header.s=jan2016.eng header.b=euls1GAh; 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; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=akamai.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728543AbfH0B66 (ORCPT + 99 others); Mon, 26 Aug 2019 21:58:58 -0400 Received: from mx0b-00190b01.pphosted.com ([67.231.157.127]:14244 "EHLO mx0b-00190b01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727646AbfH0B66 (ORCPT ); Mon, 26 Aug 2019 21:58:58 -0400 Received: from pps.filterd (m0122330.ppops.net [127.0.0.1]) by mx0b-00190b01.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id x7R1v64g026922; Tue, 27 Aug 2019 02:58:37 +0100 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=akamai.com; h=from : to : cc : subject : date : message-id : references : in-reply-to : content-type : content-transfer-encoding : mime-version; s=jan2016.eng; bh=z+bPajNU3NgiGWlepe3Am9VgKE88jtNrKSsMqBenzlo=; b=euls1GAhGHFur2O3wBy2nvhiEfpfUW/qshrBY7lBEdRJbI7YKfxbVDVSc38PrPBzISEO hBQUU3EEPhQil4etzLoUQtx4AFZtFzx6qLpd6J1d01/lyuixU4lqPtw+1T4fY/TEYdX2 EsPfa53jx2LCsVYUc4EmhLL34MzuKHNyCSMNSLvmjaOwKzo3Jnd1KAtMKZuuRb2iGhpX +bFpvAzBHDurWfUwdYNMEXOwID/fdRD9kzUVjulCDu0d++GQmk7CluQHkRpUDmCAENeH oXNBNDB4RrwBB8hwnJABOmxQeyTThk8lzv/4Ycy8ldFUC2FWk6IPxzAL0qt1b65yzwvm zg== Received: from prod-mail-ppoint4 (prod-mail-ppoint4.akamai.com [96.6.114.87] (may be forged)) by mx0b-00190b01.pphosted.com with ESMTP id 2ujwd5j3mc-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 27 Aug 2019 02:58:37 +0100 Received: from pps.filterd (prod-mail-ppoint4.akamai.com [127.0.0.1]) by prod-mail-ppoint4.akamai.com (8.16.0.27/8.16.0.27) with SMTP id x7R1lcSj001158; Mon, 26 Aug 2019 21:58:36 -0400 Received: from email.msg.corp.akamai.com ([172.27.123.57]) by prod-mail-ppoint4.akamai.com with ESMTP id 2uk0k0bgba-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Mon, 26 Aug 2019 21:58:36 -0400 Received: from usma1ex-dag1mb6.msg.corp.akamai.com (172.27.123.65) by usma1ex-dag1mb6.msg.corp.akamai.com (172.27.123.65) with Microsoft SMTP Server (TLS) id 15.0.1473.3; Mon, 26 Aug 2019 21:58:35 -0400 Received: from usma1ex-dag1mb6.msg.corp.akamai.com ([172.27.123.65]) by usma1ex-dag1mb6.msg.corp.akamai.com ([172.27.123.65]) with mapi id 15.00.1473.005; Mon, 26 Aug 2019 21:58:35 -0400 From: "Lubashev, Igor" To: Arnaldo Carvalho de Melo , Mathieu Poirier CC: Linux Kernel Mailing List , Jiri Olsa , Alexey Budankov , "Peter Zijlstra" , Ingo Molnar , "Alexander Shishkin" , Namhyung Kim , Suzuki K Poulose , linux-arm-kernel , Leo Yan Subject: RE: [PATCH v3 3/4] perf: Use CAP_SYSLOG with kptr_restrict checks Thread-Topic: [PATCH v3 3/4] perf: Use CAP_SYSLOG with kptr_restrict checks Thread-Index: AQHVTS6ohXVeHma7aEyJ5mLyFs0geab7PiSAgAAMNACAAAEdgP//yqiwgAHfTwCAABf5AIAF9+gAgAASvOCAAYXjAIAJuzjg Date: Tue, 27 Aug 2019 01:58:35 +0000 Message-ID: References: <291d2cda6ee75b4cd4c9ce717c177db18bf03a31.1565188228.git.ilubashe@akamai.com> <20190814184814.GM9280@kernel.org> <20190814185213.GN9280@kernel.org> <23f7b8c7616a467c93ee2c77e8ffd3cf@usma1ex-dag1mb6.msg.corp.akamai.com> <20190815214236.GA3929@kernel.org> <3f70f6be3a464ca5b4cf563433933245@usma1ex-dag1mb6.msg.corp.akamai.com> <20190820171342.GD3929@kernel.org> In-Reply-To: <20190820171342.GD3929@kernel.org> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-exchange-transport-fromentityheader: Hosted x-originating-ip: [172.19.33.70] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:,, definitions=2019-08-26_08:,, signatures=0 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 mlxscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1906280000 definitions=main-1908270017 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:5.22.84,1.0.8 definitions=2019-08-26_08:2019-08-26,2019-08-26 signatures=0 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 malwarescore=0 mlxscore=0 clxscore=1015 priorityscore=1501 phishscore=0 mlxlogscore=999 bulkscore=0 adultscore=0 impostorscore=0 lowpriorityscore=0 spamscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-1906280000 definitions=main-1908270019 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, August 20, 2019 at 1:14 PM Arnaldo Carvalho de Melo wrote: > > Arnaldo, once we decide what the right fix is, I am happy to post the > update (options 1, 1+2) as a patch series. >=20 > I think you should get the checks for ref_reloc_sym in place so as to mak= e the > code overall more robust, and also go on continuing to make the checks in > tools/perf/ to match what is checked on the other side of the mirror, i.e= . by > the kernel, so from a quick read, please put first the robustness patches > (check ref_reloc_sym) do your other suggestions and update the warnings, > then refresh the two patches that still are not in my perf/core branch: >=20 > [acme@quaco perf]$ git rebase perf/core > First, rewinding head to replay your work on top of it... > Applying: perf tools: Use CAP_SYS_ADMIN with perf_event_paranoid checks > Applying: perf symbols: Use CAP_SYSLOG with kptr_restrict checks > [acme@quaco perf]$ >=20 > I've pushed out perf/cap, so you can go from there as it is rebased on my > current perf/core. >=20 > Then test all these cases: with/without libcap, with euid=3D=3D0 and diff= erent > than zero, with capabilities, etc, patch by patch so that we don't break > bisection nor regress, All done. I've posted the update as a new follow-up series: https://lkml.k= ernel.org/lkml/1566869956-7154-1-git-send-email-ilubashe@akamai.com/ rebase= d on your perf/core. I've tested 336 permutations (see the new cover). In particular, I was abl= e to reproduce the crash on perf/cap and confirm that no permutation can ca= use such crashes for any of the patches in the series. > Thanks and keep up the good work! >=20 > - Arnaldo - Igor