Linux - Kernel This forum is for all discussion relating to the Linux kernel. |
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.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
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.
|
 |
|
06-01-2024, 11:22 AM
|
#31
|
Senior Member
Registered: Mar 2007
Posts: 2,614
|
Add the 6.4.y branch:
Code:
cd /root/git-6.5.0
git remote add -t master stable https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
git remote set-branches --add stable linux-6.4.y
git fetch stable
The size of that download is 284.36 MiB.
|
|
1 members found this post helpful.
|
06-02-2024, 12:07 AM
|
#32
|
LQ Guru
Registered: Mar 2016
Location: Harrow, UK
Distribution: LFS, AntiX, Slackware
Posts: 8,423
Original Poster
|
Wonderful! You always come up trumps. So I need to use linux-<maj>.<min>.y in future, not just linux-<maj>.<min>. It was pure bad luck that my first bad release this time around had a 2-digit designation.
One interesting point is that 6.5 with my first patch fails silently whereas 6.5.1 with the same patch fails with buzzing. So the patch between 6.4.16 and 6.5 (when I have found it) is not the last one I shall need. There is probably a third patch required between 6.5. and 6.5.1.
Last edited by hazel; 06-02-2024 at 12:25 AM.
|
|
|
06-02-2024, 03:04 AM
|
#33
|
Senior Member
Registered: Mar 2007
Posts: 2,614
|
After you already gave the command of post #29 and then post #31, you can add the 6.5.y branch:
Code:
cd /root/git-6.5.0
git remote set-branches --add stable linux-6.5.y
git fetch stable
The download is 18.64 MiB this time. After that 'git tag -l' will list tags like v6.5, v6.5-rc1, v6.4.16, v6.5.1.
|
|
|
06-20-2024, 06:35 AM
|
#34
|
LQ Guru
Registered: Mar 2016
Location: Harrow, UK
Distribution: LFS, AntiX, Slackware
Posts: 8,423
Original Poster
|
I have reached a blockage. And I was doing so well too!
A new download month began yesterday, so I updated my git clone using the commands suggested in this thread, and have been bisecting. Of course I included the tpm patch that I had obtained from the previous bisection before starting each actual build, since I know it won't work without that. Patching worked for the first and second runs of this new series, but now it won't accept the patch for the third run (and there are ten more to do). If I try to do it with the patch command as before, I get
Code:
Hunk #1 FAILED at 806.
1 out of 1 hunk FAILED -- saving rejects to file drivers/char/tpm/tpm_tis_core.c.rej
If I use git apply instead, I get
Code:
error: patch failed: drivers/char/tpm/tpm_tis_core.c:806
error: drivers/char/tpm/tpm_tis_core.c: patch does not apply
What do I do now? I'm out of my depth  .
|
|
|
06-20-2024, 01:10 PM
|
#35
|
Senior Member
Registered: Mar 2007
Posts: 2,614
|
I think at some point there was either a line removed or added at the position where the patch applies, and it makes the hunk fail. Check post #24 and the modified patch there. Maybe it will work.
|
|
|
06-21-2024, 12:26 AM
|
#36
|
LQ Guru
Registered: Mar 2016
Location: Harrow, UK
Distribution: LFS, AntiX, Slackware
Posts: 8,423
Original Poster
|
No, it still fails with the version in #24. FYI the sequence of events which led up to this impasse was:
1) Patch and first run of this bisection: found Good. When I reported that, git refused to bisect because the code had been patched. It said to revert the patch or commit it. I don't know how to commit, so I reverted it, reported good again and got a new checkout.
2) Patch and second run: found Bad. I reported it, removed the patch as before, and got a new checkout.
3) Tried to patch again for the third run and failed. Like you, I suspect that the code had changed in the area of the patch so that it no longer fits.
The real problem here (or one of them at any rate) is that I'm out of my depth and don't really know what I am doing. I mean I know in a vague kind of way but not the details of how git works. For some time now, I've just been following orders as if I was using Windows!
Is there a way to clear all this and revert back to the beginning of the bisect, then do it again properly?
Last edited by hazel; 06-21-2024 at 12:31 AM.
|
|
|
06-21-2024, 02:13 AM
|
#37
|
Senior Member
Registered: Mar 2007
Posts: 2,614
|
To go to, say, 6.3.6, I think this will do it:
Code:
git switch --discard-changes --detach v6.3.6
And you should be able to start bisecting with But I guess the final result will be the same.
In post #22, there is a changelog of dozens of changes in tpm, and I guess they are connected to each other so that it may be impossible to revert single commits to make it work.
|
|
|
06-21-2024, 03:00 AM
|
#38
|
LQ Guru
Registered: Mar 2016
Location: Harrow, UK
Distribution: LFS, AntiX, Slackware
Posts: 8,423
Original Poster
|
Quote:
Originally Posted by Petri Kaukasoina
...But I guess the final result will be the same.
In post #22, there is a changelog of dozens of changes in tpm, and I guess they are connected to each other so that it may be impossible to revert single commits to make it work.
|
I was afraid you'd say that. What about committing the change rather than repeatedly reverting and redoing it? Would it let me do that, given that I'm not a kernel developer? That way I would only need to patch once and I assume the patch would then become a permanent part of my cloned tree, a fork effectively.
|
|
|
06-21-2024, 07:14 AM
|
#39
|
Senior Member
Registered: Mar 2007
Posts: 2,614
|
I don't know. You can try!
I had a similar problem some time ago. Bisection found the first bad commit. But the commit was one of a patch set of 34 patches, all connected. Reverting only the culprit resulted a non-compilable kernel. So did reverting all 34. I reported the bug in bugzilla.kernel.org and the developer fixed it by modifying one line of code.
|
|
|
06-22-2024, 05:01 AM
|
#40
|
LQ Guru
Registered: Mar 2016
Location: Harrow, UK
Distribution: LFS, AntiX, Slackware
Posts: 8,423
Original Poster
|
No, it won't let me do what I want to do. After I committed the first patch, I started a new bisect in hopes of finding the second one. The version checked out turned out to be bad, so I've just rebooted slackware to register it. And I got
Code:
root@bigboy:~/git-6.5.0# git bisect bad
The merge base 6995e2de6891c724bfeb2db33d7b87775f913ad1 is bad.
This means the bug has been fixed between 6995e2de6891c724bfeb2db33d7b87775f913ad1 and [ae4e4fc35b4258626644c162a702e2bce2b79190].
Sure! A bug has been fixed. But there is another one at least, maybe two more, and it won't let me find them. Perhaps the whole thing is just unfixable for this old machine  . Both Slackware and Antix, the two systems I run in practice (because LFS has become more of a game for me than a serious endeavour) use old kernels, so it will be quite a while before I run into the buffers. I know I can can boot vanilla kernels up to 6.3.6 and I can keep going up to 6.4.16 with my existing patch.
But eventually I may just have to buy a new machine and I'm afraid that by that time, everything will have been so locked down that you won't be able to install Linux at all.
I'm going to switch focus and try some experimental builds of vanilla kernels with tpm switched off completely. I know that the later kernels won't boot like that (I've tried) but perhaps pre-6.5 kernels will. In that case, I could scrap my git tree (which is probably corrupt by now), clone another one and start from clean to find the next patch.
|
|
|
06-23-2024, 05:30 AM
|
#41
|
Senior Member
Registered: Mar 2007
Posts: 2,614
|
Quote:
Originally Posted by hazel
I'm going to switch focus and try some experimental builds of vanilla kernels with tpm switched off completely. I know that the later kernels won't boot like that (I've tried) but perhaps pre-6.5 kernels will. In that case, I could scrap my git tree (which is probably corrupt by now), clone another one and start from clean to find the next patch.
|
That sounds like a good plan. If you leave CONFIG_TCG_TPM unset and an older kernel version boots but a newer kernel doesn't, maybe you can bisect another bug not related to tpm.
|
|
|
06-24-2024, 12:16 AM
|
#42
|
LQ Guru
Registered: Mar 2016
Location: Harrow, UK
Distribution: LFS, AntiX, Slackware
Posts: 8,423
Original Poster
|
Good news! Both 6.4.16 and 6.5 boot unpatched when configured with tpm switched off. These tests were both carried out with freshly untarred source, not the git clone. So the patch that I found and added to my git tree (patch no.1) isn't actually necessary on my machine. And the hypothetical patch that I'm calling "patch no.2" that lies somewhere between 6.4.16 and 6.5 (the one that I'm not allowed to test for) must also involve tpm driver code.
If 6.5.1 doesn't boot like this, then patch no.3 is not tpm-related and I might be able to use the same git clone to find it.
The joke is that I don't think my computer actually has a tpm chip. I went into the security section of my UEFI menu and couldn't see any mention of it.
Last edited by hazel; 06-24-2024 at 12:23 AM.
|
|
|
06-24-2024, 01:31 AM
|
#43
|
Senior Member
Registered: Mar 2007
Posts: 2,614
|
Interesting.
By the way, google found something that could be relevant. Does it help if you use a stock kernel (TPM enabled) if you append this parameter to the kernel command line:
Code:
tpm_tis.interrupts=0
|
|
|
06-25-2024, 04:46 AM
|
#44
|
LQ Guru
Registered: Mar 2016
Location: Harrow, UK
Distribution: LFS, AntiX, Slackware
Posts: 8,423
Original Poster
|
Quote:
Originally Posted by Petri Kaukasoina
Interesting.
By the way, google found something that could be relevant. Does it help if you use a stock kernel (TPM enabled) if you append this parameter to the kernel command line:
Code:
tpm_tis.interrupts=0
|
No, I tried that on a later kernel that was buzzing and it didn't help. But it looks like that particular bug was actually cleared in 6.4.4:
https://community.frame.work/t/resol...d/32956?page=3
Quote:
This looks to be fixed in the latest Linux kernel release 6.4.4:
https://git.kernel.org/pub/scm/linux...cd645cb6a18f5d
“tpm/tpm_tis: Disable interrupts for Framework Laptop Intel 13th gen
tpm/tpm_tis: Disable interrupts for Framework Laptop Intel 12th gen”
The kernel parameter “tpm_tis.interrupts=0” won’t be needed after upgrading to that kernel.
|
I keep going off at a tangent! I spent most of yesterday afternoon working out a build protocol that makes my kernels behave consistently in successive builds with different configurations. It turns out that I need to start each time with an mrproper tree, not just a clean one. Who knew! Anyway I can now get 6.5 to behave itself so I am doing a full build/install of that (modules as well) before moving on to 6.5.1.
|
|
|
08-01-2024, 02:20 AM
|
#45
|
LQ Guru
Registered: Mar 2016
Location: Harrow, UK
Distribution: LFS, AntiX, Slackware
Posts: 8,423
Original Poster
|
A couple of days ago I was thinking, "I've finally cracked it. I've found the buzz." But of course it's never that simple for me. I just have the world's worst luck.
A week back, I did an overnight download of the git branch that ends in 6.5.2, the earliest release that buzzes and I've been working on it at intervals. A normal git bisection revealed the attached commit. So I patched 6.5.2, reverting the two changes from alloc to zalloc, and now 6.5.2 boots without buzzing. Hallelujah!
Not! Because when I patched 6.5.3 in the same way, guess what: it refused to boot and just buzzed at me. It's the same as with those earlier tpm errors; there must be a whole slew of successive changes in that code. And I already know from that earlier experience that trying to bisect privately patched code doesn't work. But tpm is only a driver (and an unnecessary one in my case because my machine doesn't actually have a tpm facility) so I was able to just switch it off during configuration. I don't think I can switch off this thing.
It begins to look as if my much-loved desktop computer is doomed. And I resent it. I resent being expected to shell out a couple of hundred pounds for a second-hand laptop (or even more for a new one) when my existing machine otherwise works well. I really dislike laptops but that's all anybody sells nowadays. Even the second hand machines are laptops. Grrr!! 
Last edited by hazel; 08-01-2024 at 06:08 AM.
|
|
|
All times are GMT -5. The time now is 04:52 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|