mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Arnd Bergmann" <arnd@arndb.de>
To: "Luis Chamberlain" <mcgrof@kernel.org>, "Song Liu" <song@kernel.org>
Cc: "Alan Maguire" <alan.maguire@oracle.com>,
	"Arnd Bergmann" <arnd@kernel.org>,
	"Andy Lutomirski" <luto@kernel.org>,
	"Borislav Petkov" <bp@suse.de>,
	linux-modules@vger.kernel.org,
	"Zhen Lei" <thunder.leizhen@huawei.com>,
	"Peter Zijlstra" <peterz@infradead.org>,
	"Kees Cook" <keescook@chromium.org>,
	linux-kernel@vger.kernel.org,
	"Andrew Morton" <akpm@linux-foundation.org>
Subject: Re: [PATCH] kallsyms: remove unused arch_get_kallsym() helper
Date: Fri, 26 May 2023 08:41:45 +0200	[thread overview]
Message-ID: <2591bdc4-a198-446c-8bfe-37ea39c51964@app.fastmail.com> (raw)
In-Reply-To: <ZHAmYSclm+5QlLcM@bombadil.infradead.org>

On Fri, May 26, 2023, at 05:24, Luis Chamberlain wrote:
> On Thu, May 25, 2023 at 06:45:35PM -0700, Song Liu wrote:
>> On Wed, May 24, 2023 at 12:24 AM Luis Chamberlain <mcgrof@kernel.org> wrote:
>> 
>> This change broke compilation of BPF selftests in modules-next
>> branch:
>> 
>> progs/bpf_iter_ksym.c:62:13: error: no member named 'pos_arch_end' in
>> 'struct kallsym_iter'
>>         if (!iter->pos_arch_end || iter->pos_arch_end > iter->pos)
>>              ~~~~  ^
>> progs/bpf_iter_ksym.c:62:35: error: no member named 'pos_arch_end' in
>> 'struct kallsym_iter'
>>         if (!iter->pos_arch_end || iter->pos_arch_end > iter->pos)
>>                                    ~~~~  ^
>> 
>> I haven't looked into the proper fix for it yet.
>
> A quick attempt:
>
> Arnd, can you verify?
>
> diff --git a/tools/testing/selftests/bpf/progs/bpf_iter_ksym.c 
> b/tools/testing/selftests/bpf/progs/bpf_iter_ksym.c
> index 5ddcc46fd886..521267818f4d 100644
> --- a/tools/testing/selftests/bpf/progs/bpf_iter_ksym.c
> +++ b/tools/testing/selftests/bpf/progs/bpf_iter_ksym.c
> @@ -59,9 +59,7 @@ int dump_ksym(struct bpf_iter__ksym *ctx)
>  	} else {
>  		BPF_SEQ_PRINTF(seq, "0x%llx %c %s ", value, type, iter->name);
>  	}
> -	if (!iter->pos_arch_end || iter->pos_arch_end > iter->pos)
> -		BPF_SEQ_PRINTF(seq, "CORE ");
> -	else if (!iter->pos_mod_end || iter->pos_mod_end > iter->pos)
> +	if (!iter->pos_mod_end || iter->pos_mod_end > iter->pos)
>  		BPF_SEQ_PRINTF(seq, "MOD ");
>  	else if (!iter->pos_ftrace_mod_end || iter->pos_ftrace_mod_end > 
> iter->pos)
>  		BPF_SEQ_PRINTF(seq, "FTRACE_MOD ");

This looks correct to me, but I'm still failing to cross-build
the selftests on my randconfig build setup, so I can't confirm that
this avoids the build failure, and I don't understand the code well
enough to be sure.

      Arnd

  reply	other threads:[~2023-05-26  6:42 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-17 13:18 Arnd Bergmann
2023-05-24  5:07 ` Luis Chamberlain
2023-05-24  6:25   ` Arnd Bergmann
2023-05-24  7:24     ` Luis Chamberlain
2023-05-26  1:45       ` Song Liu
2023-05-26  3:24         ` Luis Chamberlain
2023-05-26  6:41           ` Arnd Bergmann [this message]
2023-05-26 14:39             ` Alan Maguire
2023-05-26 17:39               ` Luis Chamberlain

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=2591bdc4-a198-446c-8bfe-37ea39c51964@app.fastmail.com \
    --to=arnd@arndb.de \
    --cc=akpm@linux-foundation.org \
    --cc=alan.maguire@oracle.com \
    --cc=arnd@kernel.org \
    --cc=bp@suse.de \
    --cc=keescook@chromium.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-modules@vger.kernel.org \
    --cc=luto@kernel.org \
    --cc=mcgrof@kernel.org \
    --cc=peterz@infradead.org \
    --cc=song@kernel.org \
    --cc=thunder.leizhen@huawei.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®