From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-10.1 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,INCLUDES_PATCH,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9DE4BC43461 for ; Fri, 11 Sep 2020 17:21:47 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 6BE69221E5 for ; Fri, 11 Sep 2020 17:21:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1599844907; bh=B5nGxnErGh1r8YyExELOWBICSXKy+pFrUq+YDarDgT0=; h=From:To:Cc:Subject:Date:List-ID:From; b=sSjegKyAoOehbG+zV2W6RDulPpaCSjT0s1gs3f5QJhTlUQQpcUgxO51wgvd5krEV4 XOxv6jRmDBASQRcUIAOWg6CrFGeHejQw0hJge2mk6GucoKXMHbnzxva1zL/1V/1z5h FL8OoQZY5x1IixORGDnLlD72GrphRqcnndX9zDKQ= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726088AbgIKRVo convert rfc822-to-8bit (ORCPT ); Fri, 11 Sep 2020 13:21:44 -0400 Received: from us-smtp-delivery-1.mimecast.com ([205.139.110.120]:51147 "EHLO us-smtp-1.mimecast.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726029AbgIKNA3 (ORCPT ); Fri, 11 Sep 2020 09:00:29 -0400 Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-436-XoifVDoTPOmy5KbhGZ_S1g-1; Fri, 11 Sep 2020 09:00:10 -0400 X-MC-Unique: XoifVDoTPOmy5KbhGZ_S1g-1 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 73B9B107B272; Fri, 11 Sep 2020 13:00:08 +0000 (UTC) Received: from krava.redhat.com (unknown [10.40.192.120]) by smtp.corp.redhat.com (Postfix) with ESMTP id 13EDE75136; Fri, 11 Sep 2020 13:00:05 +0000 (UTC) From: Jiri Olsa To: Arnaldo Carvalho de Melo Cc: Wang Nan , lkml , Peter Zijlstra , Ingo Molnar , Namhyung Kim , Alexander Shishkin , Michael Petlan Subject: [PATCH] perf test: Fix signal test inline assembly Date: Fri, 11 Sep 2020 15:00:05 +0200 Message-Id: <20200911130005.1842138-1-jolsa@kernel.org> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=jolsa@kernel.org X-Mimecast-Spam-Score: 0.0 X-Mimecast-Originator: kernel.org Content-Type: text/plain; charset=WINDOWS-1252 Content-Transfer-Encoding: 8BIT Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 Fixes: 8fd34e1cce18 ("perf test: Improve bp_signal") Signed-off-by: Jiri Olsa --- 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 da8ec1e8e064..cc9fbcedb364 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.26.2