Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp3553824imu; Sun, 11 Nov 2018 17:54:37 -0800 (PST) X-Google-Smtp-Source: AJdET5eKDsyzUpjRFdx8YoEiQTQvFLYa7CAzVzA5ojo+OSeWq62t0LOH8KV+L571PQRk46b53aWv X-Received: by 2002:a17:902:5a4:: with SMTP id f33-v6mr17677886plf.324.1541987676997; Sun, 11 Nov 2018 17:54:36 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1541987676; cv=none; d=google.com; s=arc-20160816; b=p1QsFQLF74XChKa1derv/gZGf3kVBXn0MiMA5bjT3AZH3Z+lupAgLQaBtNFrEcvB2X E/O67D+lyZzWVMi5xtgMaF22Ixf/JMCMnLMrlJx6dK7Jm0VWSV6kqT5k/yvVcWUJlaXb 9vMV+/lwyDF46JY9apN0Vuv0uzvvH56jJyX/crN/xvubN8nPxDF16VuuKtFsRR3WLESy p7xxF4IEfq1vxiZfm7n3JIjDguUJjqA73p6MfhaZ5j0EiPOg5NTnwkWbAhTSjz33nvRW k7HkdJZlt6uUF7Wv8J8UC3kBmsA7znoh6rX953f/gi4eheuIDooJgL6T3tv8T0DTFYUL yPiQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date; bh=0fxMyhKnGtefUk2s3g6EBijCvXX1TXVLExqiOJgBcK8=; b=Op5kAyi+fY7MG5wq4hmbshqwvTdGE2d2fZn0bjGsc6FRb/rvhISEwdh4xovjjiOAcf rXLY6vrPRarU0o0tI/OeXubOCZ3Vj71ZHenlRUjRX0RqHKO9n2/s/T7pmX2wBPb+2u/s eP99Ghmq5Jph+nU0mF8T6D6Ys+UcSyfzbC33pMOxV0y/NIEo/pAi0RV1CVGLHQK7biyd L0CNz7uo6DO6HuGSbLc2nq0nKONDwl10Wbzi70lQgcwKa+7otOF9oD06IHkHd+ZKYtsR B1Hobyuroh+jvCYgbywcD+/WiiR5uzvndqVxVZa5i2J/u/Jio3yVUA3cHVbHaz50xAOD LfrA== 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 r16-v6si14567698pgv.548.2018.11.11.17.54.21; Sun, 11 Nov 2018 17:54:36 -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 S1730179AbeKLLop (ORCPT + 99 others); Mon, 12 Nov 2018 06:44:45 -0500 Received: from mail.kernel.org ([198.145.29.99]:40484 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729911AbeKLLop (ORCPT ); Mon, 12 Nov 2018 06:44:45 -0500 Received: from vmware.local.home (unknown [64.114.255.114]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 9AC1B2087F; Mon, 12 Nov 2018 01:53:54 +0000 (UTC) Date: Sun, 11 Nov 2018 20:53:51 -0500 From: Steven Rostedt To: Alexander Popov Cc: kernel-hardening@lists.openwall.com, Kees Cook , Jann Horn , Ingo Molnar , Andy Lutomirski , Joerg Roedel , Borislav Petkov , Thomas Gleixner , Dave Hansen , Peter Zijlstra , Jan Kara , Mathieu Desnoyers , Dan Williams , Masahiro Yamada , Masami Hiramatsu , x86@kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 1/1] stackleak: Disable ftrace for stackleak.c Message-ID: <20181111205351.1874bb1e@vmware.local.home> In-Reply-To: References: <1541887530-16610-1-git-send-email-alex.popov@linux.com> <20181110183011.2290fc20@gandalf.local.home> X-Mailer: Claws Mail 3.15.1 (GTK+ 2.24.32; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, 11 Nov 2018 13:19:45 +0300 Alexander Popov wrote: > On 11.11.2018 2:30, Steven Rostedt wrote: > > On Sun, 11 Nov 2018 01:05:30 +0300 > > Alexander Popov wrote: > > > >> 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(). > > > > Is the issue with kprobes or with function tracing? Because this stops > > function tracing which I only want disabled if function tracing itself > > is an issue, not for other things that may use the function tracing > > infrastructure. > > Hello Steven, > > I believe that stackleak erasing is not compatible with function tracing itself. > That's what the kernel testing robot has hit: > https://www.openwall.com/lists/kernel-hardening/2018/11/09/1 > > I used kprobe_events just to reproduce the problem: > https://www.openwall.com/lists/kernel-hardening/2018/11/09/4 Have you tried adding a "notrace" to stackleak_erase()? Not tracing the entire file is a bit of overkill. There's no reason ftrace can't trace stack_erasing_sysctl() or perhaps even stackleak_track_stack() as that may be very interesting to trace. -- Steve