lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Mon, 25 Sep 2023 07:42:33 +0200
From:   Jiri Slaby <jirislaby@...nel.org>
To:     "Rafael J. Wysocki" <rafael@...nel.org>,
        Len Brown <lenb@...nel.org>, hmh@....eng.br
Cc:     "linux-acpi@...r.kernel.org" <linux-acpi@...r.kernel.org>,
        ibm-acpi-devel@...ts.sourceforge.net,
        platform-driver-x86@...r.kernel.org,
        Linux kernel mailing list <linux-kernel@...r.kernel.org>
Subject: Re: WARNING at drivers/acpi/platform_profile.c:74 in
 platform_profile_show()

On 25. 09. 23, 7:35, Jiri Slaby wrote:
> Hi,
> 
> according to logs, since 6.3 (up to 6.5.4 now), I repeatedly see:
>  > WARNING: CPU: 14 PID: 962 at drivers/acpi/platform_profile.c:74 
> platform_profile_show+0xb1/0x100 [platform_profile]
>  > Modules linked in: ccm michael_mic ...
>  > CPU: 14 PID: 962 Comm: power-profiles- Kdump: loaded Not tainted 
> 6.5.4-6-default #1 openSUSE Tumbleweed (unreleased) 
> dd37106c593be78644bb80e3c1534d801bf4cb36
>  > Hardware name: LENOVO 21CRS0K83K/21CRS0K83K, BIOS R22ET60W (1.30 ) 
> 02/09/2023
>  > RIP: 0010:platform_profile_show+0xb1/0x100 [platform_profile]
>  > Code: d0 a8 ...
>  > RSP: 0018:ffff9c1ac0b97db0 EFLAGS: 00010296
>  > RAX: 0000000000000000 RBX: 0000000000000000 RCX: 000000008fc35be0
>  > RDX: 0000000000000000 RSI: ffff9c1ac0b97db4 RDI: ffffffffc0a8b0a0
>  > RBP: ffff8955ca540000 R08: ffff895b9f1ed180 R09: ffff895559ea1bc0
>  > R10: 00000000031a400e R11: 000000000003f680 R12: ffff895b9f1ed180
>  > R13: ffff9c1ac0b97e50 R14: 0000000000000001 R15: ffff9c1ac0b97ee8
>  > FS:  00007f71b0e71900(0000) GS:ffff895b9f100000(0000) 
> knlGS:0000000000000000
>  > CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
>  > CR2: 00007fe402ea3400 CR3: 000000012004c000 CR4: 0000000000750ee0
>  > PKRU: 55555554
>  > Call Trace:
>  >  <TASK>
>  >  sysfs_kf_seq_show+0xab/0x100
>  >  seq_read_iter+0x123/0x480
>  >  vfs_read+0x1b8/0x300
> 
> It's:
> WARN_ON((profile < 0) || (profile >= ARRAY_SIZE(profile_names))))
> 
> So I put there one more print:
> dev_warn(dev, "profile=%d profile_get=%ps\n",
>           profile, cur_profile->profile_get);
> 
> and I see:
> : profile=-1883022368 profile_get=dytc_profile_get [thinkpad_acpi]
> : profile=-1510173440 profile_get=dytc_profile_get [thinkpad_acpi]
> : profile=-1510173440 profile_get=dytc_profile_get [thinkpad_acpi]
> : profile=-966231712 profile_get=dytc_profile_get [thinkpad_acpi]
> : profile=-1578420592 profile_get=dytc_profile_get [thinkpad_acpi]
> : profile=-1578420592 profile_get=dytc_profile_get [thinkpad_acpi]
> : profile=-1578420592 profile_get=dytc_profile_get [thinkpad_acpi]
> 
> where the profile values in hex are like:
> ffffffff8fc35be0
> ffffffffa5fc9500
> ffffffffc6687960
> 
> Looking at simplicity of dytc_profile_get(), I wonder how that can happen.
> 
> I also wonder about dev passed to dytc_profile_get() having empty name 
> (nothing before colon above)? Is that expected?

I forgot to add:
   cat /sys/firmware/acpi/platform_profile
correctly returns:
   low-power

without any WARNING. It looks like the warn often (but not exclusively) 
happens around:
PM: suspend exit

> Any ideas?

Ah, convert_dytc_to_profile()'s retval is not checked in 
dytc_profile_refresh(). That's likely it, let me add the check and retry.

> thanks,

-- 
js
suse labs

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ