在我的内核模块中,我有以下读取函数:
static ssize_t sample_read(struct file *filp, char *buffer, size_t length, loff_t( buffer, &c, 1 ); //Buffer is the stack where to place the data read by function. copy_to_user copiesKERN_INFO "%s: %s read %d from BTN\n", module_name, __fu
sys_customcall(unsigned long long __user *output) unsigned long err;
err = copy_to_user我想将一个值从内核(cnt)复制到用户指针(output)。但是,当我运行代码err =8(即sizeof(unsigned long long) )时,用户端值没有改变。我做错了什么?我使用的是linux-kernel版本5.4.5