How to allocate an executable page in a Linux kernel module?

I'm writing a Linux kernel module, and I'd like to allocate an executable page. Plain kmalloc() returns a pointer within a non-executable page, and I get a kernel panic when executing code there....

Compiling a kernel module, header problems, makefile problems

ok I'm trying to compile a simple kernel module, when I point to any of the below that contain includes, it complains about all kinds of stuff. linux-headers-2.6.31-21 ...

possibly undefined macro: AC_MSG_ERROR

I have the following in configure.ac: AC_CHECK_PROGS(MAKE,$MAKE make gmake,error) if test "x$MAKE" = "xerror" ;then AC_MSG_ERROR([cannot find a make command]) fi This has been in our project...

Find the directory for a FileStore

I'm trying to find a way to detect when a flash drive has been plugged into my computer. So far, the solution I found was to poll FileSystem#getFileStores for changes. This does indeed tell me...

Eclipse xdebug - skips breakpoints in PHP-CLI, but works for PHP-Apache?

I'm running eclipse Juno with XDebug to debug php scripts. Everything works fine when I debug as a "Web page", BUT when I debug a CLI script, Eclipse/XDebug skip right over my breakpoints. My...

simple linux device driver open call crash

I am trying to learn how to write a device driver in linux, following some reference from google and ldd3. i am able to insert the module below but when i tried to open the device in an...

npm install gives unauthorized name or password is incorrect error

When I try to install tap using npm install tap I get the following error: npm ERR! Error: unauthorized Name or password is incorrect.: tap Here's the entire response: npm http GET...

Doesn't find my variables when running perl script with cron

I'm facing a very strange problem. I'm running a script on a Squeeze Server with perl 5.10.1 from backports running. When I run the script from the console, it works perfect. But when I tried to...

install valgrind, Fatal error at startup

I am installing Valgrind but encounter some problems. The info of my platform: Linux xx-ThinkPad-X61 3.2.0-39-generic-pae #62-Ubuntu SMP Wed Feb 27 22:25:11 UTC 2013 i686 i686 i386 GNU/Linux I...

configure: error: C compiler cannot create executables when installing Ruby 1.9.3

I get the following error while trying to install Ruby 1.9.3 on Trisquel 6 using the following command rvm install 1.9.3 ERROR Error running...

Does Malloc only use the heap if requested memory space is large?

Whenever you study the memory allocation of processes you usually see it outlined like this: So far so good. But then you have the sbrk() system call which allows the program to change the upper...

Octave: mkoctfile not found when trying to install toolboxes

Downloaded packages from http://sourceforge.net/projects/octave/files/Octave%20Forge%20Packages/ then from Octave... pkg install statistics-1.2.2.tar.gz statistics needs io >= 1.0.18 pkg...

GDB won't load source file

I'm using arm-linux-gcc to compile a simple C file at host (debian i386) with -g. Then copy the a.out file to the target (arm,uclibc) computer. Run the a.out – it's just ok. Use GDB (target)...

Could not find the X.Org or XFree86 Window System, skipping

I made a new folder to install virtualbox, vagrant is 1.7.4, the virtualbox is 5.0.2. And have installed vagrant-vbguest sucessfully. I saw the errors below,it mainly said 'stdin is not a tty',...

pyinstaller create binary from python3 file, error: AttributeError: 'NoneType' object has no attribute 'rfind'

I try to create python binary from python3 file with pyinstaller, but it failled and the error message as below, can anyone give me some suggestion? thanks. [email protected]:~...

Error starting Cassandra 3.4

I have installed the Cassandra from the main website. I keep on getting an error each time I try to start it Java HotSpot(TM) 64-Bit Server VM warning: INFO: os::commit_memory(0x00007f85b2000000,...

How to check for TSX support?

My current attempt: /**simplified from * https://software.intel.com/en-us/articles/how-to-detect-new-instruction-support-in-the-4th-generation-intel-core-processor-family **/ #include...

My computer uses an ARM-based CPU. How can I run the Android emulator with optimal performance?

My Ubuntu runs on the Atom (ARM-based) CPU. How can I run the Android emulator with optimal performance? First off, here is some more information about my OS and CPU: $ uname -a Linux mypc...

Connect to mongo service via domain name

I create deployment and service from *.yaml. Into container I find ns record via nslookup or dig, but can't connect to db via service name or service IP. Anybody can tell me, what I do...

Kernel Panic : No working init found. Try passing init= option to kernel

I have just started to understand the kernel working and internals and to begin with, I am trying to build the kernel and boot it. I am using qemu as simulator for x86 architecture. I am following...

VIrtualBox: How to update the VBox.log location for a VM

After moving a VM into an external disk and updating the VM's disk image files, starting up the VM will show this warning Starting "default"... (default) Check network to re-create if...

VLCJ: A fatal error has been detected by the Java Runtime Environment just after 1 second of playback

Here's code: /* * This file is part of VLCJ. * * VLCJ is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free...

Maven compile failure using OpenJ9 with Lombok

I would like to ask help of community. I made an experiment to change jvm to Eclipse OpenJ9 VM AdoptOpenJDK from Oracle Hotspot. I created a simple spring boot application but I got an error in...

Linux vagrantlucid32 make: *** No rule to make target `all'. Stop

When I run the make all command I keep getting: make: *** No rule to make target `all'. Stop. Here is a link to the book I'm following read pages 6-7 maybe this can help solve the...

make: g: No such file or directory make: *** No rule to make target `g'. Stop

I have a sample makefile called 'g' saved in my user folder. I googled how to properly run make and this article says I should run it like this: make -f g but when I run it the way the article...

Why is this cpu going a lot faster?

i wrote a c program, run at Intel i5-7500(kubuntu with virtualbox run at win10) and Intel Xeon E5-26xx v4(tenxun cloud). i think Intel i5-7500 will be faster(CPU MHz:3.4GHz), but Intel Xeon...

EBPF: pointer arithmetic on PTR_TO_PACKET_END prohibited

I am trying to write a kernel module for filtering using the following example. On Ubuntu 18.04 with kernel 5.3.0 it's compiled and works perfectly fine. However, when the same example is compiled...

Linux user process spending 99% of time in kernel thread, no syscalls, still running but slowly

I have a process that is getting "stuck" in a loop of pure user code. Both htop and time show the process is spending most of it's time in the kernel, but it isn't making any syscalls. This...

Why can't I read /proc/pid/mem when I have read permission?

I would like to read the content of the memory file associated to one of my process (with PID 2614). I started to write a very small C program to check I can open it: #include <stdio.h> #include...

Problem during installation PostgreSQL 12 and PgAdmin4 on Linux Mint 20.1 Ulyssa 64-bit

I want to install PostgreSQL and PgAdmin4 on my Linux Mint 20.1 Ulyssa 64-bit My inxi info System: Kernel: 5.4.0-58-generic x86_64 bits: 64 compiler: gcc v: 9.3.0 Desktop: MATE 1.24.0 info:...