Received: by 2002:a05:6500:2018:b0:1fb:9675:f89d with SMTP id t24csp490846lqh; Fri, 31 May 2024 07:34:23 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWiJAC7FP3sJywuRLU2Tu/X78+IjKl/NuxpqrT5bThoqi9mU/tQwOSzmImalP53Cz3mJqKcPwYGBc9+p8tP9u0himM3LAXs+5qEegBdag== X-Google-Smtp-Source: AGHT+IE3zeIud3abA6j1oRowHJ++dFpKci0dIVNrYujMkOi0lUazh4BnzPs5wNqslfe8Ch1StKJg X-Received: by 2002:a05:6a20:3c86:b0:1b2:64c2:c224 with SMTP id adf61e73a8af0-1b26f2051abmr2481753637.34.1717166063045; Fri, 31 May 2024 07:34:23 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1717166063; cv=pass; d=google.com; s=arc-20160816; b=N6WmbkmrGOEmwzce3zTcYw7GoOb8VQ7c90nC/7A/dJ01pIesnPKM2RZ/yDndyS3HR7 fcxKBRsTuXHbG4eZMcffZI30nnMjlVFFWh4Brg6rhW/klh9IIfKEbG/b3ie5H3YPLJES UfTRGR0V9m103SOslz1JVWDJlt+pzSmEfFsv+T26CbVcePtPEqMDT2cWWi/n0PkL8rFa Swg3hRGHTPspEnJKhDUP7P8loSAdDHLTCAYER7yvfkDxZ8B/OeuXI54p934ufEzB3uLg Pi1LOwOXJrZnxjyhgJvXYi3UbxG5esJTwF9dqrGelhNXycaCDdzwp5GCkecL1dar+ohX CjXw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:list-unsubscribe:list-subscribe:list-id:precedence :user-agent:references:message-id:in-reply-to:subject:cc:to:from :date:dkim-signature:dkim-signature:dkim-signature:dkim-signature; bh=AO8BLC7Qkg5rQsHrBBnOGJ6JR70Q2hPHi932MvWcJaM=; fh=JRscDopyUO+DSMTiGhh8niWSan3FKuxUwS24/TLqfxw=; b=Tm/45v182+XTZ4beCJMlSPBiD8TDIg8vjDRACtcrnWskHXIyJDNkOkgBykvtpuY5GQ cqqVZgxI+h5ZJqvO32FYYl4Riy+V2gGiJcu7mzenMmWQ5A5UvgOPd1xMoK7PzEleQuG6 vXlvQGLfu8MykToyNOwAtYYDYV1ykk2+AGLr5J++2Vylt7IpOe5O4Tu6c5wAIewgufFD wpRCZwTA2ALq9BsF1uMpaRJv8VzALTklkMxN6xN6oeeceRzC5GCWWnagpFGTRZwJuxnN MWAUjP4MMvbGk6lBcvRNqFHtjyOiQpTLXdgOOVYBR+tXDGZdMM0q7s9y6yphqMeDr/hH 5jfw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@suse.cz header.s=susede2_rsa header.b=HWU0AKd8; dkim=neutral (no key) header.i=@suse.cz header.s=susede2_ed25519; dkim=pass header.i=@suse.cz header.s=susede2_rsa header.b=HWU0AKd8; dkim=neutral (no key) header.i=@suse.cz header.s=susede2_ed25519; arc=pass (i=1 spf=pass spfdomain=suse.cz dkim=pass dkdomain=suse.cz dkim=pass dkdomain=suse.cz); spf=pass (google.com: domain of linux-kernel+bounces-196945-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-196945-linux.lists.archive=gmail.com@vger.kernel.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 41be03b00d2f7-6c359e0994esi1735233a12.251.2024.05.31.07.34.22 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 31 May 2024 07:34:23 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-196945-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=@suse.cz header.s=susede2_rsa header.b=HWU0AKd8; dkim=neutral (no key) header.i=@suse.cz header.s=susede2_ed25519; dkim=pass header.i=@suse.cz header.s=susede2_rsa header.b=HWU0AKd8; dkim=neutral (no key) header.i=@suse.cz header.s=susede2_ed25519; arc=pass (i=1 spf=pass spfdomain=suse.cz dkim=pass dkdomain=suse.cz dkim=pass dkdomain=suse.cz); spf=pass (google.com: domain of linux-kernel+bounces-196945-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-196945-linux.lists.archive=gmail.com@vger.kernel.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 B0198B2695A for ; Fri, 31 May 2024 14:06:58 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 5CD7015B96C; Fri, 31 May 2024 14:06:52 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=suse.cz header.i=@suse.cz header.b="HWU0AKd8"; dkim=permerror (0-bit key) header.d=suse.cz header.i=@suse.cz header.b="WLnUVKXA"; dkim=pass (1024-bit key) header.d=suse.cz header.i=@suse.cz header.b="HWU0AKd8"; dkim=permerror (0-bit key) header.d=suse.cz header.i=@suse.cz header.b="WLnUVKXA" Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.223.130]) (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 AB27B15AAB6; Fri, 31 May 2024 14:06:49 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=195.135.223.130 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717164411; cv=none; b=dIXYLepo9stGdY9sdQXQnIu+sIkK5cpUKBU/qOnHzHCM0bGodNcaLfMzLuZalKgBTt6KIdV9G3q3B4OmZaZSkLxCPCFJ6Mk9EthSHJZnK6NaPL22vPAQ3ib4MAE+xS6/IAKddToAvzCotfQ+ethtmkvmld8HSwCn79gmP0Wkgrg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717164411; c=relaxed/simple; bh=B0DkizkCx/fHuPXQz+PWG9GhSLvk9fuZqO3xRqWCRa8=; h=Date:From:To:cc:Subject:In-Reply-To:Message-ID:References: MIME-Version:Content-Type; b=iYMJvXFQcmyv9VzrqX0c18HQhpYj0bP1ydFwnXHs+OuB9fX1q+XHGqXIl50wMzDxkmn+cskeaJYcu/63oAlGU7fLsSjjRczsKo/1Be51FhCheZB7k+9Qz44/AgTspx/3CYsnfwok0nM2MioME6So+mljC5MUomj6gg+l+jur/xw= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=suse.cz; spf=pass smtp.mailfrom=suse.cz; dkim=pass (1024-bit key) header.d=suse.cz header.i=@suse.cz header.b=HWU0AKd8; dkim=permerror (0-bit key) header.d=suse.cz header.i=@suse.cz header.b=WLnUVKXA; dkim=pass (1024-bit key) header.d=suse.cz header.i=@suse.cz header.b=HWU0AKd8; dkim=permerror (0-bit key) header.d=suse.cz header.i=@suse.cz header.b=WLnUVKXA; arc=none smtp.client-ip=195.135.223.130 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=suse.cz Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=suse.cz Received: from pobox.suse.cz (unknown [10.100.2.14]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id A64D321C2E; Fri, 31 May 2024 14:06:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1717164407; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=AO8BLC7Qkg5rQsHrBBnOGJ6JR70Q2hPHi932MvWcJaM=; b=HWU0AKd8EnvtjSBqVusMGY5bRvpXFwYCGiqcypc5wCkZzslVnIGgUPbTJQfNQrPz9vQvbm Vl5RdOsXSTW0v8ZY0VkMl4/YyoiOjxF4QLuAhbidSUO8C9a7wylQPBDVz1vwJfPkqwHi8R g9D5GnEAFCpXv9XJlHc8/Z7RFYV4TB0= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1717164407; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=AO8BLC7Qkg5rQsHrBBnOGJ6JR70Q2hPHi932MvWcJaM=; b=WLnUVKXAunT4ia+0z6CfgQly3KOe6hh13QG+CbJDByQBsjnLV8u4wLNPChnpU0NsIvkpj6 wq2p0srj1d4272AA== Authentication-Results: smtp-out1.suse.de; none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1717164407; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=AO8BLC7Qkg5rQsHrBBnOGJ6JR70Q2hPHi932MvWcJaM=; b=HWU0AKd8EnvtjSBqVusMGY5bRvpXFwYCGiqcypc5wCkZzslVnIGgUPbTJQfNQrPz9vQvbm Vl5RdOsXSTW0v8ZY0VkMl4/YyoiOjxF4QLuAhbidSUO8C9a7wylQPBDVz1vwJfPkqwHi8R g9D5GnEAFCpXv9XJlHc8/Z7RFYV4TB0= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1717164407; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=AO8BLC7Qkg5rQsHrBBnOGJ6JR70Q2hPHi932MvWcJaM=; b=WLnUVKXAunT4ia+0z6CfgQly3KOe6hh13QG+CbJDByQBsjnLV8u4wLNPChnpU0NsIvkpj6 wq2p0srj1d4272AA== Date: Fri, 31 May 2024 16:06:46 +0200 (CEST) From: Miroslav Benes To: zhang warden cc: Petr Mladek , Josh Poimboeuf , Jiri Kosina , Joe Lawrence , live-patching@vger.kernel.org, LKML Subject: Re: [PATCH] livepatch: introduce klp_func called interface In-Reply-To: Message-ID: References: <20240520005826.17281-1-zhangwarden@gmail.com> <2551BBD9-735E-4D1E-B1AE-F5A3F0C38815@gmail.com> User-Agent: Alpine 2.21 (LSU 202 2017-01-01) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="1678380546-857398901-1717164406=:8344" X-Spam-Flag: NO X-Spam-Score: -2.69 X-Spam-Level: X-Spamd-Result: default: False [-2.69 / 50.00]; BAYES_HAM(-3.00)[99.99%]; CTYPE_MIXED_BOGUS(1.00)[]; NEURAL_HAM_LONG(-0.39)[-0.394]; NEURAL_HAM_SHORT(-0.20)[-0.999]; MIME_GOOD(-0.10)[multipart/mixed,text/plain]; TO_MATCH_ENVRCPT_ALL(0.00)[]; ARC_NA(0.00)[]; RCVD_COUNT_ZERO(0.00)[0]; FROM_HAS_DN(0.00)[]; MIME_TRACE(0.00)[0:+,1:+]; FROM_EQ_ENVFROM(0.00)[]; FREEMAIL_TO(0.00)[gmail.com]; MID_RHS_MATCH_FROMTLD(0.00)[]; FUZZY_BLOCKED(0.00)[rspamd.com]; RCPT_COUNT_SEVEN(0.00)[7]; DKIM_SIGNED(0.00)[suse.cz:s=susede2_rsa,suse.cz:s=susede2_ed25519]; TO_DN_SOME(0.00)[]; FREEMAIL_ENVRCPT(0.00)[gmail.com] This message is in MIME format. The first part should be readable text, while the remaining parts are likely unreadable without MIME-aware tools. --1678380546-857398901-1717164406=:8344 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8BIT > And for the unlikely branch, isn’t the complier will compile this branch > into a cold branch that will do no harm to the function performance? The test (cmp insn or something like that) still needs to be there. Since there is only a simple assignment in the branch, the compiler may just choose not to have a cold branch in this case. The only difference is in which case you would jump here. You can see for yourself (and prove me wrong if it comes to it). Miroslav --1678380546-857398901-1717164406=:8344--