You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by "GUIDINGLI (via GitHub)" <gi...@apache.org> on 2023/09/23 07:30:12 UTC

[GitHub] [nuttx] GUIDINGLI opened a new pull request, #10787: kasan: add builtin_return_address(0) to kasan

GUIDINGLI opened a new pull request, #10787:
URL: https://github.com/apache/nuttx/pull/10787

   ## Summary
   
   kasan: add builtin_return_address(0) to kasan
   
   ## Impact
   
   Kasan
   
   ## Testing
   
   BES board


-- 
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: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [nuttx] pkarashchenko commented on a diff in pull request #10787: kasan: add builtin_return_address(0) to kasan

Posted by "pkarashchenko (via GitHub)" <gi...@apache.org>.
pkarashchenko commented on code in PR #10787:
URL: https://github.com/apache/nuttx/pull/10787#discussion_r1335033970


##########
include/nuttx/compiler.h:
##########
@@ -157,6 +157,7 @@
  */
 
 #  define offsetof(a, b) __builtin_offsetof(a, b)
+#  define return_address(x) __builtin_return_address(x)

Review Comment:
   Ok. Let's go with this and it can be refined based on the needs.



-- 
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: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [nuttx] xiaoxiang781216 commented on a diff in pull request #10787: kasan: add builtin_return_address(0) to kasan

Posted by "xiaoxiang781216 (via GitHub)" <gi...@apache.org>.
xiaoxiang781216 commented on code in PR #10787:
URL: https://github.com/apache/nuttx/pull/10787#discussion_r1335028549


##########
include/nuttx/compiler.h:
##########
@@ -157,6 +157,7 @@
  */
 
 #  define offsetof(a, b) __builtin_offsetof(a, b)
+#  define return_address(x) __builtin_return_address(x)

Review Comment:
   Inline assembly also depends on compiler too, all assembly written in c file doesn't work across the different compiler.



-- 
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: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [nuttx] xiaoxiang781216 merged pull request #10787: kasan: add builtin_return_address(0) to kasan

Posted by "xiaoxiang781216 (via GitHub)" <gi...@apache.org>.
xiaoxiang781216 merged PR #10787:
URL: https://github.com/apache/nuttx/pull/10787


-- 
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: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [nuttx] pkarashchenko commented on a diff in pull request #10787: kasan: add builtin_return_address(0) to kasan

Posted by "pkarashchenko (via GitHub)" <gi...@apache.org>.
pkarashchenko commented on code in PR #10787:
URL: https://github.com/apache/nuttx/pull/10787#discussion_r1334963434


##########
include/nuttx/compiler.h:
##########
@@ -157,6 +157,7 @@
  */
 
 #  define offsetof(a, b) __builtin_offsetof(a, b)
+#  define return_address(x) __builtin_return_address(x)

Review Comment:
   I'm not sure about adding this to compiler.h. Exactly this interface is compiler specific, mostly `return_address(0)` can be implemented as inline assembly for many architectures. Like reading LR register for ARM for example.



-- 
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: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org