Index | Thread | Search

From:
"Theo de Raadt" <deraadt@openbsd.org>
Subject:
Re: [PATCH] amd64: import optimized memcmp from FreeBSD
To:
Christian Weisgerber <naddy@mips.inka.de>
Cc:
tech@openbsd.org
Date:
Sat, 30 Nov 2024 11:06:38 -0700

Download raw body.

Thread
Christian Weisgerber <naddy@mips.inka.de> wrote:

> > of working on the same thing every now and then, I would be in favour of
> > providing routines using the most performant instructions the
> > architecture has to offer (simd), if possible, and be done with it.
> > Would not mind writing those, if they would be accepted.
> 
> FreeBSD already did all that work recently.
> https://freebsdfoundation.org/blog/a-sneak-peek-simd-enhanced-string-functions-for-amd64/


That uses ifuncs.

ifuncs are an impressive exploit mechanism enhancement, and there are voices
even in the glibc ecosystem (most heavily invested in them) to find another
way that isn't so risky.

The generality of the ifunc scheme is unlikely to fly in OpenBSD land, it
would need restrictive modifications to be acceptable.