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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Fri, 17 Jun 2022 13:07:33 +0200
From:   Hans de Goede <hdegoede@...hat.com>
To:     Kenneth Chan <kenneth.t.chan@...il.com>,
        Stefan Seyfried <stefan.seyfried@...glemail.com>,
        Andy Shevchenko <andy.shevchenko@...il.com>
Cc:     Platform Driver <platform-driver-x86@...r.kernel.org>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        Stefan Seyfried <seife+kernel@...systems.com>
Subject: Re: [PATCH 2/2] platform/x86: panasonic-laptop: allow to use all
 hotkeys

Hi,

On 6/17/22 09:51, Kenneth Chan wrote:
> On Thu, 16 Jun 2022 at 03:28, Hans de Goede <hdegoede@...hat.com> wrote:
>>
>> Kenneth, can you check with e.g. evemu-record or evtest
>> where the double events are coming from ?  Obviously one of
>> the events is coming from the panasonic-laptop driver, but
>> where is the other event coming from. Is it coming from the
>> atkbd driver; or ... ?   Maybe from the acpi-video driver
>> for the brightness keys ?
>>
> 
> Here's the evtest results:
> 
> acpi-video driver generates KEY_BRIGHTNESSDOWN, KEY_BRIGHTNESSUP
> atkbd generates KEY_MUTE, KEY_VOLUMEUP, KEY_VOLUMEDOWN
> 
> Hotkey_input=Y (i.e. before patch ed83c9171829)
> panasonic-laptop driver generates all keys, i.e. KEY_SLEEP,
> KEY_BATTERY, KEY_SUSPEND plus all the above keys
> 
> hotkey_input=N
> panasonic-laptop driver generates KEY_SLEEP, KEY_BATTERY and KEY_SUSPEND
> 
> So the duplicated brightness and volume key events come from the atkbd
> and acpi-video drivers on my CF-W5. I haven't looked at the other
> platform drivers. I'm wondering if they honour atkbd and acpi-driver
> events in a case like this, or just report everything.

Thank you for providing this info. Can you please give
the attached patch series a try, this includes Stefan's 1/2 patch
and replaces Stefan's 2/2 patch.

This will hopefully fix the double key-presses for you, while
also keeping everything working for Stefan without requiring
a module option or DMI quirks.

Stefan can you also give this series a try please?

###

Looking at this has also brought up an unrelated backlight question:

Kenneth, since you have acpi-video reporting keypresses you will
likely also have an acpi_video (or perhaps a native intel) backlight
under /sys/class/backlight and I noticed that panasonic-laptop
uncondirionally registers its backlight so you may very well end
up with 2 backlight controls under /sys/class/backlight, which
we generally try to avoid (so that userspace does not have to
guess which one to use).

Can you do:
ls /sys/class/backlight

and let me know the output?

Also if there are 2 backlights there then please do:
cat /sys/class/backlight/<name>/max_brightness
to find out the range (0-value)

and then try if they both work by doing:

echo $number > /sys/class/backlight/<name>/brightness

with different $number values in the range and see
if this actually changes the brightness.

While we are at it, Stefan can you do the same please?

Regards,

Hans






> 
> Attached is the dmidecode of my CF-W5, just to be verbose.
> 
>> Hence the module parameter so that the two known users of this module (Kenneth and me) can adjust this to their needs.
>>
>> Now about the DMI match: I can do that.
>> But let's face it: the panasonic laptops are pretty rare in the wild, so even if I'm "whitelisting" the CF-51, then probably other models will need the same treatment and we have no real way of finding out which ones, unless people complain.
>> So even if I add the DMI match (which is a good idea anyhow because then "my" model will work out of the box, while right now I need to add a module parameter or switch it on later), I'd still vote for having a possibility for overriding the DMI results.
> 
> In an ideal world, more panasonic-laptop users will send us their
> DSDT. I think the most uptodate model has a MAT0035 device_id (it
> increments for each generation) while our driver is at the very
> outdated MAT0021. But before it happens, I agree with Stefan on that
> point.
> 
View attachment "0001-platform-x86-panasonic-laptop-de-obfuscate-button-co.patch" of type "text/x-patch" (2327 bytes)

View attachment "0002-platform-x86-panasonic-laptop-Sort-includes-alphabet.patch" of type "text/x-patch" (1526 bytes)

View attachment "0003-platform-x86-panasonic-laptop-revert-Resolve-hotkey-.patch" of type "text/x-patch" (1542 bytes)

View attachment "0004-platform-x86-panasonic-laptop-Don-t-report-duplicate.patch" of type "text/x-patch" (2160 bytes)

View attachment "0005-platform-x86-panasonic-laptop-filter-out-duplicate-v.patch" of type "text/x-patch" (3864 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ