Message ID | 20230223-nolibc-stackprotector-v2-5-4c938e098d67@weissschuh.net |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:604a:0:0:0:0:0 with SMTP id j10csp1293095wrt; Mon, 20 Mar 2023 08:56:52 -0700 (PDT) X-Google-Smtp-Source: AK7set88yk78ajlkSJaeOVlDm1uHbIuuj7vdTyvlet3wih7P96WgqIryAAFUsahhXoWKjtuYrL91 X-Received: by 2002:a05:6a20:1443:b0:c7:249:cd8c with SMTP id a3-20020a056a20144300b000c70249cd8cmr21899113pzi.5.1679327811773; Mon, 20 Mar 2023 08:56:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1679327811; cv=none; d=google.com; s=arc-20160816; b=hBWETs8qy17OfXEpcv+6KhfXAGls7DE3ECm3XT+50ZfT6+4TbDMmAJJoI4w3uFZyjO JBhwZSB5MsVbbBwst5Np8AIYEZA7xsJ7PjtOaOlLbjww7EdgJXQqAYpi+QmX62nuR65Y /Z3DwdmcUF/Fo43hVtgDTTOWG1wnWK2cqdqckSOeZeiirfiMy1RxzQ5qtziJrtNJpYIw PZeReBxFPHYUTFSnykNzS20BiUHajkJXNt2i5Bb/pGWSBevtE8jr9U2iS+kntT1YZEyd /+pXB9kPoxBR/tHV6wByRH/wxQwwa7z79ve8dTQwaZZYa1x8i+99+pZV7YvmWXZbXsvw YRVQ== 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=e5hQRtxXF2n3IqOwpkB6g80ZgcgBQxirGOtZhX8RAZs=; b=wbQjXbKVQQTX0iZ6wQ4NrZ88uX9iBopmh/DLi+liruM1vVrwrYZMlhAG2kxQ2lpkgg OvRELKMrxvl+2smFsElRd4sxvjV67fj50kVrYJIpDRun3me6Xm5dNfeSBhMduAB8MIuW pf8ehEWP6Ghy4gUIG8wLgQkI/16Xd1pu5CFfODBYfAMnoK9BtaeSB4D5ubBXrnsxJKKl 193NodQsd3GjvY9LJSyE6QUbyf3mvC2zB0b2QGcoq0pvTqrR+G2p9GQwiWPuHWYY041y /Rwhj3nhCksOirpRnD08yVzel8J/XRhoGKfEjf1smKlN+UcC/242VVT9ArbFsPjUBVSJ GnAA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@weissschuh.net header.s=mail header.b=VdYuP7uY; 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: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id h70-20020a638349000000b0050f8bd1880bsi2054692pge.740.2023.03.20.08.56.39; Mon, 20 Mar 2023 08:56:51 -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=VdYuP7uY; 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 S232284AbjCTPv0 (ORCPT <rfc822;pusanteemu@gmail.com> + 99 others); Mon, 20 Mar 2023 11:51:26 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58996 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233330AbjCTPtr (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Mon, 20 Mar 2023 11:49:47 -0400 Received: from todd.t-8ch.de (todd.t-8ch.de [159.69.126.157]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DE4078A77; Mon, 20 Mar 2023 08:41:24 -0700 (PDT) From: =?utf-8?q?Thomas_Wei=C3=9Fschuh?= <linux@weissschuh.net> DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=weissschuh.net; s=mail; t=1679326881; bh=8+nQaJm+ZpSS5pDVDYI8Ih7aP+obiBBNskXrcuawcY4=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=VdYuP7uYCUpZyRNirukTM8/cDEaFkpqBlXmt2CKnGfoSb+HKuGYOax1JiCSV2ZDdt LbJkixmmNM134m39O+raBfqHfuG3c9Hj2n8LdjunxEFlpwBFEN48z5HfW4SjPpLL7X oHx1Qg7jnXszNuARoiFN+CyCpfAa384ZtFERU0y0= Date: Mon, 20 Mar 2023 15:41:05 +0000 Subject: [PATCH v2 5/8] tools/nolibc: tests: fold in no-stack-protector cflags MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit Message-Id: <20230223-nolibc-stackprotector-v2-5-4c938e098d67@weissschuh.net> References: <20230223-nolibc-stackprotector-v2-0-4c938e098d67@weissschuh.net> In-Reply-To: <20230223-nolibc-stackprotector-v2-0-4c938e098d67@weissschuh.net> To: Willy Tarreau <w@1wt.eu>, Shuah Khan <shuah@kernel.org> Cc: linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org, =?utf-8?q?Thomas_Wei=C3=9Fschuh?= <linux@weissschuh.net> X-Mailer: b4 0.12.1 X-Developer-Signature: v=1; a=ed25519-sha256; t=1679326878; l=987; i=linux@weissschuh.net; s=20221212; h=from:subject:message-id; bh=8+nQaJm+ZpSS5pDVDYI8Ih7aP+obiBBNskXrcuawcY4=; b=TaXGkzUL3xHCtunu6pxuTjT6Der+r4LEofS5YgQayMdk3NgAUO2r6DsVBZrRzelmREo9bB9L1 nrNsis9gLYgDvKhmE0MsrOgYVZe3KOKZ1ROVCIsjF6flvn6rD3033hm 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 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: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1760902839471810154?= X-GMAIL-MSGID: =?utf-8?q?1760902839471810154?= |
Series |
tools/nolibc: add support for stack protector
|
|
Commit Message
Thomas Weißschuh
March 20, 2023, 3:41 p.m. UTC
For the cflags to enable stack protectors to work properly they need to
be specified after -fno-stack-protector.
To do this fold all cflags into a single variable and move
-fno-stack-protector before the arch-specific cflags.
Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
---
tools/testing/selftests/nolibc/Makefile | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/tools/testing/selftests/nolibc/Makefile b/tools/testing/selftests/nolibc/Makefile index c99bbcda7495..236c0364f5fb 100644 --- a/tools/testing/selftests/nolibc/Makefile +++ b/tools/testing/selftests/nolibc/Makefile @@ -77,8 +77,9 @@ Q=@ endif CFLAGS_s390 = -m64 -CFLAGS ?= -Os -fno-ident -fno-asynchronous-unwind-tables $(CFLAGS_$(ARCH)) -CFLAGS += $(call cc-option,-fno-stack-protector) +CFLAGS ?= -Os -fno-ident -fno-asynchronous-unwind-tables \ + $(call cc-option,-fno-stack-protector) \ + $(CFLAGS_$(ARCH)) LDFLAGS := -s help: