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] [day] [month] [year] [list]
Message-ID: <20201106232159.GA3586073@ubuntu-m3-large-x86>
Date:   Fri, 6 Nov 2020 16:21:59 -0700
From:   Nathan Chancellor <natechancellor@...il.com>
To:     Matt Turner <mattst88@...il.com>
Cc:     Arnd Bergmann <arnd@...db.de>,
        Henrik Rydberg <rydberg@...math.org>,
        Jean Delvare <jdelvare@...e.com>,
        Guenter Roeck <linux@...ck-us.net>,
        Richard Fontana <rfontana@...hat.com>,
        Dmitry Torokhov <dmitry.torokhov@...il.com>,
        linux-hwmon@...r.kernel.org, linux-kernel@...r.kernel.org,
        clang-built-linux@...glegroups.com
Subject: Re: [PATCH] hwmon: applesmc: avoid overlong udelay()

On Fri, Nov 06, 2020 at 06:17:10PM -0500, Matt Turner wrote:
> On my late 2013 Macbook Pro, I have a couple of scripts that set the
> fans to auto or full-speed:
> 
> fan-hi:
> #!/bin/sh
> sudo sh -c 'echo 1 > /sys/devices/platform/applesmc.768/fan1_manual
>             echo 1 > /sys/devices/platform/applesmc.768/fan2_manual
>             cat /sys/devices/platform/applesmc.768/fan1_max > /sys/devices/platform/applesmc.768/fan1_output
>             cat /sys/devices/platform/applesmc.768/fan2_max > /sys/devices/platform/applesmc.768/fan2_output'
> 
> fan-auto:
> #!/bin/sh
> sudo sh -c 'echo 0 > /sys/devices/platform/applesmc.768/fan1_manual
>             echo 0 > /sys/devices/platform/applesmc.768/fan2_manual'
> 
> Running ./fan-hi and then ./fan-auto on Linux v5.6 works and doesn't
> cause any problems, but after updating to v5.9 I see this in dmesg:
> 
> [Nov 6 17:24] applesmc: send_byte(0x01, 0x0300) fail: 0x40
> [  +0.000005] applesmc: FS! : write data fail
> [  +0.191777] applesmc: send_byte(0x30, 0x0300) fail: 0x40
> [  +0.000009] applesmc: F0Tg: write data fail
> [  +7.097416] applesmc: send_byte(0x00, 0x0300) fail: 0x40
> [  +0.000006] applesmc: FS! : write data fail
> 
> and the fan controls don't work.
> 
> Googling turned up this [1] which looks like the same problem. They said
> it began occurring between v5.7 and v5.8, so I looked and found this
> commit.
> 
> After reverting commit fff2d0f701e6753591609739f8ab9be1c8e80ebb from
> v5.9, I no longer see the errors in dmesg and the fan controls work
> again.
> 
> Any ideas what the problem is?
> 
> Thanks,
> Matt
> 
> [1] https://stackoverflow.com/questions/63505469/cant-write-data-to-applesmc-error-after-upgrade-to-arch-linux-kernel-5-8-1
> 

There is another thread on this regression:

https://lore.kernel.org/lkml/20200930105442.3f642f6c@aktux/

Looks like Brad Campbell has a patch that has some success in fixing the
regression (although others are saying it breaks their setup...):

https://lore.kernel.org/lkml/3c72ccc3-4de1-b5d0-423d-7b8c80991254@fnarfbargle.com/

Might be worth giving it a shot and jumping in so you get CC'd on
further revisions.

Cheers,
Nathan

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ