Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp318880rwd; Mon, 12 Jun 2023 14:09:03 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5lgb329e8RhE5RYfOz5d/Ec9AbpYgj2dEiJPCMAualUgiwz8aW8cNFsVFIBleeiKyJCGAv X-Received: by 2002:aa7:c40f:0:b0:514:a45d:7894 with SMTP id j15-20020aa7c40f000000b00514a45d7894mr5342684edq.16.1686604143317; Mon, 12 Jun 2023 14:09:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686604143; cv=none; d=google.com; s=arc-20160816; b=A9ptvU2A4+1FN/8BvTkyNQmiel3Wk5ajPEswR0ZOnthCFdZE0AgXyO3OUKhyJmwTUA zSVL/CIa1SVHz7U0s7CYmXZcnwsUH3egCE8SNp2MkDBOZWByyv8F3icTsqhD4lUjloKC srf3hVWLdQO5Y2PzDUWBHX3EewcJ7bPiiAL3wMhrSK/lhKD9fF3O0IH4wmtabP4Pj8ss +Uu91ETXOLiPT+eNPBF4Ip2TsLNZDw8+g41EafNvfK9ZR54iWxPXK24QAYX7j+G987c8 edW5hbbCk5LzUwXcqEjiEvrPQicSFa2NRfq7u7aBTH9rV7xK6W7Sq3gOhORK2K35iMMk hzBw== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=q/jKbBAagPcqKM1C/Uoudv2X+CxcCPOt0UMDg7rZIkk=; b=Vzybpne5f2p/Dk4Vc7HwNO6t/Y4aLhgVJlQbe2WcL/eJoxVkJhkScKYVnMklTcbuGX Bk3h7hAIwix+RzU/u/EGhb2Xqzh7xHNJLTmE7Q9NCJ/4q4SBrdkEszvQPenDz7FbAekd IFoUJ+JsGicIQA5P65H9Gi+rofxkMH8NTWAeuCSfKBwnJZebymbkWPFpm0ZqqvdNJgFd EMQebfHogqREzRJi9jM3VirtPb2tZlT/B2rjkUSgQrSiktuMa7wmVq+N+tFLXpwLgwjk dqxWH+AC474swLYBsZMvuxvhCzo6NOv9+/zJHkm142Sc09ljn/BR/PkHydoQiplrSeOA QH4w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="qdpXve/Z"; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id y12-20020aa7c24c000000b005147c77e34fsi4723412edo.116.2023.06.12.14.08.38; Mon, 12 Jun 2023 14:09:03 -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=@kernel.org header.s=k20201202 header.b="qdpXve/Z"; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235390AbjFLUtE (ORCPT + 99 others); Mon, 12 Jun 2023 16:49:04 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36154 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233679AbjFLUrd (ORCPT ); Mon, 12 Jun 2023 16:47:33 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C074919A7 for ; Mon, 12 Jun 2023 13:46:40 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id A38D062F0F for ; Mon, 12 Jun 2023 20:45:17 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 0E9BFC4331E; Mon, 12 Jun 2023 20:45:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1686602717; bh=NIJsLUCkPm+SlEyAKKZ+JWMSEL2gT9Xxru+zz8R8kig=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=qdpXve/ZQctJnAKEwXta+3CR84M0ydiwRgzAwsMvH+1IVHWwYSAf8I9HzbiRvUT6W nEL3XqqPScLydNBucfB4/Cb4mpR/g1Y7Vtna80a8ClLUjqDHRezODsChULKNiX/6ei luDd3+JfPrEVZx35Vol9KWiwWvMGJQyvjjiweLJtztuodVVrYaLIMO51atRhVQHFkK qFpZ5OnQPZ7rbvCIAgYjoeeAHPrbiLeftANE8uGxkAbFZoM4PJPF5b7a9jekXnMmyq uEVUTxmMD17Xrm85eTlMWXeDc0vigOnVMnGYXpA/FtSVSUaG9/jJqfCit1c3KMqxKo 9f0Tw0/Q+ABew== Received: by paulmck-ThinkPad-P17-Gen-1.home (Postfix, from userid 1000) id E89F0CE3A70; Mon, 12 Jun 2023 13:45:15 -0700 (PDT) From: "Paul E. McKenney" To: linux-kernel@vger.kernel.org Cc: gwml@vger.gnuweeb.org, kernel-team@meta.com, w@lwt.eu, =?UTF-8?q?Thomas=20Wei=C3=9Fschuh?= , Willy Tarreau , "Paul E . McKenney" Subject: [PATCH v2 nolibc 28/53] tools/nolibc: add test for __stack_chk_guard initialization Date: Mon, 12 Jun 2023 13:44:49 -0700 Message-Id: <20230612204514.292087-28-paulmck@kernel.org> X-Mailer: git-send-email 2.40.1 In-Reply-To: <8b757cc0-3719-4e63-a755-9710384137bc@paulmck-laptop> References: <8b757cc0-3719-4e63-a755-9710384137bc@paulmck-laptop> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE 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 From: Thomas Weißschuh Signed-off-by: Thomas Weißschuh Signed-off-by: Willy Tarreau Signed-off-by: Paul E. McKenney --- tools/testing/selftests/nolibc/nolibc-test.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/tools/testing/selftests/nolibc/nolibc-test.c b/tools/testing/selftests/nolibc/nolibc-test.c index d5d4dea63cd6..861b9a74b71f 100644 --- a/tools/testing/selftests/nolibc/nolibc-test.c +++ b/tools/testing/selftests/nolibc/nolibc-test.c @@ -808,6 +808,14 @@ static int run_protection(int min, int max) return 0; #endif +#if defined(NOLIBC_STACKPROTECTOR) + if (!__stack_chk_guard) { + llen += printf("__stack_chk_guard not initialized"); + pad_spc(llen, 64, "[FAIL]\n"); + return 1; + } +#endif + pid = -1; pid = fork(); -- 2.40.1