From patchwork Wed Jun 24 12:33:26 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexander Popov X-Patchwork-Id: 11623049 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 0205E90 for ; Wed, 24 Jun 2020 12:34:08 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id E8ACF20E65 for ; Wed, 24 Jun 2020 12:34:07 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2403795AbgFXMeH (ORCPT ); Wed, 24 Jun 2020 08:34:07 -0400 Received: from mail-qt1-f196.google.com ([209.85.160.196]:38534 "EHLO mail-qt1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388761AbgFXMeF (ORCPT ); Wed, 24 Jun 2020 08:34:05 -0400 Received: by mail-qt1-f196.google.com with SMTP id z2so1484338qts.5; Wed, 24 Jun 2020 05:34:05 -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=r8hAW61/4BUI+NbyFnYc6YqQQjo8d8HK1rSbMU2IkRk=; b=DiHfLU1fxBkDc320X8WPOpj7EmmwPUe3YGc4AtX0OQamNzH0GcM46K/GgOMUDGI40v +n/Bzqnl9GIeLlEL2nRP0FcjBR0Fif0m1FFpNcw2z0D0rFChPGGfGMQ46LYSfneGsRAL janHdWU72hVTr5oVG2FMytgKIIw3/+EiwCBjkRmDzxdfGWMbVXbKqLbTmyEPJL8MQAJn AkoSDxxLaOD1216aiODskcCiqRgy0vDSxSwjO5zJjuFSKOEqD7wuEAjsZeAsCJJzS4XP jeOlxiLdHTg2nabm3DH/PLRDqZqU7p0Jx+bU3okMJT3aTrbaM/fz8x1C4ZLBpnPLaMzz +2Cw== X-Gm-Message-State: AOAM530c9J7LJ1p0706DAI/qzVQb6vsTyUNRSbHt8HRe0JgGqdG9UCJN Eu/36Nk6yzp/hfdHNBjnFbc= X-Google-Smtp-Source: ABdhPJxPh8KCe1nlxIC9hfI7A611S0zDh6pUHr/hn9DXDH26nDPy4DCeItaOwQUW8SJpgZNlzgTiJw== X-Received: by 2002:aed:25a2:: with SMTP id x31mr24822436qtc.96.1593002044717; Wed, 24 Jun 2020 05:34:04 -0700 (PDT) Received: from localhost.localdomain ([185.248.161.177]) by smtp.gmail.com with ESMTPSA id x26sm3354512qtr.4.2020.06.24.05.33.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 24 Jun 2020 05:34:04 -0700 (PDT) From: Alexander Popov To: Kees Cook , Jann Horn , 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 v2 1/5] gcc-plugins/stackleak: Don't instrument itself Date: Wed, 24 Jun 2020 15:33:26 +0300 Message-Id: <20200624123330.83226-2-alex.popov@linux.com> X-Mailer: git-send-email 2.25.4 In-Reply-To: <20200624123330.83226-1-alex.popov@linux.com> References: <20200624123330.83226-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 f3218bc5ec69..155b5380500a 100644 --- a/kernel/Makefile +++ b/kernel/Makefile @@ -125,6 +125,7 @@ obj-$(CONFIG_WATCH_QUEUE) += watch_queue.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 KCSAN_SANITIZE_stackleak.o := n