Giter Site home page Giter Site logo

godzil / fusd Goto Github PK

View Code? Open in Web Editor NEW
3.0 3.0 1.0 917 KB

FUSD ( Framework for User-Space Devices ) is a project of User Space Device Driver. This is a Fork of the original fusd project.

Home Page: Framework for User-Space Devices

License: Other

C 98.45% Makefile 1.55%

fusd's People

Contributors

godzil avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

Forkers

stefanstoeckigt

fusd's Issues

Error on build module kfusd with kernel 2.6.34.9-69.fc13.i686.PAE fedora13

hello friend!

(sorry for my bad english)

It's me again cristianfon, in this case I am in another distribution, Fedora 13 with the kernel Linux 2.6.34.9-69.fc13.i686.PAE fedora13 # 1 SMP Tue May 3 9:13:56 UTC 2011. this is a test machine, there is nothing to lose. :-)

I tried to compile, but I get the following error:

[root@fedora13 fusd-godzil]# make
make -C libfusd
make[1]: Entering directory /root/fusd-godzil/libfusd' make[1]: Nothing to be done fordefault'.
make[1]: Leaving directory /root/fusd-godzil/libfusd' make -C kfusd make[1]: Entering directory/root/fusd-godzil/kfusd'
make -C /lib/modules/2.6.34.9-69.fc13.i686.PAE/build SUBDIRS=/root/fusd-godzil/kfusd EXTRA_CFLAGS=-I/root/fusd-godzil/kfusd/../include modules
make[2]: Entering directory /lib/modules/2.6.34.9-69.fc13.i686.PAE/build' CC [M] /root/fusd-godzil/kfusd/kfusd.o /root/fusd-godzil/kfusd/kfusd.c:261: warning: data definition has no type or storage class /root/fusd-godzil/kfusd/kfusd.c:261: warning: type defaults to ‘int’ in declaration of ‘DEFINE_SEMAPHORE’ /root/fusd-godzil/kfusd/kfusd.c:261: warning: parameter names (without types) in function declaration /root/fusd-godzil/kfusd/kfusd.c: In function ‘maybe_free_fusd_dev’: /root/fusd-godzil/kfusd/kfusd.c:562: error: ‘fusd_devlist_sem’ undeclared (first use in this function) /root/fusd-godzil/kfusd/kfusd.c:562: error: (Each undeclared identifier is reported only once /root/fusd-godzil/kfusd/kfusd.c:562: error: for each function it appears in.) /root/fusd-godzil/kfusd/kfusd.c: In function ‘fusd_dev_is_valid’: /root/fusd-godzil/kfusd/kfusd.c:1079: error: ‘fusd_devlist_sem’ undeclared (first use in this function) /root/fusd-godzil/kfusd/kfusd.c: In function ‘find_user_device’: /root/fusd-godzil/kfusd/kfusd.c:1180: error: ‘fusd_devlist_sem’ undeclared (first use in this function) /root/fusd-godzil/kfusd/kfusd.c: In function ‘fusd_client_open’: /root/fusd-godzil/kfusd/kfusd.c:1233: error: ‘fusd_devlist_sem’ undeclared (first use in this function) /root/fusd-godzil/kfusd/kfusd.c: In function ‘fusd_register_device’: /root/fusd-godzil/kfusd/kfusd.c:2123: error: ‘fusd_devlist_sem’ undeclared (first use in this function) /root/fusd-godzil/kfusd/kfusd.c: In function ‘fusd_open’: /root/fusd-godzil/kfusd/kfusd.c:2395: error: ‘fusd_devlist_sem’ undeclared (first use in this function) /root/fusd-godzil/kfusd/kfusd.c: In function ‘fusd_unlocked_ioctl’: /root/fusd-godzil/kfusd/kfusd.c:2688: warning: unused variable ‘argp’ /root/fusd-godzil/kfusd/kfusd.c: In function ‘fusd_status_build_text’: /root/fusd-godzil/kfusd/kfusd.c:3054: error: ‘fusd_devlist_sem’ undeclared (first use in this function) /root/fusd-godzil/kfusd/kfusd.c: In function ‘fusd_status_build_binary’: /root/fusd-godzil/kfusd/kfusd.c:3106: error: ‘fusd_devlist_sem’ undeclared (first use in this function) make[3]: *** [/root/fusd-godzil/kfusd/kfusd.o] Error 1 make[2]: *** [_module_/root/fusd-godzil/kfusd] Error 2 make[2]: Leaving directory/lib/modules/2.6.34.9-69.fc13.i686.PAE/build'
make[1]: *** [default] Error 2
make[1]: Leaving directory `/root/fusd-godzil/kfusd'
make: *** [default] Error 2
[root@fedora13 fusd-godzil]#

Thanks from Argentina, Entre Rios, Paraná.
Sorry for the inconvenience
cristianf

Make error

I am getting the following error when i try to make fusd.

make -C libfusd make[1]: Entering directory '/home/garrison-admin/inteldevstack/fusd/libfusd' make[1]: Nothing to be done for 'default'. make[1]: Leaving directory '/home/garrison-admin/inteldevstack/fusd/libfusd' make -C kfusd make[1]: Entering directory '/home/garrison-admin/inteldevstack/fusd/kfusd' make -C /lib/modules/3.10.0-693.el7.x86_64/build SUBDIRS=/home/garrison-admin/inteldevstack/fusd/kfusd EXTRA_CFLAGS="-I/home/garrison-admin/inteldevstack/fusd/kfusd/../include -DGIT_DESCRIBE='\"v1.14-pre2\"'" V=1 modules make[2]: Entering directory '/usr/src/kernels/3.10.0-693.el7.x86_64' test -e include/generated/autoconf.h -a -e include/config/auto.conf || ( \ echo >&2; \ echo >&2 " ERROR: Kernel configuration is invalid."; \ echo >&2 " include/generated/autoconf.h or include/config/auto.conf are missing.";\ echo >&2 " Run 'make oldconfig && make prepare' on kernel src to fix it."; \ echo >&2 ; \ /bin/false) mkdir -p /home/garrison-admin/inteldevstack/fusd/kfusd/.tmp_versions ; rm -f /home/garrison-admin/inteldevstack/fusd/kfusd/.tmp_versions/* make -f scripts/Makefile.build obj=/home/garrison-admin/inteldevstack/fusd/kfusd gcc -Wp,-MD,/home/garrison-admin/inteldevstack/fusd/kfusd/.kfusd.o.d -nostdinc -isystem /usr/lib/gcc/x86_64-redhat-linux/4.8.5/include -I./arch/x86/include -Iarch/x86/include/generated -Iinclude -I./arch/x86/include/uapi -Iarch/x86/include/generated/uapi -I./include/uapi -Iinclude/generated/uapi -include ./include/linux/kconfig.h -D__KERNEL__ -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -Werror-implicit-function-declaration -Wno-format-security -fno-delete-null-pointer-checks -std=gnu89 -O2 -m64 -mno-mmx -mno-sse -mpreferred-stack-boundary=3 -mtune=generic -mno-red-zone -mcmodel=kernel -funit-at-a-time -maccumulate-outgoing-args -Wframe-larger-than=2048 -DCONFIG_AS_CFI=1 -DCONFIG_AS_CFI_SIGNAL_FRAME=1 -DCONFIG_AS_CFI_SECTIONS=1 -DCONFIG_AS_FXSAVEQ=1 -DCONFIG_AS_AVX=1 -DCONFIG_AS_AVX2=1 -DCONFIG_AS_AVX512=1 -DCONFIG_AS_SHA1_NI=1 -DCONFIG_AS_SHA256_NI=1 -pipe -Wno-sign-compare -fno-asynchronous-unwind-tables -mno-sse -mno-mmx -mno-sse2 -mno-3dnow -mno-avx -Wframe-larger-than=2048 -fstack-protector-strong -Wno-unused-but-set-variable -fno-omit-frame-pointer -fno-optimize-sibling-calls -g -pg -mfentry -DCC_USING_FENTRY -fno-inline-functions-called-once -Wdeclaration-after-statement -Wno-pointer-sign -fno-strict-overflow -fconserve-stack -DCC_HAVE_ASM_GOTO -I/home/garrison-admin/inteldevstack/fusd/kfusd/../include -DGIT_DESCRIBE='"v1.14-pre2"' -DMODULE -D"KBUILD_STR(s)=#s" -D"KBUILD_BASENAME=KBUILD_STR(kfusd)" -D"KBUILD_MODNAME=KBUILD_STR(kfusd)" -c -o /home/garrison-admin/inteldevstack/fusd/kfusd/.tmp_kfusd.o /home/garrison-admin/inteldevstack/fusd/kfusd/kfusd.c /home/garrison-admin/inteldevstack/fusd/kfusd/kfusd.c: In function ‘fusd_aio_write’: /home/garrison-admin/inteldevstack/fusd/kfusd/kfusd.c:2439:34: error: dereferencing pointer to incomplete type return fusd_process_write(iocb->ki_filp, ^ /home/garrison-admin/inteldevstack/fusd/kfusd/kfusd.c:2442:1: warning: control reaches end of non-void function [-Wreturn-type] } ^ make[3]: *** [/home/garrison-admin/inteldevstack/fusd/kfusd/kfusd.o] Error 1 make[2]: *** [_module_/home/garrison-admin/inteldevstack/fusd/kfusd] Error 2 make[2]: Leaving directory '/usr/src/kernels/3.10.0-693.el7.x86_64' make[1]: *** [default] Error 2 make[1]: Leaving directory '/home/garrison-admin/inteldevstack/fusd/kfusd' make: *** [default] Error 2

Fusd need to be reworked on the way it handle different kernel version

Current kernel handling is done via tons of #ifdef-s which work for a few kernel version, but as it is aimed to support a broad range of kernel version it start to get unmaintainable.

Code should be splited in a way to reduce as much as possible dependencies on ifdefs and kernel version specific are in their own file to avoid the current mess.

This will also make support for future version of the linux kernel easier.

Error on build module kfusd with kernel 2.6.32-5-686

hello friend!

(sorry for my English)

I wanted to congratulate you on taking forward this project. its good!

i using debian squeeze with kernel 2.6.32-5-686. in a test machine

I tried to compile it but I get the following error:

root@ecr:~/newfusd# make
make -C libfusd
make[1]: se ingresa al directorio `/root/newfusd/libfusd'
make target CFLAGS='-g -O2 -fPIC -std=gnu99 -O2 -g -I../include'
make[2]: se ingresa al directorio `/root/newfusd/libfusd'
Makefile:28: libfusd.d: No existe el fichero o el directorio
gcc  -M -g -O2 -fPIC -std=gnu99 -O2 -g -I../include libfusd.c > libfusd.d.$$; sed 's,\(libfusd\)\.o[ :]*,\1.o libfusd.d : ,g' < libfusd.d.$$ > libfusd.d; rm -f libfusd.d.$$
make[2]: se sale del directorio `/root/newfusd/libfusd'
make[2]: se ingresa al directorio `/root/newfusd/libfusd'
gcc  -g -O2 -fPIC -std=gnu99 -O2 -g -I../include   -c -o libfusd.o libfusd.c
gcc libfusd.o  -o libfusd.so.0.0 -shared -nostdlib
ar -cr libfusd.a libfusd.o
make[2]: se sale del directorio `/root/newfusd/libfusd'
make[1]: se sale del directorio `/root/newfusd/libfusd'
make -C kfusd
make[1]: se ingresa al directorio `/root/newfusd/kfusd'
make -C /lib/modules/2.6.32-5-686/build SUBDIRS=/root/newfusd/kfusd EXTRA_CFLAGS=-I/root/newfusd/kfusd/../include modules
make[2]: se ingresa al directorio `/usr/src/linux-headers-2.6.32-5-686'
  CC [M]  /root/newfusd/kfusd/kfusd.o
In file included from /root/newfusd/kfusd/kfusd.c:221:
/root/newfusd/kfusd/../include/kfusd.h:279: warning: data definition has no type or storage class
/root/newfusd/kfusd/../include/kfusd.h:279: warning: type defaults to âintâ in declaration of âDEFINE_SEMAPHOREâ
/root/newfusd/kfusd/../include/kfusd.h:279: warning: parameter names (without types) in function declaration
/root/newfusd/kfusd/../include/kfusd.h: In function âatomic_inc_and_retâ:
/root/newfusd/kfusd/../include/kfusd.h:285: error: âatomic_opsâ undeclared (first use in this function)
/root/newfusd/kfusd/../include/kfusd.h:285: error: (Each undeclared identifier is reported only once
/root/newfusd/kfusd/../include/kfusd.h:285: error: for each function it appears in.)
/root/newfusd/kfusd/kfusd.c: In function âfusd_unlocked_ioctlâ:
/root/newfusd/kfusd/kfusd.c:2688: warning: unused variable âargpâ
make[5]: *** [/root/newfusd/kfusd/kfusd.o] Error 1
    make[4]: *** [_module_/root/newfusd/kfusd] Error 2
make[3]: *** [sub-make] Error 2
make[2]: *** [all] Error 2
make[2]: se sale del directorio `/usr/src/linux-headers-2.6.32-5-686'
make[1]: *** [default] Error 2
    make[1]: se sale del directorio `/root/newfusd/kfusd'
make: *** [default] Error 2
root@ecr:~/newfusd#

could be resolved?
Sorry for the inconvenience
cristianf

mmap is not working

As in title, the current implementation for mmap does not work at all.

After some testing I fear it may need a complete rewrite, I don't know if it is some protection from more recent kernel to prevent accessing other process memory and would need to setup some more configuration than what the code currently do.

Error on build module kfusd with kernel 2.6.25-14.fc9.i686 (fedora 9)

hello godzil, after trying with fedora 13, probe compile it into a virtual machine with fedora 9 and had no luck, attached the output

make -C libfusd
make[1]: Entering directory /root/fusd-master/libfusd' make[1]: Nothing to be done fordefault'.
make[1]: Leaving directory /root/fusd-master/libfusd' make -C kfusd make[1]: Entering directory/root/fusd-master/kfusd'
make -C /lib/modules/2.6.25-14.fc9.i686/build SUBDIRS=/root/fusd-master/kfusd EXTRA_CFLAGS=-I/root/fusd-master/kfusd/../include modules
make[2]: Entering directory /usr/src/kernels/2.6.25-14.fc9.i686' CC [M] /root/fusd-master/kfusd/kfusd.o /root/fusd-master/kfusd/kfusd.c: In function ‘fusd_fops_call_send’: /root/fusd-master/kfusd/kfusd.c:851: error: implicit declaration of function ‘current_uid’ /root/fusd-master/kfusd/kfusd.c:852: error: implicit declaration of function ‘current_gid’ /root/fusd-master/kfusd/kfusd.c: At top level: /root/fusd-master/kfusd/kfusd.c:1722: warning: initialization from incompatible pointer type /root/fusd-master/kfusd/kfusd.c: In function ‘fusd_register_device’: /root/fusd-master/kfusd/kfusd.c:2320: warning: too many arguments for format /root/fusd-master/kfusd/kfusd.c:2320: warning: assignment from incompatible pointer type /root/fusd-master/kfusd/kfusd.c: In function ‘fusd_unlocked_ioctl’: /root/fusd-master/kfusd/kfusd.c:2688: warning: unused variable ‘argp’ /root/fusd-master/kfusd/kfusd.c: In function ‘init_fusd’: /root/fusd-master/kfusd/kfusd.c:3285: warning: too many arguments for format /root/fusd-master/kfusd/kfusd.c:3285: warning: assignment from incompatible pointer type /root/fusd-master/kfusd/kfusd.c:3319: warning: too many arguments for format /root/fusd-master/kfusd/kfusd.c:3319: warning: assignment from incompatible pointer type make[3]: *** [/root/fusd-master/kfusd/kfusd.o] Error 1 make[2]: *** [_module_/root/fusd-master/kfusd] Error 2 make[2]: Leaving directory/usr/src/kernels/2.6.25-14.fc9.i686'
make[1]: *** [default] Error 2
make[1]: Leaving directory `/root/fusd-master/kfusd'
make: *** [default] Error 2

I thank you again. is more important for my kernel 2.6.34.9-69.fc13.i686.PAE, but maybe I send this result will serve to be able to find the problem, thanks.

Kernel test needed

Current release need to be build tested on kernels:

  • 2.6.32
  • 3.10
  • 3.16
  • 4.4
  • 4.9
  • 5.1
  • 5.2

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.