Kernel Newbies archive on lore.kernel.org
 help / color / Atom feed
* Finding all modules which consume kernel lib?
@ 2019-03-09  8:07 Andy Nicholas
  2019-03-09  8:29 ` Greg KH
  0 siblings, 1 reply; 4+ messages in thread
From: Andy Nicholas @ 2019-03-09  8:07 UTC (permalink / raw)
  To: kernelnewbies

[-- Attachment #1.1: Type: text/plain, Size: 970 bytes --]

Hello,

Is there a website or service or tool or package or script or something
which allows me to determine which pieces of the compiled kernel
(especially modules) contained the source-code changes I might make to any
given directory? Like a kernel-code dependency graph website?

For instance, assume I made a change to code in net/wireless/. How do I
figure out which pieces of the kernel or modules get linked against the
library built from this directory?

I could attempt to trace the kernel's build output line-by-line and then
grep through the output looking for which other code is linking against
cfg80211. That is way too tedious. In this case I would like to know which
kernel modules I would need to, potentially, re-test because I apply a
patch to this directory.... without examining the build logs.

In my case I'm applying some patches and I'd like to make sure I am
installing and testing the correct set of related atheros modules.

Thank you,

andy

[-- Attachment #1.2: Type: text/html, Size: 1132 bytes --]

<div dir="ltr"><div>Hello,</div><div><br></div>Is there a website or service or tool or package or script or something which allows me to determine which pieces of the compiled kernel (especially modules) contained the source-code changes I might make to any given directory? Like a kernel-code dependency graph website?<br><br>For instance, assume I made a change to code in net/wireless/. How do I figure out which pieces of the kernel or modules get linked against the library built from this directory? <div><br></div><div>I could attempt to trace the kernel&#39;s build output line-by-line and then grep through the output looking for which other code is linking against cfg80211. That is way too tedious. In this case I would like to know which kernel modules I would need to, potentially, re-test because I apply a patch to this directory.... without examining the build logs.</div><div><br></div><div>In my case I&#39;m applying some patches and I&#39;d like to make sure I am installing and testing the correct set of related atheros modules.</div><div><br></div><div>Thank you,</div><div><br></div><div>andy</div></div>

[-- Attachment #2: Type: text/plain, Size: 170 bytes --]

_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Finding all modules which consume kernel lib?
  2019-03-09  8:07 Finding all modules which consume kernel lib? Andy Nicholas
@ 2019-03-09  8:29 ` Greg KH
  2019-03-09 10:04   ` Lev Olshvang
  0 siblings, 1 reply; 4+ messages in thread
From: Greg KH @ 2019-03-09  8:29 UTC (permalink / raw)
  To: Andy Nicholas; +Cc: kernelnewbies

On Sat, Mar 09, 2019 at 12:07:00AM -0800, Andy Nicholas wrote:
> Hello,
> 
> Is there a website or service or tool or package or script or something
> which allows me to determine which pieces of the compiled kernel
> (especially modules) contained the source-code changes I might make to any
> given directory? Like a kernel-code dependency graph website?
> 
> For instance, assume I made a change to code in net/wireless/. How do I
> figure out which pieces of the kernel or modules get linked against the
> library built from this directory?
> 
> I could attempt to trace the kernel's build output line-by-line and then
> grep through the output looking for which other code is linking against
> cfg80211. That is way too tedious. In this case I would like to know which
> kernel modules I would need to, potentially, re-test because I apply a
> patch to this directory.... without examining the build logs.

Just look at the build logs, it will show you exactly what gets rebuilt
when you touch a single file (or multiple files.)  That's the simplest
way to do what you want here.

good luck!

greg k-h

_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Finding all modules which consume kernel lib?
  2019-03-09  8:29 ` Greg KH
@ 2019-03-09 10:04   ` Lev Olshvang
  2019-03-09 17:00     ` valdis.kletnieks
  0 siblings, 1 reply; 4+ messages in thread
From: Lev Olshvang @ 2019-03-09 10:04 UTC (permalink / raw)
  To: Andy Nicholas, Greg KH; +Cc: kernelnewbies

[-- Attachment #1: Type: text/html, Size: 1843 bytes --]

There is also modulus.dep file which depmod builds. You can just grep to find which modulus depends.<br /><br />10:29 AM, March 9, 2019, Greg KH &lt;greg@kroah.com&gt;:<br /><blockquote><p>On Sat, Mar 09, 2019 at 12:07:00AM -0800, Andy Nicholas wrote:<br /></p><blockquote> Hello,<br /><br /> Is there a website or service or tool or package or script or something<br /> which allows me to determine which pieces of the compiled kernel<br /> (especially modules) contained the source-code changes I might make to any<br /> given directory? Like a kernel-code dependency graph website?<br /><br /> For instance, assume I made a change to code in net/wireless/. How do I<br /> figure out which pieces of the kernel or modules get linked against the<br /> library built from this directory?<br /><br /> I could attempt to trace the kernel's build output line-by-line and then<br /> grep through the output looking for which other code is linking against<br /> cfg80211. That is way too tedious. In this case I would like to know which<br /> kernel modules I would need to, potentially, re-test because I apply a<br /> patch to this directory.... without examining the build logs.<br /></blockquote><p><br />Just look at the build logs, it will show you exactly what gets rebuilt<br />when you touch a single file (or multiple files.)  That's the simplest<br />way to do what you want here.<br /><br />good luck!<br /><br />greg k-h<br /><br />_______________________________________________<br />Kernelnewbies mailing list<br /><a href="mailto:Kernelnewbies@kernelnewbies.org">Kernelnewbies@kernelnewbies.org</a><br /><a href="https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies">https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies</a><br /></p></blockquote><br /><br />-- <br />Sent from Yandex.Mail for mobile

[-- Attachment #2: Type: text/plain, Size: 170 bytes --]

_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Finding all modules which consume kernel lib?
  2019-03-09 10:04   ` Lev Olshvang
@ 2019-03-09 17:00     ` valdis.kletnieks
  0 siblings, 0 replies; 4+ messages in thread
From: valdis.kletnieks @ 2019-03-09 17:00 UTC (permalink / raw)
  To: Lev Olshvang; +Cc: Greg KH, Andy Nicholas, kernelnewbies

On Sat, 09 Mar 2019 13:04:44 +0300, Lev Olshvang said:

> There is also modulus.dep file which depmod builds. You can just grep to find
> which modulus depends.

Note that the modules.dep file only tells modprobe "If you're loading module A,
you need to load B first to get some symbols registered". If B is built-in to
the kernel, its EXPORT_SYMBOLS are already available, so it doesn't need to be
listed in modules.dep.

Also, it doesn't record build-time dependencies - it totally assumes that A and B
were built against the same source tree and that Kbuild took care of making sure
that any source code changes to B that affect A caused a rebuild of A to happen.

_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, back to index

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-03-09  8:07 Finding all modules which consume kernel lib? Andy Nicholas
2019-03-09  8:29 ` Greg KH
2019-03-09 10:04   ` Lev Olshvang
2019-03-09 17:00     ` valdis.kletnieks

Kernel Newbies archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/kernelnewbies/0 kernelnewbies/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 kernelnewbies kernelnewbies/ https://lore.kernel.org/kernelnewbies \
		kernelnewbies@kernelnewbies.org kernelnewbies@archiver.kernel.org
	public-inbox-index kernelnewbies


Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernelnewbies.kernelnewbies


AGPL code for this site: git clone https://public-inbox.org/ public-inbox