All of lore.kernel.org
 help / color / mirror / Atom feed
* Removed MTE function
@ 2021-04-02 11:26 Derrick McKee
  2021-04-02 12:34 ` Catalin Marinas
  0 siblings, 1 reply; 4+ messages in thread
From: Derrick McKee @ 2021-04-02 11:26 UTC (permalink / raw)
  To: Vincenzo Frascino, Andrey Konovalov, Linux ARM

Hi,

I was under the impression that MTE was mainlined in the kernel.
However, the function mte_assign_mem_tag_range is not present in the
5.10 or later kernels.  Was it removed or just that functionality
isn't ready yet?  If it was removed, why?  Thanks.


--
Derrick McKee
Phone: (703) 957-9362
Email: derrick.mckee@gmail.com

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Removed MTE function
  2021-04-02 11:26 Removed MTE function Derrick McKee
@ 2021-04-02 12:34 ` Catalin Marinas
  2021-04-16 17:58   ` Derrick McKee
  0 siblings, 1 reply; 4+ messages in thread
From: Catalin Marinas @ 2021-04-02 12:34 UTC (permalink / raw)
  To: Derrick McKee; +Cc: Vincenzo Frascino, Andrey Konovalov, Linux ARM

On Fri, Apr 02, 2021 at 07:26:12AM -0400, Derrick McKee wrote:
> I was under the impression that MTE was mainlined in the kernel.
> However, the function mte_assign_mem_tag_range is not present in the
> 5.10 or later kernels.  Was it removed or just that functionality
> isn't ready yet?  If it was removed, why?  Thanks.

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.

What do you need this function for? It's supposed to be used only by
kasan, hence moved to mte-kasan.h.

-- 
Catalin

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Removed MTE function
  2021-04-02 12:34 ` Catalin Marinas
@ 2021-04-16 17:58   ` Derrick McKee
  2021-04-26 17:07     ` Catalin Marinas
  0 siblings, 1 reply; 4+ messages in thread
From: Derrick McKee @ 2021-04-16 17:58 UTC (permalink / raw)
  To: Catalin Marinas; +Cc: Vincenzo Frascino, Andrey Konovalov, Linux ARM

On Fri, Apr 2, 2021 at 8:34 AM Catalin Marinas <catalin.marinas@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.



--
Derrick McKee
Phone: (703) 957-9362
Email: derrick.mckee@gmail.com

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Removed MTE function
  2021-04-16 17:58   ` Derrick McKee
@ 2021-04-26 17:07     ` Catalin Marinas
  0 siblings, 0 replies; 4+ messages in thread
From: Catalin Marinas @ 2021-04-26 17:07 UTC (permalink / raw)
  To: Derrick McKee; +Cc: Vincenzo Frascino, Andrey Konovalov, Linux ARM

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@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

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2021-04-26 17:09 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-02 11:26 Removed MTE function Derrick McKee
2021-04-02 12:34 ` Catalin Marinas
2021-04-16 17:58   ` Derrick McKee
2021-04-26 17:07     ` Catalin Marinas

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.