kexec_load -加载新的内核映像到内存

内容简介

#include

#include

long kexec_load(unsigned longentry, unsigned longnr_segments, struct kexec_segment *flags);

描述

kexec_load加载从当前地址空间中的新内核。这个系统调用只能用于由root。

条目是一个指向新加载的可执行映像的入口点。这是内核将跳转到并开始执行新加载的图像的指令的存储器位置。

nr_segments denotes the number of segments which will be passed to kexec_load. The value must not be greater than KEXEC_SEGMENT_MAX.

segments denotes a pointer to the first element of an array of kexec_segmentelements. A kexec_segment element contains the details of a segment to be loaded in memory.

flags Sixteen most significant bits of the flag are used to communicate the architecture information (KEXEC_ARCH_*). The values for various architectures are same as defined by ELF specifications.  Lower sixteen bits have been reserved for miscellaneous information. Currently only one bit is being used and rest fifteen have been reserved for future use.  The least significant bit (KEXEC_ON_CRASH) can be set to inform the kernel that the memory memory image being loaded is to be executed upon a system crash and not regular boot. For regular boot, this bit is cleared.

返回值

On success, zero is returned. On error, nonzero value is returned, anderrnois set appropriately.

错误

EPERMthe calling process has not sufficient permissions (is not root).

EINVAL the flags argument contains an invalid combination of flags, or nr_segments is greater than KEXEC_SEGMENT_MAX.

ENOMEM there is not enough memory to store the kernel image.

EBUSY the memory location which should be written to is not available now.

可用性

This syscall is implemented only since kernel 2.6.1

¥ 我要打赏

纠错/补充

收藏

加QQ群啦,易百教程官方技术学习群

注意:建议每个人选自己的技术方向加群,同一个QQ最多限加 3 个群。

Linux load函数,kexec_load()函数 Unix/Linux相关推荐

  1. linux c++ 程序运行时间,总结UNIX/LINUX下C++程序计时的方法

    前言 良好的计时器可帮助程序开发人员确定程序的性能瓶颈,或对不同算法进行性能比较.但要精确测量程序的运行时间并不容易,因为进程切换.中断.共享的多用户.网络流量.高速缓存访问及转移预测等因素都会对程序 ...

  2. linux下启动tlq命令,UNIX/LINUX命令

    1 如何查看磁盘使用情况 查看磁盘空间 df -k 可以看出磁盘空间使用情况.以及分区或者逻辑卷的挂载目录等. $ df -k Filesystem 1024-blocks Free %Used Iu ...

  3. linux下 远程桌面连接,Unix/Linux下通过远程桌面连接Windows OS

    不知Microsoft出于什么考虑,在Windows XP中只允许一个Session通过远程桌面连接,如果一台XP为管理工作站,只有它能够访问后端的SAN Switch或存储系统,那么多人将无法同时使 ...

  4. linux中ftok的作用,Unix/Linux编程之ftok函数用法

    linux 中ftok函数的用法 1.函数作用: 系统建立IPC通讯(如消息队列.共享内存时)必须指定一个ID值.通常情况下,该id值通过ftok函数得到 2.函数原型: #include #incl ...

  5. windows下的linux工具,Windows下的Unix/Linux工具集:UnxUtils

    最近用dos命令多了些,感觉方便得多,对付一些老机器特别有效~只是可惜dos命令功效有限,如果能使用到linux系统上类似grep,sed,cat这样命令就完美了~ 果然和想得差不多,网上还真有&qu ...

  6. Unit 3: Unix/Linux File System 3.1 Unix/Linux File System Sleuthkit and Autopsy

    >> Now let's learn and practice a well-known open source forensic analysis tool called Sleuth ...

  7. linux退出脚本命令,【Unix/Linux.Shell Script】退出状态,exit命令

    每一条命令,不管是内置,shell函数,还是外部的,当它退出时,都会返回一个小的整数值给引用它的程序,这是程序的退出状态. 在shell下执行程序时,有许多方式可以取出程序的退出状态. 退出状态值 以 ...

  8. Linux学习:简单基础的Linux系统命令

    Linux操作系统介绍     肯.汤普逊 丹尼斯.里奇     美国 贝尔实验室     1970-1973     BCPL->new B->C->UNIX系统->Mini ...

  9. linux 网卡驱动编译安装包,linux网卡驱动程序的编译与安装

    一般来说,目前新版的Linux预设可以支持的网络卡芯片组数量已经很完备了,很多网络卡芯片都已经被支持, 例如RLT 8139芯片( RealTek 8139 )的网络卡所以使用者可以很轻易的设定好他们 ...

最新文章

  1. 关于button按钮在IE中的宽度问题、、、、
  2. django 灵活的后台查询
  3. C# WinFrom 去掉groupbox的边框
  4. Makefile、.mk、.bp、Blueprint、Soong、kati工具链的关系
  5. Java毕业设计-养老院管理系统
  6. 十六进制颜色与RGB颜色对照表
  7. mysql workbench 安全模式_MySQL Workbench的安全模式解决
  8. Express 介绍
  9. 嘀嘀的费用是优步的两倍?
  10. 【研究生论文写作】 思政相关题目选择题
  11. Pdf.js 解决电子印章问题
  12. 世界上最好用的纯前端模板【没有之一】,AceTemplate高调亮相。
  13. python 如果你的年龄大于18_5分钟学会Python的if条件判断语句
  14. solr和elasticsearch小结
  15. windows下CUDA的卸载,怒推!!!亲测可以!!!
  16. 手机上能不能写python_如何在手机上写Python?
  17. R语言爬虫豆瓣高评分电影(喝最烈的酒,熬最深的夜,吃最好的胃药,敷最贵的面膜)
  18. 网络直播平台搭建一个直播间的礼物系统
  19. Vue (十五) --------- UI 组件库
  20. 国际顶级电子杂志(画册/商刊)制作推广系统—iebook超级精灵

热门文章

  1. Berkeley DB Java Edition
  2. linux C 语言的 system
  3. 关于 IO 和 NIO 的思考
  4. 项目 11 部署与运行
  5. 剑指Offer之旋转数组中的最小数字(题8)
  6. GIF 太大?用 GIFSicle
  7. Unity3d札记 --TanksTutorial收获与总结
  8. install 命令用法详解
  9. 专业级的WPF条形码控件
  10. 我一口气发现7个Safari 0day,苹果奖了7.5万美元