From patchwork Thu Jun 4 13:49:56 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexander Popov X-Patchwork-Id: 11588015 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 2B64C739 for ; Thu, 4 Jun 2020 13:51:10 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 1CEEA207DF for ; Thu, 4 Jun 2020 13:51:10 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728669AbgFDNvJ (ORCPT ); Thu, 4 Jun 2020 09:51:09 -0400 Received: from mail-lf1-f67.google.com ([209.85.167.67]:45601 "EHLO mail-lf1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728337AbgFDNvJ (ORCPT ); Thu, 4 Jun 2020 09:51:09 -0400 Received: by mail-lf1-f67.google.com with SMTP id d7so3632854lfi.12; Thu, 04 Jun 2020 06:51:07 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=JQF4gusMMse1t+P2Qqr0GcfguvDdOuRmX3WacGaJBcQ=; b=jF6IvBPDfMIYlTCQV/874CGcg+W6j/SRtw8BgSNN1uQQqTIMWsvwPMo30KpjABSsA2 8hEYk9DwoZdit+/S+QM45zZBeO2m2sqwm8AOvJfFZ13RyngfU9IJZrchZXhxtNES2NDm P2JNVPSgvDxgpnPrZ6ALtujS5TC7ytqjTgwnlUpB95NzkMxHojnRHJ+7zxqBJYtUxHBD sd+Q9PX0RN9m9hZFN3OrctTDwH/gk1L+w4Q4j+5w1PI5lN5tDBoCl53uieUeJDCQv+9x 9l6lN+tH1LYJgo9yUR4J6q9t/M6eqvynqT6/EfOOCPJ3k8yqbHypwOQg5pdEQfcvwqXa +Whg== X-Gm-Message-State: AOAM533rHTzkcbSv6nzmJ5qEQrbDmke6aUZBsIShTcniVv4e2aFYZB49 RWQr2myVyTqGM+DNiX2KFE4= X-Google-Smtp-Source: ABdhPJxGDD5ukdedXoxuQ27N5jKq1fSsreuCe9q3nAgk5mstTvN2pJQfkeE/l29dSTZfbBg2leMMKA== X-Received: by 2002:a05:6512:3214:: with SMTP id d20mr2637853lfe.203.1591278666991; Thu, 04 Jun 2020 06:51:06 -0700 (PDT) Received: from localhost.localdomain ([185.248.161.177]) by smtp.gmail.com with ESMTPSA id u16sm1202140lji.58.2020.06.04.06.51.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 04 Jun 2020 06:51:06 -0700 (PDT) From: Alexander Popov To: Kees Cook , Emese Revfy , Miguel Ojeda , Masahiro Yamada , Michal Marek , Andrew Morton , Masahiro Yamada , Thiago Jung Bauermann , Luis Chamberlain , Jessica Yu , Sven Schnelle , Iurii Zaikin , Catalin Marinas , Will Deacon , Vincenzo Frascino , Thomas Gleixner , Peter Collingbourne , Naohiro Aota , Alexander Monakov , Mathias Krause , PaX Team , Brad Spengler , Laura Abbott , Florian Weimer , Alexander Popov , kernel-hardening@lists.openwall.com, linux-kbuild@vger.kernel.org, x86@kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, gcc@gcc.gnu.org Cc: notify@kernel.org Subject: [PATCH 4/5] gcc-plugins/stackleak: Don't instrument itself Date: Thu, 4 Jun 2020 16:49:56 +0300 Message-Id: <20200604134957.505389-5-alex.popov@linux.com> X-Mailer: git-send-email 2.25.2 In-Reply-To: <20200604134957.505389-1-alex.popov@linux.com> References: <20200604134957.505389-1-alex.popov@linux.com> MIME-Version: 1.0 Sender: linux-kbuild-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kbuild@vger.kernel.org There is no need to try instrumenting functions in kernel/stackleak.c. Otherwise that can cause issues if the cleanup pass of stackleak gcc plugin is disabled. Signed-off-by: Alexander Popov Acked-by: Kees Cook --- kernel/Makefile | 1 + 1 file changed, 1 insertion(+) diff --git a/kernel/Makefile b/kernel/Makefile index 4cb4130ced32..d372134ac9ec 100644 --- a/kernel/Makefile +++ b/kernel/Makefile @@ -118,6 +118,7 @@ obj-$(CONFIG_RSEQ) += rseq.o obj-$(CONFIG_SYSCTL_KUNIT_TEST) += sysctl-test.o +CFLAGS_stackleak.o += $(DISABLE_STACKLEAK_PLUGIN) obj-$(CONFIG_GCC_PLUGIN_STACKLEAK) += stackleak.o KASAN_SANITIZE_stackleak.o := n KCOV_INSTRUMENT_stackleak.o := n