Received: by 2002:a89:413:0:b0:1fd:dba5:e537 with SMTP id m19csp884966lqs; Fri, 14 Jun 2024 08:20:13 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXUCwJdBIU8D9MgIfvYVgEtX2BdJS9JQwmxditVDaxs4DsoAGEar2HeJanoYHBfOQsnqm7+P3YNdfl1Pogkt9J+unl7Nn6AGYEMFwRXKQ== X-Google-Smtp-Source: AGHT+IFXPHxCEhvnsBnv50ccPOP9npXveBKUy7zdAl7Qx9kB4pG9aWKoSVM5yUjBTgMeHn37dNpL X-Received: by 2002:a17:902:d509:b0:1f6:3b15:82a0 with SMTP id d9443c01a7336-1f862a09145mr31729705ad.64.1718378413666; Fri, 14 Jun 2024 08:20:13 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1718378413; cv=pass; d=google.com; s=arc-20160816; b=J/SSZWhFLDGynjyzFZerqCYp2qUdLy/niYx+erT3zsHlj2fyFau5q8vIN/3ZGPTD00 5lOi7ksQuE8aF4oH26UoTDDFUrW3uiKThQS6pm/pqzZUvzImfoSKUOpQfMT6OVyUYWgE HSyJmDlt1WCZe7iiEVy8eBlC0EZgA0p93yUzkPE3QKEhfz4Vqk52U7N7pPcv89nCQRc0 2sFTgt4pt0b/EUezbAHzkpuh7yMwiJTQMLXHBcKj0OVQGQvk00Z16cnC3zQt93hkNqnM aSwYUXnqJbW1dF8AqFDUtcnjIn0URITyfxEBzz7iJR+N30H/SiI4Ll1FfjsqrxHmXVW1 d+oA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:list-unsubscribe:list-subscribe :list-id:precedence:dkim-signature; bh=PDBN7CfZoySclWGICiQXNm0dLSN3WzDrHOHH5KLuTBY=; fh=KWyNwzas6D1dalDQ8gBYCw8eICGaz4g3hV5p7GYlvho=; b=kjU7cn44XrXLpG4FvMl9/5D6/USYIg8rMHTc6ePFtbewfgfGqYygrCvYgeUTsumFx6 /XhLU1cpqPdAK+SldPoc3nVC6zJbquKTLscXblSgqMyawF00BfmdHpajwD8Jw+sxqlOh gMsT4RYZ1+VGOVYAiaYnpp+jCrhOz90Pg6kRXl2kxQC5p/9OOZmYZ5g2s9cVWYTm4bvm 7++b5nmlWw1OOo0o2aEq+AQt9WLiNvaUcpDHxmsu7sFalsvjUSWJvOJChnfKXzXh2ydY 3/7XhgIrFD1WwKryZ+EwzsNU+kEUWpXk4puCYL64MCVztWgogy7yzV+A61otxDw7wQPh jKGw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=RqiA2VIr; 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-215064-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-215064-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id d9443c01a7336-1f855ee1c72si18915375ad.366.2024.06.14.08.20.12 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 14 Jun 2024 08:20:13 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-215064-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=RqiA2VIr; 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-215064-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-215064-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 sy.mirrors.kernel.org (Postfix) with ESMTPS id 37738B29188 for ; Fri, 14 Jun 2024 14:57:46 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id E406E15FA60; Fri, 14 Jun 2024 14:57:35 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b="RqiA2VIr" Received: from mail-oa1-f42.google.com (mail-oa1-f42.google.com [209.85.160.42]) (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 B8F5F15EFB2 for ; Fri, 14 Jun 2024 14:57:11 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.160.42 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718377051; cv=none; b=BuUBncCFCx78CpTmmA0xChAB5iqlXWJ/i13MkD97mCO5C59ph6XS47I523rDMNRK6bVCIpk1MXfooFsaRBaRYEZZMzOWRC/HZbHcm84l6vb3RfkfUGS79f56XWrZDBhT31UymNB2U3XlDJiZuwKcKwECngxkJdY9jL/Eto3K/28= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718377051; c=relaxed/simple; bh=PDBN7CfZoySclWGICiQXNm0dLSN3WzDrHOHH5KLuTBY=; h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=PHwOAxlT3099cjqY7VmegoGuEkOCFAuFu/kU6zuYn6CytRsUE6KGp/rn4zFTwfUtPbGvCB9/XyX+A0Rr8cP26QCtGN6LzMdKDRkkxTq8ymbsYu2lALbEz8+jzG/TU92IkQN2az+B24rw6YnBUxzT1KhY0llyky8CimJv0d6Epa4= 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=RqiA2VIr; arc=none smtp.client-ip=209.85.160.42 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-oa1-f42.google.com with SMTP id 586e51a60fabf-254e42df409so1288732fac.0 for ; Fri, 14 Jun 2024 07:57:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1718377029; x=1718981829; darn=vger.kernel.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=PDBN7CfZoySclWGICiQXNm0dLSN3WzDrHOHH5KLuTBY=; b=RqiA2VIrxAOZYTsqAo8GuIbdlsUvpOHlVWfUE5OZ2lOHx3TehibFiFxCa4fso0dFQw ZdMZAgNLfrA9TEpk10rYcsqx2RmMkBADquXriPe8v0k5UoIjKTl/Lv4jDdQ2BX7K0nUz aE0bhrbcm7wLkCANOH5rpITri/4e+Bd+96WVo= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1718377029; x=1718981829; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=PDBN7CfZoySclWGICiQXNm0dLSN3WzDrHOHH5KLuTBY=; b=hTjq9RSFKzm9tMXu+bEfXCy6Le63Yynj9QVY36AneZos6g/TQ08DKQxXuOlPmpkbNr MmumNOVJiRx3CLTTGbSFHDfPbmNYXP6TkZfTJlX1VUY++xuWeRggJ7MkELMP5dykkmvp ey2wEzxmJDaRhEDDlujkhBByjVwMn1GyGzp22HbuN54R7Edo9k/3AID24UyswnhJBP5o j6dcthz5UF5W78l/CYtvcG7DcP9AbF5vlC62a2pt5HwL/sNqxwQs4yBriYoPg7xsHyMJ Qwqay0/9MVHtbgBRGVwtwMTYFO0DjyQsekgGI0ZTMZU53PGMo6QjtNsib3EmB6GrWwA9 YTUA== X-Forwarded-Encrypted: i=1; AJvYcCV3fV5ETPjfWG+Fq3mrOYS5aSAsuK7TEkhSdDVumQExOMshZbUUMstJO5gbN9liMu2PtzmNIap0VYQ6RzlhCvkIPshS555DhSIQB39S X-Gm-Message-State: AOJu0YzlxLghUK8GTbvbRBMEhUPwvkyxgGZkbS0vmEhTE/8bBV5hJmOY lRXEXGglzlsMTW6LGGvf5zoZC4nOp8TZ6wYVyU/xMn3cK4ebrg0ctYJ48Yo4ah+U6sfol/hn3qj w4/rrK9jBJ4DPe46X6V3jweeAnbj8Cp15BLPK2OnSwBG8NSbgTg== X-Received: by 2002:a05:6871:72c:b0:24f:c241:4d16 with SMTP id 586e51a60fabf-25842be40f2mr3448708fac.50.1718377029521; Fri, 14 Jun 2024 07:57:09 -0700 (PDT) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: <20240614023009.221547-1-jhubbard@nvidia.com> <20240614023009.221547-3-jhubbard@nvidia.com> <4c6ffb1e-0381-4d5e-afa2-f8809f0b445f@redhat.com> In-Reply-To: <4c6ffb1e-0381-4d5e-afa2-f8809f0b445f@redhat.com> From: Jeff Xu Date: Fri, 14 Jun 2024 07:56:57 -0700 Message-ID: Subject: Re: [PATCH v2 2/6] selftests/mm: mseal, self_elf: factor out test macros and other duplicated items To: David Hildenbrand Cc: John Hubbard , Andrew Morton , Shuah Khan , Andrei Vagin , Axel Rasmussen , Christian Brauner , Kees Cook , Kent Overstreet , "Liam R . Howlett" , Muhammad Usama Anjum , Peter Xu , Rich Felker , linux-mm@kvack.org, linux-kselftest@vger.kernel.org, LKML Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Fri, Jun 14, 2024 at 5:28=E2=80=AFAM David Hildenbrand wrote: > > On 14.06.24 04:30, John Hubbard wrote: > > Clean up and move some copy-pasted items into a new mseal_helpers.h. > > > > 1. The test macros can be made safer and simpler, by observing that the= y > > are invariably called when about to return. This means that the macros > > do not need an intrusive label to goto; they can simply return. > > > > 2. PKEY* items. We cannot, unfortunately use pkey-helpers.h. The best w= e > > can do is to factor out these few items into mseal_helpers.h. > > > > 3. These tests still need their own definition of u64, so also move tha= t > > to the header file. > > > > Cc: Jeff Xu > > Cc: David Hildenbrand > > Signed-off-by: John Hubbard > > --- > > Acked-by: David Hildenbrand Reviewed-by: Jeff Xu > > -- > Cheers, > > David / dhildenb >