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: Sun, 27 Apr 2008 22:12:39 -0400 From: Masami Hiramatsu <mhiramat@...hat.com> To: Mathieu Desnoyers <mathieu.desnoyers@...ymtl.ca> CC: akpm@...ux-foundation.org, Ingo Molnar <mingo@...e.hu>, linux-kernel@...r.kernel.org, linux-mm@...ck.org, Dave Hansen <haveblue@...ibm.com> Subject: Re: [patch 36/37] LTTng instrumentation mm Hi Mathieu, Mathieu Desnoyers wrote: > @@ -1844,3 +1848,22 @@ int valid_swaphandles(swp_entry_t entry, > *offset = ++toff; > return nr_pages? ++nr_pages: 0; > } > + > +void ltt_dump_swap_files(void *call_data) > +{ > + int type; > + struct swap_info_struct *p = NULL; > + > + mutex_lock(&swapon_mutex); > + for (type = swap_list.head; type >= 0; type = swap_info[type].next) { > + p = swap_info + type; > + if ((p->flags & SWP_ACTIVE) != SWP_ACTIVE) > + continue; > + __trace_mark(0, statedump_swap_files, call_data, > + "filp %p vfsmount %p dname %s", > + p->swap_file, p->swap_file->f_vfsmnt, > + p->swap_file->f_dentry->d_name.name); > + } > + mutex_unlock(&swapon_mutex); > +} > +EXPORT_SYMBOL_GPL(ltt_dump_swap_files); I'm not sure this kind of functions can be acceptable. IMHO, you'd better use more generic method (ex. a callback function), or just export swap_list and swapon_mutex. Thus, other subsystems can use that interface. Thank you, -- Masami Hiramatsu Software Engineer Hitachi Computer Products (America) Inc. Software Solutions Division e-mail: mhiramat@...hat.com -- 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