Received: by 2002:ab2:6816:0:b0:1f9:5764:f03e with SMTP id t22csp1668353lqo; Sat, 18 May 2024 13:36:52 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCU46LAiS6WdhuBJcHE2GJ7lUBJUMXgOKu6R0JQtDanqW+Db0G4C9xOKDZ7ML/VLu6eCCiDKo/1EPkxSIGPoYNjKNO3BjneivTqnRBSRQw== X-Google-Smtp-Source: AGHT+IGk5F9fuHDuARH/TOnIEaUnXtG4nd0C4s/ooq+FVxtytInguST1PiU3TnzZdgVOzuCnngOu X-Received: by 2002:a05:6830:1e47:b0:6ef:9ec1:2bf8 with SMTP id 46e09a7af769-6f0e92a7e7amr26691936a34.23.1716064612434; Sat, 18 May 2024 13:36:52 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1716064612; cv=pass; d=google.com; s=arc-20160816; b=gVqYwMea7N9QmxC9Glph+G/lOSnT9MElCywNmpr41F2R7sIUXBKdFynjsEgeebPdwI NAezWABDac9lhhT5D2pNRkKu8A4RF8ZzTc7BC7kNSTwN9PvIpNmXJca4BEA+uxhgzdDX QCZ/lY6XI8rFnPcf0pr3mHnsOjCLErSohCwyX/Llaa6j6j0xlgSHD+aeJpIZR9Ri+O1+ 6uAk8wsGQXFGU0m6Z+ALETQZna8utiO/TmBvc3wiMzNpDRXsQvzm1VDAld/+Kj1m4TxD NlUJ+1qfM6U7xLyFO8gT3RptX2MUuJXFQ86sQE4xHkbSufZCRn2vI/cUiBRAPpA1LEl5 s2ZQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=uYrpYXWxhgivrBCHpRYlsgoARFi6ym7CIXKVYYN00dM=; fh=s0Fh3K+4P3OJQI0aEmFl2atD7+jJ9YJzvusduu6lj7c=; b=RQFbJ79xWZ9Ev3et81a8aRfFf8DgTHO6+BLhcFaRZd4vQYTB3YYvEVLLaLFbQbshRr jHgKPlOaOeieQ78jOCa3BQboPapGkGUXc9WAK+il2Ocwb6C/kksCAafrmy/lwXf6ONlc 1nB9RRXV2tCOsee6mUaeTlswjNv4zuKjGMYTcsRstUwf1aKP7h/LDTTf4GRf4nOb0Xq1 SiYstdxATLr8s/bDIV/p/0anaDoiN1HJYxB4cn27XrX0WzBbKrWbWKEwKHS13Kk/Em6w aR/dYr+t8+LFVkNJF+SLSPJl1ksb9YT9K3ypDGa3+AzdgI8Hzba6JRpJyCptxSxVhIsd cy/Q==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=NxAvRaw6; arc=pass (i=1 spf=pass spfdomain=chromium.org dkim=pass dkdomain=chromium.org dmarc=pass fromdomain=chromium.org); spf=pass (google.com: domain of linux-kernel+bounces-182958-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-182958-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id af79cd13be357-792bf277f8fsi92721985a.90.2024.05.18.13.36.52 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 18 May 2024 13:36:52 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-182958-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=NxAvRaw6; arc=pass (i=1 spf=pass spfdomain=chromium.org dkim=pass dkdomain=chromium.org dmarc=pass fromdomain=chromium.org); spf=pass (google.com: domain of linux-kernel+bounces-182958-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-182958-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id F365F1C20C1F for ; Sat, 18 May 2024 20:36:51 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 0210060DFA; Sat, 18 May 2024 20:36:46 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b="NxAvRaw6" Received: from mail-pl1-f176.google.com (mail-pl1-f176.google.com [209.85.214.176]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id CD2F048CFC for ; Sat, 18 May 2024 20:36:43 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.176 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716064605; cv=none; b=RH5FDiNmCky1bVpqm9xK7w4Li40N3KRgF0K5AUjv2rbC6C5Lw+WHEUf86PBBXvKwGXyU/IA8TydKGJGapqDLc+DQGnwLCNufrbi9lU/AbKRNtYwCr1SBAX5n2ecCy8B7u5F3zFDuD7W0YmBgIpzdWogwM/iluA5205mdkmhvfVY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716064605; c=relaxed/simple; bh=axTlcxEqR5hWie4B2KgVAVfPcFQmVZBZ8j+fzB3XLA0=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=Bx6md+/kksqHa0pJ4YvdeVtwcVS+7EMOrMesybbIoq58OaOf0J3RA0FjVy8dOh7KycxzFppEnjCbb2inwy+KEaU+0hFJLh/gT83d/IFzGqgPS1zbYTwfGjCqBWWS7COdm6PV/CkIaiGC4Ywa+945J+NRHZJJ+Dw5cD3xkP1udDA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=chromium.org; spf=pass smtp.mailfrom=chromium.org; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b=NxAvRaw6; arc=none smtp.client-ip=209.85.214.176 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=chromium.org Received: by mail-pl1-f176.google.com with SMTP id d9443c01a7336-1eb0e08bfd2so42795465ad.1 for ; Sat, 18 May 2024 13:36:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1716064603; x=1716669403; darn=vger.kernel.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=uYrpYXWxhgivrBCHpRYlsgoARFi6ym7CIXKVYYN00dM=; b=NxAvRaw6J4ZcTItRyhOV/WE51I8acFGrx7DkfWw5xb35wQT5zwYDHH/U7jXzYf3HI9 0Tpx6uDQs30UamL9MW6/xg98UpAkey+4IuGlUc5nJKCQ9aZtVYa5l91L3oJ8eXFy9SWe 28dcUQK2PyO3jBIMhrHqU5jh2DvybI/bGfWlM= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1716064603; x=1716669403; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=uYrpYXWxhgivrBCHpRYlsgoARFi6ym7CIXKVYYN00dM=; b=elrlBI6Ey0JV09f4edqDHISOr/bDikm2B08Tj33zEsVaTvUrh2HB7shoEmdo0zsRkH zeqInyDe4Qk8vaw1KbqLhrms3tPExaf0/5x5+W6E2qtRYLRRPiakzITiAEb8fWJ8aEtR jyxPMtZ9EfyXabNXfAUHYpZY994i6aX0F87xbMwlcsKH9EcMTvZAOOYLZ8DfFiBgHnTU IYM0JDSw6QJ/bLPg9O9XDAmfu7ylvGnMUE+0MyF1jCogLOIJV0RSgOwDfDNG50MpaVrt 1IUV3Gbz+IHkn1uVPG4AQ6N/0UAhv8BJZYWSi9T8+vPd+GKKDCpylj0gVdUmpKfUYIkl +NjQ== X-Forwarded-Encrypted: i=1; AJvYcCXYbhAqGc7QbQSDjskWvp8lIgiZWFDGdr2wg8wKLHAWj6ZHc5lA/V4PalVaDdf65JBquQ12xz5b2KPAXjjVqGu/+jyad6SwVCuVGPTk X-Gm-Message-State: AOJu0YxsODIIpnvGfB15n/q/b9iBVbqZVBEsE2dHa6LHLCy7RboiYxmP PbAyfaqdUKo9WrwzwUivQZal964bB/KN8DBm4egfUHHHL6frTkRWxHnV90amtg== X-Received: by 2002:a05:6a00:1ac6:b0:6ea:bdbc:614 with SMTP id d2e1a72fcca58-6f4e02b245dmr24104637b3a.13.1716064602761; Sat, 18 May 2024 13:36:42 -0700 (PDT) Received: from www.outflux.net ([198.0.35.241]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-6f4d2aa01dasm17107542b3a.92.2024.05.18.13.36.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 18 May 2024 13:36:42 -0700 (PDT) Date: Sat, 18 May 2024 13:36:41 -0700 From: Kees Cook To: Alexandre Belloni Cc: Shuah Khan , Masahiro Yamada , linux-rtc@vger.kernel.org, linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org, linux-hardening@vger.kernel.org Subject: Re: [PATCH] selftests: rtc: rtctest: Do not open-code TEST_HARNESS_MAIN Message-ID: <202405181335.00B6D2F@keescook> References: <20240518001655.work.053-kees@kernel.org> <20240518202354d5422c77@mail.local> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20240518202354d5422c77@mail.local> On Sat, May 18, 2024 at 10:23:54PM +0200, Alexandre Belloni wrote: > On 17/05/2024 17:16:58-0700, Kees Cook wrote: > > Argument processing is specific to the test harness code. Any optional > > information needs to be passed via environment variables. Move alternate > > path to the RTC_DEV environment variable. Also do not open-code > > TEST_HARNESS_MAIN because its definition may change. > > Th main issue doing that is that this breaks the main use case of > rtctest as /dev/rtc1 is usually the main target for those tests. Having > the RTC_DEV environment variable only documented n this commit message > is definitively not enough, I'm going to have to handle zillion of > complaints that this is not working anymore. Hm, maybe switch the default to /dev/rtc1? Maybe there's a better way to integrate arguments into a test runner. Right now the core harness code is doing the argument parsing... -- Kees Cook