Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp2402060imu; Sat, 10 Nov 2018 14:08:05 -0800 (PST) X-Google-Smtp-Source: AJdET5dJ/AZxoZfwFBddnbrvjBBBLzLBoqRSCykrFQthauxro/By69MBmDwhwuJV7w/P7W2PM/C8 X-Received: by 2002:a62:d452:: with SMTP id u18-v6mr6115915pfl.32.1541887684946; Sat, 10 Nov 2018 14:08:04 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1541887684; cv=none; d=google.com; s=arc-20160816; b=BUbkVW7A8asidTq6mERQLf1WNUQh/P/21gRyj6o8ad2X2rTrEeRiPTTwrA7afzxgP/ WEENJqsJGjjFCvQeTPd/ZkaL5UvJLCAwKRDK2it+NmaEcXFQwYNpJCxceZgw5B7MdFNM IoWaejx7qo2IjZaPSXzd0ouLq1GoKUhQqByIk4E8qWx9HWYYhL5fzdvE6BCdxWZ+cqEO DCnqS36GGMi+K0O45JlhA+SswNAsdpBsq1cOmZkBsbJItGpGHbC8nHrT8knb5rIiD8PB p4uBLPUatxgRbUKlvtn8O4THWeM8+8jd4p7VJJtNQlJ4Xe+HXbiKc4IWrjjobNNl0rPe BshQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:to:from; bh=pYkHvT7Kj+Of9cWYDNEc04Shp+/KNmHnxms8QJaJZYM=; b=g71LprvIH3n1N8Z7txiZU+9t7+bKsURIxcvMuZbhNLwLT78Trbgk7fy/IetWGL3iJk xnqwtHT2toFo6EBNE6qyRC+1bNTdjtq30GTU4VJkr6/PzYKem0ZhHz5FDLU9D0r91S9E eTBPp2h0XrJyzbKNxcECxowih64EzMoph+JJtBsKlazBdTGq7vGva4VEo76vCoAKB0iB 4B2kviJSe2mMN4mKcfefXGaRYK+imIVt65l4oeXX7IFOez3Md6UbIcH3ktkIIKNR+bfu 83ryZmY4rV0RAmjBLXRHjoOjpJ70+FDT3RKraWRXo611ceZmkkH87zX4Hd70p3xIP8JR KXMw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id t191si11234865pgd.579.2018.11.10.14.07.32; Sat, 10 Nov 2018 14:08:04 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726718AbeKKHwL (ORCPT + 99 others); Sun, 11 Nov 2018 02:52:11 -0500 Received: from mail-lf1-f66.google.com ([209.85.167.66]:36624 "EHLO mail-lf1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725815AbeKKHwL (ORCPT ); Sun, 11 Nov 2018 02:52:11 -0500 Received: by mail-lf1-f66.google.com with SMTP id h192so3740620lfg.3 for ; Sat, 10 Nov 2018 14:05:41 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id; bh=pYkHvT7Kj+Of9cWYDNEc04Shp+/KNmHnxms8QJaJZYM=; b=G21tSs6h5mH7hn2llo3ElqUfhO/5D3S/xXwLToLO9BgT/xM1IzVCuG7tJJurbFy6bb bsh1gUpP+WMTE1JtOZ9h9dC15StTRvKM5Nw73ovX2XoGB+G/i7kIeIO2uljo7YeU6I8H NsWeaFTn6Ydk3Yvetv5fQzUQdkhPvOxqkuoSiYh6+uOtUIMlvHoD+CVd5TIlyhGXf64N l194mx+bA9/CK0NyymQiy4GGwugQWwkDXcWimRD/FsNzZFRppd+bN7at/45ona5JURgG kOBaYKCfO0XMVQvXWKvAOhTHpVNKQF/xeoW/ta6WQRC5UOXsmhClGWuSawhIBjqyYv6d /o1A== X-Gm-Message-State: AGRZ1gLZ84mnZvEc2UN6mfptq6UZ3XX6yGRB0CtSckl5G6N49rpicrjI ax5a72m/9gbkiTMYK89XpKU= X-Received: by 2002:a19:920a:: with SMTP id u10mr8101431lfd.122.1541887540432; Sat, 10 Nov 2018 14:05:40 -0800 (PST) Received: from hobbit.lan (128-68-186-150.broadband.corbina.ru. [128.68.186.150]) by smtp.gmail.com with ESMTPSA id o25sm2058679lfd.29.2018.11.10.14.05.39 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sat, 10 Nov 2018 14:05:39 -0800 (PST) From: Alexander Popov To: kernel-hardening@lists.openwall.com, Kees Cook , Jann Horn , Ingo Molnar , Andy Lutomirski , Joerg Roedel , Borislav Petkov , Thomas Gleixner , Dave Hansen , Steven Rostedt , Peter Zijlstra , Jan Kara , Mathieu Desnoyers , Dan Williams , Masahiro Yamada , Masami Hiramatsu , x86@kernel.org, alex.popov@linux.com, linux-kernel@vger.kernel.org Subject: [PATCH 1/1] stackleak: Disable ftrace for stackleak.c Date: Sun, 11 Nov 2018 01:05:30 +0300 Message-Id: <1541887530-16610-1-git-send-email-alex.popov@linux.com> X-Mailer: git-send-email 2.7.4 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The stackleak_erase() function is called on the trampoline stack at the end of syscall. This stack is not big enough for ftrace operations, e.g. it can be overflowed if we enable kprobe_events for stackleak_erase(). Let's disable ftrace for stackleak.c to avoid such situations. Reported-by: kernel test robot Signed-off-by: Alexander Popov Reviewed-by: Kees Cook --- kernel/Makefile | 1 + 1 file changed, 1 insertion(+) diff --git a/kernel/Makefile b/kernel/Makefile index 7343b3a..0906f6d 100644 --- a/kernel/Makefile +++ b/kernel/Makefile @@ -18,6 +18,7 @@ obj-$(CONFIG_MULTIUSER) += groups.o ifdef CONFIG_FUNCTION_TRACER # Do not trace internal ftrace files CFLAGS_REMOVE_irq_work.o = $(CC_FLAGS_FTRACE) +CFLAGS_REMOVE_stackleak.o = $(CC_FLAGS_FTRACE) endif # Prevents flicker of uninteresting __do_softirq()/__local_bh_disable_ip() -- 2.7.4