[CODE] added driver_v2 and user_task_v2 to try sending something else than strings

Added a new driver (kernel_module_v2) and a new user task (blinker..._v2)
to try sending a struct to a char device driver through casting.
Compile successful, now we have to check the printk on the board through
dmesg | tail



Signed-off-by: Francesco Robino <frobino@kth.se>
[CODE] trying to use _from_userspace but not receiving

check count


Signed-off-by: Francesco Robino <frobino@kth.se>
[CODE] added fwrite in user task and kmalloc in kernel module

now the blinker module returns a fail on the copy from user.
Should I use a void pointer to get info from copy to user and then cast it to blink?


Signed-off-by: Francesco Robino <frobino@kth.se>
[CODE] Added stevea version, trying to use ioctl...

Both ioctl and fwrite seem not to work... check write?
[CODE] stevea_user and stevea_kernel seems to work!

Modified stevea_kernel using suggestions from parking-maid:
* use a misc_device to register the device (not a generic device)
* use ioctl and inside of that copy_from_user

Continue working on this version!

Signed-off-by: Francesco Robino <frobino@kth.se>
[CODE] added a cleaner ioctl version. Still to be checked if it works

If ioctl_user works, use it as starting version!
Otherwise use stevea


Signed-off-by: Francesco Robino <frobino@kth.se>
[CODE] ioctl_ works perfectly write and read, but not ioctl yet

ioctl fails in the switch. Possible reasons:
	- should I use same #include ioctl.h in user and kernel?
	- is it a problem of wrong major/minor?
	READ Documentation/ioctl/ioctl-number.txt
	- fix the warning on ioctl that I get when compiling kernel


Signed-off-by: Francesco Robino <frobino@kth.se>
[Code] working version of ioctl_user and kernel

Now I have just to fix the driver to be usable from user space
following
http://www.makelinux.net/ldd3/chp-3-sect-2
http://stackoverflow.com/questions/21767061/linux-kernel-module-character-device-permissions


Signed-off-by: Francesco Robino <frobino@kth.se>
[CODE] Finalized ioctl and stevea

RESULTS:
	- stevea works properly but poorly documented and written;
	- ioctl is well documented and well written, but the registration
	  of the device in __init uses a old fashioned way that oblige
	  the user to chmod 755 /dev/my_device or write a udev rule

CONCLUSION (future points):
	- a final_kernel version merging the two:
		* start from ioctl and modify the __init as in stevea
		* send structs



Signed-off-by: Francesco Robino <frobino@kth.se>
[CODE] concluded kernel module struct, fixed also permissions problems

Check final_kernel and final_user, these are the most advanced kernel modules.
They can be improved sending STRUCT and allocating memory space as shown in stevea_ experiments.



Signed-off-by: Francesco Robino <frobino@kth.se>