Sponsored Content
Top Forums Programming which function copies data from user to kernel mode Post 302431705 by fpmurphy on Tuesday 22nd of June 2010 03:58:07 PM
Old 06-22-2010
On Solaris 10:
Code:
#define COPY_FROM_USER(target, source, offs, count) \
        if (uiomove((target), count, UIO_WRITE, source)) { \
                cmn_err(CE_WARN, "Bad copyin()!\n"); \
        }

#define COPY_TO_USER(target, offs, source, count) \
        if (uiomove((source), count, UIO_READ, target)) { \
                cmn_err(CE_WARN, "Bad copyout()!\n"); \
        }

 

10 More Discussions You Might Find Interesting

1. Filesystems, Disks and Memory

k_trap - kernel mode trap type 0x0000000E

HELP is urgently required, I run on SCO Unix 3 and this is the panic message that I get every time that I reboot 10U k_trap - kernel mode trap type 0x0000000E I have checked the swap already having the following results: #swap -l path dev swaplo blocks free... (3 Replies)
Discussion started by: alex_slb
3 Replies

2. SCO

unexpected trap in kernel mode

hi, I am trying to install sco openserver 5.0.4 on an old system. However, l was not able to proceed after putting the bootstr l have this panic message of PANIC: K_trap - kernel mode trap tupe 0x00000006 will someone kindly help to decode this error kayode (1 Reply)
Discussion started by: kayode
1 Replies

3. Programming

Aplication user and kernel mode (data access)

Hi all, I am trying to setup a program to use a device driver and am confusing buffer access between User and Kernel mode. I think all applications running in User space have to communicate with the device drivers using io control calls and then have some functions called back from the driver... (1 Reply)
Discussion started by: Brendan Kennedy
1 Replies

4. UNIX for Dummies Questions & Answers

Kernel Mode

Hi all i have queastion. Can anybody pease help me what is user mode and kernel mode and the term "De-mountable volumes" means? Thanks Palash (2 Replies)
Discussion started by: palash2k
2 Replies

5. Shell Programming and Scripting

MODE function in awk

Hello, Can someone pls help me with some statistical calculation in awk In excel there is a statistical function called "Mode". How Mode works: MODE returns the most frequently occurring, or repetitive, value in array or range. Eg if we have 5 numbers in 5 different columns... (12 Replies)
Discussion started by: Needhelp2
12 Replies

6. SCO

PANIC: k_trap - Kernel mode trap type 0x0000000E

Hi, i'm another question: I'm a directory /usr/data on my server sco unix 5.0.5: # du /usr/data 4386948 /usr/data I'm tried to connect to ftp directory /usr/data to this server and: PANIC: k_trap - Kernel mode trap type 0x0000000E Cannot dump 262040 pages to dumpdev hd(1/41):space... (3 Replies)
Discussion started by: sebpes
3 Replies

7. Programming

Execute code in kernel mode.

Hi everyone. I would like to hook a system function (gettimeofday) to modify it. I guess I'll need kernel mode to do that. By the way, how could I do it (c++ or c)? I want to modify that function for one process which I know the PID. So I need to return my own value for that PID and real value... (29 Replies)
Discussion started by: lilezek
29 Replies

8. Programming

HELP!!: CPU resource allocation between kernel modules and user mode process

Hi,all: I run my program which consists of one kernel module and one user mode process on a dual core server. The problem here is the kernel module consumes 100% of one core while the user mode process only consumes 10% of the other core, is there any solution that I can assign some computing... (1 Reply)
Discussion started by: neyshule
1 Replies

9. UNIX for Dummies Questions & Answers

Kernel Stack vs User Mode Stack

Hi, I am new to the linux kernel development area. I want to know what is the difference between kernel mode stack and user mode stack? Does each process has a user mode stack and a kernel mode stack?? Or Each process has a user mode stack and there is only one kernel mode stack that is shared by... (4 Replies)
Discussion started by: saurabhkoar
4 Replies

10. UNIX for Advanced & Expert Users

Precaution to access user mode buffers from kernel

When accessing a user mode buffers from kernel space drivers what precautions must we take and how those precautions need to be implemented? (0 Replies)
Discussion started by: rupeshkp728
0 Replies
VM86(2) 						     Linux Programmer's Manual							   VM86(2)

NAME
vm86old, vm86 - enter virtual 8086 mode SYNOPSIS
#include <sys/vm86.h> int vm86old(struct vm86_struct *info); int vm86(unsigned long fn, struct vm86plus_struct *v86); DESCRIPTION
The system call vm86() was introduced in Linux 0.97p2. In Linux 2.1.15 and 2.0.28, it was renamed to vm86old(), and a new vm86() was introduced. The definition of struct vm86_struct was changed in 1.1.8 and 1.1.9. These calls cause the process to enter VM86 mode (virtual-8086 in Intel literature), and are used by dosemu. VM86 mode is an emulation of real mode within a protected mode task. RETURN VALUE
On success, zero is returned. On error, -1 is returned, and errno is set appropriately. ERRORS
EFAULT This return value is specific to i386 and indicates a problem with getting user-space data. ENOSYS This return value indicates the call is not implemented on the present architecture. EPERM Saved kernel stack exists. (This is a kernel sanity check; the saved stack should exist only within vm86 mode itself.) CONFORMING TO
This call is specific to Linux on 32-bit Intel processors, and should not be used in programs intended to be portable. COLOPHON
This page is part of release 4.15 of the Linux man-pages project. A description of the project, information about reporting bugs, and the latest version of this page, can be found at https://www.kernel.org/doc/man-pages/. Linux 2009-02-20 VM86(2)
All times are GMT -4. The time now is 07:51 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy