Received: by 2002:ab2:6816:0:b0:1f9:5764:f03e with SMTP id t22csp2273600lqo; Sun, 19 May 2024 23:46:36 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUqkWmS7V5nRynU6hj7xv6sjKyukhkudFaRP613n5cjtYSrB8N0Q05WPg0GWilCBubJW2PR8spqi1XgsoPlYWSRFkFtxqEvZM6AZq5tbA== X-Google-Smtp-Source: AGHT+IH7L6gtNpXDraXsxgksKoFlN8SrVnsChM859vv4C4JszoszKMLVF6kEk75SCRl3fjk3cUt+ X-Received: by 2002:a05:622a:448:b0:43e:345e:4bbf with SMTP id d75a77b69052e-43e345e4e5emr144902071cf.40.1716187595826; Sun, 19 May 2024 23:46:35 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1716187595; cv=pass; d=google.com; s=arc-20160816; b=sx01/82dYyv1WjfwL4OmfJ/dBjWIkk9YYHddFaecRwOL8lvHB6E2r0JkJbQx5c0EMx v+48hiIbQUFnQpP0Uf+i1EaLtmei9q50AkYT6flTL3dfhqNhYGTvQZJpF+7fD6HrNHCD dA7jViddULvyCb4bdXDxTCzTaoQvMv/VemV0KaNEBAWTUTUMYRTJULhjPsibH4/SCagg jUIqFnlrMTuelwbhLTWSHlQ8KoKllwAZxwdajUS4knsvKD1EE82DW4oNmXNZKOIu/Lf/ vjZ0LIFWoe/2M3wElAK3j+7FV/3OJ5jNvryl/Zci77wTtePJpsuLrOM9iXPqU37b1SAB 8m/g== 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=JneacqqljGXg+srmnVmYB1aId3PqrqaRgKmSc9R968I=; fh=2LQanV1s0zd7icJjY0v5DVEbb8ZURSUVAUMEnwsMD68=; b=ZFbfijCjT6cFdLE+8JwE1JL0ufxQl4QJvjF4DFbWKzNsCHxMjvxFtkzHvve+SQhMTT D3bNFCPn5k69fQ7GibTcHnsPMdkZYqCRbcHeTsSjCiIR2/BlkN69C44Bi0nrvcBl9vQz xb1C3CZBAbMPjoYE+3N2R8q16srFYjIC5W+HQUUcc1faC8X+DOqwKqO8W/1cuYiQWl1y 5vBpSzr1wMkOFdHXde4bWLkGSa0TzWn4A4SyFRXF5u038F86Ltg+TxkGfHUUXNc1D+So E2AeYESdtyBORpJvm6KSguIk61Soit0IC7AVV42m6kZnHADob0hJXdXUhh+mc7Tx1gji W5SQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@suse.cz header.s=susede2_rsa header.b="k8oIx/nh"; dkim=neutral (no key) header.i=@suse.cz header.s=susede2_ed25519; dkim=pass header.i=@suse.cz header.s=susede2_rsa header.b="k8oIx/nh"; 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-183431-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-183431-linux.lists.archive=gmail.com@vger.kernel.org" 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-43df85c77c2si75098421cf.259.2024.05.19.23.46.35 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 19 May 2024 23:46:35 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-183431-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=@suse.cz header.s=susede2_rsa header.b="k8oIx/nh"; dkim=neutral (no key) header.i=@suse.cz header.s=susede2_ed25519; dkim=pass header.i=@suse.cz header.s=susede2_rsa header.b="k8oIx/nh"; 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-183431-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-183431-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 ny.mirrors.kernel.org (Postfix) with ESMTPS id 8E7901C20CB9 for ; Mon, 20 May 2024 06:46:35 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 5BD9712E5B; Mon, 20 May 2024 06:46:30 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=suse.cz header.i=@suse.cz header.b="k8oIx/nh"; dkim=permerror (0-bit key) header.d=suse.cz header.i=@suse.cz header.b="vmqTbn1b"; dkim=pass (1024-bit key) header.d=suse.cz header.i=@suse.cz header.b="k8oIx/nh"; dkim=permerror (0-bit key) header.d=suse.cz header.i=@suse.cz header.b="vmqTbn1b" 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 9FE80BA47; Mon, 20 May 2024 06:46:27 +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=1716187589; cv=none; b=K5FjInNpRklTWe99namWnWh2ZNYOL6sHvbCMaX1N4ppcv83fNkxxdnZzGrxX6QJ1aoONNo9nN8rftWGk1g02UE1XzU+aM5XrwKZEybkIuLxS2cGGXQJooI+mhdKgKooxB6tSP6KsC9Y+hP6vV5OS8//dFtU3sv7SvPLQit/XZAM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716187589; c=relaxed/simple; bh=zJeiXIUYemctI6JUyxHh/6l92N7GiddGqsNhdU7mYWQ=; h=Date:From:To:cc:Subject:In-Reply-To:Message-ID:References: MIME-Version:Content-Type; b=DTmhPMPB6Q/TRoTHG3sWMB3At4j567vY4pe5nvbvbxBJ3ziQj9MkCFpkJSwJfpZmdouzVnCdGx7SdC4zHE/joaZBxPXNJh5I3Xbfwc8XR9a0UO3vCQfnxC3q+R7M6pvVtSS/1vLutgteYptPAgnwkO/I8KBFZG1CktafaN5R+Gc= 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=k8oIx/nh; dkim=permerror (0-bit key) header.d=suse.cz header.i=@suse.cz header.b=vmqTbn1b; dkim=pass (1024-bit key) header.d=suse.cz header.i=@suse.cz header.b=k8oIx/nh; dkim=permerror (0-bit key) header.d=suse.cz header.i=@suse.cz header.b=vmqTbn1b; 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 8615C33EFA; Mon, 20 May 2024 06:46:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1716187585; 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=JneacqqljGXg+srmnVmYB1aId3PqrqaRgKmSc9R968I=; b=k8oIx/nhGpggOZgZC9WeeSbkYSaooUPQX2p5JD8sxPnnlqoG/QuPJ6twzTtCVXToEEocUo ZPEstKj82ZOV1nu4ZNDyC34UDhMjYuKOngtvzizlDzHXwhWViCgLzXlOd9nFoNdrof0eBa inFy3V3rJt42BhpVl0CaCIpflnc4eRI= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1716187585; 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=JneacqqljGXg+srmnVmYB1aId3PqrqaRgKmSc9R968I=; b=vmqTbn1bpteS/1Y1Ks7YheyXMrzt2it9x7xXuklBDKNwSjgN0hR2kyvV2P1tcO10/Lrw2T 5uJth6WxtL9+9SCg== Authentication-Results: smtp-out1.suse.de; none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1716187585; 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=JneacqqljGXg+srmnVmYB1aId3PqrqaRgKmSc9R968I=; b=k8oIx/nhGpggOZgZC9WeeSbkYSaooUPQX2p5JD8sxPnnlqoG/QuPJ6twzTtCVXToEEocUo ZPEstKj82ZOV1nu4ZNDyC34UDhMjYuKOngtvzizlDzHXwhWViCgLzXlOd9nFoNdrof0eBa inFy3V3rJt42BhpVl0CaCIpflnc4eRI= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1716187585; 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=JneacqqljGXg+srmnVmYB1aId3PqrqaRgKmSc9R968I=; b=vmqTbn1bpteS/1Y1Ks7YheyXMrzt2it9x7xXuklBDKNwSjgN0hR2kyvV2P1tcO10/Lrw2T 5uJth6WxtL9+9SCg== Date: Mon, 20 May 2024 08:46:24 +0200 (CEST) From: Miroslav Benes To: Wardenjohn cc: jpoimboe@kernel.org, jikos@kernel.org, pmladek@suse.com, joe.lawrence@redhat.com, live-patching@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] livepatch: introduce klp_func called interface In-Reply-To: <20240520005826.17281-1-zhangwarden@gmail.com> Message-ID: References: <20240520005826.17281-1-zhangwarden@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: text/plain; charset=US-ASCII X-Spam-Level: X-Spamd-Result: default: False [-4.05 / 50.00]; BAYES_HAM(-2.75)[98.93%]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_SHORT(-0.20)[-1.000]; MIME_GOOD(-0.10)[text/plain]; RCPT_COUNT_SEVEN(0.00)[7]; ARC_NA(0.00)[]; FREEMAIL_TO(0.00)[gmail.com]; RCVD_COUNT_ZERO(0.00)[0]; MID_RHS_MATCH_FROMTLD(0.00)[]; FREEMAIL_ENVRCPT(0.00)[gmail.com]; DKIM_SIGNED(0.00)[suse.cz:s=susede2_rsa,suse.cz:s=susede2_ed25519]; FROM_HAS_DN(0.00)[]; MIME_TRACE(0.00)[0:+]; FROM_EQ_ENVFROM(0.00)[]; FUZZY_BLOCKED(0.00)[rspamd.com]; TO_MATCH_ENVRCPT_ALL(0.00)[]; TO_DN_SOME(0.00)[] X-Spam-Score: -4.05 X-Spam-Flag: NO Hi, On Mon, 20 May 2024, Wardenjohn wrote: > Livepatch module usually used to modify kernel functions. > If the patched function have bug, it may cause serious result > such as kernel crash. > > This is a kobject attribute of klp_func. Sysfs interface named > "called" is introduced to livepatch which will be set as true > if the patched function is called. > > /sys/kernel/livepatch////called > > This value "called" is quite necessary for kernel stability > assurance for livepatching module of a running system. > Testing process is important before a livepatch module apply to > a production system. With this interface, testing process can > easily find out which function is successfully called. > Any testing process can make sure they have successfully cover > all the patched function that changed with the help of this interface. Even easier is to use the existing tracing infrastructure in the kernel (ftrace for example) to track the new function. You can obtain much more information with that than the new attribute provides. Regards, Miroslav