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:   Wed, 10 Jun 2020 11:44:49 +0200
From:   Pali Rohár <pali@...nel.org>
To:     Mario.Limonciello@...l.com
Cc:     rdunlap@...radead.org, y.linux@...itcher.com,
        linux-kernel@...r.kernel.org, platform-driver-x86@...r.kernel.org,
        mjg59@...f.ucam.org
Subject: Re: [PATCH v2 3/3] platform/x86: dell-wmi: add new dmi keys to
 bios_to_linux_keycode

On Tuesday 09 June 2020 19:49:18 Mario.Limonciello@...l.com wrote:
> > 
> > Looking at the last two lines... and for me it looks like that 0x00FF
> > and 0xFFFF are just "placeholders" or special values for unknown /
> > custom / unsupported / reserved / special / ... codes.
> > 
> > It is really suspicious why first 38 values are defined, then there is
> > gap, then one value 255 and then huge gap to 65535.
> > 
> > Mario, this looks like some mapping table between internal Dell BIOS key
> > code and standard Linux key code. Are you able to get access to some
> > documentation which contains explanation of those Dell key numbers?
> > It could really help us to understand these gaps and what is correct
> > interpretation of these numbers.
> > 
> 
> The codes are actually 4 bytes in the table, but in practice nothing above the
> first two bytes is used.
> 
> Those two called out are special though, here are their meanings:
> 
> 0x00FF is user programmable function
> 0xFFFF is no function
> 
> For the purpose of memory consumption I think it's reasonable to ignore the
> upper 2 bytes and special case these two.

Thank you for information!

So 0x00FF is "user programmable" button. Do I understand it correctly
that Dell/BIOS does not explicitly provide meaning for these buttons,
they do not have fixed functionality and therefore user should configure
them as he want?

And what does mean "no function"? I do not know what should I imagine if
I receive key press marked as "no function".

> > E.g. I remember that pressing Fn+Q or Fn+W on some Dell Latitude
> > generates code 255, which could prove my thesis about "special codes"
> > (which are probably not found in e.g. Windows or Linux mapping tables).
> > 
> > > >  };
> > > >
> > > >  /*
> > > > @@ -503,10 +504,7 @@ static void handle_dmi_entry(const struct
> > dmi_header *dm, void *opaque)
> > > >  					&table->keymap[i];
> > > >
> > > >  		/* Uninitialized entries are 0 aka KEY_RESERVED. */
> > > > -		u16 keycode = (bios_entry->keycode <
> > > > -			       ARRAY_SIZE(bios_to_linux_keycode)) ?
> > > > -			bios_to_linux_keycode[bios_entry->keycode] :
> > > > -			KEY_RESERVED;
> > > > +		u16 keycode = bios_to_linux_keycode[bios_entry->keycode];
> > > >
> > > >  		/*
> > > >  		 * Log if we find an entry in the DMI table that we don't
> > > >
> > >
> > > Something like:
> > >
> > > 		u16 keycode;
> > >
> > > 		keycode = bios_entry->keycode == 0xffff ? KEY_UNKNOWN :
> > > 			(bios_entry->keycode <
> > > 			       ARRAY_SIZE(bios_to_linux_keycode)) ?
> > > 			bios_to_linux_keycode[bios_entry->keycode] :
> > > 			KEY_RESERVED;
> > >
> > >
> > >
> > > Also please fix this:
> > > (no To-header on input) <>
> > 
> > Hint: specifying git send-email with '--to' argument instead of '--cc'
> > should help.
> > 
> > >
> > > --
> > > ~Randy
> > >

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ