Removed MTE function

Catalin Marinas catalin.marinas at arm.com
Mon Apr 26 18:07:46 BST 2021


On Fri, Apr 16, 2021 at 01:58:27PM -0400, Derrick McKee wrote:
> On Fri, Apr 2, 2021 at 8:34 AM Catalin Marinas <catalin.marinas at arm.com> wrote:
> > It was added in commit 85f49cae4dfc ("arm64: mte: add in-kernel MTE
> > helpers") in 5.11 but moved out of mte.S by commit 2cb34276427a ("arm64:
> > kasan: simplify and inline MTE functions") in 5.12 and renamed to
> > mte_set_mem_tag_range(). Unfortunately, that commit did not delete the
> > old function prototypes in mte.h. I'll clean it up next week, unless
> > someone beats me to it with a patch.
> 
> Ahh, ok, thanks for the information.
> 
> > What do you need this function for? It's supposed to be used only by
> > kasan, hence moved to mte-kasan.h.
> 
> I am working on a research prototype attempting to harden kernel
> modules using a combination of MTE and PAC.  I'd actually be
> interested in hearing how KASAN handles dynamic percpu allocations,
> because that's been a challenge for me in this project.

At a quick look, I don't think it does anything special. It relies on
the page allocator to set a tag on the page and I presume it uses that
tag. However, individual objects won't be tagged differently, nor the
tag reset on free.

-- 
Catalin



More information about the linux-arm-kernel mailing list