Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp2005706rwd; Thu, 25 May 2023 23:38:44 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4Rtx5LRdO3EO9y8ERfr71iuGk2zfk3lFrec9Maw4iDAN9qZ4OFswOS8PYuZQEKB4JxUhRD X-Received: by 2002:a17:90a:ac03:b0:256:2072:d830 with SMTP id o3-20020a17090aac0300b002562072d830mr1534535pjq.8.1685083124528; Thu, 25 May 2023 23:38:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1685083124; cv=none; d=google.com; s=arc-20160816; b=zGu7QrEDKwrZ50CZlXJNwwijTG1lbqmsNTborZFs/nh2X/Afzwc32iqjghFNKB4Rvn 8MTLGETH/1AUllbQ7z4b+SA8FuF/DPVOFAhZWeb4HqCgD5qQX/R42tOEfjPfGFwhIobr PD5QtsozM1JBZtFYKLMcprJlM2zVE5qAtV4c3pa6WZAsGSzs3E01tSVULvJwSeNu62qo FCNNPcjQ8D5XR7GDXEEdRIol/6vEZO8wH5G3nju4B+D30qFl2xwsIerZ5ouJWwG5Ufna lYQ9AXy2ZuHSo5VH0Zpfg2LO4F0AOuuklNv/yFvrUZ1Ac8J5kydt8ZM8pv6mMpVVjiLH SFSg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:in-reply-to:references:message-id :content-transfer-encoding:mime-version:subject:date:dkim-signature :from; bh=2ZshhxfDzYbEYGQED/F6a9wFFimpy0Snbu15ROuv9hU=; b=OHtXCMOxBDj6dOTOd/PzahqGVZVqlHUWY5FORVLu7aLWeiYJPjcVsG8wlp1PqYo7d1 /k69lj7PuD8kxypb1dNDPH8RJdrekqW4GRgSk5kzlz+DEf2A+/mDBbVGM3bSNDcF0Mma 90hbws3EnJHIzZOXop9pPVUWNSbJvt4mhKZcxuHLVoTD1Q3pO27jkYq5xhW09j1kPc0V t02CiIiXh42eQSnHoU3DEThKu5HTje8BArs7vJIw2bt8GfHWg4tNtkUCIF2fnFN6fnD+ gohO+7i+D8iW5ECLkM5CxqIMrcMSHC8F28LFsYeG9hh4QZQhMo2c5Afr4OT4U75eIRQq jOnw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@weissschuh.net header.s=mail header.b="aBIaTe/p"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id h3-20020a17090aa88300b0024df9b42c22si3339951pjq.67.2023.05.25.23.38.28; Thu, 25 May 2023 23:38:44 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@weissschuh.net header.s=mail header.b="aBIaTe/p"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S242170AbjEZGar (ORCPT + 99 others); Fri, 26 May 2023 02:30:47 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34072 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236721AbjEZGam (ORCPT ); Fri, 26 May 2023 02:30:42 -0400 Received: from todd.t-8ch.de (todd.t-8ch.de [IPv6:2a01:4f8:c010:41de::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 07100198; Thu, 25 May 2023 23:30:40 -0700 (PDT) From: =?utf-8?q?Thomas_Wei=C3=9Fschuh?= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=weissschuh.net; s=mail; t=1685082638; bh=xblaIv9ff9aMttaZ5noLw4QKOmOsHQttyPbx4HeNkGU=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=aBIaTe/p6JjQq0FT0W+hke0XP4+ZW+GxSk6KU6/wqI5+NnjucL48g8oRUYy796ItH uFZwmXMYa8ydKVYECSB6NE2uaj7rUdmGqVL7b8SOMWCk2VLcqr+x6+WtODwc/oIiq0 lX3YXgUhR0ItTKAb3cTj7u+mFWIzxKde7HXj+LM8= Date: Fri, 26 May 2023 08:30:36 +0200 Subject: [PATCH 2/2] selftests/nolibc: prevent coredumps during test execution MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit Message-Id: <20230526-nolibc-test-no-dump-v1-2-62e724a96db2@weissschuh.net> References: <20230526-nolibc-test-no-dump-v1-0-62e724a96db2@weissschuh.net> In-Reply-To: <20230526-nolibc-test-no-dump-v1-0-62e724a96db2@weissschuh.net> To: Willy Tarreau , Shuah Khan Cc: linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org, =?utf-8?q?Thomas_Wei=C3=9Fschuh?= X-Mailer: b4 0.12.2 X-Developer-Signature: v=1; a=ed25519-sha256; t=1685082638; l=989; i=linux@weissschuh.net; s=20221212; h=from:subject:message-id; bh=xblaIv9ff9aMttaZ5noLw4QKOmOsHQttyPbx4HeNkGU=; b=W55tJ8CzyJL4M+FVgABk9pXBCFnXHrsLH3hnToGetBqPIwwwEBcGilciGbU+vX0BxHEW6SDlp +UPfiRhJkvDBYitn3jrkk6fitFufRaPCD1xjQISCxuhD/S9qRZBuUxX X-Developer-Key: i=linux@weissschuh.net; a=ed25519; pk=KcycQgFPX2wGR5azS7RhpBqedglOZVgRPfdFSPB1LNw= X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The child process forked during stackprotector tests intentionally gets killed with SIGABRT. By default this will trigger writing a coredump. The writing of the coredump can spam the systems coredump machinery and take some time. Timings for the full run of nolibc-test: Before: 200ms After: 20ms This is on a desktop x86 system with systemd-coredumpd enabled. Signed-off-by: Thomas Weißschuh --- tools/testing/selftests/nolibc/nolibc-test.c | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/testing/selftests/nolibc/nolibc-test.c b/tools/testing/selftests/nolibc/nolibc-test.c index 76a9a0f362b1..40fb684eaac9 100644 --- a/tools/testing/selftests/nolibc/nolibc-test.c +++ b/tools/testing/selftests/nolibc/nolibc-test.c @@ -831,6 +831,7 @@ static int run_protection(int min, int max) close(STDOUT_FILENO); close(STDERR_FILENO); + prctl(PR_SET_DUMPABLE, 0, 0, 0, 0); smash_stack(); return 1; -- 2.40.1