Received: by 2002:ab2:7b86:0:b0:1f7:5705:b850 with SMTP id q6csp1137637lqh; Sun, 5 May 2024 19:04:51 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVyjbHiKVq7rp+hOi6xbd2ySN3yk9J4LEDdrTB2zvdl4F7oml2BTH0hOKTTedfqVJMN3n61GfmJj8gFCI6Ksff55o1GJQr7yb+w20G1Fg== X-Google-Smtp-Source: AGHT+IH5kX10S5R0PmdFqsQUiSK8GIuDGzXv/MKvH5Rxr7/63ZmPLqJHNsM2foyhP3YJ3sIBEg+N X-Received: by 2002:a50:9fcb:0:b0:56d:b7d6:d64b with SMTP id c69-20020a509fcb000000b0056db7d6d64bmr7334694edf.29.1714961091674; Sun, 05 May 2024 19:04:51 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1714961091; cv=pass; d=google.com; s=arc-20160816; b=ql1F1i2Af+uwXHauG5F2zQppRf5SltWq3JS0v1uNaLxH3uEb7A9WJ6fpwDqP4FDZMd erZiN6clm8dlC//z1vIFLWT9aZwcJZM2GqnJj/BvhmynARcbY1df0iTtMrO2ZLsmEol1 wansd81hEjDbam5a2MoOGNg1TOmXsuqK99z1aTTa/i82ySFuoAGNm/Speim5SctGxvUH ZF4AHNntXZXmYc2J0URiNnYOLEyNX2sTyXZv+nV4qHnchfdVR7nVwMul+GLvjnf/O8kj fMsVHldDOxEy3k04Xqa6Q1hMF8DQ7SdaCbeRcP9O+v1uU6gMQ6eDrKt/rxkn74p0pfLX e+8w== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:dkim-signature; bh=exY2+EBV7rKKf5A+MApdskgDLqNqkvJogkXu9c2BhNg=; fh=Uytf2OWpy3Wm9y2IYYJ69pf5PJXCnYGaadkCJ/VNj4g=; b=Dhkg1P8m46CyMUh+HLMaf3ltkq9wbFWeRRavVHcemrANQbPO/W+9o7ZgIVWnHzpmwr AFPmlO9q3i/6zaknUekvfQGsc8Xf5FWI84A4g6a9ay+wKiO4mZ6VFw0AmpSbkJrzU3iS ljY+9bu+EDfGyWSljESy2bRvpUfiTm1PkSv35z/sAEXKH1OSs2WqA5d8xy4RMmscUT/C 5OUMPZCDlzaUwDrTToI85fmNyeaIRtityvV3QBlwcpQ7PPVK+L+8qLDvNko0LyNK2gXy xQna+RCSjZZdRkutT2UTk/yiDyRhRB2u9QgQyqNRWGAI3zeT+77ozBlZf2abVk/JLE/4 5TFw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=ksRTZJ2Q; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-169248-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-169248-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id w22-20020a05640234d600b00572d5365da1si3522603edc.243.2024.05.05.19.04.51 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 05 May 2024 19:04:51 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-169248-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=ksRTZJ2Q; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-169248-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-169248-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com 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 am.mirrors.kernel.org (Postfix) with ESMTPS id 5FEDE1F219DA for ; Mon, 6 May 2024 02:04:51 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 9BAAF3E476; Mon, 6 May 2024 02:04:44 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="ksRTZJ2Q" Received: from mail-pf1-f170.google.com (mail-pf1-f170.google.com [209.85.210.170]) (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 894772B9B8; Mon, 6 May 2024 02:04:42 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.210.170 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714961083; cv=none; b=qt5LTM9RkpZm2I7jehdSG5VSj3XxlrxiWM7JOKYJFY2CPJ0K/kcewogIalL8FE9jFMhRsJFv0zQLUjAb4bZmG8s3GYxiTPcl0/FMCSnsOCUWxpTThJ5K/3AT/IdMjCwv1y/copfpm5bpv1ilzTtc3qpHtTCz0JfdfLkNIOu8Zk8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714961083; c=relaxed/simple; bh=hz/ca+J7Z712p1cKM6pciDLp5eHxR4wl9tG8AiSMRQk=; h=Content-Type:Mime-Version:Subject:From:In-Reply-To:Date:Cc: Message-Id:References:To; b=sU3eLFdzA/i7ja3G++VHXE3M3k6HScbtJeFBwPjWpMphpnVho9g/MEKUM2WYk98OmwA/KEyxbRVkOUzVFyFjS07leEp5wUYHzjy2CKf52suZGW5Q1mD3BYpAcaVFE262qL0dN/FgisLpFzpOiGduMXdm79nF72+HO4LNEQWKfDo= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=ksRTZJ2Q; arc=none smtp.client-ip=209.85.210.170 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-pf1-f170.google.com with SMTP id d2e1a72fcca58-6f44e3fd382so916338b3a.1; Sun, 05 May 2024 19:04:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1714961082; x=1715565882; darn=vger.kernel.org; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=exY2+EBV7rKKf5A+MApdskgDLqNqkvJogkXu9c2BhNg=; b=ksRTZJ2Q87Cpid2GnaB7yjEWLFRf2BAQRwLi/Jk6a3CRmtTJq4b5bJJOOClx0BaXwh cBBrNB+RsEAkIUfDz2Ww67eAMX4Huj73gZUxXs3CwrfAdj4pFdEEDKS8EGoRGxQVg5Ag WQT9O+xDb7MJR/jpwcDyPBp0z9/pAMExqXhtkZwjj28VZc/2ySvk8hr5H65UAPEIPIta Kqsyl7PpnN7dkDrn4sKj9k1/IXzMm31mrq5+2nwBzUsdeJXDgtIIlmv+wvoAeKw++MPr DDBBQw6H5Iz7cPRDUF6ipDy+FgDlry1e2yD33Mv1jDvWFVh86d613UQED9J29sV7wKzc tQdg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1714961082; x=1715565882; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=exY2+EBV7rKKf5A+MApdskgDLqNqkvJogkXu9c2BhNg=; b=RsFtUt+alcEtVJzvKF6Ft0OMAyJop6lwR/f/OCWOosdhkTkycSKOI+dgIOOb1E6evQ fDVIOu8JOPPknpVj1CQtKmXclOy8ztpq1JlWx3n72D0yVhuwdPprtb6e7uH2yQfcO2EX /Bzlk5KNtfcoWOfTu8Yz4LtDoHTVq5mfFskBap/U+ZnP1U1B0dCsVoeakIwAwS53XWOm /K8EZz/kOn+pMg7RGUE21ALKgRCIT9w7XtrDaiTfDXSlLP7S+GsnB+s8iFNO7Sw2rsj2 Z02BncyX1CrQG0ivahVmnSUk4S7NCgJjb9ELEP41Guo5qtGyeLcOia/RcTcDceRyDlEu tgtQ== X-Forwarded-Encrypted: i=1; AJvYcCUdJYCEtDIRPKdnuSw84XNYbk5wPnUkaS5w06TibaynDzbvuD/BwyGtf7fejfUDbor3rLSlpyMz56etl4tNUpTXvWGb2VIQt9IBT6qPM3twO/YbL/zLga94qN9VK6uE01ojtTW+z+t8s+UdIA== X-Gm-Message-State: AOJu0Yxi84Gt00EL01tKG2qwPqV2U4/q62+BoK5P26SeX1plqKXysRAV g8JBB8w90KjRJUvNZM6QVX9OyaP4tRFWlibC/NF3QEe87R+JuuxT X-Received: by 2002:a05:6a00:464e:b0:6f3:f963:505f with SMTP id kp14-20020a056a00464e00b006f3f963505fmr10001211pfb.5.1714961081797; Sun, 05 May 2024 19:04:41 -0700 (PDT) Received: from smtpclient.apple ([47.254.32.37]) by smtp.gmail.com with ESMTPSA id w17-20020a639351000000b0061cf79eab38sm5162651pgm.37.2024.05.05.19.04.39 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Sun, 05 May 2024 19:04:41 -0700 (PDT) Content-Type: text/plain; charset=us-ascii Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3731.500.231\)) Subject: Re: [PATCH] livepatch.h: Add comment to klp transition state From: zhang warden In-Reply-To: <20240505210024.2veie34wkbwkqggl@treble> Date: Mon, 6 May 2024 10:04:26 +0800 Cc: mbenes@suse.cz, jikos@kernel.org, pmladek@suse.com, joe.lawrence@redhat.com, live-patching@vger.kernel.org, linux-kernel@vger.kernel.org Content-Transfer-Encoding: quoted-printable Message-Id: References: <20240429072628.23841-1-zhangwarden@gmail.com> <20240505210024.2veie34wkbwkqggl@treble> To: Josh Poimboeuf X-Mailer: Apple Mail (2.3731.500.231) > On May 6, 2024, at 05:00, Josh Poimboeuf wrote: >=20 > On Mon, Apr 29, 2024 at 03:26:28PM +0800, zhangwarden@gmail.com wrote: >> From: Wardenjohn >>=20 >> livepatch.h use KLP_UNDEFINED\KLP_UNPATCHED\KLP_PATCHED for klp = transition state. >> When livepatch is ready but idle, using KLP_UNDEFINED seems very = confusing. >> In order not to introduce potential risks to kernel, just update = comment >> to these state. >> --- >> include/linux/livepatch.h | 6 +++--- >> 1 file changed, 3 insertions(+), 3 deletions(-) >>=20 >> diff --git a/include/linux/livepatch.h b/include/linux/livepatch.h >> index 9b9b38e89563..b6a214f2f8e3 100644 >> --- a/include/linux/livepatch.h >> +++ b/include/linux/livepatch.h >> @@ -18,9 +18,9 @@ >> #if IS_ENABLED(CONFIG_LIVEPATCH) >>=20 >> /* task patch states */ >> -#define KLP_UNDEFINED -1 >> -#define KLP_UNPATCHED 0 >> -#define KLP_PATCHED 1 >> +#define KLP_UNDEFINED -1 /* idle, no transition in progress */ >> +#define KLP_UNPATCHED 0 /* transitioning to unpatched state */ >> +#define KLP_PATCHED 1 /* transitioning to patched state */ >=20 > Instead of the comments, how about we just rename them to >=20 > KLP_TRANSITION_IDLE > KLP_TRANSITION_UNPATCHED > KLP_TRANSITION_PATCHED >=20 > which shouldn't break userspace AFAIK. >=20 > --=20 > Josh Hi Josh! Renaming them may be a better way as my previous patch. I would like to = know why renaming KLP_*** into=20 KLP_TRANSITION_*** will not break userspace while=20 Renaming KLP_UNDEWFINED to KLP_IDLE would break the userspace. Meanwhile, I will resubmit another patch renaming the macros as your = suggestion ASAP. Thank ~~ :) -- Wardenjohn