lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAJuCfpEJ1U2UHBNhLx4gggN3PLZKP5RejiZL_U5ZLxU_wdviVg@mail.gmail.com>
Date:   Wed, 25 Jan 2023 09:22:23 -0800
From:   Suren Baghdasaryan <surenb@...gle.com>
To:     Michal Hocko <mhocko@...e.com>
Cc:     akpm@...ux-foundation.org, michel@...pinasse.org,
        jglisse@...gle.com, vbabka@...e.cz, hannes@...xchg.org,
        mgorman@...hsingularity.net, dave@...olabs.net,
        willy@...radead.org, liam.howlett@...cle.com, peterz@...radead.org,
        ldufour@...ux.ibm.com, paulmck@...nel.org, luto@...nel.org,
        songliubraving@...com, peterx@...hat.com, david@...hat.com,
        dhowells@...hat.com, hughd@...gle.com, bigeasy@...utronix.de,
        kent.overstreet@...ux.dev, punit.agrawal@...edance.com,
        lstoakes@...il.com, peterjung1337@...il.com, rientjes@...gle.com,
        axelrasmussen@...gle.com, joelaf@...gle.com, minchan@...gle.com,
        jannh@...gle.com, shakeelb@...gle.com, tatashin@...gle.com,
        edumazet@...gle.com, gthelen@...gle.com, gurua@...gle.com,
        arjunroy@...gle.com, soheil@...gle.com, hughlynch@...gle.com,
        leewalsh@...gle.com, posk@...gle.com, will@...nel.org,
        aneesh.kumar@...ux.ibm.com, npiggin@...il.com,
        chenhuacai@...nel.org, tglx@...utronix.de, mingo@...hat.com,
        bp@...en8.de, dave.hansen@...ux.intel.com, richard@....at,
        anton.ivanov@...bridgegreys.com, johannes@...solutions.net,
        qianweili@...wei.com, wangzhou1@...ilicon.com,
        herbert@...dor.apana.org.au, davem@...emloft.net, vkoul@...nel.org,
        airlied@...il.com, daniel@...ll.ch,
        maarten.lankhorst@...ux.intel.com, mripard@...nel.org,
        tzimmermann@...e.de, l.stach@...gutronix.de,
        krzysztof.kozlowski@...aro.org, patrik.r.jakobsson@...il.com,
        matthias.bgg@...il.com, robdclark@...il.com,
        quic_abhinavk@...cinc.com, dmitry.baryshkov@...aro.org,
        tomba@...nel.org, hjc@...k-chips.com, heiko@...ech.de,
        ray.huang@....com, kraxel@...hat.com, sre@...nel.org,
        mcoquelin.stm32@...il.com, alexandre.torgue@...s.st.com,
        tfiga@...omium.org, m.szyprowski@...sung.com, mchehab@...nel.org,
        dimitri.sivanich@....com, zhangfei.gao@...aro.org,
        jejb@...ux.ibm.com, martin.petersen@...cle.com,
        dgilbert@...erlog.com, hdegoede@...hat.com, mst@...hat.com,
        jasowang@...hat.com, alex.williamson@...hat.com, deller@....de,
        jayalk@...works.biz, viro@...iv.linux.org.uk, nico@...xnic.net,
        xiang@...nel.org, chao@...nel.org, tytso@....edu,
        adilger.kernel@...ger.ca, miklos@...redi.hu,
        mike.kravetz@...cle.com, muchun.song@...ux.dev, bhe@...hat.com,
        andrii@...nel.org, yoshfuji@...ux-ipv6.org, dsahern@...nel.org,
        kuba@...nel.org, pabeni@...hat.com, perex@...ex.cz, tiwai@...e.com,
        haojian.zhuang@...il.com, robert.jarzmik@...e.fr,
        linux-mm@...ck.org, linux-arm-kernel@...ts.infradead.org,
        linuxppc-dev@...ts.ozlabs.org, x86@...nel.org,
        linux-kernel@...r.kernel.org, linux-graphics-maintainer@...are.com,
        linux-ia64@...r.kernel.org, linux-arch@...r.kernel.org,
        loongarch@...ts.linux.dev, kvm@...r.kernel.org,
        linux-s390@...r.kernel.org, linux-sgx@...r.kernel.org,
        linux-um@...ts.infradead.org, linux-acpi@...r.kernel.org,
        linux-crypto@...r.kernel.org, nvdimm@...ts.linux.dev,
        dmaengine@...r.kernel.org, amd-gfx@...ts.freedesktop.org,
        dri-devel@...ts.freedesktop.org, etnaviv@...ts.freedesktop.org,
        linux-samsung-soc@...r.kernel.org, intel-gfx@...ts.freedesktop.org,
        linux-mediatek@...ts.infradead.org, linux-arm-msm@...r.kernel.org,
        freedreno@...ts.freedesktop.org,
        linux-rockchip@...ts.infradead.org, linux-tegra@...r.kernel.org,
        virtualization@...ts.linux-foundation.org,
        xen-devel@...ts.xenproject.org,
        linux-stm32@...md-mailman.stormreply.com,
        linux-rdma@...r.kernel.org, linux-media@...r.kernel.org,
        linux-accelerators@...ts.ozlabs.org, sparclinux@...r.kernel.org,
        linux-scsi@...r.kernel.org, linux-staging@...ts.linux.dev,
        target-devel@...r.kernel.org, linux-usb@...r.kernel.org,
        netdev@...r.kernel.org, linux-fbdev@...r.kernel.org,
        linux-aio@...ck.org, linux-fsdevel@...r.kernel.org,
        linux-erofs@...ts.ozlabs.org, linux-ext4@...r.kernel.org,
        devel@...ts.orangefs.org, kexec@...ts.infradead.org,
        linux-xfs@...r.kernel.org, bpf@...r.kernel.org,
        linux-perf-users@...r.kernel.org, kasan-dev@...glegroups.com,
        selinux@...r.kernel.org, alsa-devel@...a-project.org,
        kernel-team@...roid.com
Subject: Re: [PATCH v2 4/6] mm: replace vma->vm_flags indirect modification in ksm_madvise

On Wed, Jan 25, 2023 at 9:08 AM Michal Hocko <mhocko@...e.com> wrote:
>
> On Wed 25-01-23 08:57:48, Suren Baghdasaryan wrote:
> > On Wed, Jan 25, 2023 at 1:38 AM 'Michal Hocko' via kernel-team
> > <kernel-team@...roid.com> 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.
>
> You can avoid that by making flags inaccesible directly, right?

Ah, you mean Peter's suggestion of using __private? I guess that would
cover it. I'll drop these BUG_ONs in the next version. Thanks!

>
> --
> Michal Hocko
> SUSE Labs

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ