felipepiovezan wrote: > I forgot all about #157435 so I just merged it and you'll have conflicts from > that.
All good, I was just waiting for the PR bots to give me basic signal before tagging reviewers, but you beat me to it! :) > > You don't have to make the test work on Linux, `if Darwin` is fine and extend > it later. So I'm hoping this PR is a no-op for all other targets, as the only ABI plugin that implements this new method is the Darwin one. All other plugins just forward to the existing FixAnyAddress method, and preserve existing behavior. > In an ideal world, we would know that the target has memory tagging enabled > and only then leave the tag in. Though given that MTE implies TBI and we have > TBI everywhere we care about, we won't fault leaving in the tag bits on a > system without MTE. > > So what you've got is fine, assuming you have at least TBI on all systems > you're gonna use this with. > > I do wonder if this is gonna work for any AArch64 target, because there can > be targets where you need to remove PAC codes but you don't have top byte > ignore. Anyway I'll think about that. Right, I think this is where each plugin will need to some querying of process properties in order to know what the right thing to do is. A very reasonable thing to do here is to query the process on whether it was launched with memory tagging here. I've chosen not to do that in the apple plugin, mostly because I think we're missing some debugserver support atm for this kind of query. And because we use TBI everywhere AFAICT. In a very ideal world, I would love if we could not strip anything, ever. But this places some burden on codegen of the expression evaluator, for all languages and all ABIs. I don't think it's doable right now. > > FixAnyAddressPreservingAuthentication > > Authentication is an awkward word choice considering that it removes Pointer > Authentication Codes. > A more generic term might be "significant" bits, significant to what is what > people will wonder but at least it covers the bits significant to address > resolution, plus anything required to use the pointer in code. > "PreservingAccess" - though not every bit will be about access, > "PreservingPermissions" - these aren't really permissions as such, this is > not CHERI after all. Yeah, I'm not happy with the method name either. Let's see if others come up with something, but maybe "Significant" is ok. We could also just say "FixAddressForExpressionEvaluation", given how that's the only use case I know of today. https://github.com/llvm/llvm-project/pull/159785 _______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits