[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ZADNdp5U+lP10Oqo@alley>
Date: Thu, 2 Mar 2023 17:23:18 +0100
From: Petr Mladek <pmladek@...e.com>
To: "Tomohiro Misono (Fujitsu)" <misono.tomohiro@...itsu.com>
Cc: "'madvenka@...ux.microsoft.com'" <madvenka@...ux.microsoft.com>,
"jpoimboe@...hat.com" <jpoimboe@...hat.com>,
"peterz@...radead.org" <peterz@...radead.org>,
"chenzhongjin@...wei.com" <chenzhongjin@...wei.com>,
"mark.rutland@....com" <mark.rutland@....com>,
"broonie@...nel.org" <broonie@...nel.org>,
"Keiya Nobuta (Fujitsu)" <nobuta.keiya@...itsu.com>,
"sjitindarsingh@...il.com" <sjitindarsingh@...il.com>,
"catalin.marinas@....com" <catalin.marinas@....com>,
"will@...nel.org" <will@...nel.org>,
"jamorris@...ux.microsoft.com" <jamorris@...ux.microsoft.com>,
"linux-arm-kernel@...ts.infradead.org"
<linux-arm-kernel@...ts.infradead.org>,
"live-patching@...r.kernel.org" <live-patching@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [RFC PATCH v3 00/22] arm64: livepatch: Use ORC for dynamic frame
pointer validation
On Wed 2023-03-01 03:12:08, Tomohiro Misono (Fujitsu) wrote:
> <snip>
> > Testing
> > =======
> >
> > - I have run all of the livepatch selftests successfully. I have written a
> > couple of extra selftests myself which I will be posting separately
> Hi,
>
> What test configuration/environment you are using for test?
> When I tried kselftest with fedora based config on VM, I got errors
> because livepatch transition won't finish until signal is sent
> (i.e. it takes 15s for every transition).
>
> [excerpt from test result]
> ```
> $ sudo ./test-livepatch.sh
> TEST: basic function patching ... not ok
>
> --- expected
> +++ result
> @@ -2,11 +2,13 @@
> livepatch: enabling patch 'test_klp_livepatch'
> livepatch: 'test_klp_livepatch': initializing patching transition
> livepatch: 'test_klp_livepatch': starting patching transition
> +livepatch: signaling remaining tasks
> livepatch: 'test_klp_livepatch': completing patching transition
> ```
It might be interesting to see what process is blocking the
transition. The transition state is visible in
/proc/<pid>/patch_state.
The transition is blocked when a process is in KLP_UNPATCHED state.
It is defined in include/linux/livepatch.h:
#define KLP_UNPATCHED 0
Well, the timing against the transition is important. The following
might help to see the blocking processes:
$> modprobe livepatch-sample ; \
sleep 1; \
for proc_path in \
`grep "\-1" /proc/*/patch_state | cut -d '/' -f-3` ; \
do \
cat $proc_path/comm ; \
cat $proc_path/stack ; \
echo === ; \
done
After this the livepatch has to be manualy disabled and removed
$> echo 0 >/sys/kernel/livepatch/livepatch_sample/enabled
$> rmmod livepatch_sample
Best Regards,
Petr
Powered by blists - more mailing lists