From: Thiago Rondon <thiago.rondon@gmail.com>
To: opacki@acn.waw.pl
Cc: linux-c-programming@vger.kernel.org
Subject: Re: LKM programming - problem with chars from user space (?)
Date: Mon, 9 Aug 2004 02:35:53 -0400 [thread overview]
Message-ID: <5845af7d040808233536cd5cf4@mail.gmail.com> (raw)
In-Reply-To: <200408082306.15656.opacki@acn.waw.pl>
Yeah, because you put KERN_ALERT as the first argument in the
printk() function..
See this file, ~linux/include/linux/kernel.h
-Thiago Rondon
On Sun, 8 Aug 2004 23:06:15 +0200, authn <opacki@acn.waw.pl> wrote:
> Hello,
> I am coding a linux kernel module and have problem with some string from user
> space (from execve system call). There is no problem with useing this string
> as a one, for example printk(KERN_ALERT "%s", string) works fine.
> Problem appears when i want to printk or compare single char, in first case it
> is printked with some extra '<1>' and in second case, when i compare it with
> other one, it doesnt fit to real char (it is "connected" with '<1>' in some
> way ?). I tried to copy it to kmalloced buffer:
>
> if ((k_space=(char *)kmalloc(len, GFP_KERNEL))==NULL)
> return -1;
> memcpy_fromfs((void *)k_space, (void *)argv[argc], len);
>
> but then playing with k_space[i] was the same. Can anybody help me with this ?
>
> Regards,
> apacz
> -
> To unsubscribe from this list: send the line "unsubscribe linux-c-programming" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
next prev parent reply other threads:[~2004-08-09 6:35 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-08-08 21:06 LKM programming - problem with chars from user space (?) authn
2004-08-09 6:35 ` Thiago Rondon [this message]
2004-08-15 21:03 ` Jan Opacki
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=5845af7d040808233536cd5cf4@mail.gmail.com \
--to=thiago.rondon@gmail.com \
--cc=linux-c-programming@vger.kernel.org \
--cc=opacki@acn.waw.pl \
/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).