Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp1460157ybt; Sat, 27 Jun 2020 08:55:27 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzDSN8uDXUvBduuCY6M8IpF5//HdGpfCcT82Fm8iaZ4/Nwgz7X0/UokjskIiJmXyMjxmWcW X-Received: by 2002:a17:907:2118:: with SMTP id qn24mr7427462ejb.252.1593273327708; Sat, 27 Jun 2020 08:55:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1593273327; cv=none; d=google.com; s=arc-20160816; b=b5fm+N1JYhmG1nSqFqfxT78exp30ViX587mW9wKtRSjd3bk9yAJJfh2IWBbxDC7R63 Gr6UOGs5rUwxpr6sUbvnA9RFAm4ULyookelNHqgOmhD1mlbh6AICbPUClqeiixe4H1fY 1VMe8W+xk6ZWtup4z24G34HMowpLFwImsdzNCH5nY9FkdcQDTgFqUwwtIpdHKok0o378 lM5kc9V/iF6CR2TQAVGv9pC8ecowQ8zujlJAqb0weNScF8sBqWdQ/9kAN0nm7knIGssz qKNP4BVv8eiNcaiF8w+VWSE9EDiGBo0YlQc49I3uCFoeb8/gUvxNOgCv2CrujGbppt4y gBwQ== 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=41PjtVw2FCnymQIWQmtqJCNWG/zIBsJ1p+vOmqPkCKE=; b=xs1hPsLb63ivduQ/tNQfb1OZqS5X236Yu36Y0BMLGRXsVMkpj+kdwwyi+lfPIUAKit 4fcz1wr8Vq3YaE0XEdYLpCU1oGF5/qzURn+/wQuWqghBwUChHBY8hZYRS7+4z0qghu9P m+LZFjIsCWKPP2805ngg2+JjLeIDnAwLwgf+x2FMnSTyMvqSFecquwK5VHyA+LlilKu5 b9bQI6fWlEJxluBpDNya0PGC1Ff73ykxxK84sMoqbPxWjc2ygUAQPTWvG1eJt0/GNA6d K1IWiU2fggK0tUK8PhFrdQkmqKVSjTnOTxesRHOw6wolNFwjiQL5I9Dj8RRxB9RG0SBd BXjA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=BWOD2zVO; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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. [23.128.96.18]) by mx.google.com with ESMTP id z7si863153eju.478.2020.06.27.08.55.03; Sat, 27 Jun 2020 08:55:27 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=BWOD2zVO; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 S1726093AbgF0Pwy (ORCPT + 99 others); Sat, 27 Jun 2020 11:52:54 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50710 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725900AbgF0Pwx (ORCPT ); Sat, 27 Jun 2020 11:52:53 -0400 Received: from mail-pj1-x1043.google.com (mail-pj1-x1043.google.com [IPv6:2607:f8b0:4864:20::1043]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8320AC061794 for ; Sat, 27 Jun 2020 08:52:53 -0700 (PDT) Received: by mail-pj1-x1043.google.com with SMTP id b92so6188367pjc.4 for ; Sat, 27 Jun 2020 08:52:53 -0700 (PDT) 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=41PjtVw2FCnymQIWQmtqJCNWG/zIBsJ1p+vOmqPkCKE=; b=BWOD2zVOkpWNo2bPFp4ryz2GzTvlrG4eRcB7J1dRZGF2dC02SxWF6s4ngC2sUr5+Bb eDY2hiyrwzKyw5MPZkEq3pceBPMsMcWggsPLBtAFkb3BeqEQctFko234Pn4GYrqlFPY2 CUyBk7DmCZTz9+V2L2y1dJEjvvVQ3YRUIPMkE= 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=41PjtVw2FCnymQIWQmtqJCNWG/zIBsJ1p+vOmqPkCKE=; b=dV/DgU8JgaIQfrRcvYi9QWfacewZg7c0IRGk7YzKpIRAZPpcceRC1LOVgK9kNggCIM gQ0apS1NXyKVC1Zl/AFBIuEnK/igMgK6je3MpPGFZiw9Q/9fv3B8P3B/io5rKX72FSB0 k7hxBh7NCohYeCmTrN+0PWT5yNhSBSJBjq5TPOrukho1f7rGZFNkmsPHvBvu5lgBACj1 BLyidy6SyGTnPPNyIj5P/6Z3WK5Xsy5+SUafF6+4CNnQVRnLufDVXPBY6jqbcnG9exWi pmYgk5VP3mmzKcdxQWKiAxa+WFzN0DCl+98qtOC4nthXD1zc2tkz8Y035uU2ow1oPMgK XeIw== X-Gm-Message-State: AOAM5334UZDU3wWpVpyeJar6HbE9oZFga4VNsNkEyee9w8X/A5PBhpmz /5uKn/0XdR6BqCr1rVoJhdRfgstzKug= X-Received: by 2002:a17:90a:8545:: with SMTP id a5mr9009522pjw.35.1593273173171; Sat, 27 Jun 2020 08:52:53 -0700 (PDT) Received: from www.outflux.net (smtp.outflux.net. [198.145.64.163]) by smtp.gmail.com with ESMTPSA id b13sm7419617pjl.7.2020.06.27.08.52.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 27 Jun 2020 08:52:52 -0700 (PDT) Date: Sat, 27 Jun 2020 08:52:50 -0700 From: Kees Cook To: Michael Ellerman Cc: Shuah Khan , Naresh Kamboju , Petr Mladek , Joe Lawrence , linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] selftests/lkdtm: Use "comm" instead of "diff" for dmesg Message-ID: <202006270849.7190A26@keescook> References: <202006261358.3E8AA623A9@keescook> <87k0zsbubg.fsf@mpe.ellerman.id.au> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <87k0zsbubg.fsf@mpe.ellerman.id.au> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, Jun 27, 2020 at 09:51:31PM +1000, Michael Ellerman wrote: > Kees Cook writes: > > Instead of full GNU diff (which smaller boot environments may not have), > > use "comm" which is more available. > > Although using "comm" requires CONFIG_PRINTK_TIME=y doesn't it? No, it doesn't seem to. "comm" doesn't carry about the line prefixes. AIUI, the only reason for a mention of "sort" is because of how "comm" does its line pairing. i.e. as soon as it goes out of sync, it starts accounting for the disjunction between files. But that's exactly what we want it doing, and the prefix doesn't matter. -- Kees Cook