New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

this code very fast #437

Open
wants to merge 2 commits into
base: master
from

Conversation

@ahmetilgin

ahmetilgin commented Jul 17, 2017

remove empty characters

this code very fast
remove empty characters
@KernelPRBot

This comment has been minimized.

Show comment
Hide comment
@KernelPRBot

KernelPRBot Jul 17, 2017

Hi @ahmetilgin!

Thanks for your contribution to the Linux kernel!

Linux kernel development happens on mailing lists, rather than on GitHub - this GitHub repository is a read-only mirror that isn't used for accepting contributions. So that your change can become part of Linux, please email it to us as a patch.

Sending patches isn't quite as simple as sending a pull request, but fortunately it is a well documented process.

Here's what to do:

  • Format your contribution according to kernel requirements
  • Decide who to send your contribution to
  • Set up your system to send your contribution as an email
  • Send your contribution and wait for feedback

How do I format my contribution?

The Linux kernel community is notoriously picky about how contributions are formatted and sent. Fortunately, they have documented their expectations.

Firstly, all contributions need to be formatted as patches. A patch is a plain text document showing the change you want to make to the code, and documenting why it is a good idea.

You can create patches with git format-patch.

Secondly, patches need 'commit messages', which is the human-friendly documentation explaining what the change is and why it's necessary.

Thirdly, changes have some technical requirements. There is a Linux kernel coding style, and there are licensing requirements you need to comply with.

Both of these are documented in the Submitting Patches documentation that is part of the kernel.

Note that you will almost certainly have to modify your existing git commits to satisfy these requirements. Don't worry: there are many guides on the internet for doing this.

Who do I send my contribution to?

The Linux kernel is composed of a number of subsystems. These subsystems are maintained by different people, and have different mailing lists where they discuss proposed changes.

If you don't already know what subsystem your change belongs to, the get_maintainer.pl script in the kernel source can help you.

get_maintainer.pl will take the patch or patches you created in the previous step, and tell you who is responsible for them, and what mailing lists are used. You can also take a look at the MAINTAINERS file by hand.

Make sure that your list of recipients includes a mailing list. If you can't find a more specific mailing list, then LKML - the Linux Kernel Mailing List - is the place to send your patches.

It's not usually necessary to subscribe to the mailing list before you send the patches, but if you're interested in kernel development, subscribing to a subsystem mailing list is a good idea. (At this point, you probably don't need to subscribe to LKML - it is a very high traffic list with about a thousand messages per day, which is often not useful for beginners.)

How do I send my contribution?

Use git send-email, which will ensure that your patches are formatted in the standard manner. In order to use git send-email, you'll need to configure git to use your SMTP email server.

For more information about using git send-email, look at the Git documentation or type git help send-email. There are a number of useful guides and tutorials about git send-email that can be found on the internet.

How do I get help if I'm stuck?

Firstly, don't get discouraged! There are an enormous number of resources on the internet, and many kernel developers who would like to see you succeed.

Many issues - especially about how to use certain tools - can be resolved by using your favourite internet search engine.

If you can't find an answer, there are a few places you can turn:

  • Kernel Newbies - this website contains a lot of useful resources for new kernel developers.
  • If you'd like a step-by-step, challenge-based introduction to kernel development, the Eudyptula Challenge would be an excellent start.
  • The kernel documentation - see also the Documentation directory in the kernel tree.

If you get really, really stuck, you could try the owners of this bot, @daxtens and @ajdlinux. Please be aware that we do have full-time jobs, so we are almost certainly the slowest way to get answers!

I sent my patch - now what?

You wait.

You can check that your email has been received by checking the mailing list archives for the mailing list you sent your patch to. Messages may not be received instantly, so be patient. Kernel developers are generally very busy people, so it may take a few weeks before your patch is looked at.

Then, you keep waiting. Three things may happen:

  • You might get a response to your email. Often these will be comments, which may require you to make changes to your patch, or explain why your way is the best way. You should respond to these comments, and you may need to submit another revision of your patch to address the issues raised.
  • Your patch might be merged into the subsystem tree. Code that becomes part of Linux isn't merged into the main repository straight away - it first goes into the subsystem tree, which is managed by the subsystem maintainer. It is then batched up with a number of other changes sent to Linus for inclusion. (This process is described in some detail in the kernel development process guide).
  • Your patch might be ignored completely. This happens sometimes - don't take it personally. Here's what to do:
    • Wait a bit more - patches often take several weeks to get a response; more if they were sent at a busy time.
    • Kernel developers often silently ignore patches that break the rules. Check for obvious violations of the the Submitting Patches guidelines, the style guidelines, and any other documentation you can find about your subsystem. Check that you're sending your patch to the right place.
    • Try again later. When you resend it, don't add angry commentary, as that will get your patch ignored. It might also get you silently blacklisted.

Further information

Happy hacking!

This message was posted by a bot - if you have any questions or suggestions, please talk to my owners, @ajdlinux and @daxtens, or raise an issue at https://github.com/ajdlinux/KernelPRBot.

KernelPRBot commented Jul 17, 2017

Hi @ahmetilgin!

Thanks for your contribution to the Linux kernel!

Linux kernel development happens on mailing lists, rather than on GitHub - this GitHub repository is a read-only mirror that isn't used for accepting contributions. So that your change can become part of Linux, please email it to us as a patch.

Sending patches isn't quite as simple as sending a pull request, but fortunately it is a well documented process.

Here's what to do:

  • Format your contribution according to kernel requirements
  • Decide who to send your contribution to
  • Set up your system to send your contribution as an email
  • Send your contribution and wait for feedback

How do I format my contribution?

The Linux kernel community is notoriously picky about how contributions are formatted and sent. Fortunately, they have documented their expectations.

Firstly, all contributions need to be formatted as patches. A patch is a plain text document showing the change you want to make to the code, and documenting why it is a good idea.

You can create patches with git format-patch.

Secondly, patches need 'commit messages', which is the human-friendly documentation explaining what the change is and why it's necessary.

Thirdly, changes have some technical requirements. There is a Linux kernel coding style, and there are licensing requirements you need to comply with.

Both of these are documented in the Submitting Patches documentation that is part of the kernel.

Note that you will almost certainly have to modify your existing git commits to satisfy these requirements. Don't worry: there are many guides on the internet for doing this.

Who do I send my contribution to?

The Linux kernel is composed of a number of subsystems. These subsystems are maintained by different people, and have different mailing lists where they discuss proposed changes.

If you don't already know what subsystem your change belongs to, the get_maintainer.pl script in the kernel source can help you.

get_maintainer.pl will take the patch or patches you created in the previous step, and tell you who is responsible for them, and what mailing lists are used. You can also take a look at the MAINTAINERS file by hand.

Make sure that your list of recipients includes a mailing list. If you can't find a more specific mailing list, then LKML - the Linux Kernel Mailing List - is the place to send your patches.

It's not usually necessary to subscribe to the mailing list before you send the patches, but if you're interested in kernel development, subscribing to a subsystem mailing list is a good idea. (At this point, you probably don't need to subscribe to LKML - it is a very high traffic list with about a thousand messages per day, which is often not useful for beginners.)

How do I send my contribution?

Use git send-email, which will ensure that your patches are formatted in the standard manner. In order to use git send-email, you'll need to configure git to use your SMTP email server.

For more information about using git send-email, look at the Git documentation or type git help send-email. There are a number of useful guides and tutorials about git send-email that can be found on the internet.

How do I get help if I'm stuck?

Firstly, don't get discouraged! There are an enormous number of resources on the internet, and many kernel developers who would like to see you succeed.

Many issues - especially about how to use certain tools - can be resolved by using your favourite internet search engine.

If you can't find an answer, there are a few places you can turn:

  • Kernel Newbies - this website contains a lot of useful resources for new kernel developers.
  • If you'd like a step-by-step, challenge-based introduction to kernel development, the Eudyptula Challenge would be an excellent start.
  • The kernel documentation - see also the Documentation directory in the kernel tree.

If you get really, really stuck, you could try the owners of this bot, @daxtens and @ajdlinux. Please be aware that we do have full-time jobs, so we are almost certainly the slowest way to get answers!

I sent my patch - now what?

You wait.

You can check that your email has been received by checking the mailing list archives for the mailing list you sent your patch to. Messages may not be received instantly, so be patient. Kernel developers are generally very busy people, so it may take a few weeks before your patch is looked at.

Then, you keep waiting. Three things may happen:

  • You might get a response to your email. Often these will be comments, which may require you to make changes to your patch, or explain why your way is the best way. You should respond to these comments, and you may need to submit another revision of your patch to address the issues raised.
  • Your patch might be merged into the subsystem tree. Code that becomes part of Linux isn't merged into the main repository straight away - it first goes into the subsystem tree, which is managed by the subsystem maintainer. It is then batched up with a number of other changes sent to Linus for inclusion. (This process is described in some detail in the kernel development process guide).
  • Your patch might be ignored completely. This happens sometimes - don't take it personally. Here's what to do:
    • Wait a bit more - patches often take several weeks to get a response; more if they were sent at a busy time.
    • Kernel developers often silently ignore patches that break the rules. Check for obvious violations of the the Submitting Patches guidelines, the style guidelines, and any other documentation you can find about your subsystem. Check that you're sending your patch to the right place.
    • Try again later. When you resend it, don't add angry commentary, as that will get your patch ignored. It might also get you silently blacklisted.

Further information

Happy hacking!

This message was posted by a bot - if you have any questions or suggestions, please talk to my owners, @ajdlinux and @daxtens, or raise an issue at https://github.com/ajdlinux/KernelPRBot.

@thibmo

This comment has been minimized.

Show comment
Hide comment
@thibmo

thibmo Jul 18, 2017

Also, hope you are kidding with this one.. 😅

thibmo commented Jul 18, 2017

Also, hope you are kidding with this one.. 😅

@kylelamse

This comment has been minimized.

Show comment
Hide comment
@kylelamse

kylelamse Jul 19, 2017

i think this should get merged in

kylelamse commented Jul 19, 2017

i think this should get merged in

@kylelamse

This comment has been minimized.

Show comment
Hide comment
@kylelamse

kylelamse Jul 19, 2017

@ItzLevvie Don't you think it's easier to read? It's now only one line of code!

kylelamse commented Jul 19, 2017

@ItzLevvie Don't you think it's easier to read? It's now only one line of code!

@Blaze349

This comment has been minimized.

Show comment
Hide comment
@Blaze349

Blaze349 Jul 22, 2017

@ahmetilgin The kernel is written in C. C isn't an interpreted language like JS. Instead, it is compiled. Empty characters and spaces don't affect execution speed.

That being said: It looks much more readable than the current code.

Blaze349 commented Jul 22, 2017

@ahmetilgin The kernel is written in C. C isn't an interpreted language like JS. Instead, it is compiled. Empty characters and spaces don't affect execution speed.

That being said: It looks much more readable than the current code.

@dadur604

Do you need help?

@Dot-Rar

This comment has been minimized.

Show comment
Hide comment
@Dot-Rar

Dot-Rar Jul 22, 2017

Yes is dank agree

Dot-Rar commented Jul 22, 2017

Yes is dank agree

@Jonathan50

This comment has been minimized.

Show comment
Hide comment
@Jonathan50

Jonathan50 Jul 23, 2017

@Blaze349 The Linux kernel takes soooooo long to compile. This will increase compilation speed by removing all the unnecessary whitespace the compiler has to skip over.

Jonathan50 commented Jul 23, 2017

@Blaze349 The Linux kernel takes soooooo long to compile. This will increase compilation speed by removing all the unnecessary whitespace the compiler has to skip over.

@Jonathan50

Jonathan50 approved these changes Jul 23, 2017 edited

Everybody loves it 100% (Ok I'm sorry for saying that)

@Blaze349

@Jonathan50 is right. This code definitely very fast. But it can be improved. There is an empty line between the includes and code. Please fix

@Blaze349

Perfect. Almost. All the comments should be on one line to increase speed.

@7bf70ec5

This comment has been minimized.

Show comment
Hide comment
@7bf70ec5

7bf70ec5 Jul 23, 2017

@kylelamse Are you joking? Minifying a code doesn't make it 'readable'... In Javascript it's used to reduce bandwidth between server & the user, reduce page execution time & reduce file size

@ahmetilgin don't bother wasting your time on the PR. This won't improve anything except for decreasing file size. Also, there are a lot of comments in the 'minified code' that you've not bothered to remove. But again don't bother about it.

@Jonathan50 If a Linux kernel takes 'soo long to compile' then you need to invest in a better CPU like Xeon. Compiling Android or a kernel requires you to have more cores to speed up the compiling process. If you have less cores then it will take more time to compile.

No one loves the code unless it's a sarcasm

@ItzLevvie I do have to agree, this won't get accepted anyways because of contributing guidelines. So you don't have to worry about it.

@dadur604 no he doesn't need any help.. he's just trying to make the community laugh by committing garbage code.

@Blaze349 C is already fast enough... there's no need to do all the stuff the compiler will do it for you automatically or you can add some flags to optimise it.

@thibmo I believe he's trying to make the community laugh. If it's serious then I would obliviously laugh even more.

7bf70ec5 commented Jul 23, 2017

@kylelamse Are you joking? Minifying a code doesn't make it 'readable'... In Javascript it's used to reduce bandwidth between server & the user, reduce page execution time & reduce file size

@ahmetilgin don't bother wasting your time on the PR. This won't improve anything except for decreasing file size. Also, there are a lot of comments in the 'minified code' that you've not bothered to remove. But again don't bother about it.

@Jonathan50 If a Linux kernel takes 'soo long to compile' then you need to invest in a better CPU like Xeon. Compiling Android or a kernel requires you to have more cores to speed up the compiling process. If you have less cores then it will take more time to compile.

No one loves the code unless it's a sarcasm

@ItzLevvie I do have to agree, this won't get accepted anyways because of contributing guidelines. So you don't have to worry about it.

@dadur604 no he doesn't need any help.. he's just trying to make the community laugh by committing garbage code.

@Blaze349 C is already fast enough... there's no need to do all the stuff the compiler will do it for you automatically or you can add some flags to optimise it.

@thibmo I believe he's trying to make the community laugh. If it's serious then I would obliviously laugh even more.

@Blaze349

This comment has been minimized.

Show comment
Hide comment
@Blaze349

Blaze349 Jul 23, 2017

@7bf70ec5 Linus Torvalds uses a Macbook Air so...yeah. Also, the kernel isn't written in C# 🤣 . It's written in C and a little Assembly.

Blaze349 commented Jul 23, 2017

@7bf70ec5 Linus Torvalds uses a Macbook Air so...yeah. Also, the kernel isn't written in C# 🤣 . It's written in C and a little Assembly.

@kylelamse

This comment has been minimized.

Show comment
Hide comment
@kylelamse

kylelamse Jul 24, 2017

@dizaztor Should be easier. You no longer have to scroll through thousands of lines of code. Having it on one line just makes sense.

kylelamse commented Jul 24, 2017

@dizaztor Should be easier. You no longer have to scroll through thousands of lines of code. Having it on one line just makes sense.

@pichardoJ

This comment has been minimized.

Show comment
Hide comment
@pichardoJ

pichardoJ Jul 24, 2017

Wow, now that's some beautiful code aesthetics. Congrats

pichardoJ commented Jul 24, 2017

Wow, now that's some beautiful code aesthetics. Congrats

@Dot-Rar

This comment has been minimized.

Show comment
Hide comment
@Dot-Rar

Dot-Rar Jul 24, 2017

@dizaztor why maintain when you can not maintain

Dot-Rar commented Jul 24, 2017

@dizaztor why maintain when you can not maintain

@iamsubhranil

This comment has been minimized.

Show comment
Hide comment
@iamsubhranil

iamsubhranil Jul 25, 2017

Are you seriously kidding me?😂

iamsubhranil commented Jul 25, 2017

Are you seriously kidding me?😂

@ghost

This comment has been minimized.

Show comment
Hide comment
@ghost

ghost Jul 25, 2017

yes this is beautiful 10/10

ghost commented Jul 25, 2017

yes this is beautiful 10/10

@kylelamse

This comment has been minimized.

Show comment
Hide comment
@kylelamse

kylelamse Jul 25, 2017

No one loves the code unless it's a sarcasm

@7bf70ec5

kylelamse commented Jul 25, 2017

No one loves the code unless it's a sarcasm

@7bf70ec5

@dschwartz783

This comment has been minimized.

Show comment
Hide comment
@dschwartz783

dschwartz783 Jul 26, 2017

I've never laughed at code so hard in my life. Thanks for that! Definitely a much needed contribution. Linus has nothing on this guy.

Perhaps this should go into a new Linux for Comedy branch.

dschwartz783 commented Jul 26, 2017

I've never laughed at code so hard in my life. Thanks for that! Definitely a much needed contribution. Linus has nothing on this guy.

Perhaps this should go into a new Linux for Comedy branch.

@PeterAlfonsLoch

This comment has been minimized.

Show comment
Hide comment
@PeterAlfonsLoch

PeterAlfonsLoch Jul 26, 2017

Thats just, thats's hmm what is it?..... It's ART :D Put it in a Museum.

PeterAlfonsLoch commented Jul 26, 2017

Thats just, thats's hmm what is it?..... It's ART :D Put it in a Museum.

@iamunknown2

This comment has been minimized.

Show comment
Hide comment
@iamunknown2

iamunknown2 Jul 26, 2017

10/10 best commit ever made (other than adding rm -rf / to ~/.bashrc)

iamunknown2 commented Jul 26, 2017

10/10 best commit ever made (other than adding rm -rf / to ~/.bashrc)

@hanss314

This comment has been minimized.

Show comment
Hide comment
@hanss314

hanss314 Jul 27, 2017

This made me laugh so hard. I want Linus's reaction on this now.

hanss314 commented Jul 27, 2017

This made me laugh so hard. I want Linus's reaction on this now.

@vusonhust

This comment has been minimized.

Show comment
Hide comment
@vusonhust

vusonhust Jul 27, 2017

Linus will say "f**k you" like when he told Nvidia ✌️

vusonhust commented Jul 27, 2017

Linus will say "f**k you" like when he told Nvidia ✌️

@numbqq

This comment has been minimized.

Show comment
Hide comment
@numbqq

numbqq Jul 28, 2017

Good job!

numbqq commented Jul 28, 2017

Good job!

@ryoung9550

Needs to be structured a bit better.

@m0x23

This comment has been minimized.

Show comment
Hide comment
@m0x23

m0x23 commented Jul 30, 2017

🍌

@tilda

tilda approved these changes Aug 2, 2017

+1 Good commit

I'd really like to see @torvalds reacting to this 🤣

@lgyjg

This comment has been minimized.

Show comment
Hide comment
@lgyjg

lgyjg Aug 2, 2017

Are you sure this can be compiled? Maybe this is a joke.

lgyjg commented Aug 2, 2017

Are you sure this can be compiled? Maybe this is a joke.

@nhooyr

This comment has been minimized.

Show comment
Hide comment
@nhooyr

nhooyr Aug 3, 2017

There are still too many lines of code. We should remove the comment at the top of the file. It will help the code compile even faster and we'll have less lines to scroll through.

nhooyr commented Aug 3, 2017

There are still too many lines of code. We should remove the comment at the top of the file. It will help the code compile even faster and we'll have less lines to scroll through.

@SharpOB

This comment has been minimized.

Show comment
Hide comment
@SharpOB

SharpOB Aug 3, 2017

code is ## sonic fast :)) 👍 💯

SharpOB commented Aug 3, 2017

code is ## sonic fast :)) 👍 💯

@vijunag

This comment has been minimized.

Show comment
Hide comment
@vijunag

vijunag Aug 4, 2017

This should be a GCC pull request. GCC must support partial prefix match of keywords for fast processing of C code. For eg: GCC should match the tokens #inc as #include et al. This will further reduce the compilation time and C file size

vijunag commented Aug 4, 2017

This should be a GCC pull request. GCC must support partial prefix match of keywords for fast processing of C code. For eg: GCC should match the tokens #inc as #include et al. This will further reduce the compilation time and C file size

@TheBITLINK

This comment has been minimized.

Show comment
Hide comment
@TheBITLINK

TheBITLINK Aug 4, 2017

You can make it even faster by commenting out the last line.

It slightly alters the behavior, but it'll run almost instantly.

TheBITLINK commented Aug 4, 2017

You can make it even faster by commenting out the last line.

It slightly alters the behavior, but it'll run almost instantly.

@ooploopl-

This comment has been minimized.

Show comment
Hide comment
@ooploopl-

ooploopl- Aug 5, 2017

@ahmetilgin You can make your country develop faster by removing yourself.

ooploopl- commented Aug 5, 2017

@ahmetilgin You can make your country develop faster by removing yourself.

@Salakar

This comment has been minimized.

Show comment
Hide comment
@Salakar

Salakar Aug 5, 2017

10/10 would compile 🚫

Salakar commented Aug 5, 2017

10/10 would compile 🚫

@windlessStorm

This comment has been minimized.

Show comment
Hide comment
@windlessStorm

windlessStorm Aug 5, 2017

windlessStorm commented Aug 5, 2017

@Blaze349

This comment has been minimized.

Show comment
Hide comment
@Blaze349

Blaze349 Aug 6, 2017

You can improve the speed of the preprocessor by removing the includes.

Blaze349 commented Aug 6, 2017

You can improve the speed of the preprocessor by removing the includes.

@JoshuaRLi

This comment has been minimized.

Show comment
Hide comment
@JoshuaRLi

JoshuaRLi commented Aug 7, 2017

top kek

@toloveru

This comment has been minimized.

Show comment
Hide comment
@toloveru

toloveru Nov 22, 2017

Total masterpiece! I'd say that it can skip all unit tests, bypass the subsystem tree and instead be merged directly into master 👌

toloveru commented Nov 22, 2017

Total masterpiece! I'd say that it can skip all unit tests, bypass the subsystem tree and instead be merged directly into master 👌

@agungyuliaji

Awesome!

@lby1992

This comment has been minimized.

Show comment
Hide comment
@lby1992

lby1992 Nov 25, 2017

It looks so cool!

lby1992 commented Nov 25, 2017

It looks so cool!

@cumakeen

This comment has been minimized.

Show comment
Hide comment
@cumakeen

cumakeen commented Dec 2, 2017

#486 is faster

@Serkan-devel

Rewrite in Rust

@concerttttt

This comment has been minimized.

Show comment
Hide comment
@concerttttt

concerttttt Jan 3, 2018

知乎观光团! 😄 👏 👏

concerttttt commented Jan 3, 2018

知乎观光团! 😄 👏 👏

@dodona2

This comment has been minimized.

Show comment
Hide comment
@dodona2

dodona2 Jan 3, 2018

Rewrite in Rust<
Remove these nonsense statements.

dodona2 commented Jan 3, 2018

Rewrite in Rust<
Remove these nonsense statements.

@shreve

This comment has been minimized.

Show comment
Hide comment
@shreve

shreve Jan 24, 2018

Has anyone done benchmarks on this? Seems much faster, just want to know how much.

shreve commented Jan 24, 2018

Has anyone done benchmarks on this? Seems much faster, just want to know how much.

@aixasz

aixasz approved these changes May 16, 2018

@Souhardya

This comment has been minimized.

Show comment
Hide comment
@Souhardya

Souhardya May 18, 2018

We live in a society

Souhardya commented May 18, 2018

We live in a society

@kevingil

This comment has been minimized.

Show comment
Hide comment
@kevingil

kevingil May 18, 2018

can confirm very fast 👌

kevingil commented May 18, 2018

can confirm very fast 👌

@Incognito

This comment has been minimized.

Show comment
Hide comment
@Incognito

Incognito May 18, 2018

please resolve merge conflict.

Incognito commented May 18, 2018

please resolve merge conflict.

@codenoid

This comment has been minimized.

Show comment
Hide comment
@codenoid

codenoid May 18, 2018

@kevingil why you use non-transparent glass :/

codenoid commented May 18, 2018

@kevingil why you use non-transparent glass :/

@arnavb

This comment has been minimized.

Show comment
Hide comment
@arnavb

arnavb May 18, 2018

Anyone notice the Github homepage update? Kinda weird.

arnavb commented May 18, 2018

Anyone notice the Github homepage update? Kinda weird.

@codenoid

This comment has been minimized.

Show comment
Hide comment
@codenoid

codenoid May 18, 2018

hi all, fuck u for non important notification

codenoid commented May 18, 2018

hi all, fuck u for non important notification

@Serkan-devel

This comment has been minimized.

Show comment
Hide comment
@Serkan-devel

Serkan-devel commented May 18, 2018

@codenoid no u

@Audition-CSBlock

This comment has been minimized.

Show comment
Hide comment
@Audition-CSBlock

Audition-CSBlock commented May 18, 2018

@Serkan-devel Nobelium Uranium

@codenoid

This comment has been minimized.

Show comment
Hide comment
@codenoid

codenoid May 18, 2018

I think I have unsubscribe this PR, but why his notifications still appear
@OpakAlex
@eamanu eamanu
@dadur604 dadur604
@Wittmaxi Wittmaxi
@HkgStudio HkgStudio

@cthpw103 cthpw103

@arnavb arnavb

@SirYummy SirYummy

@goatslacker goatslacker

@lawonga lawonga

@Blaze349 Blaze349

@Serkan-devel Serkan-devel

@sovietspaceship sovietspaceship

@ryoung9550 ryoung9550

@revmischa revmischa

@devunt devunt

@Xe Xe

@wrmsr wrmsr

@aisk aisk

@iqbalhasnan iqbalhasnan

@wongmjane wongmjane

@fqlx fqlx

@agungyuliaji
@aixasz
@CodinCat
@francisfsjiang
@blackhole12
@sendz
@drewcassidy
@dschwartz783
@adamyi
@codebam
@napstr
@ChrisYammine
@vusonhust
@iagoborges
@tilda
@antonpaquin
@Raymonf
@banjoman
@rvolosatovs
@MSF-Jarvis
@Jonathan50
@C0D3D3V
@eduard-t
@TishDev

I think I have unsubscribe this PR, but why his notifications still appear

codenoid commented May 18, 2018

I think I have unsubscribe this PR, but why his notifications still appear
@OpakAlex
@eamanu eamanu
@dadur604 dadur604
@Wittmaxi Wittmaxi
@HkgStudio HkgStudio

@cthpw103 cthpw103

@arnavb arnavb

@SirYummy SirYummy

@goatslacker goatslacker

@lawonga lawonga

@Blaze349 Blaze349

@Serkan-devel Serkan-devel

@sovietspaceship sovietspaceship

@ryoung9550 ryoung9550

@revmischa revmischa

@devunt devunt

@Xe Xe

@wrmsr wrmsr

@aisk aisk

@iqbalhasnan iqbalhasnan

@wongmjane wongmjane

@fqlx fqlx

@agungyuliaji
@aixasz
@CodinCat
@francisfsjiang
@blackhole12
@sendz
@drewcassidy
@dschwartz783
@adamyi
@codebam
@napstr
@ChrisYammine
@vusonhust
@iagoborges
@tilda
@antonpaquin
@Raymonf
@banjoman
@rvolosatovs
@MSF-Jarvis
@Jonathan50
@C0D3D3V
@eduard-t
@TishDev

I think I have unsubscribe this PR, but why his notifications still appear

@dschwartz783

This comment has been minimized.

Show comment
Hide comment
@dschwartz783

dschwartz783 May 18, 2018

Because someone tagged you. And now you tagged me and re-subscribed me. Do not do so again please.
@codenoid

dschwartz783 commented May 18, 2018

Because someone tagged you. And now you tagged me and re-subscribed me. Do not do so again please.
@codenoid

@revmischa

This comment has been minimized.

Show comment
Hide comment
@revmischa

revmischa May 18, 2018

@dschwartz783 try clicking the "mute the thread" link in the email?

revmischa commented May 18, 2018

@dschwartz783 try clicking the "mute the thread" link in the email?

@dschwartz783

This comment has been minimized.

Show comment
Hide comment
@dschwartz783

dschwartz783 May 18, 2018

@revmischa I did, and it unsubscribed me. Now that you tagged me again, it has resubscribed me. I'm going to start blocking people if you don't quit it. I don't want to be in this PR anymore. Thanks.

dschwartz783 commented May 18, 2018

@revmischa I did, and it unsubscribed me. Now that you tagged me again, it has resubscribed me. I'm going to start blocking people if you don't quit it. I don't want to be in this PR anymore. Thanks.

@kaisersGa

This comment has been minimized.

Show comment
Hide comment
@kaisersGa

kaisersGa May 18, 2018

kaisersGa commented May 18, 2018

@tilda

This comment has been minimized.

Show comment
Hide comment
@tilda

tilda May 19, 2018

Alright, yeah, these notifications are getting a bit annoying. :p

tilda commented May 19, 2018

Alright, yeah, these notifications are getting a bit annoying. :p

@codenoid

This comment has been minimized.

Show comment
Hide comment
@codenoid

codenoid May 19, 2018

blame github

codenoid commented May 19, 2018

blame github

@Serkan-devel

This comment has been minimized.

Show comment
Hide comment
@Serkan-devel

Serkan-devel May 19, 2018

Seems a little like a @everyone on Discord

Serkan-devel commented May 19, 2018

Seems a little like a @everyone on Discord

@jmg87

This comment has been minimized.

Show comment
Hide comment
@jmg87

jmg87 commented May 19, 2018

LGTM

@biswasab

This comment has been minimized.

Show comment
Hide comment
@biswasab

biswasab Jun 2, 2018

Congratulations. Since you have deleted the entire init process, With this patch, PC will get very very fast, so fast that the cpu will run at 3.84 stallmanherz(1 stallmanhertz=1 billion petahertz). The monitor fps will ramp up from, 60 fps to 10000fps. It would be so fast that nothing can be seen with naked eyes. Just a black screen with a "blinking cursor"! 🥇 🤑

biswasab commented Jun 2, 2018

Congratulations. Since you have deleted the entire init process, With this patch, PC will get very very fast, so fast that the cpu will run at 3.84 stallmanherz(1 stallmanhertz=1 billion petahertz). The monitor fps will ramp up from, 60 fps to 10000fps. It would be so fast that nothing can be seen with naked eyes. Just a black screen with a "blinking cursor"! 🥇 🤑

@adamyi

This comment has been minimized.

Show comment
Hide comment
@adamyi

adamyi Jun 4, 2018

Please don't mention me since it subscribes me again to this thread and it's really annoying. Thanks!

adamyi commented Jun 4, 2018

Please don't mention me since it subscribes me again to this thread and it's really annoying. Thanks!

integrity_load_keys();
load_default_modules();
}
staticintkernel_init(void*);externvoidinit_IRQ(void);externvoidfork_init(void);externvoidradix_tree_init(void);/**Debughelper:viathisflagweknowthatwearein'earlybootupcode'*whereonlythebootprocessorisrunningwithIRQdisabled.Thismeans*twothings-IRQmustnotbeenabledbeforetheflagisclearedandsome*operationswhicharenotallowedwithIRQdisabledareallowedwhilethe*flagisset.*/boolearly_boot_irqs_disabled__read_mostly;enumsystem_statessystem_state__read_mostly;EXPORT_SYMBOL(system_state);/**Bootcommand-linearguments*/#defineMAX_INIT_ARGSCONFIG_INIT_ENV_ARG_LIMIT#defineMAX_INIT_ENVSCONFIG_INIT_ENV_ARG_LIMITexternvoidtime_init(void);/*DefaultlatetimeinitisNULL.archscanoverridethislater.*/void(*__initdatalate_time_init)(void);/*Untouchedcommandlinesavedbyarch-specificcode.*/char__initdataboot_command_line[COMMAND_LINE_SIZE];/*Untouchedsavedcommandline(eg.for/proc)*/char*saved_command_line;/*Commandlineforparameterparsing*/staticchar*static_command_line;/*Commandlineforper-initcallparameterparsing*/staticchar*initcall_command_line;staticchar*execute_command;staticchar*ramdisk_execute_command;/**Usedtogeneratewarningsifstatic_keymanipulationfunctionsareused*beforejump_label_initiscalled.*/boolstatic_key_initialized__read_mostly;EXPORT_SYMBOL_GPL(static_key_initialized);/**Ifset,thisisanindicationtothedriversthatresettheunderlying*devicebeforegoingaheadwiththeinitializationotherwisedrivermight*relyontheBIOSandskiptheresetoperation.**Thisisusefulifkernelisbootinginanunreliableenvironment.*Forex.kdumpsituationwherepreviouskernelhascrashed,BIOShasbeen*skippedanddeviceswillbeinunknownstate.*/unsignedintreset_devices;EXPORT_SYMBOL(reset_devices);staticint__initset_reset_devices(char*str){reset_devices=1;return1;}__setup("reset_devices",set_reset_devices);staticconstchar*argv_init[MAX_INIT_ARGS+2]={"init",NULL,};constchar*envp_init[MAX_INIT_ENVS+2]={"HOME=/","TERM=linux",NULL,};staticconstchar*panic_later,*panic_param;externconststructobs_kernel_param__setup_start[],__setup_end[];staticbool__initobsolete_checksetup(char*line){conststructobs_kernel_param*p;boolhad_early_param=false;p=__setup_start;do{intn=strlen(p->str);if(parameqn(line,p->str,n)){if(p->early){/*Alreadydoneinparse_early_param?*(Needsexactmatchonparampart).*Keepiterating,aswecanhaveearly*paramsand__setupsofsamenames8(*/if(line[n]=='\0'||line[n]=='=')had_early_param=true;}elseif(!p->setup_func){pr_warn("Parameter%sisobsolete,ignored\n",p->str);returntrue;}elseif(p->setup_func(line+n))returntrue;}p++;}while(p<__setup_end);returnhad_early_param;}/**Thisshouldbeapprox2Bo*oMipstostart(noteinitialshift),andwill*stillworkevenifinitiallytoolarge,itwilljusttakeslightlylonger*/unsignedlongloops_per_jiffy=(1<<12);EXPORT_SYMBOL(loops_per_jiffy);staticint__initdebug_kernel(char*str){console_loglevel=CONSOLE_LOGLEVEL_DEBUG;return0;}staticint__initquiet_kernel(char*str){console_loglevel=CONSOLE_LOGLEVEL_QUIET;return0;}early_param("debug",debug_kernel);early_param("quiet",quiet_kernel);staticint__initloglevel(char*str){intnewlevel;/**Onlyupdateloglevelvaluewhenacorrectsettingwaspassed,*topreventblindcrashes(whenloglevelbeingsetto0)that*arequitehardtodebug*/if(get_option(&str,&newlevel)){console_loglevel=newlevel;return0;}return-EINVAL;}early_param("loglevel",loglevel);/*ChangeNULtermbackto"=",tomake"param"thewholestring.*/staticint__initrepair_env_string(char*param,char*val,constchar*unused,void*arg){if(val){/*param=valorparam="val"?*/if(val==param+strlen(param)+1)val[-1]='=';elseif(val==param+strlen(param)+2){val[-2]='=';memmove(val-1,val,strlen(val)+1);val--;}elseBUG();}return0;}/*Anythingafter--getshandedstraighttoinit.*/staticint__initset_init_arg(char*param,char*val,constchar*unused,void*arg){unsignedinti;if(panic_later)return0;repair_env_string(param,val,unused,NULL);for(i=0;argv_init[i];i++){if(i==MAX_INIT_ARGS){panic_later="init";panic_param=param;return0;}}argv_init[i]=param;return0;}/**Unknownbootoptionsgethandedtoinit,unlesstheylooklike*unusedparameters(modprobewillfindthemin/proc/cmdline).*/staticint__initunknown_bootoption(char*param,char*val,constchar*unused,void*arg){repair_env_string(param,val,unused,NULL);/*Handleobsolete-styleparameters*/if(obsolete_checksetup(param))return0;/*Unusedmoduleparameter.*/if(strchr(param,'.')&&(!val||strchr(param,'.')<val))return0;if(panic_later)return0;if(val){/*Environmentoption*/unsignedinti;for(i=0;envp_init[i];i++){if(i==MAX_INIT_ENVS){panic_later="env";panic_param=param;}if(!strncmp(param,envp_init[i],val-param))break;}envp_init[i]=param;}else{/*Commandlineoption*/unsignedinti;for(i=0;argv_init[i];i++){if(i==MAX_INIT_ARGS){panic_later="init";panic_param=param;}}argv_init[i]=param;}return0;}staticint__initinit_setup(char*str){unsignedinti;execute_command=str;/**IncaseLILOisgoingtobootuswithdefaultcommandline,*itprepends"auto"beforethewholecmdlinewhichmakes*theshellthinkitshouldexecuteascriptwithsuchname.*Soweignoreallargumentsentered_before_init=...[MJ]*/for(i=1;i<MAX_INIT_ARGS;i++)argv_init[i]=NULL;return1;}__setup("init=",init_setup);staticint__initrdinit_setup(char*str){unsignedinti;ramdisk_execute_command=str;/*See"auto"commentininit_setup*/for(i=1;i<MAX_INIT_ARGS;i++)argv_init[i]=NULL;return1;}__setup("rdinit=",rdinit_setup);#ifndefCONFIG_SMPstaticconstunsignedintsetup_max_cpus=NR_CPUS;staticinlinevoidsetup_nr_cpu_ids(void){}staticinlinevoidsmp_prepare_cpus(unsignedintmaxcpus){}#endif/**Weneedtostoretheuntouchedcommandlineforfuturereference.*Wealsoneedtostorethetouchedcommandlinesincetheparameter*parsingisperformedinplace,andweshouldallowacomponentto*storereferenceofname/valueforfuturereference.*/staticvoid__initsetup_command_line(char*command_line){saved_command_line=memblock_virt_alloc(strlen(boot_command_line)+1,0);initcall_command_line=memblock_virt_alloc(strlen(boot_command_line)+1,0);static_command_line=memblock_virt_alloc(strlen(command_line)+1,0);strcpy(saved_command_line,boot_command_line);strcpy(static_command_line,command_line);}/**Weneedtofinalizeinanon-__initfunctionorelseraceconditions*betweentherootthreadandtheinitthreadmaycausestart_kernelto*bereapedbyfree_initmembeforetherootthreadhasproceededto*cpu_idle.**gcc-3.4accidentallyinlinesthisfunction,sousenoinline.*/static__initdataDECLARE_COMPLETION(kthreadd_done);staticnoinlinevoid__refrest_init(void){structtask_struct*tsk;intpid;rcu_scheduler_starting();/**Weneedtospawninitfirstsothatitobtainspid1,however*theinittaskwillendupwantingtocreatekthreads,which,if*wescheduleitbeforewecreatekthreadd,willOOPS.*/pid=kernel_thread(kernel_init,NULL,CLONE_FS);/**PininitonthebootCPU.Taskmigrationisnotproperlyworking*untilsched_init_smp()hasbeenrun.Itwillsettheallowed*CPUsforinittothenonisolatedCPUs.*/rcu_read_lock();tsk=find_task_by_pid_ns(pid,&init_pid_ns);set_cpus_allowed_ptr(tsk,cpumask_of(smp_processor_id()));rcu_read_unlock();numa_default_policy();pid=kernel_thread(kthreadd,NULL,CLONE_FS|CLONE_FILES);rcu_read_lock();kthreadd_task=find_task_by_pid_ns(pid,&init_pid_ns);rcu_read_unlock();/**Enablemight_sleep()andsmp_processor_id()checks.*TheycannotbeenabledearlierbecausewithCONFIG_PRREMPT=y*kernel_thread()wouldtriggermight_sleep()splats.With*CONFIG_PREEMPT_VOLUNTARY=ytheinittaskmighthavescheduled*already,butit'sstuckonthekthreadd_donecompletion.*/system_state=SYSTEM_SCHEDULING;complete(&kthreadd_done);/**Thebootidlethreadmustexecuteschedule()*atleastoncetogetthingsmoving:*/init_idle_bootup_task(current);schedule_preempt_disabled();/*Callintocpu_idlewithpreemptdisabled*/cpu_startup_entry(CPUHP_ONLINE);}/*Checkforearlyparams.*/staticint__initdo_early_param(char*param,char*val,constchar*unused,void*arg){conststructobs_kernel_param*p;for(p=__setup_start;p<__setup_end;p++){if((p->early&&parameq(param,p->str))||(strcmp(param,"console")==0&&strcmp(p->str,"earlycon")==0)){if(p->setup_func(val)!=0)pr_warn("Malformedearlyoption'%s'\n",param);}}/*Weaccepteverythingatthisstage.*/return0;}void__initparse_early_options(char*cmdline){parse_args("earlyoptions",cmdline,NULL,0,0,0,NULL,do_early_param);}/*Archcodecallsthisearlyon,orifnot,justbeforeotherparsing.*/void__initparse_early_param(void){staticintdone__initdata;staticchartmp_cmdline[COMMAND_LINE_SIZE]__initdata;if(done)return;/*Allfallthroughtodo_early_param.*/strlcpy(tmp_cmdline,boot_command_line,COMMAND_LINE_SIZE);parse_early_options(tmp_cmdline);done=1;}void__init__weakarch_post_acpi_subsys_init(void){}void__init__weaksmp_setup_processor_id(void){}#ifTHREAD_SIZE>=PAGE_SIZEvoid__init__weakthread_stack_cache_init(void){}#endif/**Setupkernelmemoryallocators*/staticvoid__initmm_init(void){/**page_extrequirescontiguouspages,*biggerthanMAX_ORDERunlessSPARSEMEM.*/page_ext_init_flatmem();mem_init();kmem_cache_init();percpu_init_late();pgtable_init();vmalloc_init();ioremap_huge_init();}asmlinkage__visiblevoid__initstart_kernel(void){char*command_line;char*after_dashes;set_task_stack_end_magic(&init_task);smp_setup_processor_id();debug_objects_early_init();/**SetuptheinitialcanaryASAP:*/add_latent_entropy();boot_init_stack_canary();cgroup_init_early();local_irq_disable();early_boot_irqs_disabled=true;/**Interruptsarestilldisabled.Donecessarysetups,then*enablethem.*/boot_cpu_init();page_address_init();pr_notice("%s",linux_banner);setup_arch(&command_line);mm_init_cpumask(&init_mm);setup_command_line(command_line);setup_nr_cpu_ids();setup_per_cpu_areas();boot_cpu_state_init();smp_prepare_boot_cpu();/*arch-specificboot-cpuhooks*/build_all_zonelists(NULL,NULL);page_alloc_init();pr_notice("Kernelcommandline:%s\n",boot_command_line);parse_early_param();after_dashes=parse_args("Bootingkernel",static_command_line,__start___param,__stop___param-__start___param,-1,-1,NULL,&unknown_bootoption);if(!IS_ERR_OR_NULL(after_dashes))parse_args("Settinginitargs",after_dashes,NULL,0,-1,-1,NULL,set_init_arg);jump_label_init();/**Theseuselargebootmemallocationsandmustprecede*kmem_cache_init()*/setup_log_buf(0);pidhash_init();vfs_caches_init_early();sort_main_extable();trap_init();mm_init();ftrace_init();/*trace_printkcanbeenabledhere*/early_trace_init();/**Setuptheschedulerpriorstartinganyinterrupts(suchasthe*timerinterrupt).Fulltopologysetuphappensatsmp_init()*time-butmeanwhilewestillhaveafunctioningscheduler.*/sched_init();/**Disablepreemption-earlybootupschedulingisextremely*fragileuntilwecpu_idle()forthefirsttime.*/preempt_disable();if(WARN(!irqs_disabled(),"Interruptswereenabled*very*early,fixingit\n"))local_irq_disable();radix_tree_init();/**Allowworkqueuecreationandworkitemqueueing/cancelling*early.Workitemexecutiondependsonkthreadsandstartsafter*workqueue_init().*/workqueue_init_early();rcu_init();/*Traceeventsareavailableafterthis*/trace_init();context_tracking_init();/*initsomelinksbeforeinit_ISA_irqs()*/early_irq_init();init_IRQ();tick_init();rcu_init_nohz();init_timers();hrtimers_init();softirq_init();timekeeping_init();time_init();sched_clock_postinit();printk_safe_init();perf_event_init();profile_init();call_function_init();WARN(!irqs_disabled(),"Interruptswereenabledearly\n");early_boot_irqs_disabled=false;local_irq_enable();kmem_cache_init_late();/**HACKALERT!Thisisearly.We'reenablingtheconsolebefore*we'vedonePCIsetupsetc,andconsole_init()mustbeawareof*this.Butwedowantoutputearly,incasesomethinggoeswrong.*/console_init();if(panic_later)panic("Toomanyboot%svarsat`%s'",panic_later,panic_param);lockdep_info();/**Needtorunthiswhenirqsareenabled,becauseitwants*toself-test[hard/soft]-irqson/offlockinversionbugs*too:*/locking_selftest();#ifdefCONFIG_BLK_DEV_INITRDif(initrd_start&&!initrd_below_start_ok&&page_to_pfn(virt_to_page((void*)initrd_start))<min_low_pfn){pr_crit("initrdoverwritten(0x%08lx<0x%08lx)-disablingit.\n",page_to_pfn(virt_to_page((void*)initrd_start)),min_low_pfn);initrd_start=0;}#endifpage_ext_init();debug_objects_mem_init();kmemleak_init();setup_per_cpu_pageset();numa_policy_init();if(late_time_init)late_time_init();calibrate_delay();pidmap_init();anon_vma_init();acpi_early_init();#ifdefCONFIG_X86if(efi_enabled(EFI_RUNTIME_SERVICES))efi_enter_virtual_mode();#endif#ifdefCONFIG_X86_ESPFIX64/*Shouldberunbeforethefirstnon-initthreadiscreated*/init_espfix_bsp();#endifthread_stack_cache_init();cred_init();fork_init();proc_caches_init();buffer_init();key_init();security_init();dbg_late_init();vfs_caches_init();pagecache_init();signals_init();proc_root_init();nsfs_init();cpuset_init();cgroup_init();taskstats_init_early();delayacct_init();check_bugs();acpi_subsystem_init();arch_post_acpi_subsys_init();sfi_init_late();if(efi_enabled(EFI_RUNTIME_SERVICES)){efi_free_boot_services();}/*Dotherestnon-__init'ed,we'renowalive*/rest_init();}/*Callallconstructorfunctionslinkedintothekernel.*/staticvoid__initdo_ctors(void){#ifdefCONFIG_CONSTRUCTORSctor_fn_t*fn=(ctor_fn_t*)__ctors_start;for(;fn<(ctor_fn_t*)__ctors_end;fn++)(*fn)();#endif}boolinitcall_debug;core_param(initcall_debug,initcall_debug,bool,0644);#ifdefCONFIG_KALLSYMSstructblacklist_entry{structlist_headnext;char*buf;};static__initdata_or_moduleLIST_HEAD(blacklisted_initcalls);staticint__initinitcall_blacklist(char*str){char*str_entry;structblacklist_entry*entry;/*strargumentisacomma-separatedlistoffunctions*/do{str_entry=strsep(&str,",");if(str_entry){pr_debug("blacklistinginitcall%s\n",str_entry);entry=alloc_bootmem(sizeof(*entry));entry->buf=alloc_bootmem(strlen(str_entry)+1);strcpy(entry->buf,str_entry);list_add(&entry->next,&blacklisted_initcalls);}}while(str_entry);return0;}staticbool__init_or_moduleinitcall_blacklisted(initcall_tfn){structblacklist_entry*entry;charfn_name[KSYM_SYMBOL_LEN];unsignedlongaddr;if(list_empty(&blacklisted_initcalls))returnfalse;addr=(unsignedlong)dereference_function_descriptor(fn);sprint_symbol_no_offset(fn_name,addr);/**fnwillbe"function_name[module_name]"where[module_name]isnot*displayedforbuilt-ininitfunctions.Stripoffthe[module_name].*/strreplace(fn_name,'','\0');list_for_each_entry(entry,&blacklisted_initcalls,next){if(!strcmp(fn_name,entry->buf)){pr_debug("initcall%sblacklisted\n",fn_name);returntrue;}}returnfalse;}#elsestaticint__initinitcall_blacklist(char*str){pr_warn("initcall_blacklistrequiresCONFIG_KALLSYMS\n");return0;}staticbool__init_or_moduleinitcall_blacklisted(initcall_tfn){returnfalse;}#endif__setup("initcall_blacklist=",initcall_blacklist);staticint__init_or_moduledo_one_initcall_debug(initcall_tfn){ktime_tcalltime,delta,rettime;unsignedlonglongduration;intret;printk(KERN_DEBUG"calling%pF@%i\n",fn,task_pid_nr(current));calltime=ktime_get();ret=fn();rettime=ktime_get();delta=ktime_sub(rettime,calltime);duration=(unsignedlonglong)ktime_to_ns(delta)>>10;printk(KERN_DEBUG"initcall%pFreturned%dafter%lldusecs\n",fn,ret,duration);returnret;}int__init_or_moduledo_one_initcall(initcall_tfn){intcount=preempt_count();intret;charmsgbuf[64];if(initcall_blacklisted(fn))return-EPERM;if(initcall_debug)ret=do_one_initcall_debug(fn);elseret=fn();msgbuf[0]=0;if(preempt_count()!=count){sprintf(msgbuf,"preemptionimbalance");preempt_count_set(count);}if(irqs_disabled()){strlcat(msgbuf,"disabledinterrupts",sizeof(msgbuf));local_irq_enable();}WARN(msgbuf[0],"initcall%pFreturnedwith%s\n",fn,msgbuf);add_latent_entropy();returnret;}externinitcall_t__initcall_start[];externinitcall_t__initcall0_start[];externinitcall_t__initcall1_start[];externinitcall_t__initcall2_start[];externinitcall_t__initcall3_start[];externinitcall_t__initcall4_start[];externinitcall_t__initcall5_start[];externinitcall_t__initcall6_start[];externinitcall_t__initcall7_start[];externinitcall_t__initcall_end[];staticinitcall_t*initcall_levels[]__initdata={__initcall0_start,__initcall1_start,__initcall2_start,__initcall3_start,__initcall4_start,__initcall5_start,__initcall6_start,__initcall7_start,__initcall_end,};/*Keeptheseinsyncwithinitcallsininclude/linux/init.h*/staticchar*initcall_level_names[]__initdata={"early","core","postcore","arch","subsys","fs","device","late",};staticvoid__initdo_initcall_level(intlevel){initcall_t*fn;strcpy(initcall_command_line,saved_command_line);parse_args(initcall_level_names[level],initcall_command_line,__start___param,__stop___param-__start___param,level,level,NULL,&repair_env_string);for(fn=initcall_levels[level];fn<initcall_levels[level+1];fn++)do_one_initcall(*fn);}staticvoid__initdo_initcalls(void){intlevel;for(level=0;level<ARRAY_SIZE(initcall_levels)-1;level++)do_initcall_level(level);}/**Ok,themachineisnowinitialized.Noneofthedevices*havebeentouchedyet,buttheCPUsubsystemisupand*running,andmemoryandprocessmanagementworks.**Nowwecanfinallystartdoingsomerealwork..*/staticvoid__initdo_basic_setup(void){cpuset_init_smp();shmem_init();driver_init();init_irq_proc();do_ctors();usermodehelper_enable();do_initcalls();}staticvoid__initdo_pre_smp_initcalls(void){initcall_t*fn;for(fn=__initcall_start;fn<__initcall0_start;fn++)do_one_initcall(*fn);}/**Thisfunctionrequestsmoduleswhichshouldbeloadedbydefaultandis*calledtwicerightafterinitrdismountedandrightbeforeinitis*exec'd.Ifsuchmodulesareoneitherinitrdorrootfs,theywillbe*loadedbeforecontrolispassedtouserland.*/void__initload_default_modules(void){load_default_elevator_module();}staticintrun_init_process(constchar*init_filename){argv_init[0]=init_filename;returndo_execve(getname_kernel(init_filename),(constchar__user*const__user*)argv_init,(constchar__user*const__user*)envp_init);}staticinttry_to_run_init_process(constchar*init_filename){intret;ret=run_init_process(init_filename);if(ret&&ret!=-ENOENT){pr_err("Startinginit:%sexistsbutcouldn'texecuteit(error%d)\n",init_filename,ret);}returnret;}staticnoinlinevoid__initkernel_init_freeable(void);#ifdefined(CONFIG_STRICT_KERNEL_RWX)||defined(CONFIG_STRICT_MODULE_RWX)boolrodata_enabled__ro_after_init=true;staticint__initset_debug_rodata(char*str){returnstrtobool(str,&rodata_enabled);}__setup("rodata=",set_debug_rodata);#endif#ifdefCONFIG_STRICT_KERNEL_RWXstaticvoidmark_readonly(void){if(rodata_enabled){mark_rodata_ro();rodata_test();}elsepr_info("Kernelmemoryprotectiondisabled.\n");}#elsestaticinlinevoidmark_readonly(void){pr_warn("Thisarchitecturedoesnothavekernelmemoryprotection.\n");}#endifstaticint__refkernel_init(void*unused){intret;kernel_init_freeable();/*needtofinishallasync__initcodebeforefreeingthememory*/async_synchronize_full();ftrace_free_init_mem();free_initmem();mark_readonly();system_state=SYSTEM_RUNNING;numa_default_policy();rcu_end_inkernel_boot();if(ramdisk_execute_command){ret=run_init_process(ramdisk_execute_command);if(!ret)return0;pr_err("Failedtoexecute%s(error%d)\n",ramdisk_execute_command,ret);}/**Wetryeachoftheseuntilonesucceeds.**TheBourneshellcanbeusedinsteadofinitifweare*tryingtorecoverareallybrokenmachine.*/if(execute_command){ret=run_init_process(execute_command);if(!ret)return0;panic("Requestedinit%sfailed(error%d).",execute_command,ret);}if(!try_to_run_init_process("/sbin/init")||!try_to_run_init_process("/etc/init")||!try_to_run_init_process("/bin/init")||!try_to_run_init_process("/bin/sh"))return0;panic("Noworkinginitfound.Trypassinginit=optiontokernel.""SeeLinuxDocumentation/admin-guide/init.rstforguidance.");}staticnoinlinevoid__initkernel_init_freeable(void){/**Waituntilkthreaddisallset-up.*/wait_for_completion(&kthreadd_done);/*Nowtheschedulerisfullysetupandcandoblockingallocations*/gfp_allowed_mask=__GFP_BITS_MASK;/**initcanallocatepagesonanynode*/set_mems_allowed(node_states[N_MEMORY]);cad_pid=task_pid(current);smp_prepare_cpus(setup_max_cpus);workqueue_init();init_mm_internals();do_pre_smp_initcalls();lockup_detector_init();smp_init();sched_init_smp();page_alloc_init_late();do_basic_setup();/*Openthe/dev/consoleontherootfs,thisshouldneverfail*/if(sys_open((constchar__user*)"/dev/console",O_RDWR,0)<0)pr_err("Warning:unabletoopenaninitialconsole.\n");(void)sys_dup(0);(void)sys_dup(0);/**checkifthereisanearlyuserspaceinit.Ifyes,letitdoall*thework*/if(!ramdisk_execute_command)ramdisk_execute_command="/init";if(sys_access((constchar__user*)ramdisk_execute_command,0)!=0){ramdisk_execute_command=NULL;prepare_namespace();}/**Ok,wehavecompletedtheinitialbootup,and*we'reessentiallyupandrunning.Getridofthe*initmemsegmentsandstarttheuser-modestuff..**rootfsisavailablenow,tryloadingthepublickeys*anddefaultmodules*/integrity_load_keys();load_default_modules();}

This comment has been minimized.

@olivatooo

olivatooo Jun 4, 2018

I'ts so better to read this right now!

@olivatooo

olivatooo Jun 4, 2018

I'ts so better to read this right now!

@olivatooo

Nice!

@DaviesX

DaviesX approved these changes Aug 4, 2018

@RaidAndFade

This comment has been minimized.

Show comment
Hide comment
@RaidAndFade

RaidAndFade Aug 8, 2018

I always hated how disgusting comments were, like is your code seriously so badly written that you need a comment?
So many new programmers use "comments" to describe what their program does, as if anyone cares... I write all of my code with horrible formatting, no comments, and zero documentation because I don't want to waste my time with this myth of "Maintainability". As if anyone will ever need to maintain my perfect program, it can't possibly need anything.

As for spaces and formatting like that. Come on, your eyes work either way, just use em and scroll a little bit to the right, its no big deal.

RaidAndFade commented Aug 8, 2018

I always hated how disgusting comments were, like is your code seriously so badly written that you need a comment?
So many new programmers use "comments" to describe what their program does, as if anyone cares... I write all of my code with horrible formatting, no comments, and zero documentation because I don't want to waste my time with this myth of "Maintainability". As if anyone will ever need to maintain my perfect program, it can't possibly need anything.

As for spaces and formatting like that. Come on, your eyes work either way, just use em and scroll a little bit to the right, its no big deal.

@Serkan-devel

This comment has been minimized.

Show comment
Hide comment
@Serkan-devel

Serkan-devel commented Aug 8, 2018

@RaidAndFade r/woooosh

@knstn-project

This comment has been minimized.

Show comment
Hide comment
@knstn-project

knstn-project Aug 9, 2018

knstn-project commented Aug 9, 2018

@Serkan-devel

This comment has been minimized.

Show comment
Hide comment
@Serkan-devel

Serkan-devel Aug 9, 2018

@knstn-project scroll at the right panel until you see an "unsubscribe" button

Serkan-devel commented Aug 9, 2018

@knstn-project scroll at the right panel until you see an "unsubscribe" button

@revmischa

This comment has been minimized.

Show comment
Hide comment
@revmischa

revmischa Aug 9, 2018

@knstn-project click "mute this thread"

revmischa commented Aug 9, 2018

@knstn-project click "mute this thread"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment