Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
you really don't understand the problem. simple example. someone studied C++, and he wants to apply his knowledge for himself. It’s quite reasonable that he wants to create a kernel module so as not to go into the kernel itself, but he can’t. because no one thought about it.
Actually some people DID think about it and still think about it form time to time. Have you done a search for HOW TO CREATE A KERNEL MODULE or asked actual kernel developers for a pointer to documentation? Have you examined the OPEN SOURCE CODE for existing kernel modules?
Quote:
in order to write his own program in Linux, he needs to learn the special syntax of the "C " language, he needs to study the API, he needs to spend many years and over these years all desire to do something will disappear.
Wait, are you saying that it took you YEARS to learn how to apply an API and use it in your code?
Quote:
I believe that this was done on purpose to kill all the aspirations of beginners. Even now you don’t want to listen to a simple user. What then should I talk about with you? They explain to you that this is the most reasonable way for beginners, not to go straight into the kernel, where you can do a lot of wrong things, but to write modules and be able to run user functions from them - this is very correct.
Interesting advice, and something I want to consider, although I have certain doubts. Where did this advice come from? Who is this "They" you reference?
Quote:
I’ll explain to you again that this could improve the performance of systems based on the Linux kernel.
We have simple ways to modify the behavior of the Linux kernel on the fly, and tune it for environment and load, provided by the kernel developers. We also have the SOURCE code and can compile our own kernel with our own tuning and different defaults. How exactly is creating a custom module better?
Quote:
such a feature could be useful for creating kernels for highly loaded machines. especially for them. Now this is some kind of nonsense, so that a beginner can write something, he must immediately jump into the Linux kernel. this is stupidity. you are not engineers, you are collective farmers. you can't even revise the kernel logic and make everything consistent and beautiful.
Wait, so now you blame the members of LQ for the advice you have received? AND you insult the kernel developers and their code without actually examining it? I think you should cool off and think a bit, perhaps have a cup of coffee or tea.
#1 no one here has earned your anger
#2 Kernel Developers, here or not, have earned your respect and admiration, not your anger
#3 You have access to the same code, kernel, and module sources we do if you only care to look. You should not be blaming us if you do not care to look.
#4 LQ has no staff of engineers to answer questions. There are some excellent engineers here, some sysadmins and developers, some network admins, some who have been ALL of that and more, and mostly just regular users who come to ask a question and stay to learn and help where they can.
Look back at your original question. The biggest problems with running a custom operation from a custom kernel is that it is needlessly complex, has potential to interfere with successful kernel operation, and may cause corruption or failure including of other kernel modules or processes. The kernel is so well, beautifully, and efficiently constructed that you should be able to tune it properly WITHOUT adding a kernel module.
User defined function abound, in custom executibles and shell functions.
Other than your post 5 above, you have given very little information on what exactly you want. Members here will generally ask someone who posts what they have done specifically to accomplish what they want, so what have you done? Posting what your efforts have been and points of failure would be more useful if you actually want help. Most of your posts are complaints about your inability to accomplish your intended goal. That you are complaining here at LQ about this problem seems strange to me as this is hardly Linux HQ. We're just a group of volunteers who have different levels of knowledge about Linux and try to help people although some members are skilled programmers. You just need to be specific about what you want and what you have done.
you are saying the wrong things. You really did not understand the problem, its scale, and due to your narrowness and inability to understand, you decided that these were complaints. The community is not about being able to bypass the shortcomings of the system and at least somehow live on it; the community, at its core, should be heard by such figures as Linux kernel engineers. when a person speaks, he is not heard, when the community speaks, there are more chances. I think we need to go to <removed> people, they have more weight and they are more important for Linux engineers, and their requests are definitely heard) I am very sorry that Linuxoid today is some kind of frightened creature who is afraid to go forward, afraid of change, Linuxoid is just lives as he eats, without trying to do anything for himself or others. you can go further and identify system errors. I didn't call you. I called people, not their shadows.
you come and write some nonsense. You didn’t understand anything at all, but you got into the topic and demand respect for those who consider us scum. I can write a kernel module. I'm talking about legally calling a custom function from it; there is no easy way to do this. Did you understand this? This requires the knowledge of an engineer. It takes years to gain such knowledge. and this is not about me, but about all users who would like to write their own functions. don't interfere if you can't understand. They won't give you candy for protecting engineers.
The biggest problems with running a custom operation from a custom kernel is that it is needlessly complex, has potential to interfere with successful kernel operation, and may cause corruption or failure including of other kernel modules or processes. The kernel is so well, beautifully, and efficiently constructed that you should be able to tune it properly WITHOUT adding a kernel module.
User defined function abound, in custom executibles and shell functions.
You yourself say that the structure of the core is complex. so why jump there? let those who made mistakes do it, they know all the weak points, because they did it. Let them leave it to us to interact using modules. this is the right way. If you follow the API, it reduces kernel performance. and it is already critical. You just need to do it - if you want to run your function, use the kernel module. this is the only correct interface. this is as safe as possible, unlike if the user starts adding his functions to the kernel in a different way. What's not clear here?
I have been making computers do what people wanted them to do for more than 40 years. I have never needed to tweak, modify or “enhance” the kernel to do that.
I have had to learn several different programming languages and operation of several different operating systems as my career progressed.
As has been said, if you explained what you want to accomplish and what you have tried, someone here would likely be happy to help you.
what's the insult? It's true that the <removed> community matters more to Linus Torvalds than the Linux community. there were many proposals to improve the Linux kernel, and not a single one was considered, but as soon as <removed> corrected RUST, which was simply useless for the kernel and even harmful, it was immediately accepted and began to be supported in the kernel. this is a fact, this is not an insult.
slcklnx,
It's quite simple you continue to use a demographic term which has no relevance to a technical discussion.
Persisting to repeat including this in a technical discussion is not acceptable.
If this continues it could impact your posting privileges on the LQ site.
I have been making computers do what people wanted them to do for more than 40 years. I have never needed to tweak, modify or “enhance” the kernel to do that.
I have had to learn several different programming languages and operation of several different operating systems as my career progressed.
As has been said, if you explained what you want to accomplish and what you have tried, someone here would likely be happy to help you.
Can't read English? I've said many times that I want people to be able to write their own functions and run them. Why learn a programming language if you can't put it to good use? Only the specific syntax of the C language is suitable for the Linux kernel. Didn't you know that? You can't easily write a function in C++ and run it from a kernel module. why are you asking stupid questions? This will allow the Linux kernel to evolve in the right direction. such a path would not be a dead end. If you're really into Linux programming, you should have figured this out for yourself. understand existing problems and try to solve and simplify them. the system must develop, improve, and the main sign that the system is developing is that it is being sharpened, and therefore simplified. if the system does not simplify, then the chosen direction is incorrect. the engineers should have polished the system instead of cluttering it with crap code. There is still an opportunity to get on the right track and running custom functions from a Linux kernel module is the first small step.
You really did not understand the problem, its scale, and due to your narrowness and inability to understand,
I don't nor do I care if you accomplish whatever it is you would like to accomplish. You are vague about it and when given suggestions, you simply denigrate the other members who who offer to help you. If you have problems with the kernel then the Linux Foundation and Mr Torvalds are the ones to complain to. As you have been told, nobody here is in charge of that.
It took me a while, but I think I understand the OP now. HE just wants to rant and complain and is not interested in advice. I am disengaging form this thread as it is a wast of our time and efforts.
Can't read English? I've said many times that I want people to be able to write their own functions and run them. Why learn a programming language if you can't put it to good use? Only the specific syntax of the C language is suitable for the Linux kernel. Didn't you know that? You can't easily write a function in C++ and run it from a kernel module. why are you asking stupid questions? This will allow the Linux kernel to evolve in the right direction. such a path would not be a dead end. If you're really into Linux programming, you should have figured this out for yourself. understand existing problems and try to solve and simplify them. the system must develop, improve, and the main sign that the system is developing is that it is being sharpened, and therefore simplified. if the system does not simplify, then the chosen direction is incorrect. the engineers should have polished the system instead of cluttering it with crap code. There is still an opportunity to get on the right track and running custom functions from a Linux kernel module is the first small step.
People ARE writing their own functions and running them. It’s called “programming the computer.” I never learned to do that in C. I’ve always worked in 3rd and 4th generation languages: BASIC, COBOL, LINC, perl, bash, html, JavaScript, css, etc.
C always struck me as about a 2.5 generation language…
Why clutter up the operating system layer (2nd layer?) with mundane tasks?
It’s the kernel’s job to read instructions from application layer software and execute those instructions.
I have actually made a pretty good living for quite a long time understanding existing problems and solving and (usually) simplifying them. On computers. And not just Linux computers. As I said, I’ve never had occasion to tweak the OS of any of them.
you really don't understand the problem. simple example. someone studied C++, and he wants to apply his knowledge for himself. It’s quite reasonable that he wants to create a kernel module so as not to go into the kernel itself, but he can’t. because no one thought about it. in order to write his own program in Linux, he needs to learn the special syntax of the "C " language, he needs to study the API, he needs to spend many years and over these years all desire to do something will disappear. I believe that this was done on purpose to kill all the aspirations of beginners. Even now you don’t want to listen to a simple user. What then should I talk about with you? They explain to you that this is the most reasonable way for beginners, not to go straight into the kernel, where you can do a lot of wrong things, but to write modules and be able to run user functions from them - this is very correct. I’ll explain to you again that this could improve the performance of systems based on the Linux kernel. such a feature could be useful for creating kernels for highly loaded machines. especially for them. Now this is some kind of nonsense, so that a beginner can write something, he must immediately jump into the Linux kernel. this is stupidity. you are not engineers, you are collective farmers. you can't even revise the kernel logic and make everything consistent and beautiful.
Abusive language like this is inappropriate.
You can express yourself without becoming abusive or personal in the comments.
That said, what you are skirting around entirely is the learning part.
A baby learns to crawl before they walk and walk before they run.
The same applies to learning programming.
A new person must learn the basics of any language and its syntax and idiosyncrasies before they can program anything complex. Thus starting simple, with a basic "hello world" program, then working up to more complex features, then working to learn even more complex usage is mandatory.
It all takes time and no one is preventing you from doing whatever you wish. Linux is after all FOSS through and through so any user can read and modify any part of it for their own use, including using various pieces to learn what they do and how it is done.
Instead of whining about the perceived blockages why not open your eyes and see exactly how open the software is and how the licensing allows anyone to alter anything they choose.
Code:
in order to write his own program in Linux, he needs to learn the special syntax of the "C " language, he needs to study the API,
Of course, you cannot just snap your fingers and write an opus. You must learn how!
Code:
but to write modules and be able to run user functions from them
Learn to write small apps, include functions that are small code snippets to perform the same task over and over instead of writing the same code repeatedly, and build a good foundation then aspire to do even more.
Last edited by computersavvy; 03-31-2024 at 03:38 PM.
As for my personal experience I've learned way more using Linux and it's other Unix work alike brethren just by screwing up my system and having to debug faulty package installations or even purge the offending package(s). I can still remember the days in the early years of the 21st century where you had to use the broad com firmware 43 cutter package in order to get your broadloom based Ethernet or WiFi adapters working correctly.
I still remember how frustrated I'd get if something went wrong I'd immediately reach for the newest iso of my distribution of choice and nuke and pave my current installation. This included not only learning how to debug and correct my own fowl ups I also learned quite a bit about how to maintain both client systems and servers. My first experience with Linux was configuring a file and print server for my family's home network. This exercise taught me a huge amount about myself and my threshold of temper. This whole exercise was done with one of the pre RedHat Enterprise Linux Red Had Linux releases as matter of fact I think it was something like Red Hat Linux 4 or 5. I also learned a ton by simply reading internet forum posts, guides,etc and correcting my own configuration file fowl ups.
What I find weird about this thread is that the OP seems to want to port the entire system into the kernel. I thought the whole point of the Unix model was to keep the kernel and userspace separate. Quite apart from all the self-opinionated whining in this thread, the whole project seems screwed up to me.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.