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:   Sun, 7 Apr 2019 00:17:56 +0200
From:   Pavel Machek <>
To:     Jacek Anaszewski <>
Cc:     Enric Balletbo i Serra <>,
        Guenter Roeck <>,
        Dmitry Torokhov <>,
        Nick Crews <>,
        Benson Leung <>,,
        Alexandre Belloni <>,
        Alessandro Zummo <>,,
        linux-kernel <>,
        Duncan Laurie <>,
        Simon Glass <>
Subject: Re: [PATCH v5 3/3] platform/chrome: Standardize Chrome OS keyboard
 backlight name


> >I am not sure about existing driver. Important thing for me is that
> >new drivers use consistent naming.
> >
> >>In cases like above:
> >>
> >>     keyboardist::kbd_backlight
> >>     tclnumpad::kbd_backlight
> >>
> >>we could do with the following:
> >>
> >>     :kbd-backlight
> >>     :numpad-backlight
> >>
> >>I used hyphens instead of underscores since we will have this convention
> >>in the LED_FUNCTION names, which is more common for Device Tree, and
> >>some of existing LED triggers.
> >
> >Existing userspace already searches for *:kbd_backlight", AFAICT, so
> >we probably want to keep the "_".
> OK, but it should be an exception but not a rule.
> This "kbd-*" naming is used in input and tty subsystems which register
> keyboard triggers with this style:
> ~/kernel$ git grep  ".*[\":]kbd-" -- "*.c"
> drivers/input/input-leds.c:     [LED_NUML]      = { "numlock",
> VT_TRIGGER("kbd-numlock") },

> "kbd_" naming is used only in case of backlight LEDs:
> ~/kernel$ git grep  ".*[\":]kbd_" -- "*.c"
> drivers/hid/hid-asus.c: drvdata->kbd_backlight-> =
> "asus::kbd_backlight";

Yes, but userland already knows about kbd_backlight, so we really can
not change this.

> With LEDs in platform drivers is that problem that we have the name
> compiled into the kernel. Maybe to make it more flexible we could
> use kernel config to choose between new "kbd-" and legacy "kbd_"
> naming.

No, I don't think that is suitable use for config option.

> >I don't care much if we use "platform:" or no prefix at all for
> >backlight of internal keyboard, as long as it is consistent across all
> >devices.
> >
> >We certainly want to use some prefix (probably inputX:) for backlight
> >on USB keyboards.
> For LEDs exposed through the input-LED bridge my
> script nicely reports:
> associated input node: input1
> It just does:
> readlink input1\:\:numlock/device
> which prints: "../../input1 "

Yes, that will probably work for USB keyboards. (But not for internal
keyboards on phones, etc).

(cesky, pictures)

Download attachment "signature.asc" of type "application/pgp-signature" (182 bytes)

Powered by blists - more mailing lists