* Re: [PATCH] init: fix -Wmissing-variable-declarations clang warning
@ 2023-08-31 8:30 kernel test robot
0 siblings, 0 replies; 4+ messages in thread
From: kernel test robot @ 2023-08-31 8:30 UTC (permalink / raw)
To: oe-kbuild; +Cc: lkp
::::::
:::::: Manual check reason: "git am base is a link in commit message"
::::::
BCC: lkp@intel.com
CC: oe-kbuild-all@lists.linux.dev
In-Reply-To: <20230830-missingvardecl2-init-main-c-v1-1-59007a637259@google.com>
References: <20230830-missingvardecl2-init-main-c-v1-1-59007a637259@google.com>
TO: Justin Stitt <justinstitt@google.com>
TO: Nathan Chancellor <nathan@kernel.org>
TO: Nick Desaulniers <ndesaulniers@google.com>
TO: Tom Rix <trix@redhat.com>
CC: Jens Axboe <axboe@kernel.dk>
CC: Peter Zijlstra <peterz@infradead.org>
CC: "Rafael J. Wysocki" <rafael.j.wysocki@intel.com>
CC: linux-kernel@vger.kernel.org
CC: llvm@lists.linux.dev
CC: Justin Stitt <justinstitt@google.com>
Hi Justin,
kernel test robot noticed the following build errors:
[auto build test ERROR on 706a741595047797872e669b3101429ab8d378ef]
url: https://github.com/intel-lab-lkp/linux/commits/Justin-Stitt/init-fix-Wmissing-variable-declarations-clang-warning/20230831-042021
base: 706a741595047797872e669b3101429ab8d378ef
patch link: https://lore.kernel.org/r/20230830-missingvardecl2-init-main-c-v1-1-59007a637259%40google.com
patch subject: [PATCH] init: fix -Wmissing-variable-declarations clang warning
:::::: branch date: 12 hours ago
:::::: commit date: 12 hours ago
config: csky-randconfig-r011-20230831 (https://download.01.org/0day-ci/archive/20230831/202308311652.8dtXginO-lkp@intel.com/config)
compiler: csky-linux-gcc (GCC) 13.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20230831/202308311652.8dtXginO-lkp@intel.com/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/r/202308311652.8dtXginO-lkp@intel.com/
All errors (new ones prefixed by >>):
init/do_mounts_initrd.c: In function 'handle_initrd':
>> init/do_mounts_initrd.c:102:60: error: passing argument 3 of 'call_usermodehelper_setup' from incompatible pointer type [-Werror=incompatible-pointer-types]
102 | info = call_usermodehelper_setup("/linuxrc", argv, envp_init,
| ^~~~~~~~~
| |
| const char **
In file included from include/linux/kmod.h:9,
from init/do_mounts_initrd.c:10:
include/linux/umh.h:37:65: note: expected 'char **' but argument is of type 'const char **'
37 | call_usermodehelper_setup(const char *path, char **argv, char **envp,
| ~~~~~~~^~~~
cc1: some warnings being treated as errors
--
>> init/main.c:189:20: error: static declaration of 'envp_init' follows non-static declaration
189 | static const char *envp_init[MAX_INIT_ENVS+2] = { "HOME=/", "TERM=linux", NULL, };
| ^~~~~~~~~
In file included from init/main.c:28:
include/linux/initrd.h:37:20: note: previous declaration of 'envp_init' with type 'const char *[]'
37 | extern const char *envp_init[];
| ^~~~~~~~~
vim +/call_usermodehelper_setup +102 init/do_mounts_initrd.c
^1da177e4c3f41 Linus Torvalds 2005-04-16 85
c8643c72bc4278 Christoph Hellwig 2023-05-31 86 static void __init handle_initrd(char *root_device_name)
^1da177e4c3f41 Linus Torvalds 2005-04-16 87 {
907ed1328d2a74 Lucas De Marchi 2013-04-30 88 struct subprocess_info *info;
ba4df2808a86f8 Al Viro 2012-10-02 89 static char *argv[] = { "linuxrc", NULL, };
^1da177e4c3f41 Linus Torvalds 2005-04-16 90 int error;
^1da177e4c3f41 Linus Torvalds 2005-04-16 91
9acc17baf1fd63 Christoph Hellwig 2020-07-08 92 pr_warn("using deprecated initrd support, will be removed in 2021.\n");
9acc17baf1fd63 Christoph Hellwig 2020-07-08 93
^1da177e4c3f41 Linus Torvalds 2005-04-16 94 real_root_dev = new_encode_dev(ROOT_DEV);
bdaf8529385d51 Greg Kroah-Hartman 2005-06-20 95 create_dev("/dev/root.old", Root_RAM0);
^1da177e4c3f41 Linus Torvalds 2005-04-16 96 /* mount initrd on rootfs' /root */
c8643c72bc4278 Christoph Hellwig 2023-05-31 97 mount_root_generic("/dev/root.old", root_device_name,
c8643c72bc4278 Christoph Hellwig 2023-05-31 98 root_mountflags & ~MS_RDONLY);
83ff98c3e9cd2b Christoph Hellwig 2020-07-22 99 init_mkdir("/old", 0700);
db63f1e3153845 Christoph Hellwig 2020-07-22 100 init_chdir("/old");
^1da177e4c3f41 Linus Torvalds 2005-04-16 101
907ed1328d2a74 Lucas De Marchi 2013-04-30 @102 info = call_usermodehelper_setup("/linuxrc", argv, envp_init,
907ed1328d2a74 Lucas De Marchi 2013-04-30 103 GFP_KERNEL, init_linuxrc, NULL, NULL);
907ed1328d2a74 Lucas De Marchi 2013-04-30 104 if (!info)
907ed1328d2a74 Lucas De Marchi 2013-04-30 105 return;
1fbcaa923ce2d7 Peter Zijlstra 2022-08-22 106 call_usermodehelper_exec(info, UMH_WAIT_PROC|UMH_FREEZABLE);
^1da177e4c3f41 Linus Torvalds 2005-04-16 107
^1da177e4c3f41 Linus Torvalds 2005-04-16 108 /* move initrd to rootfs' /old */
c60166f04283ff Christoph Hellwig 2020-07-21 109 init_mount("..", ".", NULL, MS_MOVE, NULL);
^1da177e4c3f41 Linus Torvalds 2005-04-16 110 /* switch root and cwd back to / of rootfs */
4b7ca5014cbef5 Christoph Hellwig 2020-07-22 111 init_chroot("..");
^1da177e4c3f41 Linus Torvalds 2005-04-16 112
^1da177e4c3f41 Linus Torvalds 2005-04-16 113 if (new_decode_dev(real_root_dev) == Root_RAM0) {
db63f1e3153845 Christoph Hellwig 2020-07-22 114 init_chdir("/old");
^1da177e4c3f41 Linus Torvalds 2005-04-16 115 return;
^1da177e4c3f41 Linus Torvalds 2005-04-16 116 }
^1da177e4c3f41 Linus Torvalds 2005-04-16 117
db63f1e3153845 Christoph Hellwig 2020-07-22 118 init_chdir("/");
^1da177e4c3f41 Linus Torvalds 2005-04-16 119 ROOT_DEV = new_decode_dev(real_root_dev);
c8643c72bc4278 Christoph Hellwig 2023-05-31 120 mount_root(root_device_name);
^1da177e4c3f41 Linus Torvalds 2005-04-16 121
^1da177e4c3f41 Linus Torvalds 2005-04-16 122 printk(KERN_NOTICE "Trying to move old root to /initrd ... ");
c60166f04283ff Christoph Hellwig 2020-07-21 123 error = init_mount("/old", "/root/initrd", NULL, MS_MOVE, NULL);
^1da177e4c3f41 Linus Torvalds 2005-04-16 124 if (!error)
^1da177e4c3f41 Linus Torvalds 2005-04-16 125 printk("okay\n");
^1da177e4c3f41 Linus Torvalds 2005-04-16 126 else {
f220ab2a5162c3 Jay Lan 2005-06-30 127 if (error == -ENOENT)
f220ab2a5162c3 Jay Lan 2005-06-30 128 printk("/initrd does not exist. Ignored.\n");
f220ab2a5162c3 Jay Lan 2005-06-30 129 else
^1da177e4c3f41 Linus Torvalds 2005-04-16 130 printk("failed\n");
^1da177e4c3f41 Linus Torvalds 2005-04-16 131 printk(KERN_NOTICE "Unmounting old root\n");
09267defa36aaf Christoph Hellwig 2020-07-23 132 init_umount("/old", MNT_DETACH);
^1da177e4c3f41 Linus Torvalds 2005-04-16 133 }
^1da177e4c3f41 Linus Torvalds 2005-04-16 134 }
^1da177e4c3f41 Linus Torvalds 2005-04-16 135
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] init: fix -Wmissing-variable-declarations clang warning
@ 2023-08-31 8:18 kernel test robot
0 siblings, 0 replies; 4+ messages in thread
From: kernel test robot @ 2023-08-31 8:18 UTC (permalink / raw)
To: oe-kbuild; +Cc: lkp
::::::
:::::: Manual check reason: "git am base is a link in commit message"
::::::
BCC: lkp@intel.com
CC: llvm@lists.linux.dev
CC: oe-kbuild-all@lists.linux.dev
In-Reply-To: <20230830-missingvardecl2-init-main-c-v1-1-59007a637259@google.com>
References: <20230830-missingvardecl2-init-main-c-v1-1-59007a637259@google.com>
TO: Justin Stitt <justinstitt@google.com>
TO: Nathan Chancellor <nathan@kernel.org>
TO: Nick Desaulniers <ndesaulniers@google.com>
TO: Tom Rix <trix@redhat.com>
CC: Jens Axboe <axboe@kernel.dk>
CC: Peter Zijlstra <peterz@infradead.org>
CC: "Rafael J. Wysocki" <rafael.j.wysocki@intel.com>
CC: linux-kernel@vger.kernel.org
CC: llvm@lists.linux.dev
CC: Justin Stitt <justinstitt@google.com>
Hi Justin,
kernel test robot noticed the following build errors:
[auto build test ERROR on 706a741595047797872e669b3101429ab8d378ef]
url: https://github.com/intel-lab-lkp/linux/commits/Justin-Stitt/init-fix-Wmissing-variable-declarations-clang-warning/20230831-042021
base: 706a741595047797872e669b3101429ab8d378ef
patch link: https://lore.kernel.org/r/20230830-missingvardecl2-init-main-c-v1-1-59007a637259%40google.com
patch subject: [PATCH] init: fix -Wmissing-variable-declarations clang warning
:::::: branch date: 12 hours ago
:::::: commit date: 12 hours ago
config: i386-randconfig-r016-20230831 (https://download.01.org/0day-ci/archive/20230831/202308311617.uiCprYSL-lkp@intel.com/config)
compiler: clang version 16.0.4 (https://github.com/llvm/llvm-project.git ae42196bc493ffe877a7e3dff8be32035dea4d07)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20230831/202308311617.uiCprYSL-lkp@intel.com/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/r/202308311617.uiCprYSL-lkp@intel.com/
All errors (new ones prefixed by >>):
>> init/do_mounts_initrd.c:102:53: error: passing 'const char *[]' to parameter of type 'char **' discards qualifiers in nested pointer types [-Werror,-Wincompatible-pointer-types-discards-qualifiers]
info = call_usermodehelper_setup("/linuxrc", argv, envp_init,
^~~~~~~~~
include/linux/umh.h:37:65: note: passing argument to parameter 'envp' here
call_usermodehelper_setup(const char *path, char **argv, char **envp,
^
1 error generated.
vim +102 init/do_mounts_initrd.c
^1da177e4c3f415 Linus Torvalds 2005-04-16 85
c8643c72bc42781 Christoph Hellwig 2023-05-31 86 static void __init handle_initrd(char *root_device_name)
^1da177e4c3f415 Linus Torvalds 2005-04-16 87 {
907ed1328d2a748 Lucas De Marchi 2013-04-30 88 struct subprocess_info *info;
ba4df2808a86f8b Al Viro 2012-10-02 89 static char *argv[] = { "linuxrc", NULL, };
^1da177e4c3f415 Linus Torvalds 2005-04-16 90 int error;
^1da177e4c3f415 Linus Torvalds 2005-04-16 91
9acc17baf1fd636 Christoph Hellwig 2020-07-08 92 pr_warn("using deprecated initrd support, will be removed in 2021.\n");
9acc17baf1fd636 Christoph Hellwig 2020-07-08 93
^1da177e4c3f415 Linus Torvalds 2005-04-16 94 real_root_dev = new_encode_dev(ROOT_DEV);
bdaf8529385d512 Greg Kroah-Hartman 2005-06-20 95 create_dev("/dev/root.old", Root_RAM0);
^1da177e4c3f415 Linus Torvalds 2005-04-16 96 /* mount initrd on rootfs' /root */
c8643c72bc42781 Christoph Hellwig 2023-05-31 97 mount_root_generic("/dev/root.old", root_device_name,
c8643c72bc42781 Christoph Hellwig 2023-05-31 98 root_mountflags & ~MS_RDONLY);
83ff98c3e9cd2b8 Christoph Hellwig 2020-07-22 99 init_mkdir("/old", 0700);
db63f1e31538459 Christoph Hellwig 2020-07-22 100 init_chdir("/old");
^1da177e4c3f415 Linus Torvalds 2005-04-16 101
907ed1328d2a748 Lucas De Marchi 2013-04-30 @102 info = call_usermodehelper_setup("/linuxrc", argv, envp_init,
907ed1328d2a748 Lucas De Marchi 2013-04-30 103 GFP_KERNEL, init_linuxrc, NULL, NULL);
907ed1328d2a748 Lucas De Marchi 2013-04-30 104 if (!info)
907ed1328d2a748 Lucas De Marchi 2013-04-30 105 return;
1fbcaa923ce2d7e Peter Zijlstra 2022-08-22 106 call_usermodehelper_exec(info, UMH_WAIT_PROC|UMH_FREEZABLE);
^1da177e4c3f415 Linus Torvalds 2005-04-16 107
^1da177e4c3f415 Linus Torvalds 2005-04-16 108 /* move initrd to rootfs' /old */
c60166f04283ffb Christoph Hellwig 2020-07-21 109 init_mount("..", ".", NULL, MS_MOVE, NULL);
^1da177e4c3f415 Linus Torvalds 2005-04-16 110 /* switch root and cwd back to / of rootfs */
4b7ca5014cbef51 Christoph Hellwig 2020-07-22 111 init_chroot("..");
^1da177e4c3f415 Linus Torvalds 2005-04-16 112
^1da177e4c3f415 Linus Torvalds 2005-04-16 113 if (new_decode_dev(real_root_dev) == Root_RAM0) {
db63f1e31538459 Christoph Hellwig 2020-07-22 114 init_chdir("/old");
^1da177e4c3f415 Linus Torvalds 2005-04-16 115 return;
^1da177e4c3f415 Linus Torvalds 2005-04-16 116 }
^1da177e4c3f415 Linus Torvalds 2005-04-16 117
db63f1e31538459 Christoph Hellwig 2020-07-22 118 init_chdir("/");
^1da177e4c3f415 Linus Torvalds 2005-04-16 119 ROOT_DEV = new_decode_dev(real_root_dev);
c8643c72bc42781 Christoph Hellwig 2023-05-31 120 mount_root(root_device_name);
^1da177e4c3f415 Linus Torvalds 2005-04-16 121
^1da177e4c3f415 Linus Torvalds 2005-04-16 122 printk(KERN_NOTICE "Trying to move old root to /initrd ... ");
c60166f04283ffb Christoph Hellwig 2020-07-21 123 error = init_mount("/old", "/root/initrd", NULL, MS_MOVE, NULL);
^1da177e4c3f415 Linus Torvalds 2005-04-16 124 if (!error)
^1da177e4c3f415 Linus Torvalds 2005-04-16 125 printk("okay\n");
^1da177e4c3f415 Linus Torvalds 2005-04-16 126 else {
f220ab2a5162c35 Jay Lan 2005-06-30 127 if (error == -ENOENT)
f220ab2a5162c35 Jay Lan 2005-06-30 128 printk("/initrd does not exist. Ignored.\n");
f220ab2a5162c35 Jay Lan 2005-06-30 129 else
^1da177e4c3f415 Linus Torvalds 2005-04-16 130 printk("failed\n");
^1da177e4c3f415 Linus Torvalds 2005-04-16 131 printk(KERN_NOTICE "Unmounting old root\n");
09267defa36aaff Christoph Hellwig 2020-07-23 132 init_umount("/old", MNT_DETACH);
^1da177e4c3f415 Linus Torvalds 2005-04-16 133 }
^1da177e4c3f415 Linus Torvalds 2005-04-16 134 }
^1da177e4c3f415 Linus Torvalds 2005-04-16 135
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] init: fix -Wmissing-variable-declarations clang warning
2023-08-30 19:47 Justin Stitt
@ 2023-08-30 20:03 ` Bill Wendling
0 siblings, 0 replies; 4+ messages in thread
From: Bill Wendling @ 2023-08-30 20:03 UTC (permalink / raw)
To: Justin Stitt
Cc: Nathan Chancellor, Nick Desaulniers, Tom Rix, Jens Axboe,
Peter Zijlstra, Rafael J. Wysocki, linux-kernel, llvm
On Wed, Aug 30, 2023 at 12:47 PM Justin Stitt <justinstitt@google.com> wrote:
>
> When building x86/defconfig with Clang-18 I encounter the following warning:
> | init/main.c:189:13: warning: no previous extern declaration for non-static variable 'envp_init' [-Wmissing-variable-declarations]
> | 189 | const char *envp_init[MAX_INIT_ENVS+2] = { "HOME=/", "TERM=linux", NULL, };
> | init/main.c:189:7: note: declare 'static' if the variable is not intended to be used outside of this translation unit
> | 189 | const char *envp_init[MAX_INIT_ENVS+2] = { "HOME=/", "TERM=linux", NULL, };
>
> Move the extern declaration to a header file so that the compiler can find it
> when compiling init/main.c.
>
> Add `const` qualifier to extern declaration so that the types match and
> we follow the One-Definition Rule (ODR).
>
I'm not sure the lack of a "const" has anything to do with the ODR.
C's type system isn't nearly as strict as C++'s. :-) That said, adding
"const" is definitely correct.
-bw
> Link: https://github.com/ClangBuiltLinux/linux/issues/1920
> Signed-off-by: Justin Stitt <justinstitt@google.com>
> ---
> Note: build-tested only.
>
> There's a previous RFC [1] wherein the kernel test robot reported some
> build errors which lead me to creating this patch which both fixes the
> errors as well as the -Wmissing-variable-declarations warning.
>
> [1]: https://lore.kernel.org/all/20230829-missingvardecl-init-main-c-v1-1-ddf0f1a71215@google.com/
>
> Also, get_maintainer.pl had a hard time finding folks to Cc here, not sure why.
> ---
> include/linux/initrd.h | 2 ++
> init/do_mounts_initrd.c | 1 -
> 2 files changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/include/linux/initrd.h b/include/linux/initrd.h
> index f1a1f4c92ded..0114f1acbb45 100644
> --- a/include/linux/initrd.h
> +++ b/include/linux/initrd.h
> @@ -34,4 +34,6 @@ extern unsigned long __initramfs_size;
>
> void console_on_rootfs(void);
>
> +extern const char *envp_init[];
> +
> #endif /* __LINUX_INITRD_H */
> diff --git a/init/do_mounts_initrd.c b/init/do_mounts_initrd.c
> index 425f4bcf4b77..b35c1b0babc2 100644
> --- a/init/do_mounts_initrd.c
> +++ b/init/do_mounts_initrd.c
> @@ -87,7 +87,6 @@ static void __init handle_initrd(char *root_device_name)
> {
> struct subprocess_info *info;
> static char *argv[] = { "linuxrc", NULL, };
> - extern char *envp_init[];
> int error;
>
> pr_warn("using deprecated initrd support, will be removed in 2021.\n");
>
> ---
> base-commit: 706a741595047797872e669b3101429ab8d378ef
> change-id: 20230830-missingvardecl2-init-main-c-93dc1013ff8a
>
> Best regards,
> --
> Justin Stitt <justinstitt@google.com>
>
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH] init: fix -Wmissing-variable-declarations clang warning
@ 2023-08-30 19:47 Justin Stitt
2023-08-30 20:03 ` Bill Wendling
0 siblings, 1 reply; 4+ messages in thread
From: Justin Stitt @ 2023-08-30 19:47 UTC (permalink / raw)
To: Nathan Chancellor, Nick Desaulniers, Tom Rix
Cc: Jens Axboe, Peter Zijlstra, Rafael J. Wysocki, linux-kernel,
llvm, Justin Stitt
When building x86/defconfig with Clang-18 I encounter the following warning:
| init/main.c:189:13: warning: no previous extern declaration for non-static variable 'envp_init' [-Wmissing-variable-declarations]
| 189 | const char *envp_init[MAX_INIT_ENVS+2] = { "HOME=/", "TERM=linux", NULL, };
| init/main.c:189:7: note: declare 'static' if the variable is not intended to be used outside of this translation unit
| 189 | const char *envp_init[MAX_INIT_ENVS+2] = { "HOME=/", "TERM=linux", NULL, };
Move the extern declaration to a header file so that the compiler can find it
when compiling init/main.c.
Add `const` qualifier to extern declaration so that the types match and
we follow the One-Definition Rule (ODR).
Link: https://github.com/ClangBuiltLinux/linux/issues/1920
Signed-off-by: Justin Stitt <justinstitt@google.com>
---
Note: build-tested only.
There's a previous RFC [1] wherein the kernel test robot reported some
build errors which lead me to creating this patch which both fixes the
errors as well as the -Wmissing-variable-declarations warning.
[1]: https://lore.kernel.org/all/20230829-missingvardecl-init-main-c-v1-1-ddf0f1a71215@google.com/
Also, get_maintainer.pl had a hard time finding folks to Cc here, not sure why.
---
include/linux/initrd.h | 2 ++
init/do_mounts_initrd.c | 1 -
2 files changed, 2 insertions(+), 1 deletion(-)
diff --git a/include/linux/initrd.h b/include/linux/initrd.h
index f1a1f4c92ded..0114f1acbb45 100644
--- a/include/linux/initrd.h
+++ b/include/linux/initrd.h
@@ -34,4 +34,6 @@ extern unsigned long __initramfs_size;
void console_on_rootfs(void);
+extern const char *envp_init[];
+
#endif /* __LINUX_INITRD_H */
diff --git a/init/do_mounts_initrd.c b/init/do_mounts_initrd.c
index 425f4bcf4b77..b35c1b0babc2 100644
--- a/init/do_mounts_initrd.c
+++ b/init/do_mounts_initrd.c
@@ -87,7 +87,6 @@ static void __init handle_initrd(char *root_device_name)
{
struct subprocess_info *info;
static char *argv[] = { "linuxrc", NULL, };
- extern char *envp_init[];
int error;
pr_warn("using deprecated initrd support, will be removed in 2021.\n");
---
base-commit: 706a741595047797872e669b3101429ab8d378ef
change-id: 20230830-missingvardecl2-init-main-c-93dc1013ff8a
Best regards,
--
Justin Stitt <justinstitt@google.com>
^ permalink raw reply related [flat|nested] 4+ messages in thread
end of thread, other threads:[~2023-08-31 8:30 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-08-31 8:30 [PATCH] init: fix -Wmissing-variable-declarations clang warning kernel test robot
-- strict thread matches above, loose matches on Subject: below --
2023-08-31 8:18 kernel test robot
2023-08-30 19:47 Justin Stitt
2023-08-30 20:03 ` Bill Wendling
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.