mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "David CM Weber" <dweber@backbonesecurity.com>
To: unlisted-recipients:; (no To-header on input)@localhost.localdomain
Cc: <linux-kernel@vger.kernel.org>
Subject: RE: Simple LKM & copy_from_user question (followup)
Date: Fri, 20 Jul 2001 16:52:32 -0400	[thread overview]
Message-ID: <94FD5825A793194CBF039E6673E9AFE00B64A1@bbserver1.backbonesecurity.com> (raw)

God(Allah, Ganesh, or whom/whatever) bless you all.  Turns out I am a
dumba** and forgot to define __KERNEL__

Thanks to all for your help.  It's a valuable lesson that I'm sure
newbies make lots of..

Thanks,


Dave Weber
(Feeling somewhat idiotic)

Backbone Security, Inc.
570-422-7900





> -----Original Message-----
> From: Randy.Dunlap [mailto:rddunlap@osdlab.org]
> Sent: Friday, July 20, 2001 4:39 PM
> To: David CM Weber
> Cc: linux-kernel@vger.kernel.org
> Subject: Re: Simple LKM & copy_from_user question (followup)
> 
> 
> Hi-
> 
> I'll suggest a few things for you.
> 
>     cd to your linux tree and 'make modules'
>     Look at the gcc compile string there.
>     Try to copy it closely.
> 
> I added -I/path/to/linux/include and -D__KERNEL__
> and compiled your module with no problem.
> 
> If you had included the complete messages, we could have
> seen that it was using /usr/include/linux for header files
> instead of header files from linux/include/* .
> (at least that's what it did on my system)
> 
> ~Randy
> 
> 
> David CM Weber wrote:
> > 
> > Attached is the file I"m having problems with.  I'm compiling it w/
> > 
> > gcc -O3 -c main.c
> > 
> > Thanks in advance,
> > 
> > Dave Weber
> > Backbone Security, Inc.
> > 570-422-7900
> > 
> > > -----Original Message-----
> > > From: David CM Weber
> > > Sent: Friday, July 20, 2001 12:45 PM
> > > To: linux-kernel@vger.kernel.org
> > > Subject: Simple LKM & copy_from_user question
> > >
> > >
> > > Hello all.  I've been lurking for a while, and I have a quick
> > > question.
> > > I'm in the process of writing my first LKM to mess with the
> > > sys_socketcall function.  I'm looking at the original one for
> > > guidance,
> > > and it makes a call to copy_from_user() to get some
> > > socket-related data.
> > >
> > > So, to use copy_from_user(), I've gathered that I need to #include
> > > <asm/uaccess.h>, so I do so.
> > >
> > > After including this file, I'm getting the following errors:
> > >
> > >
> > > .../linux/timer.h:21: field 'vec' has incomplete type
> > >
> > > .../asm/uaccess.h::63: dereferencing pointer to incomplete type
> > >
> > >
> > > (This is not a full list of the error message that it's reporting)
> > >
> > > Am I not setting a define correctly?
> > >
> > > I'm using Redhat 7.1, on an Intel P3 system.  It's the 
> latest stable
> > > release (2.4.x ??) of the kernel.
> > >
> > > If you need more information, please let me know.  This has been
> > > troubling me for several days now..
> 

             reply	other threads:[~2001-07-20 20:44 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-07-20 20:52 David CM Weber [this message]
  -- strict thread matches above, loose matches on Subject: below --
2001-07-20 20:26 David CM Weber
2001-07-20 20:38 ` Richard B. Johnson
2001-07-20 20:38 ` Randy.Dunlap
2001-07-20 20:59 ` John Polyakov

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=94FD5825A793194CBF039E6673E9AFE00B64A1@bbserver1.backbonesecurity.com \
    --to=dweber@backbonesecurity.com \
    --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®