lkml.org 
[lkml]   [2020]   [Apr]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [RFC] seq_buf: Export symbols to external modules
On Fri, 17 Apr 2020 14:47:48 +0530
Vaibhav Jain <vaibhav@linux.ibm.com> wrote:

> Having these symbols exported to modules should simplify generating file
> content for pseudo file systems like sysfs or procfs. Many of the in
> kernel modules export atleast one such attribute file. Using seq_buf
> api provides a safe way to populate the read buffers for these attrs
> as these string buffers are PAGE_SIZE in length and a buggy module can
> easily cause an overflow.
>
> My specific use-case is exporting a set of nvdimm specific flags from
> papr_scm kernel module [1] via sysfs through a patch proposed at [2] and
> using seq_buf should considerably simply my code as suggested by Mpe
> at [3].
>
> [1] arch/powerpc/platforms/pseries/papr_scm.c
> [2] https://lore.kernel.org/linux-nvdimm/20200331143229.306718-2-vaibhav@linux.ibm.com
> [3] https://lore.kernel.org/linux-nvdimm/878sjetcis.fsf@mpe.ellerman.id.au

This patch should be added to a patch series that needs it. Then I'll give
my ack to it. That way, there's a reason to export them.

-- Steve

\
 
 \ /
  Last update: 2020-04-20 21:21    [W:0.048 / U:0.752 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site