Received: by 2002:a25:7ec1:0:0:0:0:0 with SMTP id z184csp4676087ybc; Fri, 15 Nov 2019 08:20:00 -0800 (PST) X-Google-Smtp-Source: APXvYqyVI3Pbyn6ssF9E0LhfmqfygyxTwqv4vtnyZ+BSNi7oeZj6nB4lqysQj6pfQrXZ5mQU17aa X-Received: by 2002:a1c:814b:: with SMTP id c72mr16271137wmd.167.1573834800273; Fri, 15 Nov 2019 08:20:00 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1573834800; cv=none; d=google.com; s=arc-20160816; b=gS4xfQ8YQjHr4yfLqV+mkERb3O+k2UrxXSiniv2iZ0eEP8GqVA3sRzomBm7xuDObMZ y3kER8fWztsirSUn/W+lvsYWQ43Me4Xfzhco0DalIewXC96Lw8/z/UcXqF7/kS5cc6XU iFCy0KYl8urslDbfgVU1ZgcSvZdKRhyt34bNQawrAdPA9UFA3fFRd7Uo5iwh073xz6ZN w6+ZsAOoljluxX40b/gVEo0Ut9VLu2999iJEE+d+aYP2pTPJY4fyak/ouYfPKicU+uvX eEzjPicyEEODwK261DliLGRheJp4RKp2mktA66W5UpCbxL6nWvj95lEXxrHfeH8rA5xw 4RJg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:message-id:date:references :in-reply-to:subject:cc:to:from; bh=0o29X3n2tw30KCGofzcZi4GY8Qv4/OV8Ef3s40kXmo4=; b=LjynAxj8Z02eF0fPTStxhsqObR3B/WUF+94/gIpETPnoaxa1WjJa2jYt0w9K2W9263 vLKcX+Lvh7/zwDDTlipsrQq2uHcY6vXvgJUWL3Vy+aQeu45yu7g66D8OftaHbMI3Q3wz jmHwVJjLn/w0FNlrkJrhHufEDSjmGp4k3KL4/g6sQ/qqgvt+ASDWK92WvIFEpZGg7Kzr sPS12SQQ8QIuMjRxbYcfIvWwiyXr9MW/OuTJSIi/wzWgAU8ZeShnzhtOd1b0Wb97yw82 xA3L9msgUPEQgGTVkDunr413LMjirKnfzLZor3faZPcikqQ5x9Z1GNQqYfTOcwc0YKOr 60RA== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id l40si6971240edb.432.2019.11.15.08.19.35; Fri, 15 Nov 2019 08:20:00 -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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727813AbfKOQRk (ORCPT + 99 others); Fri, 15 Nov 2019 11:17:40 -0500 Received: from mga07.intel.com ([134.134.136.100]:12461 "EHLO mga07.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727799AbfKOQRi (ORCPT ); Fri, 15 Nov 2019 11:17:38 -0500 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga008.jf.intel.com ([10.7.209.65]) by orsmga105.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 15 Nov 2019 08:17:37 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.68,308,1569308400"; d="scan'208";a="199242713" Received: from um.fi.intel.com (HELO um) ([10.237.72.57]) by orsmga008.jf.intel.com with ESMTP; 15 Nov 2019 08:17:34 -0800 From: Alexander Shishkin To: Peter Zijlstra Cc: Ingo Molnar , linux-kernel@vger.kernel.org, tmricht@linux.ibm.com, alexander.shishkin@linux.intel.com Subject: Re: [PATCH] perf: Fix the mlock accounting, again In-Reply-To: <20191115160818.6480-1-alexander.shishkin@linux.intel.com> References: <20191115160818.6480-1-alexander.shishkin@linux.intel.com> Date: Fri, 15 Nov 2019 18:17:34 +0200 Message-ID: <878sohdsgx.fsf@ashishki-desk.ger.corp.intel.com> MIME-Version: 1.0 Content-Type: text/plain Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Alexander Shishkin writes: > Commit > > 5e6c3c7b1ec2 ("perf/aux: Fix tracking of auxiliary trace buffer allocation") > > tried to guess the correct combination of arithmetic operations that would > undo the AUX buffer's mlock accounting, and failed, leaking the bottom part > when an allocation needs to be changed partially to both user->locked_vm s/changed/charged/