From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-0.9 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2F5C5C4BA21 for ; Wed, 26 Feb 2020 19:01:34 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 02EE42072D for ; Wed, 26 Feb 2020 19:01:34 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b="JN3PoAv4" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727035AbgBZTBd (ORCPT ); Wed, 26 Feb 2020 14:01:33 -0500 Received: from mail-pl1-f196.google.com ([209.85.214.196]:42939 "EHLO mail-pl1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726996AbgBZTBd (ORCPT ); Wed, 26 Feb 2020 14:01:33 -0500 Received: by mail-pl1-f196.google.com with SMTP id u3so55404plr.9 for ; Wed, 26 Feb 2020 11:01:33 -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=5ATCKzo/gzRmMNQS8TBoj8F2LcVte5l4YReuJidbYCk=; b=JN3PoAv4GK1eTqJJvP77PN8TbdvNTRarphHEwxan72jmJPgZzYH/RakPIG8YP5cwuY PcVPGQyZCUYbWRgaM9aQEu06iMRJr9xaHoujPc6GOtKZJQ3CSK8sD3phuh+gModawnHE qjZvrugvNpbyLWGcFKEmNAtqTOHwWIyTH5LuA= 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=5ATCKzo/gzRmMNQS8TBoj8F2LcVte5l4YReuJidbYCk=; b=pvTwkGgpcGA5Q/04JZAPkEC8YCuIOeJlwUwd/iKxoLRMAXZIZata7UH4KPtmz+2Ll3 15MhbPLSUfcGRciIrjJ0xNIuVI/qqpHe6m4g1ENm5LZTNQhDh8/BKpon0wYf2AWbNseM yeln+h7rYTbwWaU0eSc9vQeSo37uehwirTZufEMmDvRsDgmKHahdNM2A6IIxerlZ+dUM kt1dCVCmIGTCrHn0VGoUMtQWHi/NlVQ5u0bSwUsDBOJRGnxWBeFDMxie0Q30QpkCQFHc 6ie6ITFwhFQNZwS1uFDVZmVTtaYNDczCAOjNFTTNg1uqtVn6OatPN6ZpBjNYP4V0OU63 E+iQ== X-Gm-Message-State: APjAAAWRtAIRuqeUj7SJLnN5NjJDBO7SnWXlwlC8KOsQ+7G0LOGiTSsf hu2XVZgqZ0mLE94npQG8svl/aA== X-Google-Smtp-Source: APXvYqwg1MbijmVQVnfYFIBi41a8NSAB0pByCSDUzo7KP9zG9KvOInzMkhGjNZLsNIqp3JTlAzNPlw== X-Received: by 2002:a17:902:61:: with SMTP id 88mr659964pla.313.1582743692593; Wed, 26 Feb 2020 11:01:32 -0800 (PST) Received: from www.outflux.net (smtp.outflux.net. [198.145.64.163]) by smtp.gmail.com with ESMTPSA id h185sm3973110pfg.135.2020.02.26.11.01.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 26 Feb 2020 11:01:31 -0800 (PST) Date: Wed, 26 Feb 2020 11:01:30 -0800 From: Kees Cook To: Naresh Kamboju Cc: Cristian Marussi , "open list:KERNEL SELFTEST FRAMEWORK" , Shuah Khan , Anders Roxell , lkft-triage@lists.linaro.org, open list , ankita@in.ibm.com, Will Deacon , ardb@kernel.org, "Guohanjun (Hanjun Guo)" Subject: Re: selftests: Linux Kernel Dump Test Module output Message-ID: <202002261052.62C3132B0@keescook> References: <202002251131.3216B3B50C@keescook> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Sender: linux-kselftest-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kselftest@vger.kernel.org On Wed, Feb 26, 2020 at 11:32:46PM +0530, Naresh Kamboju wrote: > Yeah i see this case at my end also. > > my two cents, > I have two comments, > 1) shell check I'll fix these up; thanks for the suggestions! > Test output with set -x for debugging shell scripts. > [...] > ++ dmesg -c > +++ mktemp --tmpdir -t lkdtm-XXXXXX > ++ LOG=/tmp/lkdtm-r5yZ7K > ++ trap cleanup EXIT > ++ /bin/sh -c 'cat <(echo BUG) >/sys/kernel/debug/provoke-crash/DIRECT' > ++ true > ++ dmesg -c > ++ cat /tmp/lkdtm-r5yZ7K This is the part that is failing and I don't know why. clear the kernel event log: dmesg -c trigger the kernel event: /bin/sh -c 'cat <(echo BUG) >/sys/kernel/debug/provoke-crash/DIRECT' dump the newly added event logs into a file (set -x doesn't report redirection to /tmp/lkdtm-r5yZ7K): dmesg -c It seems /tmp/lkdtm-r5yZ7K is empty? -- Kees Cook