From: Vaibhav Jain <vaibhav@linux.ibm.com>
To: Steven Rostedt <rostedt@goodmis.org>
Cc: linux-kernel@vger.kernel.org,
"Aneesh Kumar K . V" <aneesh.kumar@linux.ibm.com>,
Michael Ellerman <ellerman@au1.ibm.com>,
Piotr Maziarz <piotrx.maziarz@linux.intel.com>,
Cezary Rojewski <cezary.rojewski@intel.com>,
Borislav Petkov <bp@alien8.de>
Subject: Re: [RFC] seq_buf: Export symbols to external modules
Date: Fri, 08 May 2020 16:24:45 +0530 [thread overview]
Message-ID: <87eeru8znu.fsf@linux.ibm.com> (raw)
In-Reply-To: <20200420152043.1cd0a2ae@gandalf.local.home>
Steven Rostedt <rostedt@goodmis.org> writes:
> 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.
Thanks Steve,
I have posted a patch series at
https://lore.kernel.org/linux-nvdimm/20200508104922.72565-1-vaibhav@linux.ibm.com/
titled "powerpc/papr_scm: Add support for reporting nvdimm health" that
contains a patch to export seq_buf_printf() viz patch
https://lore.kernel.org/linux-nvdimm/20200508104922.72565-3-vaibhav@linux.ibm.com/
titled "seq_buf: Export seq_buf_printf() to external modules"
~ Vaibhav
>
> -- Steve
prev parent reply other threads:[~2020-05-08 10:55 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-04-16 3:51 Vaibhav Jain
2020-04-16 13:09 ` Steven Rostedt
2020-04-17 9:17 ` Vaibhav Jain
2020-04-20 19:20 ` Steven Rostedt
2020-05-08 10:54 ` Vaibhav Jain [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87eeru8znu.fsf@linux.ibm.com \
--to=vaibhav@linux.ibm.com \
--cc=aneesh.kumar@linux.ibm.com \
--cc=bp@alien8.de \
--cc=cezary.rojewski@intel.com \
--cc=ellerman@au1.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=piotrx.maziarz@linux.intel.com \
--cc=rostedt@goodmis.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®