BPF List
 help / color / mirror / Atom feed
From: Viktor Malik <vmalik@redhat.com>
To: Daniel Borkmann <daniel@iogearbox.net>,
	Luis Chamberlain <mcgrof@kernel.org>
Cc: bpf@vger.kernel.org, linux-modules@vger.kernel.org,
	linux-kernel@vger.kernel.org, Alexei Starovoitov <ast@kernel.org>,
	John Fastabend <john.fastabend@gmail.com>,
	Andrii Nakryiko <andrii@kernel.org>,
	Martin KaFai Lau <martin.lau@linux.dev>,
	Song Liu <song@kernel.org>, Yonghong Song <yhs@fb.com>,
	KP Singh <kpsingh@kernel.org>,
	Stanislav Fomichev <sdf@google.com>, Hao Luo <haoluo@google.com>,
	Jiri Olsa <jolsa@kernel.org>,
	"David S. Miller" <davem@davemloft.net>,
	Jakub Kicinski <kuba@kernel.org>,
	Jesper Dangaard Brouer <hawk@kernel.org>,
	Nathan Chancellor <nathan@kernel.org>,
	Nick Desaulniers <ndesaulniers@google.com>,
	Tom Rix <trix@redhat.com>, kernel test robot <lkp@intel.com>
Subject: Re: [PATCH bpf-next] kallsyms: move module-related functions under correct configs
Date: Wed, 29 Mar 2023 13:40:41 +0200	[thread overview]
Message-ID: <9dec8409-6e69-4f14-dcd8-9f47e088ce17@redhat.com> (raw)
In-Reply-To: <bfaefad6-692f-e687-ad55-05a43aa54883@iogearbox.net>

On 3/28/23 10:23, Daniel Borkmann wrote:
> On 3/27/23 9:28 PM, Luis Chamberlain wrote:
>> On Mon, Mar 27, 2023 at 08:20:56PM +0200, Viktor Malik wrote:
>>> On 3/27/23 19:47, Luis Chamberlain wrote:
>>>> On Mon, Mar 27, 2023 at 06:12:51PM +0200, Viktor Malik wrote:
>>>>> Functions for searching module kallsyms should have non-empty
>>>>> definitions only if CONFIG_MODULES=y and CONFIG_KALLSYMS=y. Until now,
>>>>> only CONFIG_MODULES check was used for many of these, which may have
>>>>> caused complilation errors on some configs.
>>>>>
>>>>> This patch moves all relevant functions under the correct configs.
>>>>>
>>>>> Signed-off-by: Viktor Malik <vmalik@redhat.com>
>>>>> Reported-by: kernel test robot <lkp@intel.com>
>>>>> Link: https://lore.kernel.org/oe-kbuild-all/202303181535.RFDCnz3E-lkp@intel.com/
>>>>
>>>> Thanks Viktor!  Does this fix something from an existing commit? If so
>>>> which one?  The commit log should mention it.
>>>
>>> Ah, right, I forgot about that. The commit log is missing:
>>>
>>> Fixes: bd5314f8dd2d ("kallsyms, bpf: Move find_kallsyms_symbol_value out of internal header")
>>>
>>> I can post v2 but I'm also fine with maintainers applying the tag.
>>
>> That patch went through the bpf tree so its fix can go throug that tree.
>> So up to Daniel if he wants a new patch.
> 
> Fixing up is fine with me. Viktor, which config combinations did you test for this
> patch and under which architectures?
> 
> I suspect kbuild bot might still complain. For example, your patch moves
> dereference_module_function_descriptor() stub definition under !CONFIG_MODULES ||
> !CONFIG_KALLSYMS. Looking at ppc's dereference_module_function_descriptor()
> implementation (!CONFIG_PPC64_ELF_ABI_V2 case), it's build under CONFIG_MODULES,
> so you'll have two different implementations of the functions, the generic one
> then w/o __weak attribute.

Right, I didn't notice this one, thanks. Looks like
dereference_module_function_descriptor will need to stay in the original
place (under CONFIG_MODULES only). I'll cross-compile for arches that
redefine this function (powerpc, ia64, parisc) with relevant config
combinations and submit v2. The rest of the functions don't have
arch-dependent implementations, so they should be fine.

> 
> Also small nit, please fix the patch up wrt indentation to align with kernel coding
> style.

Ok, will do.

Thanks,
Viktor

> 
> Thanks,
> Daniel
> 


      reply	other threads:[~2023-03-29 11:41 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-27 16:12 [PATCH bpf-next] kallsyms: move module-related functions under correct configs Viktor Malik
2023-03-27 17:47 ` Luis Chamberlain
2023-03-27 18:20   ` Viktor Malik
2023-03-27 19:28     ` Luis Chamberlain
2023-03-28  8:23       ` Daniel Borkmann
2023-03-29 11:40         ` Viktor Malik [this message]

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=9dec8409-6e69-4f14-dcd8-9f47e088ce17@redhat.com \
    --to=vmalik@redhat.com \
    --cc=andrii@kernel.org \
    --cc=ast@kernel.org \
    --cc=bpf@vger.kernel.org \
    --cc=daniel@iogearbox.net \
    --cc=davem@davemloft.net \
    --cc=haoluo@google.com \
    --cc=hawk@kernel.org \
    --cc=john.fastabend@gmail.com \
    --cc=jolsa@kernel.org \
    --cc=kpsingh@kernel.org \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-modules@vger.kernel.org \
    --cc=lkp@intel.com \
    --cc=martin.lau@linux.dev \
    --cc=mcgrof@kernel.org \
    --cc=nathan@kernel.org \
    --cc=ndesaulniers@google.com \
    --cc=sdf@google.com \
    --cc=song@kernel.org \
    --cc=trix@redhat.com \
    --cc=yhs@fb.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