LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel
User Name
Password
Linux - Kernel This forum is for all discussion relating to the Linux kernel.

Notices


Reply
  Search this Thread
Old 06-01-2024, 11:22 AM   #31
Petri Kaukasoina
Senior Member
 
Registered: Mar 2007
Posts: 2,066

Rep: Reputation: 1679Reputation: 1679Reputation: 1679Reputation: 1679Reputation: 1679Reputation: 1679Reputation: 1679Reputation: 1679Reputation: 1679Reputation: 1679Reputation: 1679

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.
Old 06-02-2024, 12:07 AM   #32
hazel
LQ Guru
 
Registered: Mar 2016
Location: Harrow, UK
Distribution: LFS, AntiX, Slackware
Posts: 7,787

Original Poster
Blog Entries: 19

Rep: Reputation: 4526Reputation: 4526Reputation: 4526Reputation: 4526Reputation: 4526Reputation: 4526Reputation: 4526Reputation: 4526Reputation: 4526Reputation: 4526Reputation: 4526
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.
 
Old 06-02-2024, 03:04 AM   #33
Petri Kaukasoina
Senior Member
 
Registered: Mar 2007
Posts: 2,066

Rep: Reputation: 1679Reputation: 1679Reputation: 1679Reputation: 1679Reputation: 1679Reputation: 1679Reputation: 1679Reputation: 1679Reputation: 1679Reputation: 1679Reputation: 1679
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.
 
Old 06-20-2024, 06:35 AM   #34
hazel
LQ Guru
 
Registered: Mar 2016
Location: Harrow, UK
Distribution: LFS, AntiX, Slackware
Posts: 7,787

Original Poster
Blog Entries: 19

Rep: Reputation: 4526Reputation: 4526Reputation: 4526Reputation: 4526Reputation: 4526Reputation: 4526Reputation: 4526Reputation: 4526Reputation: 4526Reputation: 4526Reputation: 4526
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.
 
Old 06-20-2024, 01:10 PM   #35
Petri Kaukasoina
Senior Member
 
Registered: Mar 2007
Posts: 2,066

Rep: Reputation: 1679Reputation: 1679Reputation: 1679Reputation: 1679Reputation: 1679Reputation: 1679Reputation: 1679Reputation: 1679Reputation: 1679Reputation: 1679Reputation: 1679
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.
 
Old 06-21-2024, 12:26 AM   #36
hazel
LQ Guru
 
Registered: Mar 2016
Location: Harrow, UK
Distribution: LFS, AntiX, Slackware
Posts: 7,787

Original Poster
Blog Entries: 19

Rep: Reputation: 4526Reputation: 4526Reputation: 4526Reputation: 4526Reputation: 4526Reputation: 4526Reputation: 4526Reputation: 4526Reputation: 4526Reputation: 4526Reputation: 4526
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.
 
Old 06-21-2024, 02:13 AM   #37
Petri Kaukasoina
Senior Member
 
Registered: Mar 2007
Posts: 2,066

Rep: Reputation: 1679Reputation: 1679Reputation: 1679Reputation: 1679Reputation: 1679Reputation: 1679Reputation: 1679Reputation: 1679Reputation: 1679Reputation: 1679Reputation: 1679
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
Code:
git bisect start
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.
 
Old 06-21-2024, 03:00 AM   #38
hazel
LQ Guru
 
Registered: Mar 2016
Location: Harrow, UK
Distribution: LFS, AntiX, Slackware
Posts: 7,787

Original Poster
Blog Entries: 19

Rep: Reputation: 4526Reputation: 4526Reputation: 4526Reputation: 4526Reputation: 4526Reputation: 4526Reputation: 4526Reputation: 4526Reputation: 4526Reputation: 4526Reputation: 4526
Quote:
Originally Posted by Petri Kaukasoina View Post
...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.
 
Old 06-21-2024, 07:14 AM   #39
Petri Kaukasoina
Senior Member
 
Registered: Mar 2007
Posts: 2,066

Rep: Reputation: 1679Reputation: 1679Reputation: 1679Reputation: 1679Reputation: 1679Reputation: 1679Reputation: 1679Reputation: 1679Reputation: 1679Reputation: 1679Reputation: 1679
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.
 
Old 06-22-2024, 05:01 AM   #40
hazel
LQ Guru
 
Registered: Mar 2016
Location: Harrow, UK
Distribution: LFS, AntiX, Slackware
Posts: 7,787

Original Poster
Blog Entries: 19

Rep: Reputation: 4526Reputation: 4526Reputation: 4526Reputation: 4526Reputation: 4526Reputation: 4526Reputation: 4526Reputation: 4526Reputation: 4526Reputation: 4526Reputation: 4526
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.
 
Old 06-23-2024, 05:30 AM   #41
Petri Kaukasoina
Senior Member
 
Registered: Mar 2007
Posts: 2,066

Rep: Reputation: 1679Reputation: 1679Reputation: 1679Reputation: 1679Reputation: 1679Reputation: 1679Reputation: 1679Reputation: 1679Reputation: 1679Reputation: 1679Reputation: 1679
Quote:
Originally Posted by hazel View Post
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.
 
Old 06-24-2024, 12:16 AM   #42
hazel
LQ Guru
 
Registered: Mar 2016
Location: Harrow, UK
Distribution: LFS, AntiX, Slackware
Posts: 7,787

Original Poster
Blog Entries: 19

Rep: Reputation: 4526Reputation: 4526Reputation: 4526Reputation: 4526Reputation: 4526Reputation: 4526Reputation: 4526Reputation: 4526Reputation: 4526Reputation: 4526Reputation: 4526
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.
 
Old 06-24-2024, 01:31 AM   #43
Petri Kaukasoina
Senior Member
 
Registered: Mar 2007
Posts: 2,066

Rep: Reputation: 1679Reputation: 1679Reputation: 1679Reputation: 1679Reputation: 1679Reputation: 1679Reputation: 1679Reputation: 1679Reputation: 1679Reputation: 1679Reputation: 1679
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
 
Old 06-25-2024, 04:46 AM   #44
hazel
LQ Guru
 
Registered: Mar 2016
Location: Harrow, UK
Distribution: LFS, AntiX, Slackware
Posts: 7,787

Original Poster
Blog Entries: 19

Rep: Reputation: 4526Reputation: 4526Reputation: 4526Reputation: 4526Reputation: 4526Reputation: 4526Reputation: 4526Reputation: 4526Reputation: 4526Reputation: 4526Reputation: 4526
Quote:
Originally Posted by Petri Kaukasoina View Post
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.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Does Anyone Else Have These Converting To Linux Symptoms aaron4katie General 39 01-12-2007 12:52 PM
command.php attack - has anyone seen this form before? TigerOC Linux - Security 2 04-05-2005 01:45 AM
??has anyone ever seen this error before?? lemay_jeff Linux - Newbie 2 07-08-2004 03:01 AM
Has anyone seen this before robinhood1995 Linux - General 3 12-20-2002 10:25 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel

All times are GMT -5. The time now is 04:12 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration