Received: by 2002:a89:d88:0:b0:1fa:5c73:8e2d with SMTP id eb8csp390377lqb; Fri, 24 May 2024 01:09:41 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVFvovbJ9FRqSp8uaCYkTJ9mNv+U7NCWIROWxmqDGiTAUvKlC260ZiWaX3tgQHxqAEqT8U0bbv2QUPGGtQNK+bmXfW3iptq7Od/l+1g1Q== X-Google-Smtp-Source: AGHT+IEt/V8CgNYEdgyWniwkG0pW6qARHcXKbv6Bi4f5JDDo9fF6u/G4c5QuMwvJmNNptmdPoDIJ X-Received: by 2002:a25:ad0b:0:b0:de5:5cbb:d4a8 with SMTP id 3f1490d57ef6-df772240e64mr1620480276.54.1716538180759; Fri, 24 May 2024 01:09:40 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1716538180; cv=pass; d=google.com; s=arc-20160816; b=o9SyTBYxAg0p4nOCLGeN3MCAmLiKl8FpLEgtdjba+AcADH4bBveLxjXkip/ZGlGDnl JtjvF6B9ZCwVoQd/i3oYthZxnD3b3qA73vLguO/WMfKHllIroHkjbNDApkcnQ1PO1ugu v+MA8v0nouE0MOLGjUiFqOyvvnF69BtcsGMJ/0nA3iB5nbHG0DBu/JRmfpW1DxMPIrv2 F6Ul7Py8Tz9hT0OhjyqYTu3cuBJrMnVvPJ3OHK+wOd8zW/Ivp4bfPsd1vhkMDKwyAbsN 2Bhab2NNC6xX91R0NQRfaZ5irAXW6zBEwjhU7FGGWJ8g0n88XcJDVEbCW1RmDPI0cdmU uVQQ== 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=Zkj2JsIkfE+bq2wOsgBsTDSgz21PZZORITW3xZI1H74=; fh=8raoVCduGbfyfHPMC4Xx7yT3Kny+5SiNpnUhGqg+UVE=; b=svMaQjoUzJ7UU7sJLNA66CM2eHO8M1VaRs4JZQkqrlAbZCJj9ikv/elRQiWA877PmC ROQFAtEahk/yArE4ydgMYnuGRPTJcssA4LrIOSq1eM8kCe38nI+O2q8bZ2lS4ar6aG27 Syg1fII8mcBsb4eadgjoNi7lRby8yUDjlw+uKOxpBPexmUP5NxaOuSJgPMLazpIuopK5 TKU6A78uvkEX13BdPlg1CR55UBdydNrU1Mp6yU/awYsBe8thkmJChMp5Aw6q+4u9iwoU +u1T6XRBTuwYdt83mXN7tFMAQKJwm3MQK/wNRPg6zrSFGBWrEBaefh2WBRCIrftYPYuX Kf2Q==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=UPYxb0eJ; 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-188436-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-188436-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-43fb18a6318si12946141cf.314.2024.05.24.01.09.40 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 24 May 2024 01:09:40 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-188436-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=UPYxb0eJ; 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-188436-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-188436-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 6FD2F1C2135A for ; Fri, 24 May 2024 08:09:40 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 6F2DD128814; Fri, 24 May 2024 08:09:34 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="UPYxb0eJ" Received: from mail-pf1-f179.google.com (mail-pf1-f179.google.com [209.85.210.179]) (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 57F7E17578; Fri, 24 May 2024 08:09:32 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.210.179 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716538173; cv=none; b=gHSGXZQy4IqG9ENK7U/O3HE6+M2b5zhA/iugiQJMpLvQ7obKd3ZZjJt5iMyanxEqCZaEa8m9//1v+GRHv6R3YSkp1CMIYAFXaoN/ahqudVw01tfi0DLE5grcsYn0oGwfkodA/7DiXEkmgkaEJAlLz1hlagsQuQ7th110T2nUx08= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716538173; c=relaxed/simple; bh=Zkj2JsIkfE+bq2wOsgBsTDSgz21PZZORITW3xZI1H74=; h=Content-Type:Mime-Version:Subject:From:In-Reply-To:Date:Cc: Message-Id:References:To; b=RqL0mqTRnKGFLXbjhIseaiuJP+BOrwNbufMEUONkzEk2bFzGM6MJuXaG662Itl4owwMPIrIx9vmC1tm5YyFq5u6pudLz29yWtJqI8KdFqKmOZjicu1h0DTlmU3qbHbHaDafD75dw6McfYYWE4AHj6/UDfT2mtvN1eGv6q6YYdmw= 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=UPYxb0eJ; arc=none smtp.client-ip=209.85.210.179 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-f179.google.com with SMTP id d2e1a72fcca58-6f8ecafd661so574426b3a.3; Fri, 24 May 2024 01:09:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1716538171; x=1717142971; 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=Zkj2JsIkfE+bq2wOsgBsTDSgz21PZZORITW3xZI1H74=; b=UPYxb0eJWdjue9zhgYHawAOlmqAEwHCT7WSCYyh8CkYNkG2rKKLU6Sqbtz9ma99rGh 8XvC1rqEOjIShJX9lK59eIqxtuHUBUhse0p/8HhlALaVyo8szmEPLaH5rJgpcCR3774F KMs8nc1B+fzCoPJGtueWHkkOJjxuB6wUpnikGDCcj2+VHkwQr67zyUajc73vIYSnexPP iu3aKub1zvUsb/qolHCdGGg8yqhe48wnZqHB+0q22cSBYQvBEdLxvmhiCCI0de/u0Wxk aUU1Hy3STdf1G5G0o2B9zj2xYZSuIb7BY7FIN/BO4K4G1J3q4eVdarp1WLj6hC3umJrO wvLg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1716538171; x=1717142971; 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=Zkj2JsIkfE+bq2wOsgBsTDSgz21PZZORITW3xZI1H74=; b=hBN+bRNeI8lUK+Cgf+TGSrbDvcYszL6+/74iXd1kY8wwTR2QdiOXE0vFvdulGwQXQw uI7dAc4WBPUHou5atDPCJu6gLXLIZ0h/Vjye6pUboN7J8FaelMzIPCO263xL/XYo1KT1 /sNMWuL0l1WMRoSQrqix/uKSzH3s84oY2gytWLEqrB09bFdwN60+3Cx7AGUuv0SX87CO ZkXIzwdexQXEeFCrrRQ+eDC4I56fIqUl4dXF5OSRaeA1wtTYDm1w+YlHe6iVm5nQPz6m CGuJPTn9usgJBXmTPnDJnRaYA+U6Z4N9v6tocuFxmSwWWMtQpcFzNhLjWjeuDhSi9P4g YH5g== X-Forwarded-Encrypted: i=1; AJvYcCWiNopqV8k0TqaucKH7v+M1Vb+QId/OKinjCyP+LG/WNRq6O3EXFaCnw2dJWtnSro0z/2+uRO/31LTyq8GFooqQgS8NRnBl94UnWJ+XWNovmVMhzZtDooygYE2eambyAcaa5TZkQi9v2q6S5w== X-Gm-Message-State: AOJu0YypgHYlflkqYqX51MSQ/6tDG8o3IL88kcklF6jJs36IItJ+CDpG ZotkhO34uC9g0hQ890wxTq16lxjtrbAMsXBIYq3ZSVkLwxiwUk3ZNzWBW45e X-Received: by 2002:a05:6a20:3d88:b0:1af:e151:a934 with SMTP id adf61e73a8af0-1b212e5c01emr2044559637.59.1716538171508; Fri, 24 May 2024 01:09:31 -0700 (PDT) Received: from smtpclient.apple ([47.88.5.130]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-2bdd9f4c604sm2739097a91.41.2024.05.24.01.09.27 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Fri, 24 May 2024 01:09:31 -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 \(3774.500.171.1.1\)) Subject: Re: [PATCH] livepatch: introduce klp_func called interface From: zhang warden In-Reply-To: Date: Fri, 24 May 2024 16:09:10 +0800 Cc: Miroslav Benes , Josh Poimboeuf , Jiri Kosina , Joe Lawrence , live-patching@vger.kernel.org, linux-kernel@vger.kernel.org Content-Transfer-Encoding: quoted-printable Message-Id: <17CDE51B-D42D-471F-8E32-64C8D9C06413@gmail.com> References: <20240520005826.17281-1-zhangwarden@gmail.com> To: Petr Mladek X-Mailer: Apple Mail (2.3774.500.171.1.1) > On May 21, 2024, at 16:04, Petr Mladek wrote: >=20 > Another motivation to use ftrace for testing is that it does not > affect the performance in production. >=20 > We should keep klp_ftrace_handler() as fast as possible so that we > could livepatch also performance sensitive functions. >=20 How about using unlikely() for branch testing? If we use unlikely, maybe = there is no negative effect to klp_ftrace_handler() once this function = is called. Regards, Wardenjohn