Received: by 2002:ab2:7903:0:b0:1fb:b500:807b with SMTP id a3csp1440680lqj; Tue, 4 Jun 2024 01:17:24 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUeEvs5au6/aYCNT4GnahK9vhM4Ui8oS+cwY/p+wrQhirySm/5iI02D7lzq6zNCw/pGd3fwPr9xtNI0TeBd/cATQssE7RwxvrGLQtadnQ== X-Google-Smtp-Source: AGHT+IEVAKw9JTD7C6kn6Gbn1RmJttAwTb216M742+lwI27eFbYevnP5DdIv8241OmuhlTPW+y5n X-Received: by 2002:a05:620a:3947:b0:794:f0b6:441 with SMTP id af79cd13be357-794f5c89b19mr1343964485a.45.1717489044747; Tue, 04 Jun 2024 01:17:24 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1717489044; cv=pass; d=google.com; s=arc-20160816; b=PN8BSvp9TRvHX+/AAukdmzm3tdkBCfORLjA268zMa6Eup/agGuL58xAD+PNolBe2S3 BIkyZpA9hQRjfV112bK94+3a5ixVnBVxB0NjpSz0xPljvM0etEbpLxT6DQh0pIuRG5cI GlZSlsES8cw1es6y8CVnlhvQBZm4fdp6aDx1tIiaM1wGIoCFAGJ77HRylS9goY29EcqL p8Ijiv3i2u0SoXfol90h3RAzaisO8MO0yF7D/XwXvSZPAlOI3gJn7xtjb1AwZ/MVs35W 4AYVk15gE/WM45qvezR9WvYIeeZmmmmvQQq6QpX43b6NPwvbfstkhqp39H136VRONAoc +jPw== 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=9Wf+j/r8bT2i678Is404RDPuyVL0+W6hBWBeanTJwSc=; fh=K6q+nokaA4sRPqtnKySSwQ5mdIHXACX5HsYQwO9/2mM=; b=ZZtOJwDjkzePtSp6xPjr/522mKzyI3gNjJYwqB85a+e8fXC6uh8vVIcLp3Jii0UL7N +VHLGKe7wpYeTijTMPxkhpDp/RZBrMx6dLNTGp/KhIvYewbUXZJ0gupHQKWFlB2S64YC J3Wa0RyxfVtdcRBBK5oXaqiL5QWQtbBfFHhmVuNo2IGiFr0sIfccdv1zJT5Qa7Hz4wXq 3m69chcvuTw7/NFddBTcYGTBuQ250mqH8SQ7CQzKjEUYD99rx0idl3qRMrnFC1GIphpU eKjuhOKx6az3DbVNl3cQ5rr7t2VcbxYHjdYfwI2Sk5Ueiv5WKdOCIIl073ByQ+ZP5cg+ zlGg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=UdP9Ljqq; 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-200235-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-200235-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id d75a77b69052e-4401fe59f36si8654501cf.807.2024.06.04.01.17.24 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 04 Jun 2024 01:17:24 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-200235-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=@gmail.com header.s=20230601 header.b=UdP9Ljqq; 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-200235-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-200235-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 ny.mirrors.kernel.org (Postfix) with ESMTPS id 77C3E1C21A98 for ; Tue, 4 Jun 2024 08:17:24 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 986DF1422D0; Tue, 4 Jun 2024 08:17:19 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="UdP9Ljqq" Received: from mail-pl1-f170.google.com (mail-pl1-f170.google.com [209.85.214.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 969451422C3; Tue, 4 Jun 2024 08:17:17 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.170 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717489038; cv=none; b=ZlQboPFPrjhtsZkndTVS1JHhjsK/TUW9+2ygblI6VedYXGN99E5LFbWTonMra6UGxu8SqPMvew8wVBeOCOK7dPhO7a4A6vTSZ3ptdQSuaZsAi8TJBvdfglWAGkmi22Jo9BAZjjT5gFppsUlI6y0Bbk7unDO5Xz9MPiY4qIrJcVE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717489038; c=relaxed/simple; bh=9Wf+j/r8bT2i678Is404RDPuyVL0+W6hBWBeanTJwSc=; h=Content-Type:Mime-Version:Subject:From:In-Reply-To:Date:Cc: Message-Id:References:To; b=Lqn8Jkqyu3vkFMyOoG2BuXTa3sDEcfD6BeWjb4R9FQMMzXj0Gx28m267HHrtwGnLKSkR+OR0vUcEYe5Xlytmh2BSD7N3J8eKrrCH2iDAIe5VihwPnbgQ8ULTlnQ7/fmtJaITfWgWxVLy0Y96tt8tV0V9z6w5Pm2baHE4p27eFXw= 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=UdP9Ljqq; arc=none smtp.client-ip=209.85.214.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-pl1-f170.google.com with SMTP id d9443c01a7336-1f6559668e1so19924415ad.3; Tue, 04 Jun 2024 01:17:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1717489037; x=1718093837; 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=9Wf+j/r8bT2i678Is404RDPuyVL0+W6hBWBeanTJwSc=; b=UdP9LjqqY3UYpJUxTaB+OoM1l2P7DNgSysqOstiHK8/jt8EChNsb69vysMDo0sEhn1 m+9XKP2bsA1f3JGLRaOdZ7rlXeDPGxNP5oTKQi1/96ZD+lOw9Z6tkB9q+0J7H7NFGakq oYWigr0r3QHiCTRXNxVxrxzU0BpfdyA2TgdhO16BqXPKZnpA8VKxGSmRGb5N0Etz5ZQN y3F2b84RS1QQI6sZlcp1AuRtxCSgDSxbGsQa0XJtfl6seLiJ+nWxEn1/4YFMeLqkW4K8 VFexMvC8gqw2jB/A+kh7U/cJzPF5xgs/wPJbkOH0PuMX5OR4bbAWIXUwjR+JSUzU4QEB orbQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1717489037; x=1718093837; 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=9Wf+j/r8bT2i678Is404RDPuyVL0+W6hBWBeanTJwSc=; b=iM7oRhvpPvMFPXipvsazjW91TS3FxtfgLq5vHrKJZOOHwPT5bk/msQyS/fyptxs+r+ BWUPuUep5y0yyUkNQeG9mX5a025d0M7JCEyMqKNiLPnZCaJJ0rIXuIWK4jxStzJZ9u9I JhoMoHTPQavslcmrM8WHOBxejxJIZLn19CyKMAIP0G/n7MbgYZZezT1XpGnq/td7JDYi YzC190W+bng2akeQwp7u28/SJLF5aNLrFA6z/66/8qoDej9jD+g5I+ngANbamXNzaZtA kRDmjoL3LTgGEVQKd6LQeVrmrtIg2p9CB0swE792DE8dlc/jwfvdIk7hbHrgJS4XRaqP kT3g== X-Forwarded-Encrypted: i=1; AJvYcCWpqm5YWoNboQsKbFmlLXRl0HnYK+1GPXwSS97UzP+BQCrW+EP5+tYkP4WDpHCZY63018TiLrPn7x6iaNSwWnG22K4mefVeAVgq6/OVs16n3v7G8Bdts8K3sZsdC0xVHSsAG9sMOFGJTwVq3Q== X-Gm-Message-State: AOJu0Ywedg/Aa9SPM+LK8pdBoKiJQrmlo3zumgTJxPls1TWpaqQJ+K36 2IAYLtjQKC/F+7Rou0mRev727djH2GcfDhbqYbRCwoMD2QkeKzkohkvXpw== X-Received: by 2002:a17:902:e5c2:b0:1f6:8290:175a with SMTP id d9443c01a7336-1f682901acamr43966985ad.40.1717489036496; Tue, 04 Jun 2024 01:17:16 -0700 (PDT) Received: from smtpclient.apple ([47.88.5.130]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-1f63232f26dsm78302805ad.46.2024.06.04.01.17.13 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Tue, 04 Jun 2024 01:17:16 -0700 (PDT) Content-Type: text/plain; charset=utf-8 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 \(3774.500.171.1.1\)) Subject: Re: [PATCH] livepatch: introduce klp_func called interface From: zhang warden In-Reply-To: Date: Tue, 4 Jun 2024 16:17:01 +0800 Cc: Petr Mladek , Josh Poimboeuf , Jiri Kosina , Joe Lawrence , live-patching@vger.kernel.org, LKML Content-Transfer-Encoding: quoted-printable Message-Id: <0C2ABDBE-FBBA-4CD6-A903-B146EBBF4AC8@gmail.com> References: <20240520005826.17281-1-zhangwarden@gmail.com> <2551BBD9-735E-4D1E-B1AE-F5A3F0C38815@gmail.com> To: Miroslav Benes X-Mailer: Apple Mail (2.3774.500.171.1.1) > On May 31, 2024, at 22:06, Miroslav Benes wrote: >=20 >> And for the unlikely branch, isn=E2=80=99t the complier will compile = this branch=20 >> into a cold branch that will do no harm to the function performance? >=20 > The test (cmp insn or something like that) still needs to be there. = Since=20 > there is only a simple assignment in the branch, the compiler may just=20= > choose not to have a cold branch in this case. The only difference is = in=20 > which case you would jump here. You can see for yourself (and prove me=20= > wrong if it comes to it). >=20 > Miroslav Hi Miroslav, Yes, more tests should be done in this case according to your opinion. Regards, Wardenjohn