From: "Vlodavsky, Zvi" <zvi.vlodavsky@intel.com>
To: "'linux-kernel@vger.kernel.org'" <linux-kernel@vger.kernel.org>,
"'kaos@ocs.com.au'" <kaos@ocs.com.au>
Cc: "Vlodavsky, Zvi" <zvi.vlodavsky@intel.com>
Subject: Using "query_module"
Date: Mon, 4 Feb 2002 12:04:19 +0200 [thread overview]
Message-ID: <436282DBEE7CD51191E30002A50A636924113B@hasmsx102.iil.intel.com> (raw)
Please personally CC me with responses on this posting:
I would like to use the "query_module" system call with the QM_SYMBOLS flag
in an application, but I am not sure of what the appropriate way of doing it
is, and whether it is safe.
I have the man-page for query_module on the system on which I am compiling,
but I can't find the function prototype in <linux/module.h>. So, I just
wrote the prototype in my code. Is this the way this should be done?
Other than that, the man page states that struct module_symbol looks like
this:
struct module_symbol
{
unsigned long value;
unsigned long name;
};
But in module.h it is defined as:
struct module_symbol
{
unsigned long value;
const char *name;
};
>From my understanding, the second definition is the way the kernel uses this
struct, and the first definition is the way the user should interpret the
result of query_module with the QM_SYMBOLS flag. Am I right? (Shouldn't
there be 2 different structures for this?)
Most importantly, I would like to understand whether it is safe to use this
system call. If I compile my application on a machine in which this function
is implemented (in libc), is the system call guaranteed to work on kernels
2.2 and up? Do I need to do a preliminary check such as "if
(query_module(NULL, 0, NULL, 0, NULL))" for the existence of the system
call, or would it simply fail if I use it regularly?
Thanks for your help,
Zvi.
---------------
Zvi Vlodavsky
Software Engineer
Network Communications Group, Intel Corp.
Zvi.Vlodavsky@intel.com
Disclaimer: In this e-mail, I do not speak on behalf of Intel corp.
next reply other threads:[~2002-02-04 10:04 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-02-04 10:04 Vlodavsky, Zvi [this message]
2002-02-04 10:20 ` Keith Owens
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=436282DBEE7CD51191E30002A50A636924113B@hasmsx102.iil.intel.com \
--to=zvi.vlodavsky@intel.com \
--cc=kaos@ocs.com.au \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®