Hi Richard,

On 6/21/24 1:35 AM, Richard Henderson wrote:
On 6/16/24 23:28, Gustavo Romero wrote:
Factor out the code used for setting the MTE TCF0 field from the prctl
code into a convenient function. Other subsystems, like gdbstub, need to
set this field as well, so keep it as a separate function to avoid
duplication and ensure consistency in how this field is set across the
board.

Signed-off-by: Gustavo Romero <gustavo.rom...@linaro.org>
---
  linux-user/aarch64/target_prctl.h | 22 ++---------------
  target/arm/tcg/mte_user_helper.h  | 40 +++++++++++++++++++++++++++++++

I'm not keen on this placement, because this is specifically linux syscall 
semantics.

I'm not sure what the right thing to do here, because it's not like there are 
any other OS that support MTE at the moment, and gdb is inheriting linux's 
ptrace interface.

I think it would be less bad if we put the header in linux-user/aarch64/ and have 
target/arm/gdbstub.c include that if CONFIG_USER_ONLY & CONFIG_LINUX.

I think that makes more sense indeed. Done in v4. Thanks.


Cheers,
Gustavo

Reply via email to