Message ID | 20220228234322.2073104-1-atomlin@redhat.com (mailing list archive) |
---|---|
Headers | show |
Series | module: core code clean up | expand |
On Mon, Feb 28, 2022 at 11:43:08PM +0000, Aaron Tomlin wrote: > Hi Luis, > > As per your suggestion [1], this is an attempt to refactor and split > optional code out of core module support code into separate components. > This version is based on Linus' commit 7993e65fdd0f ("Merge tag > 'mtd/fixes-for-5.17-rc5' of > git://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux"). > > Petr, > > I decided to use preempt_disable() instead to remain consistent with the > rest of the file. Unfortunately, I did not make time to boot test etc. Aaron, thanks so much for doing this! Since no boot tests are performed yet, I just pushed this to modules-testing for now, after we get some boot test results I'll push to modules-next. We should run kmod tests as well. Luis
Hi Luis, Le 01/03/2022 à 01:21, Luis Chamberlain a écrit : > On Mon, Feb 28, 2022 at 11:43:08PM +0000, Aaron Tomlin wrote: >> Hi Luis, >> >> As per your suggestion [1], this is an attempt to refactor and split >> optional code out of core module support code into separate components. >> This version is based on Linus' commit 7993e65fdd0f ("Merge tag >> 'mtd/fixes-for-5.17-rc5' of >> git://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux"). >> >> Petr, >> >> I decided to use preempt_disable() instead to remain consistent with the >> rest of the file. Unfortunately, I did not make time to boot test etc. > > Aaron, thanks so much for doing this! > > Since no boot tests are performed yet, I just pushed this to modules-testing > for now, after we get some boot test results I'll push to modules-next. > > We should run kmod tests as well. > My Kconfig patch and my two series still cleanly apply on v9. I don't need to rebase/resend them. boot test is OK for me with Aaron's v9. Christophe
Le 01/03/2022 à 01:21, Luis Chamberlain a écrit : > > We should run kmod tests as well. > I tried to build kmod tests, but I get a crazy result: $ ./configure --host=ppc-linux --prefix=/usr/local $ make $ cd testsuite $ make $ file test-list test-list: ELF 32-bit MSB executable, PowerPC or cisco 4500, version 1 (SYSV), dynamically linked, interpreter /lib/ld.so.1, for GNU/Linux 3.2.0, with debug_info, not stripped $ file module-playground/mod-loop-a.ko module-playground/mod-loop-a.ko: ELF 64-bit LSB relocatable, x86-64, version 1 (SYSV), BuildID[sha1]=d46956a4fd36d8d3467806c31831c81217a573f5, with debug_info, not stripped How do I get it to crossbuild proper PowerPC module ? Thanks Christophe
On Tue, Mar 01, 2022 at 07:07:30AM +0000, Christophe Leroy wrote: > Hi Luis, > > Le 01/03/2022 à 01:21, Luis Chamberlain a écrit : > > On Mon, Feb 28, 2022 at 11:43:08PM +0000, Aaron Tomlin wrote: > >> Hi Luis, > >> > >> As per your suggestion [1], this is an attempt to refactor and split > >> optional code out of core module support code into separate components. > >> This version is based on Linus' commit 7993e65fdd0f ("Merge tag > >> 'mtd/fixes-for-5.17-rc5' of > >> git://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux"). > >> > >> Petr, > >> > >> I decided to use preempt_disable() instead to remain consistent with the > >> rest of the file. Unfortunately, I did not make time to boot test etc. > > > > Aaron, thanks so much for doing this! > > > > Since no boot tests are performed yet, I just pushed this to modules-testing > > for now, after we get some boot test results I'll push to modules-next. > > > > We should run kmod tests as well. > > > > > My Kconfig patch and my two series still cleanly apply on v9. I don't > need to rebase/resend them. > > > boot test is OK for me with Aaron's v9. Great thanks yes, I intend on applying them as soon as I get some test confirmations on modules-testing. It's all about testing now. Luis
On Tue, Mar 01, 2022 at 07:44:26AM +0000, Christophe Leroy wrote: > > > Le 01/03/2022 à 01:21, Luis Chamberlain a écrit : > > > > We should run kmod tests as well. > > > > I tried to build kmod tests, but I get a crazy result: > > > $ ./configure --host=ppc-linux --prefix=/usr/local > > $ make > > $ cd testsuite > > $ make > > $ file test-list > test-list: ELF 32-bit MSB executable, PowerPC or cisco 4500, version 1 > (SYSV), dynamically linked, interpreter /lib/ld.so.1, for GNU/Linux > 3.2.0, with debug_info, not stripped > > $ file module-playground/mod-loop-a.ko > module-playground/mod-loop-a.ko: ELF 64-bit LSB relocatable, x86-64, > version 1 (SYSV), > BuildID[sha1]=d46956a4fd36d8d3467806c31831c81217a573f5, with debug_info, > not stripped > > > > How do I get it to crossbuild proper PowerPC module ? Lucas? Luis
On Tue, Mar 01, 2022 at 08:01:23AM -0800, Luis Chamberlain wrote: >On Tue, Mar 01, 2022 at 07:44:26AM +0000, Christophe Leroy wrote: >> >> >> Le 01/03/2022 à 01:21, Luis Chamberlain a écrit : >> > >> > We should run kmod tests as well. >> > >> >> I tried to build kmod tests, but I get a crazy result: >> >> >> $ ./configure --host=ppc-linux --prefix=/usr/local >> >> $ make >> >> $ cd testsuite >> >> $ make >> >> $ file test-list >> test-list: ELF 32-bit MSB executable, PowerPC or cisco 4500, version 1 >> (SYSV), dynamically linked, interpreter /lib/ld.so.1, for GNU/Linux >> 3.2.0, with debug_info, not stripped >> >> $ file module-playground/mod-loop-a.ko >> module-playground/mod-loop-a.ko: ELF 64-bit LSB relocatable, x86-64, >> version 1 (SYSV), >> BuildID[sha1]=d46956a4fd36d8d3467806c31831c81217a573f5, with debug_info, >> not stripped >> >> >> >> How do I get it to crossbuild proper PowerPC module ? do I understand correctly that you want to crossbuild kmod + kernel modules to do your test? why? If you really need it, then beware we just chainload the kernel build for the out-of-tree modules when compiling the test modules. Something like this should work: make V=1 KDIR=$HOME/p/gfx-internal/linux-arm64/ ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- check But running the cross built binaries is probably not what you want? Another thing is that unless you are patching kmod binaries or libkmod, the testsuite won't test much. kmod's testsuite don't test anything on the kernel side... the kernel part is mocked by the testsuite itself. Adding proper integration with the kernel part is possible, but not something ready. Lucas De Marchi > >Lucas? > > Luis
Le 01/03/2022 à 18:15, Lucas De Marchi a écrit : > On Tue, Mar 01, 2022 at 08:01:23AM -0800, Luis Chamberlain wrote: >> On Tue, Mar 01, 2022 at 07:44:26AM +0000, Christophe Leroy wrote: >>> >>> >>> Le 01/03/2022 à 01:21, Luis Chamberlain a écrit : >>> > >>> > We should run kmod tests as well. >>> > >>> >>> I tried to build kmod tests, but I get a crazy result: >>> >>> >>> $ ./configure --host=ppc-linux --prefix=/usr/local >>> >>> $ make >>> >>> $ cd testsuite >>> >>> $ make >>> >>> $ file test-list >>> test-list: ELF 32-bit MSB executable, PowerPC or cisco 4500, version 1 >>> (SYSV), dynamically linked, interpreter /lib/ld.so.1, for GNU/Linux >>> 3.2.0, with debug_info, not stripped >>> >>> $ file module-playground/mod-loop-a.ko >>> module-playground/mod-loop-a.ko: ELF 64-bit LSB relocatable, x86-64, >>> version 1 (SYSV), >>> BuildID[sha1]=d46956a4fd36d8d3467806c31831c81217a573f5, with debug_info, >>> not stripped >>> >>> >>> >>> How do I get it to crossbuild proper PowerPC module ? > > do I understand correctly that you want to crossbuild kmod + kernel > modules to do your test? why? Yes, I want to build the tests on my PC and run them on a powerpc board. > > If you really need it, then beware we just chainload the kernel build > for the out-of-tree modules when compiling the test modules. Something > like this should work: > > make V=1 KDIR=$HOME/p/gfx-internal/linux-arm64/ ARCH=arm64 > CROSS_COMPILE=aarch64-linux-gnu- check > > But running the cross built binaries is probably not what you want? I want to run them on the board. > > Another thing is that unless you are patching kmod binaries or libkmod, > the testsuite won't test much. kmod's testsuite don't test anything on > the kernel side... the kernel part is mocked by the testsuite itself. > Adding proper integration with the kernel part is possible, but not > something ready. Ah, I see. I made non trivial modification on kernel modules handling (see series at https://patchwork.kernel.org/project/linux-modules/cover/cover.1645607143.git.christophe.leroy@csgroup.eu/) and Luis suggested to run kmod test suite to perform regression testing. Christophe