From: Greg KH <gregkh@linuxfoundation.org>
To: Gabriele Paoloni <gpaoloni@redhat.com>
Cc: arnd@arndb.de, linux-kernel@vger.kernel.org,
safety-architecture@lists.elisa.tech
Subject: Re: [RFC PATCH] /dev/mem: Add initial documentation of memory_open() and mem_fops
Date: Thu, 21 Aug 2025 19:35:38 +0200 [thread overview]
Message-ID: <2025082126-sulfite-unwired-c58c@gregkh> (raw)
In-Reply-To: <20250821170419.70668-1-gpaoloni@redhat.com>
On Thu, Aug 21, 2025 at 07:04:19PM +0200, Gabriele Paoloni wrote:
> This patch proposes initial kernel-doc documentation for memory_open()
> and most of the functions in the mem_fops structure.
> The format used for the **Description** intends to define testable
> function's expectations and Assumptions of Use to be met by the
> user of the function.
>
> Signed-off-by: Gabriele Paoloni <gpaoloni@redhat.com>
> ---
> I have a couple of comments from this documentation activity:
> 1) Shouldn't the check in read_mem() <<if (p != *ppos)>> return
> -EFBIG (as done in write_mem())?
I think that check implies you don't want to read any more memory,
right? Try changing it and see what happens :)
> 2) There is a note in memory_lseek() that states the return value
> to be (0) for negative addresses, however I cannot see how that
> would happen in the current implementation...
How that you could have a negative address, or how you would return 0?
Also, you should cc: the mm developers, they touch this file all the
time and know it quite well (recent changes to /dev/zero just got added
in the past few days from them.)
thanks,
greg k-h
next prev parent reply other threads:[~2025-08-21 17:35 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-08-21 17:04 [RFC PATCH] /dev/mem: Add initial documentation of memory_open() and mem_fops Gabriele Paoloni
2025-08-21 17:14 ` Greg KH
2025-08-22 14:43 ` Gabriele Paoloni
2025-08-22 15:08 ` Greg KH
2025-08-23 7:48 ` Gabriele Paoloni
2025-08-23 8:01 ` Greg KH
2025-08-24 15:09 ` Gabriele Paoloni
2025-08-21 17:35 ` Greg KH [this message]
2025-08-22 15:14 ` Gabriele Paoloni
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=2025082126-sulfite-unwired-c58c@gregkh \
--to=gregkh@linuxfoundation.org \
--cc=arnd@arndb.de \
--cc=gpaoloni@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=safety-architecture@lists.elisa.tech \
/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