kernel

Windows 2008 R2 - Kernel (System Process PID=4) is locking files and folders

这一生的挚爱 提交于 2019-12-28 03:35:10
问题 Windows 2008 R2 - Kernel (System Process PID=4) is locking files and folders for a long time. For example when deleting a file, the file may remain locked for 1 minute or more and only after that be deleted. On another occasions I encountered files or folders I could not delete. ProcMon showed that the System Process was holding a handle to those resources for a couple of minutes and then released them None of the resources I mentioned were system resources, only files and folders installed

cscope or ctags why choose one over the other? [closed]

南笙酒味 提交于 2019-12-28 03:15:10
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 3 months ago . I primarily use vim / gvim as an editor and am looking at using a combination of lxr (the Linux Cross Reference) and either cscope or ctags for exploring the kernel source. However, I haven't ever used either cscope or ctags and would like to hear why one might choose one over the other taking into

Sending UDP packets from the Linux Kernel

北城以北 提交于 2019-12-28 01:55:22
问题 Even if a similar topic already exists, I noticed that it dates back two years, thus I guess it's more appropriate to open a fresh one... I'm trying to figure out how to send UDP packets from the Linux Kernel (3.3.4), in order to monitor the behavior of the random number generator (/drivers/char/random.c). So far, I've managed to monitor a few things owing to the sock_create and sock_sendmsg functions. You can find the typical piece of code I use at the end of this message. (You might also

Linux kernel 输入验证漏洞

给你一囗甜甜゛ 提交于 2019-12-27 03:57:45
漏洞名称: Linux kernel 输入验证漏洞 CNNVD编号: CNNVD-201306-131 发布时间: 2013-06-08 更新时间: 2013-06-08 危害等级: 中危 漏洞类型: 输入验证 威胁类型: 本地 CVE编号: CVE-2013-2146 Linux Kernel是美国Linux基金会发布的开放源码操作系统Linux所使用的内核。 Linux kernel 3.8.8及之前的版本中的arch/x86/kernel/cpu/perf_event_intel.c中存在漏洞。该漏洞源于当启用Performance Events Subsystem时,程序指定了不正确的位掩码。本地攻击者可通过尝试设置保留位利用该漏洞造成拒绝服务(通用保护故障和系统崩溃)。 目前厂商已经发布了升级补丁以修复此安全问题,补丁获取链接: http://www.openwall.com/lists/oss-security/2013/06/05/23 来源: github.com 链接: https://github.com/torvalds/linux/commit/f1923820c447e986a9da0fc6bf60c1dccdf0408e 来源: git.kernel.org 链接: http://git.kernel.org/?p=linux/kernel/git

[FAQ20527] 如何关闭OTG功能

断了今生、忘了曾经 提交于 2019-12-27 01:44:02
设定kernel config中: CONFIG_USB_MTK_OTG=n或删除CONFIG_USB_MTK_OTG. 注: kernel config位置: kernel-3.18(kernel-4.4)/arch/arm[64]/configs/[_debug]_defconfig 确认文件修改有效与否: out/target/product//obj/KERNEL_OBJ/.config 编译验证: mmm -j12 -k kernel-3.18:kernel 2>&1 | tee k.log ; make -j12 bootimage-nodeps mmm -j12 -k kernel-4.4:kernel 2>&1 | tee k.log ; make -j12 bootimage-nodeps 烧录boot.img. 使用验证: 连接U盘,鼠标,键盘等外设,无任何反应,无法读取或操作. 来源: CSDN 作者: weixin_37376417 链接: https://blog.csdn.net/weixin_37376417/article/details/103718854

解决Unable to create new native thread

不羁的心 提交于 2019-12-26 20:36:00
两种类型的Out of Memory java.lang.OutOfMemoryError: Java heap space error 当JVM尝试在堆中分配对象,堆中空间不足时抛出。一般通过设定JAVA启动参数 -Xmx 最小可用内存解决。 java.lang.OutOfMemoryError: Unable to create new native thread 当JVM向OS申请创建线程,而OS不能分配一个本地线程时抛出。 了解系统参数 系统级最大进程ID $ sysctl -a | grep kernel.pid_max kernel.pid_max = 32768 # 输出结果表示当前系统允许的最大进程数为32768 $ cat /proc/sys/kernel/pid_max # 命令功用与上述同样 $ echo 200000 > /proc/sys/kernel/pid_max # 修改系统级最大进程数为200000,可通过sysctl查看修改 系统级最大线程数 # /proc/sys/kernel/threads-max 限制了系统级最大线程数 $ echo 120000 > /proc/sys/kernel/threads-max # 修改系统级最大线程数为120000,可通过sysctl查看修改 # Linux没有每个进程单独的最大线程数限制 ulimit

高通-音频驱动程序

一笑奈何 提交于 2019-12-26 17:01:39
\kernel\sound\core\control.c \kernel\sound\core\ \kernel\sound\soc\codecs\Msm8x16-wcd.c 从上往下的大致流程: amixer-用户层 |->snd_ctl_ioctl-系统调用 |->snd_ctl_elem_write_user-内核钩子函数 |->snd_ctl_elem_wirte- |->snd_ctl_find_id-遍历kcontrol链表找到与给定id相匹配的kctl |->kctl->put()-调用kctl的成员函数put() |->snd_soc_put_volsw modem重启了的代码:\kernel\drivers\soc\qcom\smd.c 起始ioctl:\kernel\sound\core\control_compat.c snd_ctl_elem_write_user_compat >> snd_ctl_elem_write >> result = kctl->put(kctl, control); ADC1 Volume函数get put设置\kernel\sound\soc\codecs\msm8x16-wcd.c 最终读写寄存器函数:\kernel\sound\soc\soc-core.c 更往上:\kernel\sound\core\control.c:

How to implement the c malloc/realloc functions properly?

旧城冷巷雨未停 提交于 2019-12-25 19:09:21
问题 I am writing my own OS and had to implement my own malloc realloc functions. However I think that what I have written may not be safe and may also cause a memory leak because the variable isn't really destroyed, its memory is set to zero, but the variable name still exists. Could someone tell me if there are any vulnerabilities in this code? The project will be added to github soon as its finished under user subado512. Code: void * malloc(int nbytes) { char variable[nbytes]; return &variable;

sending a struct with MapViewOfFile and reading an unknown value

人走茶凉 提交于 2019-12-25 19:07:54
问题 I am basically trying to cast or copy my struct to my other process section view but I keep getting an error C2760: syntax error: unexpected token 'identifier', expected 'declaration' This is what I am doing: type RPM(UINT_PTR ReadAddress) { if (hDriver == INVALID_HANDLE_VALUE) { return {}; } DWORD64 Bytes; KM_READ_REQUEST ReadRequest{}; type response{}; ReadRequest.ProcessId = PID; ReadRequest.Address = ReadAddress; ReadRequest.Size = sizeof(type); ReadRequest.Output = &response; The problem

Linker error setting loading GDT register with LGDT instruction using Inline assembly

≯℡__Kan透↙ 提交于 2019-12-25 18:49:29
问题 I was compiling my prototype of prototype of a kernel (sounds weird, but it really doesn't matter) and in the installation I need to link the ASM file to a C file compiled with gcc to get a executable that could be used as kernel. The problem is that, after implementing a swap to protected mode from real mode, I get this error at linking the kernel.c and loader.asm scripts: Code: kernel.c:(.text+0x1e1): undefined reference to `gdtr' I will explain how all process of installation is and I will