Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <4c0d6fa3-20c6-5dd9-4bff-15ae7cc2ff82@gmail.com>
Date: Mon, 2 Nov 2020 18:14:21 +0100
From: Jacek <wampir990@...il.com>
To: lkrg-users@...ts.openwall.com
Subject: Re: Fwd: Re: P_LKRG error in Linux 5.9.3


HI

There is an improvement.
After applying the commit:

commit 83cb64640a70273f8c73c6d9e6b02cf1a094b054 (HEAD -> main, 
origin/main, origin/HEAD)
Author: Adam_pi3 <pi3@....com.pl>
Date:   Mon Nov 2 01:43:02 2020 -0500

     Fix p_lkrg_counter_lock_trylock() API

     spin_trylock() disables preemption under the hood.


  there is still some strange message on landing, but then LRG no longer 
reports similar errors


Loading log:

# root ~> dmesg
[ 1460.036545] [p_lkrg] Loading LKRG...
[ 1460.036548] [p_lkrg] System does NOT support SMAP. LKRG can't enforce 
SMAP validation :(
[ 1460.049691] Freezing user space processes ... (elapsed 0.002 seconds) 
done.
[ 1460.052220] OOM killer disabled.
[ 1460.052237] [p_lkrg] 5/23 UMH paths are allowed...
[ 1463.671449] [p_lkrg] [kretprobe] register_kretprobe() for 
<ttwu_do_wakeup> failed! [err=-22]
[ 1463.671455] [p_lkrg] Trying to find ISRA / CONSTPROP name for 
<ttwu_do_wakeup>
[ 1463.675621] [p_lkrg] Found ISRA version of function 
<ttwu_do_wakeup.isra.0>
[ 1463.791478] [p_lkrg] ISRA / CONSTPROP version was found and hook was 
planted at <ttwu_do_wakeup.isra.0>
[ 1464.219919] BUG: scheduling while atomic: modprobe/1413/0x00000002
[ 1464.219921] Modules linked in: p_lkrg(O+) r8188eu(C) lib80211 [last 
unloaded: p_lkrg]
[ 1464.219924] Preemption disabled at:
[ 1464.219925] [<0000000000000000>] 0x0
[ 1464.219927] CPU: 1 PID: 1413 Comm: modprobe Tainted: G WC O    T 
5.9.3-g1 #2
[ 1464.219928] Hardware name: Gigabyte Technology Co., Ltd. 
Z97-D3H/Z97-D3H-CF, BIOS F9 09/18/2015
[ 1464.219928] Call Trace:
[ 1464.219931]  dump_stack+0x57/0x70
[ 1464.219933]  __schedule_bug.cold+0x83/0x91
[ 1464.219934]  __schedule+0x5fc/0x6c0
[ 1464.219936]  schedule+0x44/0xe0
[ 1464.219937]  trace_clock_x86_tsc+0x10/0x10
[ 1464.219939]  ? __mutex_lock.isra.0+0x279/0x540
[ 1464.219947]  ? p_create_database+0x14f/0x300 [p_lkrg]
[ 1464.219951]  ? p_lkrg_register+0x3d7/0x1000 [p_lkrg]
[ 1464.219952]  ? 0xffffffffc0212000
[ 1464.219953]  ? do_one_initcall+0x5a/0x19f
[ 1464.219955]  ? do_init_module+0x54/0x200
[ 1464.219956]  ? load_module+0x233f/0x2660
[ 1464.219959]  ? __do_sys_finit_module+0xd5/0xf0
[ 1464.219960]  ? __do_sys_finit_module+0xd5/0xf0
[ 1464.219962]  ? do_syscall_64+0x33/0x40
[ 1464.219964]  ? entry_SYSCALL_64_after_hwframe+0x44/0xa9
[ 1464.273289] [p_lkrg] LKRG initialized successfully!
[ 1464.273292] OOM killer enabled.
[ 1464.273293] Restarting tasks ... done.


Cheers
>
>
> ------------------------------------------------------------------------
> *Od:* Adam Zabrocki <pi3@....com.pl>
> *Wysłane:* November 2, 2020 4:40:57 AM UTC
> *Do:* lkrg-users@...ts.openwall.com
> *Temat:* Re: [lkrg-users] P_LKRG error in Linux 5.9.3
>
> Hi,
>
> Can you try LKRG with the latest patches (pushed today) and verify if you see
> the same problem?
>
> Thanks,
> Adam
>
> On Mon, Nov 02, 2020 at 05:02:04AM +0100, Jacek wrote:
>
>     HI LKRG version: # root ~> modinfo p_lkrg filename:      
>     /lib/modules/5.9.3-g1/extra/p_lkrg.ko license:        GPL v2
>     description:    pi3's Linux kernel Runtime Guard author:        
>     Adam 'pi3' Zabrocki (http://pi3.com.pl <http://pi3.com.pl>)
>     srcversion:     EEC95B0840D6CC7AA27D2E3 depends: retpoline:      Y
>     name:           p_lkrg vermagic:       5.9.3-g1 SMP preempt
>     mod_unload modversions
>     RANDSTRUCT_PLUGIN_366bedefd89976f1b4c46144945391fda92f7f7735ea0773c232d89a1537a832
>     sig_id:         PKCS#7 signer:         domek.cert sig_key:       
>     9B:90:A7:9D:13:60:77:B8 sig_hashalgo:   sha512 The following
>     message appears periodically in logs and tty consoles: [
>     1753.134389] BUG: workqueue leaked lock or atomic:
>     kworker/u8:0/0x00000001/1102                     last function:
>     p_check_integrity [p_lkrg] [ 1753.134397] CPU: 3 PID: 1102 Comm:
>     kworker/u8:0 Tainted: G        WC O T 5.9.3-g1 #2 [ 1753.134400]
>     Hardware name: Gigabyte Technology Co., Ltd. Z97-D3H/Z97-D3H-CF,
>     BIOS F9 09/18/2015 [ 1753.134408] Workqueue: events_unbound
>     p_check_integrity [p_lkrg] [ 1753.134411] Call Trace: [
>     1753.134422]  dump_stack+0x57/0x70 [ 1753.134430] 
>     process_one_work.cold+0x2b/0x30 [ 1753.134436]  ?
>     process_one_work+0x2e0/0x2e0 [ 1753.134440] 
>     worker_thread+0x4b/0x390 [ 1753.134445]  ?
>     process_one_work+0x2e0/0x2e0 [ 1753.134449]  kthread+0x118/0x160 [
>     1753.134453]  ? kthread_park+0x80/0x80 [ 1753.134458] 
>     ret_from_fork+0x22/0x30 [ 1753.134465] BUG: scheduling while
>     atomic: kworker/u8:0/1102/0x00000002 [ 1753.134467] Modules linked
>     in: p_lkrg(O) r8188eu(C) lib80211 [ 1753.134473] Preemption
>     disabled at: [ 1753.134480] [<ffffffffc0423328>]
>     p_check_integrity+0xf8/0x1140 [p_lkrg] [ 1753.134484] CPU: 3 PID:
>     1102 Comm: kworker/u8:0 Tainted: G        WC O T 5.9.3-g1 #2 [
>     1753.134486] Hardware name: Gigabyte Technology Co., Ltd.
>     Z97-D3H/Z97-D3H-CF, BIOS F9 09/18/2015 [ 1753.134489] Workqueue: 
>     0x0 (events_unbound) [ 1753.134492] Call Trace: [ 1753.134497] 
>     dump_stack+0x57/0x70 [ 1753.134503]  __schedule_bug.cold+0x83/0x91
>     [ 1753.134509]  __schedule+0x5fc/0x6c0 [ 1753.134514]  ?
>     process_one_work+0x2e0/0x2e0 [ 1753.134518]  schedule+0x44/0xe0 [
>     1753.134522]  worker_thread+0xc1/0x390 [ 1753.134527]  ?
>     process_one_work+0x2e0/0x2e0 [ 1753.134530]  kthread+0x118/0x160 [
>     1753.134534]  ? kthread_park+0x80/0x80 [ 1753.134537] 
>     ret_from_fork+0x22/0x30 [ 1768.493370] BUG: workqueue leaked lock
>     or atomic: kworker/u8:0/0x00000001/1102                     last
>     function: p_check_integrity [p_lkrg] [ 1768.493378] CPU: 0 PID:
>     1102 Comm: kworker/u8:0 Tainted: G        WC O T 5.9.3-g1 #2 [
>     1768.493381] Hardware name: Gigabyte Technology Co., Ltd.
>     Z97-D3H/Z97-D3H-CF, BIOS F9 09/18/2015 [ 1768.493390] Workqueue:
>     events_unbound p_check_integrity [p_lkrg] [ 1768.493393] Call
>     Trace: [ 1768.493405]  dump_stack+0x57/0x70 [ 1768.493414] 
>     process_one_work.cold+0x2b/0x30 [ 1768.493420]  ?
>     process_one_work+0x2e0/0x2e0 [ 1768.493424] 
>     worker_thread+0x4b/0x390 [ 1768.493430]  ?
>     process_one_work+0x2e0/0x2e0 [ 1768.493434]  kthread+0x118/0x160 [
>     1768.493438]  ? kthread_park+0x80/0x80 [ 1768.493443] 
>     ret_from_fork+0x22/0x30 [ 1768.493451] BUG: scheduling while
>     atomic: kworker/u8:0/1102/0x00000002 [ 1768.493453] Modules linked
>     in: p_lkrg(O) r8188eu(C) lib80211 [ 1768.493459] Preemption
>     disabled at: [ 1768.493467] [<ffffffffc0423328>]
>     p_check_integrity+0xf8/0x1140 [p_lkrg] [ 1768.493471] CPU: 0 PID:
>     1102 Comm: kworker/u8:0 Tainted: G        WC O T 5.9.3-g1 #2 [
>     1768.493473] Hardware name: Gigabyte Technology Co., Ltd.
>     Z97-D3H/Z97-D3H-CF, BIOS F9 09/18/2015 [ 1768.493477] Workqueue: 
>     0x0 (events_unbound) [ 1768.493480] Call Trace: [ 1768.493485] 
>     dump_stack+0x57/0x70 [ 1768.493491]  __schedule_bug.cold+0x83/0x91
>     [ 1768.493497]  __schedule+0x5fc/0x6c0 [ 1768.493503]  ?
>     process_one_work+0x2e0/0x2e0 [ 1768.493507]  schedule+0x44/0xe0 [
>     1768.493512]  worker_thread+0xc1/0x390 [ 1768.493517]  ?
>     process_one_work+0x2e0/0x2e0 [ 1768.493521]  kthread+0x118/0x160 [
>     1768.493524]  ? kthread_park+0x80/0x80 [ 1768.493528] 
>     ret_from_fork+0x22/0x30 Cheers 
>
>
> -- 
> pi3 (pi3ki31ny) - pi3 (at) itsec pl
> http://pi3.com.pl  <http://pi3.com.pl>
>
>
> -- Wysłane za pomocą K-9 Mail. 

Content of type "text/html" skipped

Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.