Dell Adds Hardware Privacy Drivers to Linux Kernel

2 min


Dell plans to add hardware kill switches for microphone and camera of all the laptops models from 2021 onwards.

With this in mind, Dell started adding supporting driver codes to the Linux Kernel.

Privacy is a big concern for you, me, and every user on the internet. There are applications, software that can read the audio and video streams without the user’s consent. There are reports even, due to certain software bug, you might not see the LED turned on the webcam but applications are reading your cam streams.

Sample Hardware Kill Switch for Laptop
Sample Hardware Kill Switch for Laptop

That’s where the hardware kill switches are useful. When hardware switches are turned off you can rest assured that no application is reading your mic and cam data.

When you add any hardware feature, drivers are needed. That is why Dell is already adding support for these drivers before the actual Laptop launched in the market for Linux.

Hardware Privacy Drivers for Linux Kernel

+void dell_privacy_process_event(int type, int code, int status)
+{
struct privacy_wmi_data *priv;
const struct key_entry *key;
+
mutex_lock(&list_mutex);
priv = list_first_entry_or_null(&wmi_list,
struct privacy_wmi_data,
list);
if (priv == NULL) {
pr_err("dell privacy priv is NULL\n");
goto error;
}
+
key = sparse_keymap_entry_from_scancode(priv->input_dev, (type << 16)|code);
if (!key) {
dev_dbg(&priv->wdev->dev, "Unknown key with type 0x%04x and code 0x%04x pressed\n",
type, code);
goto error;
}
+
switch (code) {
case DELL_PRIVACY_TYPE_AUDIO: /* Mic mute */
priv->last_status = status;
sparse_keymap_report_entry(priv->input_dev, key, 1, true);
break;
case DELL_PRIVACY_TYPE_CAMERA: /* Camera mute */
priv->last_status = status;
sparse_keymap_report_entry(priv->input_dev, key, 1, true);
break;
default:
dev_dbg(&priv->wdev->dev, "unknown event type %u /%u",
type, code);
}
+error:
mutex_unlock(&list_mutex);
return;
+}

Sample code added by Dell

The actual code can be found here. As per the code added, the driver will work with the Dell laptops equipped with the “Hardware Privacy Design” to protect users’ privacy of cam and mic at the hardware level.

Also, it’s worth noting that hotkeys are also supported in Linux as well to turn off the mic and cam as per the code added. Once privacy mode is enabled, you can press CTRL+F4 to toggle the mic and CTRL+F9 for cam.

PC manufacturers Companies don’t think aloud sometimes about Linux and its users in terms of driver support, mainly for new hardware features such as fingerprint scanner, hardware kill switches. It’s still a grey area for some users blocking them to migrate to Linux while wondering whether my Laptop’s features still work under Linux.

That being said, it’s good to see the world’s largest PC manufacturers thinking about Linux and its users. And it’s adding support from the Beginning – in this case before the launch of the actual hardware. At this moment, it is not announced which of the Dell Laptop series will be equipped with the hardware kill switch.


Arindam

Creator and author of debugpoint.com. Connect with me via Telegram, 𝕏 (Twitter), or send us an email.
Subscribe
Notify of
guest

This site uses Akismet to reduce spam. Learn how your comment data is processed.

0 Comments
Inline Feedbacks
View all comments