Current Server Time: 05:04 (Central Europe)

#apertus IRC Channel Logs

2020/03/17

Timezone: UTC


23:25
HEGAZY
left the channel
23:38
Oscar
left the channel
00:24
intracube
left the channel
00:25
intrac
joined the channel
00:25
intrac
left the channel
00:28
intrac
joined the channel
02:07
namibj
left the channel
02:14
namibj
joined the channel
02:26
Bertl_oO
changed nick to: Bertl_zZ
02:41
intrac
changed nick to: intracube
04:13
rajdeep
joined the channel
06:44
rajdeep
left the channel
08:12
Bertl_zZ
changed nick to: Bertl
08:12
Bertl
morning folks!
08:47
se6ast1an
good day
08:50
intracube
left the channel
08:52
intracube
joined the channel
09:04
intracube
left the channel
09:05
intracube
joined the channel
10:02
BAndiT1983|away
changed nick to: BAndiT1983
10:11
BAndiT1983
changed nick to: BAndiT1983|away
10:32
omar31
joined the channel
10:46
pratyush
joined the channel
10:46
pratyush
left the channel
10:46
pratyush
joined the channel
10:48
pratyush
left the channel
10:50
pratyush
joined the channel
10:51
pratyush
Hi I have completed T884 Task 1
10:54
pratyush
Bertl: The output looks like
10:54
pratyush
root@pratyush-HP-Laptop-15g-dr0xxx:/home/pratyush/Desktop/kc-final/kc# ./chrdev_test chrdevfile chrdev openedwrote 15 bytes into file chrdevdata written are: 50 72 61 74 79 75 73 68 20 48 61 72 73 48 00 file chrdev reopenedread 15 bytes from file chrdevdata read are: 50 72 61 74 79 75 73 68 20 48 61 72 73 48 00 The String Read is:Pratyush
10:54
pratyush
HarsH======PROCFILE OPERATIONS======THE CALCULATED CHECKSUM =678236The calculated length of checksum integer 6Parameters=678236Reading From the procfile:checksum = 678236���=====IOCTL OPERATIONS=====Writing checksum Value to device file using ioctl callReading Checksum Value from device file using ioctlValue is 678236Closing Driver
10:55
pratyush
I will be sharing the code :)
10:56
pratyush
:) :) :)
10:56
Bertl
please do so and use a pastebin in the future :)
10:56
pratyush
okay
10:58
pratyush
<script src="https://pastebin.com/embed_js/NrqrBHAS"></script>
11:01
Bertl
way better :)
11:01
Bertl
btw, this is the simplest and most effective link:
11:01
Bertl
https://pastebin.com/raw/NrqrBHAS
11:07
pratyush
pratyush: :)
11:47
HEGAZY
joined the channel
12:00
omar31
Hi Bertl, I submitted a draft proposal for review
12:01
Bertl
great,
12:01
Bertl
will check shortly
12:22
bluez_[m]
Hi Bertl ! I partly completed the task 1 of kernel challenge. Currently only procfs is implemented.
12:24
bluez_[m]
Here is a test run: https://pastebin.com/FGs1CNtH
12:24
Bertl
great, link to the code?
12:24
bluez_[m]
How should I share code with you?
12:25
Bertl
you can upload it somewhere or check it in with github
12:26
Bertl
then send me a link via e-mail, private message or simply paste it here ... whatever you prefer
12:26
bluez_[m]
Okay! Gimme a minute.
12:41
bluez_[m]
Bertl: Here is the code: https://github.com/Swaraj1998/apertus-kernel-challenge
12:42
BAndiT1983|away
changed nick to: BAndiT1983
12:42
BAndiT1983
bluez_[m]: it's rather old practice to put variables at the top of the function, usually they should be placed where they are used
12:42
BAndiT1983
e.g. len in checksum_read
12:43
BAndiT1983
it's not used until len = sprintf(buf, "checksum: %ld\n", checksum);, so you can also write int len = ...
12:44
BAndiT1983
also the if check can be moved to the top of the function, as it should do an early return
12:44
bluez_[m]
BAndiT1983: ohh, ok got it! Actually I was in doubt weather that is allowed in the version of C that linux kernel uses...
12:44
bluez_[m]
BAndiT1983: sure, will do that
12:44
BAndiT1983
it's up to Bertl to approve stuff, just giving hints of what i see and usually expect
12:45
BAndiT1983
also braces for if() and for() are a good practice, even if there is only one line
12:46
bluez_[m]
BAndiT1983: also, can i initialize the loop counter "i" in the for loop, iirc its a feature of c99 but I dont koow if it is allowed in linux kernel
12:47
bluez_[m]
<BAndiT1983 "also braces for if() and for() a"> ok, noted
12:47
BAndiT1983
just try what happens when you do it
12:47
Bertl
bluez_[m]: do not let BAndiT1983 confuse you, follow the Linux kernel style
12:47
pratyush
Bertl: I have shared code via email
12:48
Bertl
bluez_[m]: https://www.kernel.org/doc/html/v4.10/process/coding-style.html
12:49
bluez_[m]
Bertl: Actually I was in doubt weather its according to linux kernel style or not... will check again
12:49
Bertl
e.g.: Do not unnecessarily use braces where a single statement will do.
12:51
Bertl
also variables go to the top of a function/block, as the kernel doesn't use C99
12:51
BAndiT1983
so kernel development follows all the practices which are bad nowadays, nice
12:51
bluez_[m]
Bertl: Thanks! I did follow that, but missed a few things I guess, but nevertheless it was correct
12:51
Bertl
bluez_[m]: what you want to do is to use proper spacing and indentation
12:52
Bertl
e.g. separate variables from code with an empty line
12:52
Bertl
separate blocks with empty lines, etc
12:52
bluez_[m]
Bertl: what about initialization in the for loop? Can we do that in kernel?
12:53
Bertl
sure
12:53
bluez_[m]
i did use 8 spaces as suggested
12:54
bluez_[m]
for indentation
12:54
bluez_[m]
<Bertl "e.g. separate variables from cod"> yes! will do that
12:55
bluez_[m]
Bertl: Okay will check with the style thoroughly
12:55
bluez_[m]
Should I start with ioctl?
12:56
Bertl
there are a bunch of issues with the code so far
12:56
Bertl
did you test it?
12:56
bluez_[m]
yes I did
12:57
bluez_[m]
what issues did you find?
12:57
Bertl
well, first, what is size_t used for?
12:57
Bertl
(the name is probably a good hint :)
12:57
bluez_[m]
i can replace it with unsigned int
12:57
preetimenghwani[
Hello Bertl
12:57
preetimenghwani[
I have partly implemented T871.
12:57
preetimenghwani[
I implemented the bitslip part too but i am a bit confused how to train my model in such a way that it takes testpattern as input when the data is under training and takes user input when the data is trained.
12:59
bluez_[m]
<Bertl "(the name is probably a good hin"> yeah your are right, will change that ':D
12:59
Bertl
preetimenghwani[: you are talking about a testbench?
12:59
bluez_[m]
any other issues?
12:59
Bertl
bluez_[m]: be aware that 'normal' C types like 'unsigned int' may have different sizes :)
12:59
Bertl
why is there an arbitrary limit (BUFSIZE) on the input?
13:00
Bertl
why do you allocate the buffer on the stack?
13:00
bluez_[m]
<Bertl "bluez_: be aware that 'normal' C"> should I use uint32_t and types like that?
13:01
BAndiT1983
is it available at all there?
13:01
Bertl
bluez_[m]: probably a better choice, yes
13:02
Bertl
how did reading back the data go in your tests?
13:03
bluez_[m]
<Bertl "why do you allocate the buffer o"> is there kmalloc or something I should use? I am currently learning...
13:03
BAndiT1983
check the link from Bertl, seen it there
13:07
bluez_[m]
<Bertl "how did reading back the data go"> reading was fine afai checked... I sent you that pastebin....
13:08
bluez_[m]
<BAndiT1983 "check the link from Bertl, seen "> yeah found it!
13:10
bluez_[m]
I will make the changes then... will be back
13:11
preetimenghwani[
In reply to Bertl
13:11
preetimenghwani[
I can do this using a testbench too but do we have to send a signal from deserializer to serialzer indicating that the model is trained so that serializer sends the input data accordingly.
13:12
Bertl
bluez_[m]: also check for any warning when you compile your code against the kernel
13:13
Bertl
preetimenghwani[: you can do that in several ways in a testbench ... the simplest is probably to wait for a specific time
13:13
Bertl
the smarter way is to have a signal which you want in your hardware design anyway
13:16
preetimenghwani[
The signal you are talking about is the signal from deserializer to serializer right?
13:21
bluez_[m]
> bluez_: also check for any warning when you compile your code against the kernel
13:21
bluez_[m]
Sure will do... none as of now though
13:21
BAndiT1983
bluez_[m]: have you cranked up the compiler flags for more inspections?
13:22
BAndiT1983
sometimes it's better to see more probable problems in the build log, although some are false positive, than to miss important error-prone places
13:24
bluez_[m]
> bluez_: have you cranked up the compiler flags for more inspections?
13:24
bluez_[m]
None yet... will add more flags and check...thanks!
13:26
HEGAZY
left the channel
13:33
RexOrCine1
joined the channel
13:33
RexOrCine
left the channel
13:37
pratyush
changed nick to: pratyush1
13:41
pratyush1
left the channel
13:44
pratyush
joined the channel
13:46
Bertl
pratyush: you go by the pseudonym Rodolfo Giometti ?
13:46
pratyush
No
13:49
pratyush
Bertl:NO
13:49
BAndiT1983
:D NSA at it again
13:50
Bertl
nah, was just wondering about the MODULE_AUTHOR entry in the code :)
13:54
BAndiT1983
and i've thought that you're a bit bored because of curfew at your place
13:55
Bertl
for me, basically nothing changed :)
13:56
BAndiT1983
same thing was told me exactly the second you've wrote it, that i'm happy about home office and residing at my computer table
13:58
pratyush
Bertl : Shall I start to work on a proposal
13:59
Bertl
it wouldn't hurt to have a proposal, but I would also suggest to address the challenge task a little better :)
14:00
pratyush
Bertl : What improvements I need to make
14:02
Bertl
well, you obviously copied a lot of example code without really understanding the parts
14:03
Bertl
so my suggestion would be to go through 'your' code line by line and make sure you know what it does and that it is really required
14:04
Bertl
also adhering to the kernel coding style and making the code readable by proper formating is a good idea (see the discussion on the channel here today for more hints)
14:04
pratyush
Bertl : sure
14:04
Bertl
finally, solving the actual task would be great!
14:06
Bertl
maybe discuss your solution with other potential applicants here to identify potential problems and get some ideas ...
14:06
pratyush
okay
14:07
pratyush
Bertl : I will make the code more compact
14:10
pratyush
left the channel
14:24
Bertl
off for now ... bbl
14:24
Bertl
changed nick to: Bertl_oO
14:57
BAndiT1983
changed nick to: BAndiT1983|away
15:07
BAndiT1983|away
changed nick to: BAndiT1983
15:30
omar98
joined the channel
15:32
omar31
left the channel
15:33
omar31
joined the channel
15:35
omar98
left the channel
15:38
omar31
left the channel
15:49
abeljj[m]
left the channel
15:49
abeljj[m]
joined the channel
16:51
se6ast1an
new Team Talk is out!
16:51
se6ast1an
https://www.apertus.org/axiom-team-talk-15-3-packaging--axiom-micro-article-march-2020
16:52
apurvanandan[m]
Yayy!
17:13
bluez_[m]
Bertl: Hey! I have made appropriate changes, can you review once? Here's the link again: https://github.com/Swaraj1998/apertus-kernel-challenge
17:24
bluez_[m]
Also, I am getting warnings about unused variables like file pointer in the read write function (should i remove them? how?)... other then that rest of the warnings are in the kernel source tree itself...
17:49
Bertl_oO
bluez_[m]: will check shortly ... but unused variables should be removed.
18:19
BAndiT1983
if they are coming from the API and are argument of a function, then a macro can be used to mark them
18:19
BAndiT1983
https://stackoverflow.com/questions/7090998/portable-unused-parameter-macro-used-on-function-signature-for-c-and-c
18:28
bluez_[m]
> bluez_: will check shortly ... but unused variables should be removed.
18:28
bluez_[m]
Sorry I meant to say unused parameters... from api functions
18:32
bluez_[m]
> if they are coming from the API and are argument of a function, then a macro can be used to mark them
18:32
bluez_[m]
Is there an already defined macro in headers or I have to define those? I guess its better if its pre existing, I'll try it. Thanks!
19:03
Bertl_oO
note that parameters are usually there for a reason
19:04
Bertl_oO
i.e. unused parameters are probably a good indication that you are doing something wrong
21:12
HEGAZY
joined the channel
21:34
se6ast1an
of to bed
21:34
se6ast1an
good night
21:34
BAndiT1983
changed nick to: BAndiT1983|away
21:36
HEGAZY
left the channel
21:44
intracube
changed nick to: intrac
21:48
futarisIRCcloud
left the channel
22:29
bluez_[m]
> i.e. unused parameters are probably a good indication that you are doing something wrong
22:29
bluez_[m]
Ohh, okay. Will try to find what's wrong. The ldd book did not mention anything yet though, maybe something in subsequent chapters. Will check. Thanks!!
22:30
bluez_[m]
Good night
22:33
Bertl_oO
nn
22:59
abc
joined the channel