Programming :: Use Buffer Of User Mode In Kernel?
Feb 5, 2009
I add new syscall, and it need copy big data into the buffer specified in user mode. How can i do it? use copy_to_user? or can i use memcpy directly? If i use copy_to_use, is it low efficient?v
View 2 Replies
ADVERTISEMENT
May 3, 2010
I need a shared buffer between user and kernel space. I read that one way is to allocated buffer in kernel and then call mmap from the user space. I searched for an example but couldn't find something useful. If you know, could you please send me any links or sample code that does this..
View 1 Replies
View Related
Dec 17, 2009
I have a question regarding application/process execution and it's the following:
Is it possible a user application (which will regularly be executed at user-space) to be re-written as a kernel-module to allow the entire execution to be under kernel-mode (i.e. no system calls should be needed)? I am not saying that this is the right thing to do; I am just asking if it's doable.
View 4 Replies
View Related
Jun 28, 2010
i need C code to get child pids from its parent pid in linux and in kernel mode, is there anything like getpid() or getppid() which works in kernel mode?
View 2 Replies
View Related
May 3, 2011
In user mode [non-root] linux machine, tried to bind a socket by using a"ioctl(iInterfaceSocket, SIOCSIFADDR, &stCommand)". I am getting error 13 -> Permission denied because of user mode. If change from usermode to kernel mode everything works fine.I need to bind the socket in user mode only, please suggest solution for the abovewhile explaining the above,
View 2 Replies
View Related
Nov 28, 2009
I have 2 hdds, with encrypted / and /home. Besides there are four other (encrypted ext4) partitions I use rarely. In Fedora 11 at boottime I gave the luks passphrase for / and home and the system booted as intended.
Whenever I needed those extra encrypted partitions I mounted them in Nautilus. Now, in Fedora 12 at boottime dracut tries to open all the encrypted partitions, / and /home are mounted fine, but opening all the other partitions gave the following messages in messages.log:
Quote:
dracut: luksOpen /dev/sdb6 luks-02a0e706-a26f-4019-a2a0-88a0366a994d
kernel: Buffer I/O error on device dm-0, logical block 124
kernel: device-mapper: ioctl: unable to remove open device temporary-cryptsetup-304
kernel: Buffer I/O error on device dm-0, logical block 124
kernel: Buffer I/O error on device dm-0, logical block 124
[code]....
...and these messages are repeated with the other partiitions, and the boot time takes very, very long. How can I tell dracut to ignore those extra encrypted partitions at boottime?
View 8 Replies
View Related
Dec 1, 2010
My linux workstation recently crashed. After rebooting, Linux (Red Hat 5.3) will not boot properly and automatically went into emergency mode or recovery mode i think. I can still see my /home/user/ and all the files inside.I boot from CD to rescue mode and tried mounting read-only the /dev/sd5 which contains the files in the crashed hard disk to try to copy out my files but mounting was unsuccessful (invalid argument). I checked the filesystem type using fsck -N /dev/sda5 and shows it to ext2. i tried to mount another known working hdd and was successful.
My question is why in emergency mode, the crashed hdd is able to be mounted automatically as read-only but cannot be done in rescue mode thru a bootable CD?Is there any special mount options used in emergency mode?I also cannot copy out in emergency mode booting from the crashed hard disk as everything is read only.
View 3 Replies
View Related
Dec 10, 2008
I am writing a program which i dont want the kernel scheduler to preempt before certain time duration. I am using the system call sched_get_priority_max to set the maximum priority. However it is not producing results.
View 3 Replies
View Related
Mar 10, 2011
I need boot in emergency mode (not single user mode), from docs:
[URL]
in red hat enterprise 5 it's ok, not in red hat 6.
View 1 Replies
View Related
Mar 4, 2010
Code:
char retBuffer[100];
recv(sock , retBuffer ,sizeof(retBuffer) , 0);
if i send a string smaller then my buffer size retBuffer always have garbage of the end of it....what can i do to eliminate tis problem ?
View 2 Replies
View Related
Apr 12, 2011
Greetings EveryOne
how to check if buffer is empty in c?
View 14 Replies
View Related
May 19, 2010
writing a code in C program for debugging error and sendingror messagein routingprotocols. please answer with code
View 2 Replies
View Related
Jul 21, 2010
I wanna capture network packets from DMA ring buffer, just like netfilter. i wanna capture it from DMA, because i wanna get MAC address of I/O packets, so netfilter not included MAC address of out going packets because its on IP level and Ebtables is like that too. how i can capture network packets from DMA ring buffer.
View 9 Replies
View Related
Sep 20, 2010
I have been developing some code which I have been testing an another i386 system. However I have been getting some weird data received on a socket I am communicating with some 3rd party hardware, I have opened a socket to read data on the hardware's telnet port. The data being read is as expected and my code appears to function correctly.
However I have now began testing the code on a target platform, this platform is of a better spec than my development system. When I read data from the socket using recv(), all the expected data has not been read.A chunk of data from the beginning is missing and a portion of data that would be at the end is now at the beginning of the buffer. I'll try and illustrate this below.
[Code]...
View 6 Replies
View Related
Jan 9, 2010
The algorithm for reading and writing disk blocks use the algorithm getblk to allocate buffers from the pool. In the algorithm getblk, if the kernel removes a buffer from the free list, it must raise the processor priority level to block out interrupts before checking the free list. Why ?Where can i find the C implementation of the above algorithm for buffer allocation in the linux source code ?
View 1 Replies
View Related
Feb 9, 2011
create a large buffer in my program so that I can send, and then receive on another pc, more than 4096 bytes (this seems to be the default for the serial port). I thought this might work:
[code]...
View 9 Replies
View Related
Nov 20, 2009
I compiled a new kernel for slackware 13 yesterday and all is going well, except for the fact that during boot I get errors regarding a second hard drive. They are of the form
PHP Code:
[code]....
I wasn't getting this error with the previous 2.6.29.6 kernel. As far as I can tell everything is working fine, but the errors make me nervous as this is where all my data is stored. The partition was previously formatted ntfs-3g and I thought maybe I'd done something with ntfs support while configuring the kernel so I backed up the data, reformatted to ext4 which matches all other linux partitions except for swap of course, and I get the exact same errors.
1. Is there something different in this kernel in reporting errors or maybe something I set in configuration?
2. recommend a good (simple and ubiquitous) cli program to check the disk for errors so that I can run it in both the old and new slack kernels as well as mandriva on the same machine?
View 5 Replies
View Related
Dec 13, 2010
I am developing a I2C CDROM client driver. The CDROM firmware supports TOC information read through a I2C command. It sends the TOC information in burst ( Interrupts a GPIO pin when it is ready ) and my CPU does a I2C read to read the TOC. When the CDROM firmware finishes sending the last data burst , it informs my CPU that it is done with the TOC, by a flag in the last data burst. I would like to know, which is the most efficinet way I can send these TOC information to userspace?
View 4 Replies
View Related
Jul 7, 2009
I wanna write a file in kernel space but from my searching I can to know that instead of writeing file in kernel space ,I can write data to user space by copy_to_user space.
But link is missing ...I dont know how will my user space will access kernel space means my function in kernel space which will do copy_to_user /....How my user space function will call my kernel level function ..
Can any one of you provide me with some example file which are doing this .I know every char driver is using it ...but i could not trace back how user level function is accessing it ...i m confused between user space and kernel space.
View 2 Replies
View Related
Jul 14, 2009
How to use execv from kernel space to call a user space program writtenfor socket prog.
I tried to write code for socket in kernel but its not working.
Socket code in kernel is also needed.
View 2 Replies
View Related
Jan 6, 2009
I want to know what are the advantages and disadvantages for accessing spi(serial peripheral inerface )from kernel level and user level. like methods of doing it, speed ,memeory utilization etc
View 1 Replies
View Related
Jul 21, 2011
I have the following requirement in my module. The driver gets some data from the external device. After getting 1MB of data it has to send it to the user space application. What is the best thing to implement for this in driver.? Is it ok to implement like, after getting data, the driver will send a signal to the user space application. Then the user space application sends an ioctl to read the data. Is there any alternate, that the driver directly sends the data without the user space application asks for it.?
View 4 Replies
View Related
Mar 3, 2010
How do i customize CPerl mode?And how do i setup everything on i cperl-mode?
How do i install perlnow.el
here the link [URL]...
View 1 Replies
View Related
Sep 7, 2010
How do I get into Single User Mode in 10.04?
The grub menu seems to be gone in 10.04, and the computer boots in 2 seconds. It's great that it boots fast, but there has to be some way to specify boot options?
/etc/default/grub says the timeout is 10, but that doesn't seem to be the case.
View 4 Replies
View Related
Mar 22, 2009
what things can i do in single user mode?is there a guide out there can help me out how to navigate in single user mode?in links that focus only on user user mode?being in single user mode in other istro all the same? debian, fedora, suse. etc
View 4 Replies
View Related
Aug 10, 2010
I've created Oracle Enterprise 5 Virtual machine. It was running fine but not sure what went wrong and now when ever I reboot the machine, it goes to single user mode. If I enter "init 5" command it boots to multi-user X11 mode without any problem.I checked inittab file and default line has id 5. So it looks OK. What else can be wrong?
View 15 Replies
View Related
Mar 18, 2011
I am running redhat ES 5 on a dell server and recently, I ran into a snag where I was able to reduce a partition (ext3) but could not run resize2fs (mismatch between physical and logical blocks (i never found a solution to this). In any case I decided to log in a single user mode (appended 'single' at the GRUB loader prompt) and now I am always taken to this single user mode every single time I reboot and can't seem to get out of it. I have tried init 5 (runlevel that the system is set to boot into by default) but that does nothing (no message on the # prompt).Of course, I have 2 problems here:
1) partition issue
2) cannot log out of single user mode.
View 6 Replies
View Related
Jan 24, 2010
I am trying to set up samba server on my box, and the easiest way seems to be to use the kde4 samba setting dialog. I need to run it as super user though. I tried
su -
systemsettings
but the window doesn't seem to appear on the screen.
View 1 Replies
View Related
Mar 22, 2010
I'm running debian lenny. Suddenly when I rebooted my system I was unable to login. I type root and the password and it tells me the login is incorrect.If I boot into single user mode, it accepts the password just fine. Looking in the /etc/shadow file, it appears to be fine as well.Running passwd to set a new password sets a new password just fine, i can login to single user mode with the new password, however, I cannot login at a higher runlevel with the password.
If I delete a password in the /etc/shadow file, then try to login as that user, it simply says "Login Incorrect" without even asking for a password.
View 14 Replies
View Related
Oct 27, 2009
Upon OS start-up Debian gives a choice, one is just simply start Debian, another line to start Debian, but with brackets (single-user mode). What's this for? And when and why do you need to use this?
View 2 Replies
View Related