Mar!o
Okay thank you very much :)
Utkarsh
Why RISC? Did arm became RISC?
also for some general knowledge, ARM was previously abbreviation of Advanced RISC Machinery.
Anonymous
No offtop here
Anonymous
It's not even about optimization
Anonymous
Clang's lto has a real world impact of just 1%
Anonymous
Google is pushing this change purely because LTO is a requirement to support cfi
Anonymous
It's really just 1%
Anonymous
Verified by several kernel developers on android who've been using lto for almost 2 years now
Anonymous
Think a guy named kdrag0n did one
Anonymous
As for LTO
Anonymous
At present there are issues with thinlto and -Wl,--gc-sections breaking programs
Anonymous
x86 uses thinlto because it's too expensive to do full LTO
Anonymous
An almost stripped down android kernel needs 16-36gb to do full LTO
Anonymous
Clang's aggressive inlining during thinlto can sometimes blow the size of your kernel
Anonymous
It never did
Anonymous
Gcc building the kernel without lto is still faster than clang with lto
Anonymous
Only on x86 BTW
Anonymous
Arm64 needs a hack to boot thinlto
Anonymous
x86 is multiarch inside Linux
Anonymous
There's no arch/amd64
Anonymous
Means it includes the -64 extensions
Anonymous
Please don't nitpick stuff like "amd64 as well" we know that when we're talking about Linux x86 includes the -64 too
Anonymous
It isn't about support at all
Anonymous
Clang gives you little performance at best
Anonymous
At the end of the day GCC compiles the faster binary
Anonymous
That's because it's the only one feasible to use?
Anonymous
Unless you're telling me you can allocate 1 tb of ram to link an x86 kernel
Anonymous
Definitely not that much
Anonymous
Very hard to believe if I must say so
Anonymous
I've been doing CFI kernels for quite a while now
Anonymous
Even if I administer a blind test users will say GCC is outperforming
Anonymous
There's several other developers who've independently reproduced similar results
Anonymous
Ex: @Pappschlumpf
Anonymous
Even with LTO clang doesn't come close
Anonymous
I'm not going to go to a thread arguing about some crsm benchmark honestly
particaney 🐸🍲
Hi guys, i just had a exam and i had a program to understand. (ive already done it) but there is something buging me with fork and exec, its a small program but i dont understand why it dosnt go into a infinite loop because the exec is calling itself. Anyone mind cheking it? Thanks
Anonymous
We've all seen the horrible effects benchmarks had on real world performance. Example octane
Anonymous
Yeah I mean octane also existed a long time
particaney 🐸🍲
Anonymous
Benchmarks that live this long finally begin to show flaws
Anonymous
Paste code no screenshot
particaney 🐸🍲
Paste code no screenshot
Sorry, give me 2 min
Anonymous
That's really interesting
particaney 🐸🍲
#include <stdio.h> #include <unistd.h> #include <sys/types.h> #include <sys/wait.h> int main() { pid_t pid; pid = fork(); if(pid < 0 ){ fprintf(stderr,"fork a ecohouer\n"); return 1; } else if (pid == 0) { printf("je suis le fils %d",pid); execlp("chmod","chmod","755","/home/bagama/Documents/school/2020ete_systemdexploi/exec.c",NULL); } else { printf("je suis le parent %d\n",pid); wait(NULL); printf("lenfant a terminer\n"); execlp("/home/bagama/Documents/school/2020ete_systemdexploi/","./exec",NULL); } return 0; }
particaney 🐸🍲
I mean if if ends up by calling itself why dosnt it go into a infinite loop? And sorry some of the words are in french
Anonymous
I don't think you can call exec() on .c files
Anonymous
Eww
particaney 🐸🍲
I don't think you can call exec() on .c files
Its calling the programe with ". /exec". Also yeah the program is called exec lol
particaney 🐸🍲
Anonymous
int execlp(const char *file, const char *arg, ...);
particaney 🐸🍲
Yeah it was in the statement i had to chmod the exec.c but in the last else its calling exec on itself
Anonymous
Okay execlp("/home/whatever/.../exec", NULL);
particaney 🐸🍲
It was in my exam this morning, i had to answer to what would be the output.
particaney 🐸🍲
I was sure it was going to give me an infinity loop because the program ends up by calling itself, but i tryed and non it dosnt. Thats why i reached to you devs :)
particaney 🐸🍲
Okay execlp("/home/whatever/.../exec", NULL);
But that part dosnt work? It is not a c file its a executabl3
Anonymous
/home/whatever/whatever ./exec
Anonymous
This is how the final command looks. Think this will execute?
Anonymous
The first command is trying to execute a C file. The other is trying to execute a directory
Anonymous
Both are invalid
particaney 🐸🍲
The first one is chmoding the c file non? And the second one is only the path for the executable
Anonymous
The final command looks like "chmod chmod 755 ....."
Anonymous
Since chmod is specified twice the syntax is violated
Sourabh
+1
Anonymous
Read the code
particaney 🐸🍲
Okey thank you all for the answers. Also how would i be able to call the program itself with execlp
Anonymous
execlp("chmod","chmod","755","/home/bagama/Documents/school/2020ete_systemdexploi/exec.c",NULL);
Anonymous
That's not right
Anonymous
Regardless of how you look at it
Anonymous
You mention the file name twice?
particaney 🐸🍲
You mention the file name twice?
Its the path OR the name and it will look itself i think
particaney 🐸🍲
Guys im just trying to understand the logic :( why it dosnt go into a infinity loop.
Anonymous
Yeah thanks as if we call exec() inside the kernel
Anonymous
Very cool
particaney 🐸🍲
How would i call it without the path with execlp?