Re: [PATCH 10/13] powerpc/rtas: improve function information lookups
From: Andrew Donnellan <hidden>
Date: 2022-11-23 02:52:23
From: Andrew Donnellan <hidden>
Date: 2022-11-23 02:52:23
On Fri, 2022-11-18 at 09:07 -0600, Nathan Lynch wrote:
Convert rtas_token() to use a lockless binary search on the function table. Fall back to the old behavior for lookups against names that are not known to be RTAS functions, but issue a warning. rtas_token() is for function names; it is not a general facility for accessing arbitrary properties of the /rtas node. All known misuses of rtas_token() have been converted to more appropriate of_ APIs in preceding changes.
For in-kernel users, why not go all the way: make rtas_token() static and use it purely for the userspace API, and switch kernel users over to using rtas_function_index directly?
+enum rtas_function_flags {
+ RTAS_FN_FLAG_BANNED_FOR_SYSCALL_ON_LE = (1 << 0),
+};This seems to be new, what's the justification? -- Andrew Donnellan OzLabs, ADL Canberra ajd@linux.ibm.com IBM Australia Limited