Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp17886063ybl; Thu, 2 Jan 2020 14:06:05 -0800 (PST) X-Google-Smtp-Source: APXvYqzUqcnNAR8LomCFsxKYK5GHBGQ8oddU8Q5AFMgbbAyVAdUxNcwET2ZRrE4Ow/pOEAL6nMcy X-Received: by 2002:a9d:784b:: with SMTP id c11mr89415844otm.246.1578002765465; Thu, 02 Jan 2020 14:06:05 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1578002765; cv=none; d=google.com; s=arc-20160816; b=kb5EqOQ+GedehrMQWRnOY7Y4vvgDSwFJ2/Wrc+jmDvMDngVobTbc3q/vqMQhrT4nHD Gt/nI4GTJM35rzWkRuUHo1eEFkKvYURafEhPpJN4IA5QJ7A1qO/TbHFKYNnEGzbGjAPm 3hYQUxvQuUikKgrUd8dZTDPd/49p+3z+LeY1gBe4r4eu/+E6zBgZbtUKqzRU2iRXH/hf +2XVoA7uaMKWLdzhSb0h0Ju2IRDe4ZUBth/+K++zeG4q/7YT0ITeBCaTfYIPe5Cp1SUy HtV1wVwCauoCyL3kWVeahMT5Mwk2TeVm1Ja4Lk8EjsP8dXvTp3Fjlnw8l/FTq6PR4iK3 B27Q== 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=9Qm+6s5MAO8n13CG6+uytEx5y7oyEZvgzhXp8vcmVdw=; b=WGjqp6Xgc5Tz+NSBe+qdS1e8sAyzqqQ3BuxWAeNhuwmSEo8xW3hssM14zxA5VO6mqo UPI3fdaIzqjTT+mTaLxgKz3J173cD/Tfe4SmIkSxUd6nTx2IcZbGZK1kMosD3V8v4Eco D+ilO6DprPpHoUsIMZ2U6B6SzeKTYiT7xm7Qad1iIjiOObMslyzgRt95a0le6coUE9zC 1OsSvo8Xped+MX+60KZg+EWzDk0z9nFzccVDnC8cFX9z2mmYu1vf76qDuKhli7owHChZ ezf7u44M04y8Pw6N17pghS2KpkTC77noxRriIilY93uJs2Oiey4J/LAvs6+brrg08Lac Qs4w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=FSGhkyHM; 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 p11si29217723ota.300.2020.01.02.14.05.49; Thu, 02 Jan 2020 14:06:05 -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=FSGhkyHM; 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 S1725916AbgABWDH (ORCPT + 99 others); Thu, 2 Jan 2020 17:03:07 -0500 Received: from mail-oi1-f195.google.com ([209.85.167.195]:36875 "EHLO mail-oi1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725837AbgABWDG (ORCPT ); Thu, 2 Jan 2020 17:03:06 -0500 Received: by mail-oi1-f195.google.com with SMTP id z64so7344093oia.4 for ; Thu, 02 Jan 2020 14:03:06 -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=9Qm+6s5MAO8n13CG6+uytEx5y7oyEZvgzhXp8vcmVdw=; b=FSGhkyHMKw5phVrORIUvJbWA+TZtwIAmw8b5i2QtckbwfTgeLU+HloQhQ7edZHSTtK p+Bng3Frnsio6Vcg8kcEJoWKz0KVIpKUfG4C3EUbmRd0BKbkAp935sb10GlX2VdVQ2VE +lbmxMYPYTR0EiPWTGumhbJralABOuYFno94I= 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=9Qm+6s5MAO8n13CG6+uytEx5y7oyEZvgzhXp8vcmVdw=; b=bR1rX/XpZNUr1ipJS152nY6OQhXCiDPSQ8Ww4nEraVnmUwcBGA5Y3sZeCzZbaWINH/ V4EAeuQ6Pa2XKiqcOshCp86MuCmo1MH4YrLe37O8LICj02YInqhQwGa58invWSjI3BP1 H6xphQIyVm3HDpelUu9rfmRaV1dYi8Jk465rqZjtdiVLmOzzbSj4eC+inqqaffSf+Nel Hq7+/4qBIbUtJn2niiXL6cXuZD1JqtrE6f1YiHMzf8uwLpypxgdFbH55ZI/lMjL1DebJ yBpRGrd6yTkGCgFKGy/QipEj+UfQopU57rsUjdDh1RkVC1Hj1gqw+AxjgxN8buTWpzcB 71RA== X-Gm-Message-State: APjAAAVxfgjmWcdxh9mVAYovYYjGCSGbS49Ziqp6dKtl1ChmLJ+2KNIP KjMKJVEMIY0lOVJ9hPhYbskwPTfmOdM= X-Received: by 2002:aca:ed57:: with SMTP id l84mr3198908oih.8.1578002585732; Thu, 02 Jan 2020 14:03:05 -0800 (PST) Received: from www.outflux.net (smtp.outflux.net. [198.145.64.163]) by smtp.gmail.com with ESMTPSA id g19sm15499278otj.1.2020.01.02.14.03.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 02 Jan 2020 14:03:04 -0800 (PST) Date: Thu, 2 Jan 2020 14:03:03 -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: <202001021402.EDBC5114D@keescook> References: <20191219145416.435508-1-alex.popov@linux.com> <201912301034.5C04DC89@keescook> <5bde4de0-875c-536b-67ec-eafebb8b9ab1@linux.com> <201912301443.9B8F6CA6@keescook> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Jan 02, 2020 at 02:26:39AM +0300, Alexander Popov wrote: > On 31.12.2019 01:46, Kees Cook wrote: > > On Tue, Dec 31, 2019 at 01:20:24AM +0300, Alexander Popov wrote: > >> On 30.12.2019 21:37, Kees Cook wrote: > >>> 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. > >> > >> Do you mean that you will apply this patch? > > > > Sorry for my confusing reply! I meant that I don't want to apply the > > patch, but I'm find to leave the stackleak check in LKDTM. > > Kees, I think I see a solution. > > Would you agree if I use dump_stack() instead of BUG() in case of test failure? > That would provide enough info for debugging and would NOT break your design. I would be fine with that, yes! :) -- Kees Cook