問題タブ [printk]

For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.

0 投票する
1 に答える
233 参照

c - copy_to_user() はメッセージを無限に出力し続けます

「Linux デバイスドライバー」について学んでいます。という名前のキャラクター デバイスを作成しましたchar_device。デバイスからデータを読み取ると、端末にメッセージを出力し続け、マシンを無限にクラッシュさせます。

ドライバーでの読み取り操作のソース コード:

デバイスの読み取りに使用されるユーザー空間コマンド:

ドライバーは「Hello from the kernel world!」と出力し続けます。端末へのメッセージ。

0 投票する
0 に答える
21 参照

openvswitch - OpenvSwitch building, installation and testing problem

I am trying to install OpenvSwitch on Ubuntu 18.04. I have two kernels version which are 5.11.0-27-generic and 5.4.0-42-generic. I set ./configure to build 5.4.0-42-generic version. Then I use command 'make modules_install', and I get the following message

/sbin/depmod sed -n 's/#define UTS_RELEASE "\([^"]*\)"/\1/p' /lib/modules/5.4.0-42-generic/build/include/generated/utsrelease.h"

The result seems to be success. However, I use mininet to set a topology which have three eths connect to a switch. 'mn --topo=single,3 --controller=none --mac' Next I add a flow that is 'ovs-ofctl add-flow s1 action=normal' and 'pingall' The wireshark gets all icmp packets. I add a code in vport.c in advance. The code is 'printk(KERN_ERR "\r\n!!!print1 !!!\r\n)"' However, dmesg doesn't show printk. I found the 'insmod' command will show the following error 'insmod: ERROR: could not insert module openvswitch.ko: Invalid module format' Is there anything wrong in my building and installation process? How can I show printk message in dmesg?