Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp3288549pxk; Mon, 21 Sep 2020 09:46:39 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwRx/3Nkm28UoYn/K1o111gArVrU4iNkyr5zpSV8kFGw2uuFWaKkSVDJY5OUZSzZbaSX+1q X-Received: by 2002:a17:906:2552:: with SMTP id j18mr336602ejb.476.1600706799358; Mon, 21 Sep 2020 09:46:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1600706799; cv=none; d=google.com; s=arc-20160816; b=KMfVpDWxf1mutyobGxyYN4nlvrpSlyl+Bn/WcJGkqUqwgbymbgyWsSRaCWAT/6fQ9L sTe7OjcdZMWpr8Zm2Jc/X7zxzJfAebBAYKE4mgakKClfliIlRZvyEGM+B4OlwgSHWN8J m+0+KmAHUf0YQQE9li7UUuX/mxHCnXcose+/4gPNKn/xnuwf8HAnlXKv0z/WRJyrfUi/ U5Ufnal/CBTKQZmXNnnhmxSZ2HdM+hLFx/XjJBeFho4qo8KdD3G/QCLxg9IFdcrfBSpw RNcOeG1UCNX14Bq5kxL5QeV4HJhr/uiCDMjfYOfcI4FWsj+OSWUvH1wd+hBdi8HcR0rp M8cQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=GRHfY4YHFqq0PZFVE4Xb1OdR7Uvo3fSSDuxExvzvJh8=; b=NuPQWZpFlUvcKWwqQplXA6bMIoo5AO1wvKypoSB45lR/32TWw6+m5a6yVI8zeUQ2Ey VoWJFruf4u6XPcuT6m8f+9FcIug78GLmq7tMQ4k2FJSbbmiy7gDnl9bLRIflyDgu4CfZ oGOAHfbE9F10ONh6MMMN9jsLXnA+o2cpfIu6X27ZO1jlOLRq4fv6KiIUzK9HMM9JnUvZ gJ9QYxg12rTXwJULwZJ6NjEcSZOLSbOTFtHTTecnOQ0PyMriY6v5zVgvmXXWqzgC5oVn SH0bNtK9tTeiHa0ti/S2btskP1+KZQwM4g6cWgmcJ+mKNXc77zEsOOKETx6l2ZFac0HW sCsw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=q3lnc02h; 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=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id w4si8547259ede.468.2020.09.21.09.46.15; Mon, 21 Sep 2020 09:46:39 -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; dkim=pass header.i=@kernel.org header.s=default header.b=q3lnc02h; 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=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729005AbgIUQpW (ORCPT + 99 others); Mon, 21 Sep 2020 12:45:22 -0400 Received: from mail.kernel.org ([198.145.29.99]:50946 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729743AbgIUQpM (ORCPT ); Mon, 21 Sep 2020 12:45:12 -0400 Received: from localhost (83-86-74-64.cable.dynamic.v4.ziggo.nl [83.86.74.64]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id EBFF62399A; Mon, 21 Sep 2020 16:45:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1600706711; bh=ycVIKcfHuW1l9SRJXTqpu8EivAe91T0jHo0k/qpj5mU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=q3lnc02hNUwvXOnsuAsrDdQX6qJy+GDWutLc/32ktiv1nF2Q1qY73TsMADzffMQ84 ZJcvmCYd7MAVMt2/Sl+7/llezXtAtrkajf+3pWpoI7esPiI/JPAvcOyPch1PjYC4rN bxr9Qz7gmuoD+qcZhLnDpGp03JnW7Rxw5O8PQDHM= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Jiri Olsa , Arnaldo Carvalho de Melo , Alexander Shishkin , Michael Petlan , Namhyung Kim , Peter Zijlstra , Wang Nan , Sasha Levin Subject: [PATCH 5.8 056/118] perf test: Fix the "signal" test inline assembly Date: Mon, 21 Sep 2020 18:27:48 +0200 Message-Id: <20200921162038.947881580@linuxfoundation.org> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20200921162036.324813383@linuxfoundation.org> References: <20200921162036.324813383@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Jiri Olsa [ Upstream commit 8a39e8c4d9baf65d88f66d49ac684df381e30055 ] When compiling with DEBUG=1 on Fedora 32 I'm getting crash for 'perf test signal': Program received signal SIGSEGV, Segmentation fault. 0x0000000000c68548 in __test_function () (gdb) bt #0 0x0000000000c68548 in __test_function () #1 0x00000000004d62e9 in test_function () at tests/bp_signal.c:61 #2 0x00000000004d689a in test__bp_signal (test=0xa8e280 DW_AT_producer : (indirect string, offset: 0x254a): GNU C99 10.2.1 20200723 (Red Hat 10.2.1-1) -mtune=generic -march=x86-64 -ggdb3 -std=gnu99 -fno-omit-frame-pointer -funwind-tables -fstack-protector-all ^^^^^ ^^^^^ ^^^^^ $ Before: $ perf test signal 20: Breakpoint overflow signal handler : FAILED! $ After: $ perf test signal 20: Breakpoint overflow signal handler : Ok $ Fixes: 8fd34e1cce18 ("perf test: Improve bp_signal") Signed-off-by: Jiri Olsa Tested-by: Arnaldo Carvalho de Melo Cc: Alexander Shishkin Cc: Michael Petlan Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Wang Nan Link: http://lore.kernel.org/lkml/20200911130005.1842138-1-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo Signed-off-by: Sasha Levin --- tools/perf/tests/bp_signal.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tools/perf/tests/bp_signal.c b/tools/perf/tests/bp_signal.c index da8ec1e8e0648..cc9fbcedb3646 100644 --- a/tools/perf/tests/bp_signal.c +++ b/tools/perf/tests/bp_signal.c @@ -45,10 +45,13 @@ volatile long the_var; #if defined (__x86_64__) extern void __test_function(volatile long *ptr); asm ( + ".pushsection .text;" ".globl __test_function\n" + ".type __test_function, @function;" "__test_function:\n" "incq (%rdi)\n" - "ret\n"); + "ret\n" + ".popsection\n"); #else static void __test_function(volatile long *ptr) { -- 2.25.1