Re: [RFC] module: Strict per-modname namespaces

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Nov 08, 2024 at 04:28:58PM +0100, H. Peter Anvin wrote:
> >@@ -1700,11 +1715,7 @@ static void check_exports(struct module *mod)
> > 		s->crc_valid = exp->crc_valid;
> > 		s->crc = exp->crc;
> > 
> >-		basename = strrchr(mod->name, '/');
> >-		if (basename)
> >-			basename++;
> >-		else
> >-			basename = mod->name;
> >+		basename = mod_basename(mod->name);
> > 
> > 		if (!contains_namespace(&mod->imported_namespaces, exp->namespace)) {
> > 			modpost_log(!allow_missing_ns_imports,
> 
> I presume this only applies to code compiled as dynamic modules, not compiled into the kernel?

Yes, the built-in modules get the regular linker to resolve relocations.
Nothing much we can do about that.




[Index of Archives]     [Linux&nblp;USB Development]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite Secrets]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux