pussuw commented on code in PR #13486:
URL: https://github.com/apache/nuttx/pull/13486#discussion_r1761760405
##########
arch/arm64/src/common/arm64_arch.h:
##########
@@ -466,7 +465,7 @@ static inline int arch_get_exception_depth(void)
static inline uint64_t arch_get_current_tcb(void)
{
- return read_sysreg(tpidr_el1);
+ return read_sysreg(tpidr_el0);
Review Comment:
You cannot rely on this as the user has access to tpidr_el0 and can corrupt
the contents at any point. This can be considered a security risk as well.
Edit: I did not verify if el0 has _write_ access to tpidr_el0, but it has
read access. It is typically used to hold thread local storage.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]