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 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 07B16C433EF for ; Tue, 18 Jan 2022 11:20:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=yfqNExYfXxgOXd/4wpJW9t8Ae7XF3L8zFSP9Kqsrg4s=; b=z9WDn9sqp1xTOa O5dadwGACTCOzcy71+gpaoumRdb+WxfeWybxr9OR6KSxZhwQK94MoRnnKzRz/5aej6TgyemNbuXSU 6ylZroo83GszQtKXTZ/z6ZxcynJm9eZTJF9ixHvKFMnGBXhv3S553FdzD3z2qKz8aUv2TJq/Y17GI u46eUQn4jArSjg5Isfx0rC3aXJYAp8woKHBgj0D7KnqlsB0cLaLJh7xMaZ2vzlkCnxMI9HgDTC+fk 3EmXpd/gPFZqH04g0uxfy1Q6xG3W96vXEXTHdRvP26Ffdj69/lquJ0gLZncX7bWni00Xdi1M5C8Mc jwBriBZrVO+azAV17iLg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1n9mVy-001HQt-Ao; Tue, 18 Jan 2022 11:19:02 +0000 Received: from mail-ed1-x52c.google.com ([2a00:1450:4864:20::52c]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1n9mVu-001HQF-Eu for linux-arm-kernel@lists.infradead.org; Tue, 18 Jan 2022 11:19:00 +0000 Received: by mail-ed1-x52c.google.com with SMTP id t24so77809951edi.8 for ; Tue, 18 Jan 2022 03:18:58 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=dXkKY9TV5jKPRQS8npjT2kmqtGeprtOApiCdkfgYiBA=; b=RaqI3KHqXcZqT1HWbCc0QERICwhfSItlAf6p615a9aV9FK4gtZloTjvE/aMk0xre// QG5neM7zOxKc0gFZcPnY6KDQ8EnpFbkN+BymjejeISvbcCjp+OMzu+vWfNkL9lEx8z09 oMZNi53pbX0GAE2fgZ7eyihjD/lWTJBEvLyyuSs3ysA/HXTU3r16HTa13jXPTcxM+kq+ 5NjdSp5PP8U7O7pepfz+7rS0WGGyRbZpsYF4B1KDlzQ8Do/UgWjbcIKn2lXu+tCDNBoC U/tIm2ZqfKw5WmJ1K7IwJTCMydISJXfcRSBlv/r2mxpLy2Tv2yjiOxmqX4/TMP8LfzVJ t/dQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=dXkKY9TV5jKPRQS8npjT2kmqtGeprtOApiCdkfgYiBA=; b=WehSHGbrE4SaGFDOJUv7tYyIzaaIGgP1wLdtHUR/b9QLsFefk8Y3rTTzsGh4XlYm14 uafECyGWEoawQNjpYe+ch4j4hE1Ii3tNSSS8FmJXqCJ591YEN/IHzweQF6kDMofYHSBi 9OTStBtgfYIpvKmAFx11smJYOdOyvzP0pWTaEfx3TPmyRW93SY9Ot6Pz1kemO5f2XIih LqbAxB7PiAYkyuFBN33tIVwCIxFxUT+HXhXXx67ZXgRNWnAOxr1t/t5AAQSQDCFWDsBn Coq614SGoTPyc9yB2R8wvSphVhug/3DlSzb4eNn0TxrcInnB3PJqtUNk5Zym+ApgYkSQ qZMg== X-Gm-Message-State: AOAM531SwdmGYEUVJcH5OJsuwJuOvKBxCMU0Wrb1jxvENUyuKi/AV7DB GzzGKiPXd/iRi33kEqfPB0qjVA== X-Google-Smtp-Source: ABdhPJxyP3fn57xchwb8RYb//nVXkLqwMxgKnviK20rQSEkF8U4GquITBii9dwbD2lb1qcYRUKGWzw== X-Received: by 2002:a17:907:160c:: with SMTP id hb12mr9439119ejc.652.1642504736785; Tue, 18 Jan 2022 03:18:56 -0800 (PST) Received: from leoy-ThinkPad-X240s ([104.245.96.239]) by smtp.gmail.com with ESMTPSA id h2sm5267548ejo.169.2022.01.18.03.18.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 18 Jan 2022 03:18:56 -0800 (PST) Date: Tue, 18 Jan 2022 19:18:49 +0800 From: Leo Yan To: John Garry Cc: Marco Elver , Thomas Richter , linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org, acme@kernel.org, svens@linux.ibm.com, gor@linux.ibm.com, sumanthk@linux.ibm.com, hca@linux.ibm.com, Will Deacon , Mark Rutland , "linux-arm-kernel@lists.infradead.org" Subject: Re: [PATCH] perf test: Test 73 Sig_trap fails on s390 Message-ID: <20220118111849.GB98966@leoy-ThinkPad-X240s> References: <20211216151454.752066-1-tmricht@linux.ibm.com> <90efb5a9-612a-919e-cf2f-c528692d61e2@huawei.com> <20220118091827.GA98966@leoy-ThinkPad-X240s> <46d27f58-7732-3359-e0aa-090468a1cb22@huawei.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <46d27f58-7732-3359-e0aa-090468a1cb22@huawei.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220118_031858_555405_AEAF52CD X-CRM114-Status: GOOD ( 25.42 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Hi John, On Tue, Jan 18, 2022 at 10:20:37AM +0000, John Garry wrote: [...] > > static int test__sigtrap(struct test_suite *test __maybe_unused, int subtest __maybe_unused) > > { > > ... > > > > if (!BP_SIGNAL_IS_SUPPORTED) { > > pr_debug("Test not supported on this architecture"); > > return TEST_SKIP; > > } > > > > ... > > } > > > > Since we have defined BP_SIGNAL_IS_SUPPORTED, I think we can reuse it at > > here. > > > Do you know any other architectures which would have this issue? Or a > generic way to check for support? > > It's better to not have to add to this list arch-by-arch.. Yeah, it's ugly to add archs one by one. But I don't find an ABI can be used to make decision if an arch supports signal handler for breakpoint. Usually, it's architecture specific operations for signal handling, see the code [1]; simply to say, architecture needs to disable single step when call signal handler and restore single step after return from signal handler. [1] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/arch/x86/kernel/signal.c#n830 > > > And fails on my x86 broadwell machine: > > > > > > john@localhost:~/kernel-dev2/tools/perf> sudo ./perf test -v 73 > > > 73: Sigtrap : > > > --- start --- > > > test child forked, pid 22255 > > > FAILED sys_perf_event_open(): Argument list too long > > > test child finished with -1 > > > ---- end ---- > > > Sigtrap: FAILED! > > > john@localhost:~/kernel-dev2/tools/perf> > > It is a bit suprise for the failure on x86, as I remembered x86 platform > > can support signal handler with hw breakpoint. And from the error > > "Argument list too long", it should be a different issue from other > > archs. > > Yeah, I don't know what's going on here. Seems to there have incompatible issue. Maybe you could cleanup with "make clean" and then rebuild perf. Thanks, Leo _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel