Received: by 2002:a25:c205:0:0:0:0:0 with SMTP id s5csp180459ybf; Wed, 26 Feb 2020 11:03:24 -0800 (PST) X-Google-Smtp-Source: APXvYqw2k8SsraEhClSF8I1xEU2UlgaVOp6NUejgMsHxf5qzmgJjtKSXVmwhE02bAX0agm7CVMOE X-Received: by 2002:a05:6808:658:: with SMTP id z24mr364266oih.91.1582743804530; Wed, 26 Feb 2020 11:03:24 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1582743804; cv=none; d=google.com; s=arc-20160816; b=UhRHgPDglp3UbjTWZlm006FBBMk545RwWbrdrJWLuUw4C3aUOxmftPpxjZIxHfUb1+ ZhBAfKgHKggckyTUZ4hsvjdUlJEQSKr73Cs4+TSx2gmgfv4bGfEWjZgo3TkUk592GjaM kwo0rINFPFBslzq3ui+AYIsUaTPzH1QdvlCoa5FJoHW+BZrtKUmht32BD7F2ZaoM2EmK rC3mexf6uY1Shzql0Si95MJ8HTj9248e7MtiTuvC7MTDMivXvnwlYu0b0Sw6uZfbPQx1 Fi4IpSGA60ZZ04bZprVf4nJIhQkufWAbX06SmHljJrUcN6aWSM63JLGp1uNkVe1osR0L Whpg== 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=5ATCKzo/gzRmMNQS8TBoj8F2LcVte5l4YReuJidbYCk=; b=FYa6dHQiHsCqYReDC1LuNIeCTU4phi97DMXMSWJlkbhr/Ku4Eeza1GuBBfWRf7rXXX ln3XXi2cOCJPhV2TeMsrsou01hemdT7iyExLwBaklYIz7R8rPZaTWf4gcuyiS0Eo3dtq i2N1C2+8SRQc6qUSyD7EY1ScKtpCR77Cng0rye8HccqTdcbLrlaoVdy4CYpX3RMp/vzA JWTh0R7Y6hB2Z+hQbM2ymEh2whQdSkkFPIR9RReoyjN+sJz1dxkFnS3hlF8r+C94F9+X Y177MzHpMUX4a0/w6gQ77xbm4OnRzdCv4sKpZr1zLHginXiXqSBX/oSigdLmfP8JMRRr gANg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=JN3PoAv4; 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 q9si75418oif.92.2020.02.26.11.03.09; Wed, 26 Feb 2020 11:03:24 -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=JN3PoAv4; 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 S1727073AbgBZTBd (ORCPT + 99 others); Wed, 26 Feb 2020 14:01:33 -0500 Received: from mail-pl1-f195.google.com ([209.85.214.195]:35052 "EHLO mail-pl1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727031AbgBZTBd (ORCPT ); Wed, 26 Feb 2020 14:01:33 -0500 Received: by mail-pl1-f195.google.com with SMTP id g6so70312plt.2 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=MxMBP+Xez/vzrreZvxgr/UUYPlI2gPw/SAUmClDrg6gKGuZcIAkVPE4JtBCpy5pSWa eNaLvox81l9Nr1tYdvU1O/bJpmHc40v+vhPNIo9T9IjD55YuvczomNpGXMii+l1W5GA8 WFeZvHGhNJ8rPEqmi1e84U44sE2Ihf4m9DDLCkPl81YQ2rnE1ldsegBpEm+7PWZX4LTg CvAnnv47vG0y7t67jFGQs8xRVStbKk4m/JMSZw4EC7r5CoJ6PaDr2gVwrfTarzM7GeRc 3nbJ/fM3iRrkAb4/AHD7KJWyBQk0mGMPZgVGdnWr6TsnbUrcumAtSao8gf5ucuQT5A25 P3Iw== X-Gm-Message-State: APjAAAUQFX12sjuz/oGoRfhUCULr/C+GGfECWuLyOQCr5tdYX8Hxs8LR vUVFEONO21Ukv+6UG0twrACV4w== 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-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@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