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-prev] [day] [month] [year] [list]
Message-ID: <f420a63d63334e5b97e7562ce5be0d5d@realtek.com>
Date: Thu, 24 Jul 2025 08:57:19 +0000
From: Ping-Ke Shih <pkshih@...ltek.com>
To: Zong-Zhe Yang <kevin_yang@...ltek.com>,
        Mande Imran Ahmed
	<immu.ahmed1905@...il.com>,
        "rtl8821cerfe2@...il.com"
	<rtl8821cerfe2@...il.com>,
        Bernie Huang <phhuang@...ltek.com>,
        Damon Chen
	<damon.chen@...ltek.com>
CC: "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: RE: [PATCH] net:realtek:use sysfs_emit() instead of scnprintf() for sysfs consistency

Zong-Zhe Yang <kevin_yang@...ltek.com> wrote:
> Mande Imran Ahmed <immu.ahmed1905@...il.com> wrote:
> >
> > Update the Realtek rtw89 wireless driver to replace scnprintf() with
> > sysfs_emit() for formatting sysfs attribute output, in line with the recommendations from
> > Documentation/filesystems/sysfs.rst.

This is for sysfs, no? But this patch is related to debugfs, which buffer
size isn't PAGE_SIZE. Please refer to implementation of sysfs_emit().

So NACK.

> >
> > This change enhances the safety and correctness of sysfs handling, promotes consistency
> > throughout the kernel, and aids long-term maintainability.
> >
> > Functionality verified using ping, iperf, and connection tests to ensure stability after the
> > change.
> >
> > Signed-off-by: Mande Imran Ahmed <immu.ahmed1905@...il.com>

[...]

> 
> (1.) buffer might not just be allocated with PAGE_SIZE
> (2.) the pointer passed to leaf function might not point to the head of allocated buffer
> 
> Will the above cause some problems ?
> 
> For (2.), maybe need to tweak them with sysfs_emit_at() instead of sysfs_emit(). !?

The assumption of buffer size in sysfs_emit() is PAGE_SIZE, but this is
totally wrong in rtw89 debugfs.



Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ