https://github.com/ojhunt requested changes to this pull request.

I'm not convinced that this is the correct structural approach, I feel there is 
too much duplication of code.

My preference would be for us to have an initial path that does the basics: 
load+store+equality

The changes for that should be negligible, and not required an particularly 
complex changes to cmpxchange: the new value simply gets signed to the target 
schema prior to being passed to the existing xchg logic.

I'd like tests to ensure that no-op schema change does not re-authenticate 
unnecessarily - I'm actually curious what currently happens with an atomic 
function pointer.

I'm using "authenticated integer" below, as "signed integer" is cursed.

I do not like the addition of hasPointerAuthInteger - it seems plausible 
there's a dumb oversight in the existing "has pointer auth" check on the 
context that fails to record authenticated integers. If so that should be 
fixed, we shouldn't have an ad hoc implementation here - and if it is necessary 
to know there are authenticated integers specifically the astcontext pointer 
auth caches should record that directly.

As a separate point to this, I'm not sure we want to invest significant support 
that encourages authenticated integers -- there are real questions about how 
much we really want people to use them as if normal integers vs simply opaque 
pointer aliases that C and C++ developers seem woefully obsessed with.

A large number of the tests appear to simply be authenticated integer semantic 
tests implying the AI used here made improvements to the authenticated integer 
implementation that should be separated.

Also clean up the LLM comments.

https://github.com/llvm/llvm-project/pull/240090
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to