* Re: [patch 163/227] mm: madvise: skip unmapped vma holes passed to process_madvise
[not found] ` <Yjpo2jnp5pkJr+XI@google.com>
@ 2022-03-23 8:28 ` Michal Hocko
2022-03-23 15:47 ` Charan Teja Kalla
0 siblings, 1 reply; 2+ messages in thread
From: Michal Hocko @ 2022-03-23 8:28 UTC (permalink / raw)
To: linux-kernel
Cc: Andrew Morton, vbabka, surenb, stable, sfr, rientjes, nadav.amit,
quic_charante, patches, linux-mm, mm-commits, torvalds
On Tue 22-03-22 17:24:58, Minchan Kim wrote:
> On Tue, Mar 22, 2022 at 02:46:48PM -0700, Andrew Morton wrote:
> > From: Charan Teja Kalla <quic_charante@quicinc.com>
> > Subject: mm: madvise: skip unmapped vma holes passed to process_madvise
> >
> > The process_madvise() system call is expected to skip holes in vma passed
> > through 'struct iovec' vector list. But do_madvise, which
> > process_madvise() calls for each vma, returns ENOMEM in case of unmapped
> > holes, despite the VMA is processed.
> >
> > Thus process_madvise() should treat ENOMEM as expected and consider the
> > VMA passed to as processed and continue processing other vma's in the
> > vector list. Returning -ENOMEM to user, despite the VMA is processed,
> > will be unable to figure out where to start the next madvise.
> >
> > Link: https://lkml.kernel.org/r/4f091776142f2ebf7b94018146de72318474e686.1647008754.git.quic_charante@quicinc.com
>
> I thought it was still under discussion and Charan will post next
> version along with previous patch
> "mm: madvise: return correct bytes advised with process_madvise"
>
> https://lore.kernel.org/linux-mm/7207b2f5-6b3e-aea4-aa1b-9c6d849abe34@quicinc.com/
Yes, I am not even sure the new semantic is sensible[1]. We should discuss
that and see all the consequences. Changing the semantic of an existing
syscall is always tricky going back and forth is even worse.
--
Michal Hocko
SUSE Labs
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [patch 163/227] mm: madvise: skip unmapped vma holes passed to process_madvise
2022-03-23 8:28 ` [patch 163/227] mm: madvise: skip unmapped vma holes passed to process_madvise Michal Hocko
@ 2022-03-23 15:47 ` Charan Teja Kalla
0 siblings, 0 replies; 2+ messages in thread
From: Charan Teja Kalla @ 2022-03-23 15:47 UTC (permalink / raw)
To: Michal Hocko, linux-kernel
Cc: Andrew Morton, vbabka, surenb, stable, sfr, rientjes, nadav.amit,
patches, linux-mm, mm-commits, torvalds
On 3/23/2022 1:58 PM, Michal Hocko wrote:
> On Tue 22-03-22 17:24:58, Minchan Kim wrote:
>> On Tue, Mar 22, 2022 at 02:46:48PM -0700, Andrew Morton wrote:
>>> From: Charan Teja Kalla <quic_charante@quicinc.com>
>>> Subject: mm: madvise: skip unmapped vma holes passed to process_madvise
>>>
>>> The process_madvise() system call is expected to skip holes in vma passed
>>> through 'struct iovec' vector list. But do_madvise, which
>>> process_madvise() calls for each vma, returns ENOMEM in case of unmapped
>>> holes, despite the VMA is processed.
>>>
>>> Thus process_madvise() should treat ENOMEM as expected and consider the
>>> VMA passed to as processed and continue processing other vma's in the
>>> vector list. Returning -ENOMEM to user, despite the VMA is processed,
>>> will be unable to figure out where to start the next madvise.
>>>
>>> Link: https://lkml.kernel.org/r/4f091776142f2ebf7b94018146de72318474e686.1647008754.git.quic_charante@quicinc.com
>> I thought it was still under discussion and Charan will post next
>> version along with previous patch
>> "mm: madvise: return correct bytes advised with process_madvise"
>>
>> https://lore.kernel.org/linux-mm/7207b2f5-6b3e-aea4-aa1b-9c6d849abe34@quicinc.com/
> Yes, I am not even sure the new semantic is sensible[1]. We should discuss
> that and see all the consequences. Changing the semantic of an existing
> syscall is always tricky going back and forth is even worse.
Starting the discussion @
https://lore.kernel.org/linux-mm/cover.1648046642.git.quic_charante@quicinc.com/
Thanks,
Charan
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-03-23 15:48 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <20220322143803.04a5e59a07e48284f196a2f9@linux-foundation.org>
[not found] ` <20220322214648.AB7A1C340EC@smtp.kernel.org>
[not found] ` <Yjpo2jnp5pkJr+XI@google.com>
2022-03-23 8:28 ` [patch 163/227] mm: madvise: skip unmapped vma holes passed to process_madvise Michal Hocko
2022-03-23 15:47 ` Charan Teja Kalla
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®