1. put_user

Name

put_user --    Write a simple value into user space.

Synopsis

put_user ( x, ptr);

Arguments

x

Value to copy to user space.

ptr

Destination address, in user space.

Context

User context only. This function may sleep.

Description

This macro copies a single simple value from kernel space to user space. It supports simple types like char and int, but not larger data types like structures or arrays.

ptr must have pointer-to-simple-variable type, and x must be assignable to the result of dereferencing ptr .

Returns zero on success, or -EFAULT on error.

put_user的更多相关文章

  1. copy_to_user,copy_from_user,get_user,put_user函数比较

    copy_to_user,copy_from_user,get_user,put_user函数比较 copy_to_user --  Copy a block of data into user sp ...

  2. linux内核中的get_user和put_user

    linux内核中的get_user和put_user 在 内核空间和用户空间交换数据时,get_user和put_user是两个两用的函数.相对于copy_to_user和 copy_from_use ...

  3. Missing access checks in put_user/get_user kernel API (CVE-2013-6282)

    /* 本文章由 莫灰灰 编写,转载请注明出处. 作者:莫灰灰    邮箱: minzhenfei@163.com */ 1.漏洞成因 Linux kernel对ARM上的get_user/put_us ...

  4. Linux 驱动学习笔记05--字符驱动实例,实现一个共享内存设备的驱动

    断断续续学驱动,好不容易有空,做了段字符驱动的例子.主要还是跟书上学习在此记录下来,以后说不定能回过头来温故知新. 首先上驱动源码 gmem.c: /************************* ...

  5. 分析Linux内核创建一个新进程的过程

    一.原理分析 1.进程的描述 进程控制块PCB——task_struct,为了管理进程,内核必须对每个进程进行清晰的描述,进程描述符提供了内核所需了解的进程信息. struct task_struct ...

  6. karottc A Simple linux-virus Analysis、Linux Kernel <= 2.6.37 - Local Privilege Escalation、CVE-2010-4258、CVE-2010-3849、CVE-2010-3850

    catalog . 程序功能概述 . 感染文件 . 前置知识 . 获取ROOT权限: Linux Kernel <= - Local Privilege Escalation 1. 程序功能概述 ...

  7. Process Kill Technology && Process Protection Against In Linux

    目录 . 引言 . Kill Process By Kill Command && SIGNAL . Kill Process By Resource Limits . Kill Pr ...

  8. Linux字符设备

    一.linux系统将设备分为3类:字符设备.块设备.网络设备. 字符设备:是指只能一个字节一个字节读写的设备,不能随机读取设备内存中的某一数据,读取数据需要按照先后数据.字符设备是面向流的设备,常见的 ...

  9. Binder的设计和框架

    转自:http://wangkuiwu.github.io/2014/09/01/Binder-Introduce/ 1. Binder架构解析 1.1 Binder模型 上图中涉及到Binder模型 ...

随机推荐

  1. Java创建线程的三种方法比较

    一般有三种方法,Thread,Runnable,Callable. Runnable和Callable的区别 (1)Callable规定的方法是call(),Runnable规定的方法是run(). ...

  2. 自动化测试【Maven+Eclipse+Selenium+Java环境搭建和测试】

    一.下载必要的文件 1.eclipse Eclipse官网 2.jdk jdk官网 3.selenium IDE.Selenium Server.Selenium Client Drivers(Jav ...

  3. 流媒体中ffmpeg 命令的使用

    在linux系统中,使用到的有关流媒体音视频流进行处理的ffmpeg 命令的常用的命令己命令对应的参数如下:记录一下: 1.分离视频音频流 ffmpeg -i input_file -vcodec c ...

  4. RHEL6.3卸载OpenJDK操作示范:

    安装好的CentOS会自带OpenJdk,用命令 java -version ,会有下面的信息: java version "1.6.0" OpenJDK Runtime Envi ...

  5. MVN&nbsp;命令行

    Maven依赖查询: http://mvnrepository.com/ Maven常用命令:  1. 创建Maven的普通java项目:     mvn archetype:create     - ...

  6. eclipse必备快捷键

    1.[ Ctrl + Shift+ P  ],查找括号的开始和闭合 2.[ALT+/],这个快捷键应该没有人不知道 3.[Ctrl+O],显示类中方法和属性的大纲,能快速定位类的方法和属性,在查找Bu ...

  7. linux下安装Drcom

    环境:台式机物理机,centos7 因为要下载依赖包,物理机一开始没有网络,所以我先使用的是实验室的公用ip,然后完成以下操作(网上有大神说,可以现在其他机器上下载依赖包,copy过来也可以,但我没有 ...

  8. (十四)hibernate逆向工程

    一.hibernate逆向工程生成实体 介绍一个模型设计工具PowerDesigner,这个是j2ee开发必要的一个工具.一般在开发中先使用PowerDesigner 创建实体关系图即概念模型.建立了 ...

  9. 实验楼的php比赛题,网页数据提取。

    实验楼的php比赛题,网页数据提取. 题目的地址:https://www.shiyanlou.com/contests/lou5/challenges 以下代码是题目的答案 <?php head ...

  10. API---CreateIoCompletionPort

    HANDLE WINAPI CreateIoCompletionPort(  __in          HANDLE FileHandle,  __in          HANDLE Existi ...