lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20190323002812.GW7431@mini-arch.hsd1.ca.comcast.net>
Date:   Fri, 22 Mar 2019 17:28:12 -0700
From:   Stanislav Fomichev <sdf@...ichev.me>
To:     Daniel Borkmann <daniel@...earbox.net>
Cc:     ast@...nel.org, sdf@...gle.com, bpf@...r.kernel.org,
        netdev@...r.kernel.org
Subject: Re: [PATCH bpf 1/2] bpf, libbpf: fix version info and add it to
 shared object

On 03/23, Daniel Borkmann wrote:
> On 03/23/2019 01:09 AM, Stanislav Fomichev wrote:
> > On 03/23, Daniel Borkmann wrote:
> [...]
> >> +$(OUTPUT)libbpf.so.$(LIBBPF_VERSION): $(BPF_IN)
> >> +	$(QUIET_LINK)$(CC) --shared -Wl,-soname,libbpf.so.$(LIBBPF_VERSION) \
> > Shouldn't it be -soname,libbpf.so.$(VERSION) ?
> 
> The above is generating libbpf.so.0.0.2, and with the below two we generate
> symlinks to it. libbpf.so.$(VERSION) would result in libbpf.so.0 otherwise
> which we want to be a symlink instead. The workflow I've been following is
> similar to fe316723a810 ("tools lib traceevent: Add version for traceevent
> shared object").
Sorry, I was not clear enough, I was talking about -Wl,-soname linker option.
Shouldn't it contain "major" version?

$ readelf -d libtraceevent.so.1.1.0 | grep SONAME
 0x000000000000000e (SONAME)             Library soname: [libtraceevent.so.1]

With your patch applied:
$ readelf -d libbpf.so.0.0.2 | grep SONAME
 0x000000000000000e (SONAME)             Library soname: [libbpf.so.0.0.2]

                                                          ^^^^^^^^^^^^^
							  libbpf.so.0 ?

> 
> >> +				    -Wl,--version-script=$(VERSION_SCRIPT) $^ -o $@
> >> +	@ln -sf $(@F) $(OUTPUT)libbpf.so
> >> +	@ln -sf $(@F) $(OUTPUT)libbpf.so.$(VERSION)
> >>  
> >>  $(OUTPUT)libbpf.a: $(BPF_IN)
> >>  	$(QUIET_LINK)$(RM) $@; $(AR) rcs $@ $^
> >> @@ -192,6 +199,12 @@ check_abi: $(OUTPUT)libbpf.so
> >>  		exit 1;							 \
> >>  	fi
> >>  
> >> +define do_install_mkdir
> >> +	if [ ! -d '$(DESTDIR_SQ)$1' ]; then		\
> >> +		$(INSTALL) -d -m 755 '$(DESTDIR_SQ)$1';	\
> >> +	fi
> >> +endef
> >> +
> >>  define do_install
> >>  	if [ ! -d '$(DESTDIR_SQ)$2' ]; then		\
> >>  		$(INSTALL) -d -m 755 '$(DESTDIR_SQ)$2';	\
> >> @@ -200,8 +213,9 @@ define do_install
> >>  endef
> >>  
> >>  install_lib: all_cmd
> >> -	$(call QUIET_INSTALL, $(LIB_FILE)) \
> >> -		$(call do_install,$(LIB_FILE),$(libdir_SQ))
> >> +	$(call QUIET_INSTALL, $(LIB_TARGET)) \
> >> +		$(call do_install_mkdir,$(libdir_SQ)); \
> >> +		cp -fpR $(LIB_FILE) $(DESTDIR)$(libdir_SQ)
> >>  
> >>  install_headers:
> >>  	$(call QUIET_INSTALL, headers) \
> >> @@ -219,7 +233,7 @@ config-clean:
> >>  
> >>  clean:
> >>  	$(call QUIET_CLEAN, libbpf) $(RM) $(TARGETS) $(CXX_TEST_TARGET) \
> >> -		*.o *~ *.a *.so .*.d .*.cmd LIBBPF-CFLAGS
> >> +		*.o *~ *.a *.so *.so.$(VERSION) .*.d .*.cmd LIBBPF-CFLAGS
> > What about libbpf.so.$(LIBBPF_VERSION) ?
> 
> That is already cleaned via $(TARGETS), so this is taken care of.
> 
> >>  	$(call QUIET_CLEAN, core-gen) $(RM) $(OUTPUT)FEATURE-DUMP.libbpf
> >>  
> >>  
> >> -- 
> >> 2.9.5
> >>
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ