[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v2 4/6] mm: replace vma->vm_flags indirect modification in ksm_madvise
- To: Michal Hocko <mhocko@xxxxxxxx>
- From: Suren Baghdasaryan <surenb@xxxxxxxxxx>
- Date: Wed, 25 Jan 2023 08:57:48 -0800
- Cc: akpm@xxxxxxxxxxxxxxxxxxxx, michel@xxxxxxxxxxxxxx, jglisse@xxxxxxxxxx, vbabka@xxxxxxx, hannes@xxxxxxxxxxx, mgorman@xxxxxxxxxxxxxxxxxxx, dave@xxxxxxxxxxxx, willy@xxxxxxxxxxxxx, liam.howlett@xxxxxxxxxx, peterz@xxxxxxxxxxxxx, ldufour@xxxxxxxxxxxxx, paulmck@xxxxxxxxxx, luto@xxxxxxxxxx, songliubraving@xxxxxx, peterx@xxxxxxxxxx, david@xxxxxxxxxx, dhowells@xxxxxxxxxx, hughd@xxxxxxxxxx, bigeasy@xxxxxxxxxxxxx, kent.overstreet@xxxxxxxxx, punit.agrawal@xxxxxxxxxxxxx, lstoakes@xxxxxxxxx, peterjung1337@xxxxxxxxx, rientjes@xxxxxxxxxx, axelrasmussen@xxxxxxxxxx, joelaf@xxxxxxxxxx, minchan@xxxxxxxxxx, jannh@xxxxxxxxxx, shakeelb@xxxxxxxxxx, tatashin@xxxxxxxxxx, edumazet@xxxxxxxxxx, gthelen@xxxxxxxxxx, gurua@xxxxxxxxxx, arjunroy@xxxxxxxxxx, soheil@xxxxxxxxxx, hughlynch@xxxxxxxxxx, leewalsh@xxxxxxxxxx, posk@xxxxxxxxxx, will@xxxxxxxxxx, aneesh.kumar@xxxxxxxxxxxxx, npiggin@xxxxxxxxx, chenhuacai@xxxxxxxxxx, tglx@xxxxxxxxxxxxx, mingo@xxxxxxxxxx, bp@xxxxxxxxx, dave.hansen@xxxxxxxxxxxxxxx, richard@xxxxxx, anton.ivanov@xxxxxxxxxxxxxxxxxx, johannes@xxxxxxxxxxxxxxxx, qianweili@xxxxxxxxxx, wangzhou1@xxxxxxxxxxxxx, herbert@xxxxxxxxxxxxxxxxxxx, davem@xxxxxxxxxxxxx, vkoul@xxxxxxxxxx, airlied@xxxxxxxxx, daniel@xxxxxxxx, maarten.lankhorst@xxxxxxxxxxxxxxx, mripard@xxxxxxxxxx, tzimmermann@xxxxxxx, l.stach@xxxxxxxxxxxxxx, krzysztof.kozlowski@xxxxxxxxxx, patrik.r.jakobsson@xxxxxxxxx, matthias.bgg@xxxxxxxxx, robdclark@xxxxxxxxx, quic_abhinavk@xxxxxxxxxxx, dmitry.baryshkov@xxxxxxxxxx, tomba@xxxxxxxxxx, hjc@xxxxxxxxxxxxxx, heiko@xxxxxxxxx, ray.huang@xxxxxxx, kraxel@xxxxxxxxxx, sre@xxxxxxxxxx, mcoquelin.stm32@xxxxxxxxx, alexandre.torgue@xxxxxxxxxxx, tfiga@xxxxxxxxxxxx, m.szyprowski@xxxxxxxxxxx, mchehab@xxxxxxxxxx, dimitri.sivanich@xxxxxxx, zhangfei.gao@xxxxxxxxxx, jejb@xxxxxxxxxxxxx, martin.petersen@xxxxxxxxxx, dgilbert@xxxxxxxxxxxx, hdegoede@xxxxxxxxxx, mst@xxxxxxxxxx, jasowang@xxxxxxxxxx, alex.williamson@xxxxxxxxxx, deller@xxxxxx, jayalk@xxxxxxxxxxxx, viro@xxxxxxxxxxxxxxxxxx, nico@xxxxxxxxxxx, xiang@xxxxxxxxxx, chao@xxxxxxxxxx, tytso@xxxxxxx, adilger.kernel@xxxxxxxxx, miklos@xxxxxxxxxx, mike.kravetz@xxxxxxxxxx, muchun.song@xxxxxxxxx, bhe@xxxxxxxxxx, andrii@xxxxxxxxxx, yoshfuji@xxxxxxxxxxxxxx, dsahern@xxxxxxxxxx, kuba@xxxxxxxxxx, pabeni@xxxxxxxxxx, perex@xxxxxxxx, tiwai@xxxxxxxx, haojian.zhuang@xxxxxxxxx, robert.jarzmik@xxxxxxx, linux-mm@xxxxxxxxx, linux-arm-kernel@xxxxxxxxxxxxxxxxxxx, linuxppc-dev@xxxxxxxxxxxxxxxx, x86@xxxxxxxxxx, linux-kernel@xxxxxxxxxxxxxxx, linux-graphics-maintainer@xxxxxxxxxx, linux-ia64@xxxxxxxxxxxxxxx, linux-arch@xxxxxxxxxxxxxxx, loongarch@xxxxxxxxxxxxxxx, kvm@xxxxxxxxxxxxxxx, linux-s390@xxxxxxxxxxxxxxx, linux-sgx@xxxxxxxxxxxxxxx, linux-um@xxxxxxxxxxxxxxxxxxx, linux-acpi@xxxxxxxxxxxxxxx, linux-crypto@xxxxxxxxxxxxxxx, nvdimm@xxxxxxxxxxxxxxx, dmaengine@xxxxxxxxxxxxxxx, amd-gfx@xxxxxxxxxxxxxxxxxxxxx, dri-devel@xxxxxxxxxxxxxxxxxxxxx, etnaviv@xxxxxxxxxxxxxxxxxxxxx, linux-samsung-soc@xxxxxxxxxxxxxxx, intel-gfx@xxxxxxxxxxxxxxxxxxxxx, linux-mediatek@xxxxxxxxxxxxxxxxxxx, linux-arm-msm@xxxxxxxxxxxxxxx, freedreno@xxxxxxxxxxxxxxxxxxxxx, linux-rockchip@xxxxxxxxxxxxxxxxxxx, linux-tegra@xxxxxxxxxxxxxxx, virtualization@xxxxxxxxxxxxxxxxxxxxxxxxxx, xen-devel@xxxxxxxxxxxxxxxxxxxx, linux-stm32@xxxxxxxxxxxxxxxxxxxxxxxxxxxx, linux-rdma@xxxxxxxxxxxxxxx, linux-media@xxxxxxxxxxxxxxx, linux-accelerators@xxxxxxxxxxxxxxxx, sparclinux@xxxxxxxxxxxxxxx, linux-scsi@xxxxxxxxxxxxxxx, linux-staging@xxxxxxxxxxxxxxx, target-devel@xxxxxxxxxxxxxxx, linux-usb@xxxxxxxxxxxxxxx, netdev@xxxxxxxxxxxxxxx, linux-fbdev@xxxxxxxxxxxxxxx, linux-aio@xxxxxxxxx, linux-fsdevel@xxxxxxxxxxxxxxx, linux-erofs@xxxxxxxxxxxxxxxx, linux-ext4@xxxxxxxxxxxxxxx, devel@xxxxxxxxxxxxxxxxxx, kexec@xxxxxxxxxxxxxxxxxxx, linux-xfs@xxxxxxxxxxxxxxx, bpf@xxxxxxxxxxxxxxx, linux-perf-users@xxxxxxxxxxxxxxx, kasan-dev@xxxxxxxxxxxxxxxx, selinux@xxxxxxxxxxxxxxx, alsa-devel@xxxxxxxxxxxxxxxx, kernel-team@xxxxxxxxxxx
- Delivery-date: Thu, 26 Jan 2023 05:08:40 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
On Wed, Jan 25, 2023 at 1:38 AM 'Michal Hocko' via kernel-team
<kernel-team@xxxxxxxxxxx> wrote:
>
> On Wed 25-01-23 00:38:49, Suren Baghdasaryan wrote:
> > Replace indirect modifications to vma->vm_flags with calls to modifier
> > functions to be able to track flag changes and to keep vma locking
> > correctness. Add a BUG_ON check in ksm_madvise() to catch indirect
> > vm_flags modification attempts.
>
> Those BUG_ONs scream to much IMHO. KSM is an MM internal code so I
> gueess we should be willing to trust it.
Yes, but I really want to prevent an indirect misuse since it was not
easy to find these. If you feel strongly about it I will remove them
or if you have a better suggestion I'm all for it.
>
> > Signed-off-by: Suren Baghdasaryan <surenb@xxxxxxxxxx>
>
> Acked-by: Michal Hocko <mhocko@xxxxxxxx>
> --
> Michal Hocko
> SUSE Labs
>
> --
> To unsubscribe from this group and stop receiving emails from it, send an
> email to kernel-team+unsubscribe@xxxxxxxxxxx.
>
|