On 11/22/2019 07:23 AM, Nick Alcock wrote:
On 22 Nov 2019, Masahiro Yamada stated:
Thank you for the careful review. I await your feedback on Nick's
comments. In particular, you raise good challenge cases, but like Nick
I wonder if "better" might be good enough.
Meanwhile, ...
On Wed, Nov 20, 2019 at 2:02 PM <eugene.loh@xxxxxxxxxx> wrote:
From: Eugene Loh <eugene.loh@xxxxxxxxxx>
+static struct obj2mod_elem *obj2mod[OBJ2MOD_N];
+
+static void obj2mod_init(void)
+{
+ memset(obj2mod, 0, sizeof(obj2mod));
+}
Unneeded.
The .bss section is automatically zero-cleared by
operating system. obj2mod is already zero-filled.
Agreed (with the caveat that I'm not the one shepherding this patch
through, but I hope Eugene agrees as well. :) )
No caveat needed: I'm on board!
+ /* skip the .init.scratch section */
+ if (strcmp(sym, "__init_scratch_end") == 0) {
+ init_scratch = 0;
+ goto read_another;
+ }
+ if (strcmp(sym, "__init_scratch_begin") == 0)
+ init_scratch = 1;
+ if (init_scratch)
+ goto read_another;
How is this hunk related?
I do not understand it from the commit log.
Right. It's not described in the commit message. I will pull this code
out in the next version of this patch.
Ah, sorry, this was a recent addition to work around problems in the
parsing side in userspace: it really doesn't belong here, I suspect.
(Our userspace-side parsing code (which was getting confused about the
relatively recently-added presence of symbols that were neither 'all
address in order, modules jumbled together' nor 'addresses not in order,
one module at a time'. I suspect we should adjust to that instead -- but
I didn't make that change so I'm not really an authoritative source
here. Eugene?)