netfilter-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Kristian Evensen <kristian.evensen@gmail.com>
To: netfilter-devel@vger.kernel.org
Subject: Updating variable shared between user and kernel space
Date: Thu, 26 Mar 2009 15:00:25 +0100	[thread overview]
Message-ID: <17e3a8f80903260700y2908961ah2218fcd185a76f7f@mail.gmail.com> (raw)

Hello,

I have a value I would like to share between userspace and kernelspace
(it is store in my target struct and intialized in the user space part
of my module), but when I update it in kernel space it gets the wrong
value. When for example incrementing the value by 1 every time the
rule matches, the values are all messed up (but never larger than the
number of matches/increments). When creating and initializing the
value in the module, it behaves correctly.

I always though that if you try to accesses userspace varibles from
kernel space, you will get a seg. fault or similar, and am therefore a
little confused as to why this do not work. Does anybody know why
and/or how to share variables?

-Kristian

             reply	other threads:[~2009-03-26 14:00 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-03-26 14:00 Kristian Evensen [this message]
2009-03-26 14:26 ` Updating variable shared between user and kernel space Jan Engelhardt
2009-03-26 15:29   ` Kristian Evensen

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=17e3a8f80903260700y2908961ah2218fcd185a76f7f@mail.gmail.com \
    --to=kristian.evensen@gmail.com \
    --cc=netfilter-devel@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;
as well as URLs for NNTP newsgroup(s).