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. CCD与CMOS的区别?

    我们在购买相机或是摄像机时,都会看到使用CMOS镜头或是CCD镜头,那么CCD与CMOS是什么意思呢,CCD与CMOS的区别是什么?首先,让我们了解CCD与CMOS的意思. CCDCCD使用一种高感光 ...

  2. win10 安装nodejs,报错there is a problem in the windows installer package

    今天重装了win10系统,开始安装各种软件,装到node的时候我崩溃了,报错there is a problem in the windows installer package··· 度娘了各种安装 ...

  3. java之Date(日期)、Date格式化、Calendar(日历)

    参考http://how2j.cn/k/date/date-date/346.html Date(日期) Date类 注意:是java.util.Date; 而非 java.sql.Date,此类是给 ...

  4. 下拉选择select和复选框checkbox的状态的各种方式

    复选框的状态 <input name="ck" value=" " type="checkbox"  checked> 或者&l ...

  5. 11. 几点基于Web日志的Webshell检测思路

    摘要: Web日志记录了网站被访问的情况,在Web安全的应用中,Web日志常被用来进行攻击事件的回溯和取证.Webshell大多由网页脚本语言编写,常被入侵者用作对网站服务器操作的后门程序,网站被植入 ...

  6. C# 获取外网IP和运营商和城市

    /// <summary> /// 获取客户端外网IP,省份,城市,运营商 /// 2012年12月18日 15:07 /// </summary> public class ...

  7. John 尼姆博弈

    John Little John is playing very funny game with his younger brother. There is one big box filled wi ...

  8. Intellij IDEA生成JavaDoc(转)

    Intellij IDEA生成JavaDoc(转)

  9. linux mysql 简单记录

    mysql 1.linux下启动mysql的命令:mysqladmin start/ect/init.d/mysql start (前面为mysql的安装路径) 2.linux下重启mysql的命令: ...

  10. layui时间控件联动:开始时间、结束时间,有效时间范围

    实际开发中,经常遇到时间控件联动的情况,然后每次都网上搜代码Copy,不过每次都有点小Bug让你错不及防: 这次,在这里备份一下,以后Copy自己的得了(欢迎Copy代码,若遇到问题,请麻烦回复我一下 ...