Thread (7 messages) 7 messages, 2 authors, 2025-01-15

Re: [PATCH v13 1/3] tools: ynl-gen: add trampolines for sock-priv

From: Li Li <hidden>
Date: 2025-01-15 16:44:50
Also in: linux-doc, lkml

On Wed, Jan 15, 2025 at 8:13 AM Jakub Kicinski [off-list ref] wrote:
On Wed, 15 Jan 2025 02:29:48 -0800 Li Li wrote:
quoted
From: Li Li <redacted>

This fixes the CFI failure at genl-sk_priv_get().

Suggested-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Li Li <redacted>
No, no, this is a fix. We'll try to send it to Linus tomorrow.
Thank you for prioritizing the fix!

There's another trivial issue which I just realized after sending out the
patchset. When "sock-priv" is a pointer (like the example below), ynl-gen
generates ugly code and fails scripts/checkpatch.

Should I use typedef instead although it seems discouraged according to
https://www.kernel.org/doc/html/latest/process/coding-style.html?

YAML:
+  sock-priv: struct binder_context *

==>

Generated code:
+void binder_nl_sock_priv_init(struct binder_context * *priv);
                                                     ^^^ extra space
+void binder_nl_sock_priv_destroy(struct binder_context * *priv);
                                                        ^^^ extra space
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help