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]
Message-Id: <cover.1600285923.git.joe@perches.com>
Date:   Wed, 16 Sep 2020 13:40:37 -0700
From:   Joe Perches <joe@...ches.com>
To:     Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        "Rafael J . Wysocki" <rafael@...nel.org>,
        linux-kernel@...r.kernel.org, linux-pm@...r.kernel.org,
        linux-mm@...ck.org
Cc:     Denis Efremov <efremov@...ux.com>,
        Julia Lawall <julia.lawall@...ia.fr>,
        Alex Dewar <alex.dewar90@...il.com>, linux-doc@...r.kernel.org
Subject: [PATCH V3 0/8] sysfs: drivers core: Add and use sysfs_emit and sysfs_emit_at

Output defects can exist in sysfs content using sprintf and snprintf.

sprintf does not know the PAGE_SIZE maximum of the temporary buffer
used for outputting sysfs content and it's possible to overrun the
PAGE_SIZE buffer length.

Add a generic sysfs_emit function that knows that the size of the
temporary buffer and ensures that no overrun is done.

Add a generic sysfs_emit_at function that can be used in multiple
call situations that also ensures that no overrun is done.

V2: Add drivers core conversions
V3: Add a few more neatenings and conversions to drivers core
    Add mm hugetlb_report_node_meminfo conversion

Joe Perches (8):
  sysfs: Add sysfs_emit and sysfs_emit_at to format sysfs output
  drivers core: Use sysfs_emit and sysfs_emit_at for show(device *...) functions
  drivers core: Remove strcat uses around sysfs_emit and neaten
  drivers core: Reindent a couple uses around sysfs_emit
  drivers core: Miscellaneous changes for sysfs_emit
  mm: and drivers core: Convert hugetlb_report_node_meminfo to sysfs_emit
  drivers core: Use sysfs_emit for shared_cpu_map_show and shared_cpu_list_show
  drivers core: node: Use a more typical macro definition style for ACCESS_ATTR

 Documentation/filesystems/sysfs.rst     |   8 +-
 drivers/base/arch_topology.c            |   2 +-
 drivers/base/bus.c                      |   2 +-
 drivers/base/cacheinfo.c                |  49 ++--
 drivers/base/class.c                    |   2 +-
 drivers/base/core.c                     |  59 +++--
 drivers/base/cpu.c                      |  84 ++++---
 drivers/base/dd.c                       |   3 +-
 drivers/base/devcoredump.c              |   2 +-
 drivers/base/firmware_loader/fallback.c |   4 +-
 drivers/base/memory.c                   |  62 ++---
 drivers/base/node.c                     | 306 ++++++++++++------------
 drivers/base/platform.c                 |  17 +-
 drivers/base/power/sysfs.c              | 160 ++++++++-----
 drivers/base/power/wakeup_stats.c       |  17 +-
 drivers/base/soc.c                      |  64 +++--
 drivers/base/topology.c                 |  10 +-
 fs/sysfs/file.c                         |  55 +++++
 include/linux/hugetlb.h                 |   4 +-
 include/linux/sysfs.h                   |  15 ++
 mm/hugetlb.c                            |  18 +-
 21 files changed, 532 insertions(+), 411 deletions(-)

-- 
2.26.0

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ