Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 289718 Details for
Bug 253476
add a new /proc/modules like interface for module licensing metadata
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
display module taint and gpg signing state of runtime loaded modules
linux-2.6-display-module-taint-and-gpg-signing-status.patch (text/plain), 3.64 KB, created by
Jon Masters
on 2007-12-16 10:48:21 UTC
(
hide
)
Description:
display module taint and gpg signing state of runtime loaded modules
Filename:
MIME Type:
Creator:
Jon Masters
Created:
2007-12-16 10:48:21 UTC
Size:
3.64 KB
patch
obsolete
>diff -urNp linux-2.6.18.noarch_orig1/fs/proc/proc_misc.c linux-2.6.18.noarch/fs/proc/proc_misc.c >--- linux-2.6.18.noarch_orig1/fs/proc/proc_misc.c 2006-09-19 23:42:06.000000000 -0400 >+++ linux-2.6.18.noarch/fs/proc/proc_misc.c 2007-12-16 03:54:34.000000000 -0500 >@@ -382,6 +382,18 @@ static struct file_operations proc_modul > .llseek = seq_lseek, > .release = seq_release, > }; >+ >+extern struct seq_operations modules_taint_op; >+static int modules_taint_open(struct inode *inode, struct file *file) >+{ >+ return seq_open(file, &modules_taint_op); >+} >+static struct file_operations proc_modules_taint_operations = { >+ .open = modules_taint_open, >+ .read = seq_read, >+ .llseek = seq_lseek, >+ .release = seq_release, >+}; > #endif > > #ifdef CONFIG_SLAB >@@ -701,6 +713,7 @@ void __init proc_misc_init(void) > create_seq_entry("diskstats", 0, &proc_diskstats_operations); > #ifdef CONFIG_MODULES > create_seq_entry("modules", 0, &proc_modules_operations); >+ create_seq_entry("modules_taint", 0, &proc_modules_taint_operations); > #endif > #ifdef CONFIG_SCHEDSTATS > create_seq_entry("schedstat", 0, &proc_schedstat_operations); >diff -urNp linux-2.6.18.noarch_orig1/include/linux/module.h linux-2.6.18.noarch/include/linux/module.h >--- linux-2.6.18.noarch_orig1/include/linux/module.h 2007-12-16 00:56:55.000000000 -0500 >+++ linux-2.6.18.noarch/include/linux/module.h 2007-12-16 03:40:16.000000000 -0500 >@@ -231,6 +231,12 @@ enum module_state > MODULE_STATE_GOING, > }; > >+enum module_seqfile_type >+{ >+ MODULE_SEQFILE_NORMAL, >+ MODULE_SEQFILE_TAINT, >+}; >+ > /* Similar stuff for section attributes. */ > #define MODULE_SECT_NAME_LEN 32 > struct module_sect_attr >diff -urNp linux-2.6.18.noarch_orig1/kernel/module.c linux-2.6.18.noarch/kernel/module.c >--- linux-2.6.18.noarch_orig1/kernel/module.c 2007-12-16 00:56:37.000000000 -0500 >+++ linux-2.6.18.noarch/kernel/module.c 2007-12-16 03:55:13.000000000 -0500 >@@ -742,6 +742,26 @@ static void print_unload_info(struct seq > seq_printf(m, "[permanent],"); > } > >+ /* print module support status/taint info. */ >+ /* Specifically label Red Hat modules. */ >+ if ((void *)MODULE_SEQFILE_TAINT == m->private) { >+ if (mod->gpgsig_ok) { >+ printed_something = 1; >+ seq_printf(m, "[Red Hat],"); >+ } else { >+ printed_something = 1; >+ seq_printf(m, "[Updated],"); >+ } >+ >+ if (mod->license_gplok) { >+ printed_something = 1; >+ seq_printf(m, "[GPL],"); >+ } else { >+ printed_something = 1; >+ seq_printf(m, "[non-GPL],"); >+ } >+ } >+ > if (!printed_something) > seq_printf(m, "-"); > } >@@ -2088,7 +2108,7 @@ unsigned long module_kallsyms_lookup_nam > #endif /* CONFIG_KALLSYMS */ > > /* Called by the /proc file system to return a list of modules. */ >-static void *m_start(struct seq_file *m, loff_t *pos) >+static void *__m_start(struct seq_file *m, loff_t *pos) > { > struct list_head *i; > loff_t n = 0; >@@ -2100,6 +2120,23 @@ static void *m_start(struct seq_file *m, > } > if (i == &modules) > return NULL; >+ >+ m->private = NULL; >+ >+ return i; >+} >+ >+static void *m_start(struct seq_file *m, loff_t *pos) >+{ >+ struct list_head *i = (struct list_head *)__m_start(m, pos); >+ m->private = (void *)MODULE_SEQFILE_NORMAL; >+ return i; >+} >+ >+static void *m_taint_start(struct seq_file *m, loff_t *pos) >+{ >+ struct list_head *i = (struct list_head *)__m_start(m, pos); >+ m->private = (void *)MODULE_SEQFILE_TAINT; > return i; > } > >@@ -2148,6 +2185,13 @@ struct seq_operations modules_op = { > .show = m_show > }; > >+struct seq_operations modules_taint_op = { >+ .start = m_taint_start, >+ .next = m_next, >+ .stop = m_stop, >+ .show = m_show >+}; >+ > /* Given an address, look for it in the module exception tables. */ > const struct exception_table_entry *search_module_extables(unsigned long addr) > {
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 253476
: 289718