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-next>] [day] [month] [year] [list]
Date:   Tue, 17 Oct 2023 16:04:15 +0530
From:   Abhishek Kumar Singh <abhi1.singh@...sung.com>
To:     "dmitry.torokhov@...il.com" <dmitry.torokhov@...il.com>
CC:     "robh@...nel.org" <robh@...nel.org>,
        "linux-input@...r.kernel.org" <linux-input@...r.kernel.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        SRI-N IT Security <sri-n.itsec@...sung.com>
Subject: [PATCH] input: gpio-keys - optimize wakeup sequence.

Dear Mr. Dmitry,

Greetings!



This patch is related to optimization in input key event driver of Kernel module.

Suggested change to avoid the many APIs call chain if there is no key press event triggered.



There is a call back function gpio_keys_resume() called for every suspend/resume of the device.

And whenever this function is called, it is reading the status of the key. 

And gpio_keys_resume() API further calls the below chain of API irrespective of key press event.



APIs call chain:

static void gpio_keys_report_state(struct gpio_keys_drvdata *ddata)

static void gpio_keys_gpio_report_event(struct gpio_button_data *bdata)

gpiod_get_value_cansleep(bdata->gpiod);

input_event(input, type, *bdata->code, state);

input_sync(input);




Suggested changes to avoid the above APIs call chain if there is no key press event triggered.

It will save the device computational resources, power resources and optimize the suspend/resume time"


Please help to review the attached patch and integrate in main line kernel code.

 



Thanks and Regards,
Abhishek Kumar Singh
Sr. Chief Engineer, Samsung Electronics, Noida-India
Download attachment "input_keys_optimized.zip" of type "application/octet-stream" (998 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ