Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp14468668ybl; Mon, 30 Dec 2019 10:38:20 -0800 (PST) X-Google-Smtp-Source: APXvYqw6MQ+lhsDVUob8+1gmYALAdiVaFsx8BdPIW+BuGttwUTzTLiKcxSQjjNpX5gFb7BcOmwea X-Received: by 2002:a9d:1e4:: with SMTP id e91mr71642175ote.324.1577731100435; Mon, 30 Dec 2019 10:38:20 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1577731100; cv=none; d=google.com; s=arc-20160816; b=NmEr9sa5kFC7TV6H4rP7c+QVAK3ZCHsoKeNI+2cLNNWJwjXXxbvXvbfd/6a8mBOzec 7IBUMBlGtWYFAB5KenyOcmD7CaX8yBWD9e2RTlxLSga0zFgv1gWLSvjzyGnIW64eY22o lW9XpQGfIgOKOUqzUl7f0Y4YT+z1onAvKgFEVphrbcR6PEwA6BMuSzelftXDu9Dx9GRC 5yPP88YbC1fuPZAP6C3qhGuYLQU7PJpT+humIfmKpF8/V1ju6NSiD4nQWZWqObieVbNY yGY3j6gC11ynquI0SgRFE6r5AaVrYlCaHM6wyE/JomexYdu8GQ6TQVZAk8tBCaJnq8rf 3irg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=V5tjxV4Z5VBOgEtDpAINKYzqYZFdNdLpMM9QZ7NDW1w=; b=i4aqJXj4gQuU7C7PR8OMI4e/klbSpkixPwA3I3vXcpx+SrNTZ7PU7dNlWRBYLTOm1x rgSu0bFKAZStWnoCtEDJwPoraIMjkq9EE6JZO9eUUFpMTo43rd6W/wQi8KWGHZAvGLB3 XAaOhd1AZzrujx8xloTvjMXPPcrS1kJIVLbQIhxkA78cd0J7a5Mph3qsPn0LWlxDEXBh +MSN77ln6A68iCZi0G/zHx0B4xcHbsYf6xPjjp6tD7wLqgt91Z1KpNHZUxWWCLNvYpx/ N7/8v6L+9zCTgyP/90jDwmixYNIzHIbuQ7fzZVkr0AxE9Q7opAL+erpBbLV7Pokvsw94 W5MQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=Xz4+oXhJ; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id p83si21117452oih.198.2019.12.30.10.38.08; Mon, 30 Dec 2019 10:38:20 -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; dkim=pass header.i=@chromium.org header.s=google header.b=Xz4+oXhJ; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727558AbfL3Sh1 (ORCPT + 99 others); Mon, 30 Dec 2019 13:37:27 -0500 Received: from mail-ot1-f68.google.com ([209.85.210.68]:42829 "EHLO mail-ot1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727511AbfL3Sh1 (ORCPT ); Mon, 30 Dec 2019 13:37:27 -0500 Received: by mail-ot1-f68.google.com with SMTP id 66so47206351otd.9 for ; Mon, 30 Dec 2019 10:37:26 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=V5tjxV4Z5VBOgEtDpAINKYzqYZFdNdLpMM9QZ7NDW1w=; b=Xz4+oXhJ+d4SiH2kiUJH6ZVUz4J+nRaBt1frOIR9LOTwNaQVh0jw0zehTlD3QJKreS qpY+oGYucQ4NeolgDl9UNswiTnu9kGnwAbmWCVK2vyVN1aKkbFhm3XbBHuaxDLEHrVXg gspturbBhW7JdcDedahXM21cE+3Rodlo0oozo= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=V5tjxV4Z5VBOgEtDpAINKYzqYZFdNdLpMM9QZ7NDW1w=; b=lr/g+tWrJTqmxaihLrgpsaKB2JhoJ0B6uzBY75VI8RhhsMHnsiH7cmNvFaVh2Wfh/j jrfdUKqSsN3ktw4Xf8UJ5/vuGJzqNNda9uFpxq8qnFpZ0r1YZzdhWbc5AdC2WTd5cXxz wl2oDaiISDfzEPEgIbpanVXR+UIBPUtkKdw4p0mBWeIOAT0cJLuYSZTA6wIb8AkAfG75 zAYBZV0OLuUNM6NmfQXDCq0UIKib1+MP2SLKxIM//856PnCiHyUMqNTnUv4fzHdCpWFb /9NrfmoL26D2W7dsAn5v4c6BdUqWUVkcXh3uCGNCedFerJT1XQ9N1DN6mKt6B5q2AEv3 iLow== X-Gm-Message-State: APjAAAWwMBAFcsR2zXfnl9KnyurG7BgYt/zFFVq7cl3qIx7nokbLyu+H cIIHp7QyrOyvk5THc6/aWoktBQ== X-Received: by 2002:a05:6830:12ce:: with SMTP id a14mr38961071otq.366.1577731046375; Mon, 30 Dec 2019 10:37:26 -0800 (PST) Received: from www.outflux.net (smtp.outflux.net. [198.145.64.163]) by smtp.gmail.com with ESMTPSA id p83sm14001032oia.51.2019.12.30.10.37.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 30 Dec 2019 10:37:25 -0800 (PST) Date: Mon, 30 Dec 2019 10:37:24 -0800 From: Kees Cook To: Alexander Popov Cc: Arnd Bergmann , Greg Kroah-Hartman , linux-kernel@vger.kernel.org, notify@kernel.org Subject: Re: [PATCH v1 1/1] lkdtm/stackleak: Make the stack erasing test more verbose Message-ID: <201912301034.5C04DC89@keescook> References: <20191219145416.435508-1-alex.popov@linux.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20191219145416.435508-1-alex.popov@linux.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Dec 19, 2019 at 05:54:16PM +0300, Alexander Popov wrote: > Make the stack erasing test more verbose about the errors that it > can detect. BUG() in case of test failure is useful when the test > is running in a loop. Hi! I try to keep the "success" conditions for LKDTM tests to be a system exception, so doing "BUG" on a failure is actually against the design. So, really, a test harness needs to know to check dmesg for the results here. It almost looks like this check shouldn't live in LKDTM, but since it feels like other LKDTM tests, I'm happy to keep it there for now. I'll resend my selftests series that adds a real test harness for all the LKDTM tests and CC you. -Kees -- Kees Cook