Re: [PATCH 1/7] modules: Refactor within_module_core() and within_module_init()

2022-01-27 Thread Christophe Leroy
Le 26/01/2022 à 22:36, Mike Rapoport a écrit : > On Mon, Jan 24, 2022 at 09:22:15AM +, Christophe Leroy wrote: >> within_module_core() and within_module_init() are doing the exact same >> test, one on core_layout, the second on init_layout. >> >> In preparation of increasing the complexity

Re: [PATCH 1/7] modules: Refactor within_module_core() and within_module_init()

2022-01-27 Thread Christophe Leroy
Le 24/01/2022 à 13:32, Christoph Hellwig a écrit : > On Mon, Jan 24, 2022 at 09:22:15AM +, Christophe Leroy wrote: >> +static inline bool within_range(unsigned long addr, void *base, unsigned >> int size) > > Please avoid the overly long line. > > .. But given that this function only has

Re: [PATCH 1/7] modules: Refactor within_module_core() and within_module_init()

2022-01-26 Thread Mike Rapoport
On Mon, Jan 24, 2022 at 09:22:15AM +, Christophe Leroy wrote: > within_module_core() and within_module_init() are doing the exact same > test, one on core_layout, the second on init_layout. > > In preparation of increasing the complexity of that verification, > refactor it into a single

Re: [PATCH 1/7] modules: Refactor within_module_core() and within_module_init()

2022-01-24 Thread Christophe Leroy
Le 24/01/2022 à 13:32, Christoph Hellwig a écrit : > On Mon, Jan 24, 2022 at 09:22:15AM +, Christophe Leroy wrote: >> +static inline bool within_range(unsigned long addr, void *base, unsigned >> int size) > > Please avoid the overly long line. > > .. But given that this function only has

Re: [PATCH 1/7] modules: Refactor within_module_core() and within_module_init()

2022-01-24 Thread Christoph Hellwig
On Mon, Jan 24, 2022 at 09:22:15AM +, Christophe Leroy wrote: > +static inline bool within_range(unsigned long addr, void *base, unsigned int > size) Please avoid the overly long line. .. But given that this function only has a single caller I see no point in factoring it out anyway.

[PATCH 1/7] modules: Refactor within_module_core() and within_module_init()

2022-01-24 Thread Christophe Leroy
within_module_core() and within_module_init() are doing the exact same test, one on core_layout, the second on init_layout. In preparation of increasing the complexity of that verification, refactor it into a single function called within_module_layout(). Signed-off-by: Christophe Leroy ---