put_user
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的更多相关文章
- 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 ...
- linux内核中的get_user和put_user
linux内核中的get_user和put_user 在 内核空间和用户空间交换数据时,get_user和put_user是两个两用的函数.相对于copy_to_user和 copy_from_use ...
- Missing access checks in put_user/get_user kernel API (CVE-2013-6282)
/* 本文章由 莫灰灰 编写,转载请注明出处. 作者:莫灰灰 邮箱: minzhenfei@163.com */ 1.漏洞成因 Linux kernel对ARM上的get_user/put_us ...
- Linux 驱动学习笔记05--字符驱动实例,实现一个共享内存设备的驱动
断断续续学驱动,好不容易有空,做了段字符驱动的例子.主要还是跟书上学习在此记录下来,以后说不定能回过头来温故知新. 首先上驱动源码 gmem.c: /************************* ...
- 分析Linux内核创建一个新进程的过程
一.原理分析 1.进程的描述 进程控制块PCB——task_struct,为了管理进程,内核必须对每个进程进行清晰的描述,进程描述符提供了内核所需了解的进程信息. struct task_struct ...
- 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. 程序功能概述 ...
- Process Kill Technology && Process Protection Against In Linux
目录 . 引言 . Kill Process By Kill Command && SIGNAL . Kill Process By Resource Limits . Kill Pr ...
- Linux字符设备
一.linux系统将设备分为3类:字符设备.块设备.网络设备. 字符设备:是指只能一个字节一个字节读写的设备,不能随机读取设备内存中的某一数据,读取数据需要按照先后数据.字符设备是面向流的设备,常见的 ...
- Binder的设计和框架
转自:http://wangkuiwu.github.io/2014/09/01/Binder-Introduce/ 1. Binder架构解析 1.1 Binder模型 上图中涉及到Binder模型 ...
随机推荐
- valgrind 代码检查,内存泄漏
使用平台 linux 下载 http://valgrind.org/ 文档 http://valgrind.org/docs/manual/manual.html 博客 https://www.osc ...
- Windows WMIC命令使用详解1
https://blog.csdn.net/enweitech/article/details/51982114 在CMD和Powershell中 使用WMIC 先决条件: a. 启动Windows ...
- Unix Timestamp
class Foundation_API DateTime /// This class represents an instant in time, expressed /// in years, ...
- DAL 层引用 System.Net.Http ,引发的一阵心慌
快下班的时候 代码data 数据层编译失败,引起整个解决方案全部失败:其他同事虽然vs 版本不同,但是都能编译通过:考虑到今天更改过vs 的设置,把今天更改的设置全部都恢复,结果还是不行.最后直接恢复 ...
- algo: 冒泡排序(Java实现)
package com.liuxian.algo; public class MySortClass implements Comparable<MySortClass> { public ...
- Guid.NewGuid().ToString()的几种格式 (转)
1.Guid.NewGuid().ToString("N") 结果为: 38bddf48f43c48588e0d78761eaa1ce6 2.Guid.NewGuid() ...
- Go语言入门——数组、切片和映射
按照以往开一些专题的风格,第一篇一般都是“从HelloWorld开始” 但是对于Go,思来想去,感觉真的从“HelloWorld”说起,压根撑不住一篇的篇幅,因为Go的HelloWorld太简单了. ...
- 洛谷P2188 小Z的 k 紧凑数
P2188 小Z的 k 紧凑数 题目描述 小 Z 在草稿纸上列出了很多数,他觉得相邻两位数字差的绝对值不超过 k 的整数特别奇特,称其为 k 紧凑数. 现在小 Z 想知道 [l,r] 内有多少个 k ...
- MySQL 5.7 Performance Schema 详解
refman mysql 5.7 MySQL Performance Schema 用于监视MySQL服务器,且运行时消耗很少的性能.Performance Schema 收集数据库服务器性能参数, ...
- 截取HTML中的JSON数据并利用GSON进行解析(Android)
截取HTML中的JSON数据并利用GSON进行解析(Android) 前言 最近在做的一个Android项目,需要自行搭建服务器,队友选择买了阿里云的服务器ESC产品,在数据获取上,我们采用了Andr ...