Re: [PATCH bpf-next] libbpf: fix libbpf_print

2019-02-04 Thread Yonghong Song
On 2/4/19 5:51 PM, Alexei Starovoitov wrote: > On Tue, Feb 05, 2019 at 12:37:29AM +, Yonghong Song wrote: >> >> >> On 2/4/19 4:20 PM, Stanislav Fomichev wrote: >>> With the recent print rework we now have the following problem: >>> pr_{warning,info,debug} expand to __pr which calls libbpf_pri

Re: [PATCH bpf-next] libbpf: fix libbpf_print

2019-02-04 Thread Alexei Starovoitov
On Tue, Feb 05, 2019 at 12:37:29AM +, Yonghong Song wrote: > > > On 2/4/19 4:20 PM, Stanislav Fomichev wrote: > > With the recent print rework we now have the following problem: > > pr_{warning,info,debug} expand to __pr which calls libbpf_print. > > libbpf_print does va_start and calls __lib

Re: [PATCH bpf-next] libbpf: fix libbpf_print

2019-02-04 Thread Yonghong Song
On 2/4/19 4:20 PM, Stanislav Fomichev wrote: > With the recent print rework we now have the following problem: > pr_{warning,info,debug} expand to __pr which calls libbpf_print. > libbpf_print does va_start and calls __libbpf_pr with va_list argument. > In __base_pr we again do va_start. Because

[PATCH bpf-next] libbpf: fix libbpf_print

2019-02-04 Thread Stanislav Fomichev
With the recent print rework we now have the following problem: pr_{warning,info,debug} expand to __pr which calls libbpf_print. libbpf_print does va_start and calls __libbpf_pr with va_list argument. In __base_pr we again do va_start. Because the next argument is a va_list, we don't get correct po