Category "linux"

How to debug in kernel mode using printk

I am trying to add some stuff to Linux task_struct. In this area I copy a string from the user and try to store it in my struct. I try to debug my code by add

How can a shared library (.so) call a function that is implemented in its loader code?

I have a shared library that I implemented and want the .so to call a function that's implemented in the main program which loads the library. Let's say I have

"'omp.h' file not found" when compiling using Clang

I'm trying to set up an OpenMP project using Clang (3.7.0) on my laptop running Linux Mint. Now I've read that OpenMP is not supported right away so I followed

React application on production - links don't work when requested directly, they work only when accessed by react router

I have deployed an application on a ubuntu server. I ran npm run build, and copied all the content of build inside /var/www/html The file /etc/nginx/sites-avail

iptables moving rule in a list

i have 2 rules of iptables iptables -A INPUT -s 5.5.5.5 -j DROP iptables -A INPUT -s 6.5.5.5 -j ACCEPT is there a function or a command that will swap the

How to distinguish between different operating system distros in node.js?

In node you have access to process.os() and process.platform, which give you one of 5 values: 'darwin' 'freebsd' 'linux' 'sunos' 'win32' But how do you print

IP tuntap command can't open tun

I want to create a TUN interfae I type command in adb like below mkdir -p /dev/net busybox mknod /dev/net/tun1 c 10 200 chmod 666 /dev/net/tun1 ip tuntap add d

Is the sscanf function in the Linux kernel susceptible to buffer overflow attacks?

From what I understand, a typical buffer overflow attack occurs when an attack overflows a buffer of memory on the stack, thus allowing the attacker to inject m

Absolute fastest way to recursively delete all files and folders in a given path. Linux

I am looking for the absolute fastest method of performing unlink and rmdir commands on a path containing millions of files and thousands of folders. I have fo

Docker mounting volume. Permission denied

I have a problem with creating new files in mounted docker volume. Firstly after installation docker i added my user to docker group. sudo usermod -aG docker

How to get CPU clock frequency on an ARM/Linux machine

The answer seems pretty obvious I guess but none of the possible answers given in https://superuser.com/questions/406141/how-to-get-an-arm-cpu-clock-speed-in-li

Why can the posix thread id be NULL in Linux kernel function filp_close?

Below is excerpted from linux kernel: /* * "id" is the POSIX thread ID. We use the * files pointer for this.. */ int filp_close(struct file *filp, fl_owner_

Upgrade PHP on AWS Linux

I have an AWS server running a website with NGINX and PHP. I originally installed these using the following: sudo yum install -y nginx php-fpm The version of

Docker container accessible only via Cloudflare CDN (selected ip ranges)

I have webserver in docker container, but I cannot configure iptables on my host (Debian). I want allow only specified ip addressess to connect on ports 80 and

check library version netcdf linux

how do I determine which version of the netcdf library is installed in my system? Is there a command line? I tried to search "netcdf" and I find a bunch of file

Using sed to replace tab with spaces

I'm trying to replace the tab with 4 spaces, using sed, but it is not working. Here is my code: sed -i '{s/\t/ \{4\}/g}' filename Any suggestion is apprecia

Determine architecture when compiling linux module

I am writing a kernel module and in it I have the following piece of code: dma_dev->coherent_dma_mask = DMA_BIT_MASK(64); I do not always want 64 in there

MongoError: connect ECONNREFUSED 127.0.0.1:27017

I'm using NodeJS wih MongoDB using mongodb package. When I run mongod command it works fine and gives "waiting for connection on port 27017". So, mongod seems t

Bluetooth pairing in C blueZ on Linux

I cannot find any reference on how to pair a bluetooth device on linux in a program written in C using the BlueZ Bluetooth libraries. I already managed to do a

OCS Inventory integration in iTop Combodo

i have a big problem with the integrations in iTop by Combodo, I hope anybody can help me :) To my Problem... I have two servers with Linux Ubuntu 18.04LTS, one