lists.openwall.net | lists / announce owl-users owl-dev john-users john-dev passwdqc-users yescrypt popa3d-users / oss-security kernel-hardening musl sabotage tlsify passwords / crypt-dev xvendor / Bugtraq Full-Disclosure linux-kernel linux-netdev linux-ext4 linux-hardening linux-cve-announce PHC | |
Open Source and information security mailing list archives
| ||
|
Date: Wed, 14 Mar 2007 02:07:53 +0300 From: Alexey Dobriyan <adobriyan@...il.com> To: Paulo Marques <pmarques@...popie.com> Cc: akpm@...l.org, linux-kernel@...r.kernel.org Subject: Re: /proc/kallsyms race vs module unload On Tue, Mar 13, 2007 at 06:49:50PM +0000, Paulo Marques wrote: > Alexey Dobriyan wrote: > >[...] > >What happens is that module_get_kallsym() drops module_mutex, > >returns "struct module *", module unloaded, "struct module *" > >used. > > The only use for the "struct module *" is to display the name of the > module. Ehh? > This can be solved by adding a "char mod_name[MODULE_NAME_LEN];" field > to "kallsym_iter" and copy the name of the module over, while still > holding module_mutex. It would be slightly slower, but safer. iter->owner = module_get_kallsym(iter->pos - kallsyms_num_syms, &iter->value, &iter->type, iter->name, sizeof(iter->name)); if (iter->owner == NULL) return 0; /* Label it "global" if it is exported, "local" if not exported. */ iter->type = is_exported(iter->name, iter->owner) ^^^^^^^^^^^ - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@...r.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists