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=-0.6 required=3.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=no 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 7D19DC35249 for ; Wed, 5 Feb 2020 05:29:32 +0000 (UTC) Received: from lists.ozlabs.org (lists.ozlabs.org [203.11.71.2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 0E0F72085B for ; Wed, 5 Feb 2020 05:29:31 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=ellerman.id.au header.i=@ellerman.id.au header.b="NEJfQNyk" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 0E0F72085B Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=ellerman.id.au Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=linuxppc-dev-bounces+linuxppc-dev=archiver.kernel.org@lists.ozlabs.org Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 48C99P5mrDzDqQk for ; Wed, 5 Feb 2020 16:29:29 +1100 (AEDT) Received: from ozlabs.org (bilbo.ozlabs.org [203.11.71.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 48C97c5YYNzDqKf for ; Wed, 5 Feb 2020 16:27:56 +1100 (AEDT) Authentication-Results: lists.ozlabs.org; dmarc=none (p=none dis=none) header.from=ellerman.id.au Authentication-Results: lists.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=ellerman.id.au header.i=@ellerman.id.au header.a=rsa-sha256 header.s=201909 header.b=NEJfQNyk; dkim-atps=neutral Received: from authenticated.ozlabs.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mail.ozlabs.org (Postfix) with ESMTPSA id 48C97c0xQ7z9sSR; Wed, 5 Feb 2020 16:27:56 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ellerman.id.au; s=201909; t=1580880476; bh=fDcXTa4erO0JmEY8maPRVXIJtal56B9tg1k6mw1Wulk=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=NEJfQNykW0bZ/CzXUz0B/Zb/z7lL6+OZ7QAOOlRLFFkqS4t/l13kit/VPOhu1KqTK FQIHp54tQrEnhK79k54EyPTOjHDdJO+nOgJtd5xXmuS8EoAU1t6fUraUMfwJsTGsu7 y6RaUPQrshDAeTxNeu0oqWRh53ekoYwmtFtCQOL5PunGVBxceM+oxQ72peM/FFolwE /CUV/5ZTeilx3bJ1sjOPYKisy766en/uR0b/071SEu/JMMHom7e8DLkEMMl8suXGRu QywS0J4PO0Y+Z1tKN98+2V2ngGsqJXr2DjRLlE+FDOGeBk4PdlU+GwnmvUyBy9FkrG KK17H11ZKyIsw== From: Michael Ellerman To: Gustavo Luiz Duarte , linuxppc-dev@lists.ozlabs.org Subject: Re: [PATCH v2 2/3] selftests/powerpc: Add tm-signal-pagefault test In-Reply-To: <20200203160906.24482-2-gustavold@linux.ibm.com> References: <20200203160906.24482-1-gustavold@linux.ibm.com> <20200203160906.24482-2-gustavold@linux.ibm.com> Date: Wed, 05 Feb 2020 16:27:52 +1100 Message-ID: <8736bp38o7.fsf@mpe.ellerman.id.au> MIME-Version: 1.0 Content-Type: text/plain X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: mikey@neuling.org, gromero@linux.ibm.com, Gustavo Luiz Duarte Errors-To: linuxppc-dev-bounces+linuxppc-dev=archiver.kernel.org@lists.ozlabs.org Sender: "Linuxppc-dev" Gustavo Luiz Duarte writes: > This test triggers a TM Bad Thing by raising a signal in transactional state > and forcing a pagefault to happen in kernelspace when the kernel signal > handling code first touches the user signal stack. > > This is inspired by the test tm-signal-context-force-tm but uses userfaultfd to > make the test deterministic. While this test always triggers the bug in one > run, I had to execute tm-signal-context-force-tm several times (the test runs > 5000 times each execution) to trigger the same bug. Using userfaultfd is a very nice touch. But it's not always enabled, which leads to eg: root@mpe-ubuntu-le:~# /home/michael/tm-signal-pagefault test: tm_signal_pagefault tags: git_version:v5.5-9354-gc1e346e7fc44 userfaultfd() failed: Function not implemented failure: tm_signal_pagefault It would be nice if that resulted in a skip, not a failure. It looks like it shouldn't be too hard to skip if the userfaultfd call returns ENOSYS. cheers