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-next>] [day] [month] [year] [list]
Date:   Fri, 15 Oct 2021 04:07:27 -0700
From:   Qing Wang <wangqing@...o.com>
To:     Jiri Kosina <jikos@...nel.org>,
        Benjamin Tissoires <benjamin.tissoires@...hat.com>,
        Bruno Prémont <bonbons@...ux-vserver.org>,
        Stefan Achatz <erazor_de@...rs.sourceforge.net>,
        Jonathan Cameron <jic23@...nel.org>,
        Srinivas Pandruvada <srinivas.pandruvada@...ux.intel.com>,
        linux-input@...r.kernel.org, linux-kernel@...r.kernel.org,
        linux-iio@...r.kernel.org
Cc:     Qing Wang <wangqing@...o.com>
Subject: [PATCH V2 0/5] hid: replace snprintf in show functions with sysfs_emit

According to Documentation/filesystems/sysfs.txt:
show() methods of device attributes should return the number
of bytes printed into the buffer. This is the return value of 
scnprintf(). snprintf() returns the length the resulting string.

So, show() should not use snprintf() when formatting 
the value to be returned to user space. 
Also, use sysfs_emit directly makes more sense.

Qing Wang (5):
  hid-lenovo: replace snprintf in show functions with sysfs_emit
  hid-picolcd: replace snprintf in show functions with sysfs_emit
  hid-roccat: replace snprintf in show functions with sysfs_emit
  hid-sensor: replace snprintf in show functions with sysfs_emit
  hid-sony: replace snprintf in show functions with sysfs_emit

 drivers/hid/hid-lenovo.c          | 16 ++++++++--------
 drivers/hid/hid-picolcd_core.c    |  6 +++---
 drivers/hid/hid-roccat-isku.c     |  2 +-
 drivers/hid/hid-roccat-kone.c     | 12 ++++++------
 drivers/hid/hid-roccat-koneplus.c |  4 ++--
 drivers/hid/hid-roccat-kovaplus.c | 10 +++++-----
 drivers/hid/hid-roccat-pyra.c     |  6 +++---
 drivers/hid/hid-sensor-custom.c   |  2 +-
 drivers/hid/hid-sony.c            |  6 +++---
 9 files changed, 32 insertions(+), 32 deletions(-)

-- 
2.7.4

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ