Message ID | 20200412170731.5432-1-william.c.roberts@intel.com (mailing list archive) |
---|---|
State | Superseded |
Headers | show |
Series | libsemanage: fix linker script symbol versions | expand |
On Sun, Apr 12, 2020 at 12:07 PM <bill.c.roberts@gmail.com> wrote: > > From: William Roberts <william.c.roberts@intel.com> > > In previous work to cleanup the exports and linker scripts, I introduced > a regression causing symbols to be named in both the 1.0 and 1.1 > sections. This went un-noticed and was reported by > nicolas.iooss@m4x.org. > > In previous patched checked for correctness by: in previous patches... > This was checked by generating an old export map (from master): > nm --defined-only -g ./src/libsemanage.so | cut -d' ' -f 3-3 | grep -v '^_' > old.map > > Then creating a new one for this library after this patch is applied: > nm --defined-only -g ./src/libsemanage.so | cut -d' ' -f 3-3 | grep -v '^_' > new.map > > And diffing them: > diff old.map new.map > > However, this discards the version information. Nicolas points out a > better way, by using objdump so we can see the version information. A > better sequence of commands for checking is as follows: > > git checkout 1967477913f6e > objdump -T ./src/libsemanage.so | grep LIBSEMANAGE | cut -d' ' -f 8- | sed 's/^ //' > map.old > > git checkout origin/master > objdump -T ./src/libsemanage.so | grep LIBSEMANAGE | cut -d' ' -f 8- | sed 's/^ //' > map.new > > diff map.old map.new > > Signed-off-by: William Roberts <william.c.roberts@intel.com> > --- > libsemanage/src/libsemanage.map | 30 +----------------------------- > 1 file changed, 1 insertion(+), 29 deletions(-) > > diff --git a/libsemanage/src/libsemanage.map b/libsemanage/src/libsemanage.map > index ff5977b9f483..79aa8e693389 100644 > --- a/libsemanage/src/libsemanage.map > +++ b/libsemanage/src/libsemanage.map > @@ -76,10 +76,7 @@ LIBSEMANAGE_1.0 { > semanage_fcontext_set_con; > semanage_fcontext_set_expr; > semanage_fcontext_set_type; > - semanage_get_default_priority; > semanage_get_disable_dontaudit; > - semanage_get_hll_compiler_path; > - semanage_get_ignore_module_cache; > semanage_get_preserve_tunables; > semanage_handle_create; > semanage_handle_destroy; > @@ -170,39 +167,17 @@ LIBSEMANAGE_1.0 { > semanage_mls_enabled; > semanage_module_disable; > semanage_module_enable; > - semanage_module_extract; > semanage_module_get_enabled; > - semanage_module_get_module_info; > semanage_module_get_name; > semanage_module_get_version; > - semanage_module_info_create; > semanage_module_info_datum_destroy; > - semanage_module_info_destroy; > - semanage_module_info_get_enabled; > - semanage_module_info_get_lang_ext; > - semanage_module_info_get_name; > - semanage_module_info_get_priority; > - semanage_module_info_set_enabled; > - semanage_module_info_set_lang_ext; > - semanage_module_info_set_name; > - semanage_module_info_set_priority; > semanage_module_install; > semanage_module_install_base; > semanage_module_install_base_file; > semanage_module_install_file; > - semanage_module_install_info; > - semanage_module_key_create; > - semanage_module_key_destroy; > - semanage_module_key_get_name; > - semanage_module_key_get_priority; > - semanage_module_key_set_name; > - semanage_module_key_set_priority; > semanage_module_list; > - semanage_module_list_all; > semanage_module_list_nth; > semanage_module_remove; > - semanage_module_remove_key; > - semanage_module_set_enabled; > semanage_module_upgrade; > semanage_module_upgrade_file; > semanage_msg_get_channel; > @@ -276,14 +251,11 @@ LIBSEMANAGE_1.0 { > semanage_select_store; > semanage_set_check_contexts; > semanage_set_create_store; > - semanage_set_default_priority; > semanage_set_disable_dontaudit; > - semanage_set_ignore_module_cache; > semanage_set_preserve_tunables; > semanage_set_rebuild; > semanage_set_reload; > semanage_set_root; > - semanage_set_store_root; > semanage_seuser_clone; > semanage_seuser_compare; > semanage_seuser_compare2; > @@ -366,6 +338,7 @@ LIBSEMANAGE_1.1 { > semanage_module_info_set_name; > semanage_module_info_set_lang_ext; > semanage_module_info_set_enabled; > + semanage_module_install_info; > semanage_module_key_create; > semanage_module_key_destroy; > semanage_module_key_get_priority; > @@ -376,7 +349,6 @@ LIBSEMANAGE_1.1 { > semanage_module_list_all; > semanage_module_get_enabled; > semanage_module_set_enabled; > - semanage_module_install_info; We don't need to move this. > semanage_module_upgrade_info; > semanage_module_remove_key; > semanage_set_store_root; > -- > 2.17.1 > Ill aggregate feedback and send out a V2. This at least gets people up and running.
On Sun, Apr 12, 2020 at 7:42 PM William Roberts <bill.c.roberts@gmail.com> wrote: > > On Sun, Apr 12, 2020 at 12:07 PM <bill.c.roberts@gmail.com> wrote: > > > > From: William Roberts <william.c.roberts@intel.com> > > > > In previous work to cleanup the exports and linker scripts, I introduced > > a regression causing symbols to be named in both the 1.0 and 1.1 > > sections. This went un-noticed and was reported by > > nicolas.iooss@m4x.org. > > > > In previous patched checked for correctness by: > > in previous patches... > > > This was checked by generating an old export map (from master): > > nm --defined-only -g ./src/libsemanage.so | cut -d' ' -f 3-3 | grep -v '^_' > old.map > > > > Then creating a new one for this library after this patch is applied: > > nm --defined-only -g ./src/libsemanage.so | cut -d' ' -f 3-3 | grep -v '^_' > new.map > > > > And diffing them: > > diff old.map new.map > > > > However, this discards the version information. Nicolas points out a > > better way, by using objdump so we can see the version information. A > > better sequence of commands for checking is as follows: > > > > git checkout 1967477913f6e > > objdump -T ./src/libsemanage.so | grep LIBSEMANAGE | cut -d' ' -f 8- | sed 's/^ //' > map.old > > > > git checkout origin/master > > objdump -T ./src/libsemanage.so | grep LIBSEMANAGE | cut -d' ' -f 8- | sed 's/^ //' > map.new > > > > diff map.old map.new > > > > Signed-off-by: William Roberts <william.c.roberts@intel.com> > > --- > > libsemanage/src/libsemanage.map | 30 +----------------------------- > > 1 file changed, 1 insertion(+), 29 deletions(-) > > > > diff --git a/libsemanage/src/libsemanage.map b/libsemanage/src/libsemanage.map > > index ff5977b9f483..79aa8e693389 100644 > > --- a/libsemanage/src/libsemanage.map > > +++ b/libsemanage/src/libsemanage.map > > @@ -76,10 +76,7 @@ LIBSEMANAGE_1.0 { > > semanage_fcontext_set_con; > > semanage_fcontext_set_expr; > > semanage_fcontext_set_type; > > - semanage_get_default_priority; > > semanage_get_disable_dontaudit; > > - semanage_get_hll_compiler_path; > > - semanage_get_ignore_module_cache; > > semanage_get_preserve_tunables; > > semanage_handle_create; > > semanage_handle_destroy; > > @@ -170,39 +167,17 @@ LIBSEMANAGE_1.0 { > > semanage_mls_enabled; > > semanage_module_disable; > > semanage_module_enable; > > - semanage_module_extract; > > semanage_module_get_enabled; > > - semanage_module_get_module_info; > > semanage_module_get_name; > > semanage_module_get_version; > > - semanage_module_info_create; > > semanage_module_info_datum_destroy; > > - semanage_module_info_destroy; > > - semanage_module_info_get_enabled; > > - semanage_module_info_get_lang_ext; > > - semanage_module_info_get_name; > > - semanage_module_info_get_priority; > > - semanage_module_info_set_enabled; > > - semanage_module_info_set_lang_ext; > > - semanage_module_info_set_name; > > - semanage_module_info_set_priority; > > semanage_module_install; > > semanage_module_install_base; > > semanage_module_install_base_file; > > semanage_module_install_file; > > - semanage_module_install_info; > > - semanage_module_key_create; > > - semanage_module_key_destroy; > > - semanage_module_key_get_name; > > - semanage_module_key_get_priority; > > - semanage_module_key_set_name; > > - semanage_module_key_set_priority; > > semanage_module_list; > > - semanage_module_list_all; > > semanage_module_list_nth; > > semanage_module_remove; > > - semanage_module_remove_key; > > - semanage_module_set_enabled; > > semanage_module_upgrade; > > semanage_module_upgrade_file; > > semanage_msg_get_channel; > > @@ -276,14 +251,11 @@ LIBSEMANAGE_1.0 { > > semanage_select_store; > > semanage_set_check_contexts; > > semanage_set_create_store; > > - semanage_set_default_priority; > > semanage_set_disable_dontaudit; > > - semanage_set_ignore_module_cache; > > semanage_set_preserve_tunables; > > semanage_set_rebuild; > > semanage_set_reload; > > semanage_set_root; > > - semanage_set_store_root; > > semanage_seuser_clone; > > semanage_seuser_compare; > > semanage_seuser_compare2; > > @@ -366,6 +338,7 @@ LIBSEMANAGE_1.1 { > > semanage_module_info_set_name; > > semanage_module_info_set_lang_ext; > > semanage_module_info_set_enabled; > > + semanage_module_install_info; > > semanage_module_key_create; > > semanage_module_key_destroy; > > semanage_module_key_get_priority; > > @@ -376,7 +349,6 @@ LIBSEMANAGE_1.1 { > > semanage_module_list_all; > > semanage_module_get_enabled; > > semanage_module_set_enabled; > > - semanage_module_install_info; > > We don't need to move this. > > > semanage_module_upgrade_info; > > semanage_module_remove_key; > > semanage_set_store_root; > > -- > > 2.17.1 > > > > Ill aggregate feedback and send out a V2. This at least gets people up > and running. Thanks for your patch. I have tested it and it indeed fixed the issues I had. I agree with your comments. By the way, the .map file contains "semanage_module_upgrade_info" even though there is no symbol with this name in libsemanage. Should this line be removed? (in another patch) Nicolas
On Sun, Apr 12, 2020 at 1:48 PM Nicolas Iooss <nicolas.iooss@m4x.org> wrote: > > On Sun, Apr 12, 2020 at 7:42 PM William Roberts > <bill.c.roberts@gmail.com> wrote: > > > > On Sun, Apr 12, 2020 at 12:07 PM <bill.c.roberts@gmail.com> wrote: > > > > > > From: William Roberts <william.c.roberts@intel.com> > > > > > > In previous work to cleanup the exports and linker scripts, I introduced > > > a regression causing symbols to be named in both the 1.0 and 1.1 > > > sections. This went un-noticed and was reported by > > > nicolas.iooss@m4x.org. > > > > > > In previous patched checked for correctness by: > > > > in previous patches... > > > > > This was checked by generating an old export map (from master): > > > nm --defined-only -g ./src/libsemanage.so | cut -d' ' -f 3-3 | grep -v '^_' > old.map > > > > > > Then creating a new one for this library after this patch is applied: > > > nm --defined-only -g ./src/libsemanage.so | cut -d' ' -f 3-3 | grep -v '^_' > new.map > > > > > > And diffing them: > > > diff old.map new.map > > > > > > However, this discards the version information. Nicolas points out a > > > better way, by using objdump so we can see the version information. A > > > better sequence of commands for checking is as follows: > > > > > > git checkout 1967477913f6e > > > objdump -T ./src/libsemanage.so | grep LIBSEMANAGE | cut -d' ' -f 8- | sed 's/^ //' > map.old > > > > > > git checkout origin/master > > > objdump -T ./src/libsemanage.so | grep LIBSEMANAGE | cut -d' ' -f 8- | sed 's/^ //' > map.new > > > > > > diff map.old map.new > > > > > > Signed-off-by: William Roberts <william.c.roberts@intel.com> > > > --- > > > libsemanage/src/libsemanage.map | 30 +----------------------------- > > > 1 file changed, 1 insertion(+), 29 deletions(-) > > > > > > diff --git a/libsemanage/src/libsemanage.map b/libsemanage/src/libsemanage.map > > > index ff5977b9f483..79aa8e693389 100644 > > > --- a/libsemanage/src/libsemanage.map > > > +++ b/libsemanage/src/libsemanage.map > > > @@ -76,10 +76,7 @@ LIBSEMANAGE_1.0 { > > > semanage_fcontext_set_con; > > > semanage_fcontext_set_expr; > > > semanage_fcontext_set_type; > > > - semanage_get_default_priority; > > > semanage_get_disable_dontaudit; > > > - semanage_get_hll_compiler_path; > > > - semanage_get_ignore_module_cache; > > > semanage_get_preserve_tunables; > > > semanage_handle_create; > > > semanage_handle_destroy; > > > @@ -170,39 +167,17 @@ LIBSEMANAGE_1.0 { > > > semanage_mls_enabled; > > > semanage_module_disable; > > > semanage_module_enable; > > > - semanage_module_extract; > > > semanage_module_get_enabled; > > > - semanage_module_get_module_info; > > > semanage_module_get_name; > > > semanage_module_get_version; > > > - semanage_module_info_create; > > > semanage_module_info_datum_destroy; > > > - semanage_module_info_destroy; > > > - semanage_module_info_get_enabled; > > > - semanage_module_info_get_lang_ext; > > > - semanage_module_info_get_name; > > > - semanage_module_info_get_priority; > > > - semanage_module_info_set_enabled; > > > - semanage_module_info_set_lang_ext; > > > - semanage_module_info_set_name; > > > - semanage_module_info_set_priority; > > > semanage_module_install; > > > semanage_module_install_base; > > > semanage_module_install_base_file; > > > semanage_module_install_file; > > > - semanage_module_install_info; > > > - semanage_module_key_create; > > > - semanage_module_key_destroy; > > > - semanage_module_key_get_name; > > > - semanage_module_key_get_priority; > > > - semanage_module_key_set_name; > > > - semanage_module_key_set_priority; > > > semanage_module_list; > > > - semanage_module_list_all; > > > semanage_module_list_nth; > > > semanage_module_remove; > > > - semanage_module_remove_key; > > > - semanage_module_set_enabled; > > > semanage_module_upgrade; > > > semanage_module_upgrade_file; > > > semanage_msg_get_channel; > > > @@ -276,14 +251,11 @@ LIBSEMANAGE_1.0 { > > > semanage_select_store; > > > semanage_set_check_contexts; > > > semanage_set_create_store; > > > - semanage_set_default_priority; > > > semanage_set_disable_dontaudit; > > > - semanage_set_ignore_module_cache; > > > semanage_set_preserve_tunables; > > > semanage_set_rebuild; > > > semanage_set_reload; > > > semanage_set_root; > > > - semanage_set_store_root; > > > semanage_seuser_clone; > > > semanage_seuser_compare; > > > semanage_seuser_compare2; > > > @@ -366,6 +338,7 @@ LIBSEMANAGE_1.1 { > > > semanage_module_info_set_name; > > > semanage_module_info_set_lang_ext; > > > semanage_module_info_set_enabled; > > > + semanage_module_install_info; > > > semanage_module_key_create; > > > semanage_module_key_destroy; > > > semanage_module_key_get_priority; > > > @@ -376,7 +349,6 @@ LIBSEMANAGE_1.1 { > > > semanage_module_list_all; > > > semanage_module_get_enabled; > > > semanage_module_set_enabled; > > > - semanage_module_install_info; > > > > We don't need to move this. > > > > > semanage_module_upgrade_info; > > > semanage_module_remove_key; > > > semanage_set_store_root; > > > -- > > > 2.17.1 > > > > > > > Ill aggregate feedback and send out a V2. This at least gets people up > > and running. > > Thanks for your patch. I have tested it and it indeed fixed the issues > I had. I agree with your comments. > > By the way, the .map file contains "semanage_module_upgrade_info" even > though there is no symbol with this name in libsemanage. Should this > line be removed? (in another patch) I see that, ill drop it as well. > > Nicolas >
diff old.map new.map However, this discards the version information. Nicolas points out a better way, by using objdump so we can see the version information. A better sequence of commands for checking is as follows: git checkout 1967477913f6e objdump -T ./src/libsemanage.so | grep LIBSEMANAGE | cut -d' ' -f 8- | sed 's/^ //' > map.old git checkout origin/master objdump -T ./src/libsemanage.so | grep LIBSEMANAGE | cut -d' ' -f 8- | sed 's/^ //' > map.new diff map.old map.new Signed-off-by: William Roberts <william.c.roberts@intel.com> --- libsemanage/src/libsemanage.map | 30 +----------------------------- 1 file changed, 1 insertion(+), 29 deletions(-) diff --git a/libsemanage/src/libsemanage.map b/libsemanage/src/libsemanage.map index ff5977b9f483..79aa8e693389 100644 --- a/libsemanage/src/libsemanage.map +++ b/libsemanage/src/libsemanage.map @@ -76,10 +76,7 @@ LIBSEMANAGE_1.0 { semanage_fcontext_set_con; semanage_fcontext_set_expr; semanage_fcontext_set_type; - semanage_get_default_priority; semanage_get_disable_dontaudit; - semanage_get_hll_compiler_path; - semanage_get_ignore_module_cache; semanage_get_preserve_tunables; semanage_handle_create; semanage_handle_destroy; @@ -170,39 +167,17 @@ LIBSEMANAGE_1.0 { semanage_mls_enabled; semanage_module_disable; semanage_module_enable; - semanage_module_extract; semanage_module_get_enabled; - semanage_module_get_module_info; semanage_module_get_name; semanage_module_get_version; - semanage_module_info_create; semanage_module_info_datum_destroy; - semanage_module_info_destroy; - semanage_module_info_get_enabled; - semanage_module_info_get_lang_ext; - semanage_module_info_get_name; - semanage_module_info_get_priority; - semanage_module_info_set_enabled; - semanage_module_info_set_lang_ext; - semanage_module_info_set_name; - semanage_module_info_set_priority; semanage_module_install; semanage_module_install_base; semanage_module_install_base_file; semanage_module_install_file; - semanage_module_install_info; - semanage_module_key_create; - semanage_module_key_destroy; - semanage_module_key_get_name; - semanage_module_key_get_priority; - semanage_module_key_set_name; - semanage_module_key_set_priority; semanage_module_list; - semanage_module_list_all; semanage_module_list_nth; semanage_module_remove; - semanage_module_remove_key; - semanage_module_set_enabled; semanage_module_upgrade; semanage_module_upgrade_file; semanage_msg_get_channel; @@ -276,14 +251,11 @@ LIBSEMANAGE_1.0 { semanage_select_store; semanage_set_check_contexts; semanage_set_create_store; - semanage_set_default_priority; semanage_set_disable_dontaudit; - semanage_set_ignore_module_cache; semanage_set_preserve_tunables; semanage_set_rebuild; semanage_set_reload; semanage_set_root; - semanage_set_store_root; semanage_seuser_clone; semanage_seuser_compare; semanage_seuser_compare2; @@ -366,6 +338,7 @@ LIBSEMANAGE_1.1 { semanage_module_info_set_name; semanage_module_info_set_lang_ext; semanage_module_info_set_enabled; + semanage_module_install_info; semanage_module_key_create; semanage_module_key_destroy; semanage_module_key_get_priority; @@ -376,7 +349,6 @@ LIBSEMANAGE_1.1 { semanage_module_list_all; semanage_module_get_enabled; semanage_module_set_enabled; - semanage_module_install_info; semanage_module_upgrade_info; semanage_module_remove_key; semanage_set_store_root;
From: William Roberts <william.c.roberts@intel.com> In previous work to cleanup the exports and linker scripts, I introduced a regression causing symbols to be named in both the 1.0 and 1.1 sections. This went un-noticed and was reported by nicolas.iooss@m4x.org. In previous patched checked for correctness by: This was checked by generating an old export map (from master): nm --defined-only -g ./src/libsemanage.so | cut -d' ' -f 3-3 | grep -v '^_' > old.map Then creating a new one for this library after this patch is applied: nm --defined-only -g ./src/libsemanage.so | cut -d' ' -f 3-3 | grep -v '^_' > new.map And diffing them: