From patchwork Mon Nov 25 11:28:11 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: George Guo X-Patchwork-Id: 13884833 Received: from out-176.mta0.migadu.com (out-176.mta0.migadu.com [91.218.175.176]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 48CC1199237 for ; Mon, 25 Nov 2024 11:28:26 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=91.218.175.176 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1732534108; cv=none; b=nxdJ2JEjZQ3p2QKA+qH56NRsjS87AMzYskOzDCX4wVGp5xYJwIjDczoXQFivgQLkoJ9kEgFtuQxWyTGqd0rPj3ay3UAdfuwOkkub0Rh1R5tbn317IX+dECJK7+oy8OXm9KFBrswepN29xsEiotWLRO9r5EFcdL9TjLSv3LtxW0w= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1732534108; c=relaxed/simple; bh=+VuaVobFp5Zisv4ECgsSim05t9k6TMIk+ZPhiGNsSlI=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version; b=DJyBYjEmPh83FA5Q7KBGj6bR5Leg2CueEZPrW9LDTTY9d+ru01JpznxH/NDYvySD4nzFzZrV6vCgNY3gbKOGu5e6clK4C5EN5bwfKsV+eHLsowOwMz4TOWviagjYEWB55w3kma+Dc7kHnDayRXP6XlMwZi7MZIT9jRQqu8lczrA= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev; spf=pass smtp.mailfrom=linux.dev; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b=i77TUixI; arc=none smtp.client-ip=91.218.175.176 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.dev Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b="i77TUixI" X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1732534103; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=8VQ+ccQMha4i1JocKsS0xwAjEvTSkx+heZNfF1J0jX4=; b=i77TUixIr00q05uDs475DK8ORDEg7j214HQKMUu8SJHoI1X1BOHrvXxfoH1+aJVugZ9uxy Vdgl2H+qTL2UsirtSXejU/zt/FmTxzDE8eII6TaZKYXii7d5E0r9zFv1AmwdUkYs/NWAcJ 0reSh6FUEH6n6Or+cZTacUy+KJ0IQN8= From: George Guo To: jpoimboe@kernel.org, jikos@kernel.org, mbenes@suse.cz, pmladek@suse.com, joe.lawrence@redhat.com, shuah@kernel.org Cc: live-patching@vger.kernel.org, linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org, George Guo Subject: [PATCH livepatch/master v1 1/2] selftests/livepatch: Replace hardcoded path with variable in test-syscall.sh Date: Mon, 25 Nov 2024 19:28:11 +0800 Message-Id: <20241125112812.281018-1-dongtai.guo@linux.dev> Precedence: bulk X-Mailing-List: linux-kselftest@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Migadu-Flow: FLOW_OUT From: George Guo Updated test-syscall.sh to replace the path /sys/kernel/test_klp_syscall/npids with a variable $MOD_SYSCALL. Signed-off-by: George Guo --- tools/testing/selftests/livepatch/test-syscall.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/testing/selftests/livepatch/test-syscall.sh b/tools/testing/selftests/livepatch/test-syscall.sh index b76a881d4..9cfa17b6b 100755 --- a/tools/testing/selftests/livepatch/test-syscall.sh +++ b/tools/testing/selftests/livepatch/test-syscall.sh @@ -24,9 +24,9 @@ pid_list=$(echo ${pids[@]} | tr ' ' ',') load_lp $MOD_SYSCALL klp_pids=$pid_list # wait for all tasks to transition to patched state -loop_until 'grep -q '^0$' /sys/kernel/test_klp_syscall/npids' +loop_until 'grep -q '^0$' /sys/kernel/$MOD_SYSCALL/npids' -pending_pids=$(cat /sys/kernel/test_klp_syscall/npids) +pending_pids=$(cat /sys/kernel/$MOD_SYSCALL/npids) log "$MOD_SYSCALL: Remaining not livepatched processes: $pending_pids" for pid in ${pids[@]}; do From patchwork Mon Nov 25 11:28:12 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: George Guo X-Patchwork-Id: 13884834 Received: from out-187.mta0.migadu.com (out-187.mta0.migadu.com [91.218.175.187]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id C654919E961 for ; Mon, 25 Nov 2024 11:28:31 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=91.218.175.187 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1732534114; cv=none; b=iJ6TGad8V+34+6fbnoz0feYWzVlMsAxo1LNakBY/spZW3nVv8AMEKgFfsuMBl0mubUnhiPGabRmw7F++bg8pwMIcEz/+yo04RksRWMAbyT5S0o+exvzlV5EqF7bLp9AnNjtHswctQN+qmn7K6ZHokRjiofcuGR54KCW35fOc6BY= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1732534114; c=relaxed/simple; bh=8+WrTeIjHJDsvO6eNUfMcipH42y2RHwqgZd720PD++E=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=DEBiN4Sws5ZDKBsAFRJbt1wpaHMBJDSKOlCT/Jc4iJj4sXwxzCBlkCaHt7p01OjgK7o62TlO5/V/zg5nRAZeG9oV8Q1iT+qwZTO8Qu1G6AGAvKoRfkg3jlpC4LjHWCQR1caIM36VHaDxRkKMTJbWINtPaXBfhdnjKwyeLBBHr00= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev; spf=pass smtp.mailfrom=linux.dev; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b=NJUVo3MQ; arc=none smtp.client-ip=91.218.175.187 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.dev Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b="NJUVo3MQ" X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1732534109; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=X4iiNlDUMS/v/1sWsQak88i5dwU1nxdsRUlCF1jU/hk=; b=NJUVo3MQ7dgQTljsVnJm87JCU5R42RgqSjNOH2rCQGRqUHTyI6MAh9a4l0+XT1DaB4V5FL 1I/UlkxLKWv/4eB4xdGWaAtwp/oxkGloutT53YMaLwyrU4wlmDRsKney/gp7w+msT9Of2T hI8AbPHzJDDBr9ijXSyeP54lpGChz30= From: George Guo To: jpoimboe@kernel.org, jikos@kernel.org, mbenes@suse.cz, pmladek@suse.com, joe.lawrence@redhat.com, shuah@kernel.org Cc: live-patching@vger.kernel.org, linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org, George Guo Subject: [PATCH livepatch/master v1 2/2] selftests/livepatch: Replace hardcoded module name with variable in test-callbacks.sh Date: Mon, 25 Nov 2024 19:28:12 +0800 Message-Id: <20241125112812.281018-2-dongtai.guo@linux.dev> In-Reply-To: <20241125112812.281018-1-dongtai.guo@linux.dev> References: <20241125112812.281018-1-dongtai.guo@linux.dev> Precedence: bulk X-Mailing-List: linux-kselftest@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Migadu-Flow: FLOW_OUT From: George Guo Replaced the hardcoded module name test_klp_callbacks_demo in the pre_patch_callback log message with the variable $MOD_LIVEPATCH. Signed-off-by: George Guo --- tools/testing/selftests/livepatch/test-callbacks.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/testing/selftests/livepatch/test-callbacks.sh b/tools/testing/selftests/livepatch/test-callbacks.sh index 32b150e25..150cb68fe 100755 --- a/tools/testing/selftests/livepatch/test-callbacks.sh +++ b/tools/testing/selftests/livepatch/test-callbacks.sh @@ -259,7 +259,7 @@ $MOD_TARGET: ${MOD_TARGET}_init % insmod test_modules/$MOD_LIVEPATCH.ko pre_patch_ret=-19 livepatch: enabling patch '$MOD_LIVEPATCH' livepatch: '$MOD_LIVEPATCH': initializing patching transition -test_klp_callbacks_demo: pre_patch_callback: vmlinux +$MOD_LIVEPATCH: pre_patch_callback: vmlinux livepatch: pre-patch callback failed for object 'vmlinux' livepatch: failed to enable patch '$MOD_LIVEPATCH' livepatch: '$MOD_LIVEPATCH': canceling patching transition, going to unpatch