Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp1734507ybt; Thu, 18 Jun 2020 16:11:53 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwGKV74gblDTU2sK0U1Q55iQtmaAEz7f2CL661Pjt48V42ZPO19jUuHdRJnJRDbAAlZLl9V X-Received: by 2002:a17:906:e2d5:: with SMTP id gr21mr923012ejb.219.1592521913447; Thu, 18 Jun 2020 16:11:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1592521913; cv=none; d=google.com; s=arc-20160816; b=tVTuZvybnwLTtEy31kq7wesnDc8CQjKR/S5kaEljI06eIisjEwcesbTRucSZjV51LZ Cvn0a5OseNKzx0nBTp3ZknwJclTUkODpZNjM4BFQ2F47y/eX1CNvnNQqZCD3i4vgAFqx lE2kzKBIc0g3wvdEFXDA4jDToQl3iXhIda2XE/ks6AHQyOtaPlhy65lDvV/S3Y93Beq9 qgkqS5yeFrXjt7HygpBdEpAm68l/KfVshGdGc4qy6+ZwDnjO1rEyov2PkjQLpGKpxLDI Re2330J0YyfIGw11HRa2eDr9qF3NG6/Q0NHEv+Q113TqZ+6r7hDn0Os2T8lrbtie4w0A h+uA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :ironport-sdr:ironport-sdr; bh=FJxYhNXFbkPnj3gw0TBgbQ+b/jNPsAatHLmlpEe9OSs=; b=0nOSegXSSUtXUOg6dkqgxpuTHVNL0zUf8YkSMQc8UKSlMKRkt3a2x9XgTNBRSOVWDH kRvtQjWjLoGye4yFzSEfwFOnbY69MTbi2x+yXf8GL2dR5dT7tAW+9pYumgKsNiOaFyDz H8KlLTm4eUSLXu1q0lS8PQIkIW9XfGBTtIc8cF+E/m1WeBIGB4u33CM7uHy+DgBsI6Wr Xvp8SDsBSIir3uHwNI/6Y5IN0EK/Z89qoDIoHB+vqh7EVgtqGLVVz94MN6tDX/EgVDQp 44Tf38icbXt2ZTKt8ZFwgYsVqV/DGIMbXKvS2uxrmyXNMJUYm7/eHTkfWFRtKtYET9mI 7dhg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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. [23.128.96.18]) by mx.google.com with ESMTP id q7si2753245ejb.504.2020.06.18.16.11.30; Thu, 18 Jun 2020 16:11:53 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 S1730722AbgFRWf5 (ORCPT + 99 others); Thu, 18 Jun 2020 18:35:57 -0400 Received: from mga17.intel.com ([192.55.52.151]:3851 "EHLO mga17.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726835AbgFRWf5 (ORCPT ); Thu, 18 Jun 2020 18:35:57 -0400 IronPort-SDR: gaVE7B71bqR7IuBD5Ms5tlKGqQGRPhpfvMPRuDSKYOi5+rIaTpjPQlHc86bbRJlLmc6g6NBVme ch7iHLasTk/A== X-IronPort-AV: E=McAfee;i="6000,8403,9656"; a="122994596" X-IronPort-AV: E=Sophos;i="5.75,253,1589266800"; d="scan'208";a="122994596" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 18 Jun 2020 15:35:54 -0700 IronPort-SDR: tBl+yN1PD9XcwxdAGbq0xniZ49uCwAQ4ukB+smLqBDRoLXRsopap3LyS3IYK2v0YTFPormJYSz am0AUMiVKbVg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.75,253,1589266800"; d="scan'208";a="383661822" Received: from tassilo.jf.intel.com (HELO tassilo.localdomain) ([10.7.201.21]) by fmsmga001.fm.intel.com with ESMTP; 18 Jun 2020 15:35:55 -0700 Received: by tassilo.localdomain (Postfix, from userid 1000) id 6070F301B21; Thu, 18 Jun 2020 15:35:55 -0700 (PDT) Date: Thu, 18 Jun 2020 15:35:55 -0700 From: Andi Kleen To: Song Liu Cc: linux-kernel , Kan Liang , Alexander Shishkin , Josh Poimboeuf , Peter Zijlstra , Tejun Heo , Andrii Nakryiko , Francis Ricci Subject: Re: WARNING with LBR + precise_ip=2 + bpf_get_stackid() Message-ID: <20200618223555.GB793265@tassilo.jf.intel.com> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > We noticed that this only happens with precise_ip >= 2. This is caused by > setup_pebs_fixed_sample_data() using pens->real_ip: > > set_linear_ip(regs, pebs->real_ip); With precise_ip == 1 the IP will be one instruction behind. That's the only difference to 2 or 3. So something about the actual instruction confuses the unwinder. I would check if there is anything special about these IPs: > 0xfffffe00004d1f78 entry_SYSCALL_64 > 0xfffffe00004d1fa0 entry_SYSCALL_64 > 0xfffffe00004d1fd8 entry_SYSCALL_64 > > For our use case, we do need precise_ip=2. So we would like suggestions to fix the > warning and/or to avoid double fault. As a minimum, I would just add an && !in_nmi() to the warning. Clearly it doesn't make sense to print a warning that overflows the stack. -Andi