You are not logged in.

#1 2017-09-16 16:14:58

sitwano
Member
Registered: 2017-07-07
Posts: 83

How do I check if my kernel has a needed patch already applied?

I have the latest arch kernel 4.12.13-1-ARCH. I can go to kernel.org and look at their incoming patches by a certain developer over here https://patchwork.kernel.org/project/in … ate&page=1

I've also learnt to use the git page https://git.kernel.org/pub/scm/linux/ke … linux.git/ to see if commits have been applied to the source. While this is helpful, it does not show what versions have the commit applied.

Now, without tirelessly looking through the changelog of each released kernel, is there a way to check if the needed patch is applied to a certain kernel? Surely there must be some status regarding the patch as to whether it has been applied and the first kernel it has been applied to or something?

Last edited by sitwano (2017-09-16 16:51:04)

Offline

#2 2017-09-16 17:27:45

aesiris
Member
Registered: 2012-02-25
Posts: 97

Re: How do I check if my kernel has a needed patch already applied?

Minor updates are not released directly by Linus.
You can find the 4.12.13 tag on the "stable" repo: https://git.kernel.org/pub/scm/linux/ke … h=v4.12.13

Offline

#3 2017-09-16 17:54:24

brebs
Member
Registered: 2007-04-03
Posts: 3,742

Re: How do I check if my kernel has a needed patch already applied?

Checking the sourcecode, is the only way to be *sure*. I understand you're looking for a more convenient way, which will be less reliable.

Offline

#4 2017-09-16 19:08:21

loqs
Member
Registered: 2014-03-06
Posts: 17,327

Re: How do I check if my kernel has a needed patch already applied?

aesiris wrote:

Minor updates are not released directly by Linus.

However every patch must be in mainline before it can enter the stable queue https://git.kernel.org/pub/scm/linux/ke … =v4.13#n32

Offline

#5 2017-09-16 19:29:25

progandy
Member
Registered: 2012-05-17
Posts: 5,190

Re: How do I check if my kernel has a needed patch already applied?

sitwano wrote:

Now, without tirelessly looking through the changelog of each released kernel, is there a way to check if the needed patch is applied to a certain kernel? Surely there must be some status regarding the patch as to whether it has been applied and the first kernel it has been applied to or something?

Of course. You can clone and checkout the tag for your linux kernel version, search for commits with a specific description to get the commit id. If you already have the id, then you only have to clone the linux-stable repository. Now you can find the tags or branches which contain this commit:

 git log  --since=DATE_OF_LAST_CHECK --grep="Message..."
git tag --contains <commit_id>
git branch --contains <commit_id>
git describe --contains <commit_id>

Last edited by progandy (2017-09-16 19:32:04)


| alias CUTF='LANG=en_XX.UTF-8@POSIX ' |

Offline

#6 2017-09-16 19:50:18

sitwano
Member
Registered: 2017-07-07
Posts: 83

Re: How do I check if my kernel has a needed patch already applied?

Ah I see, I just suck at using the git system at git.kernel.org. I needed to go to the stable tree and then search to see if the commit I required shows up within the respectful  kernel version!

Offline

#7 2017-09-16 19:56:51

loqs
Member
Registered: 2014-03-06
Posts: 17,327

Re: How do I check if my kernel has a needed patch already applied?

The commit id will not be the same as the commit id in mainline see https://git.kernel.org/pub/scm/linux/ke … ecbe27e3e7 for example.
Edit:
If it is not in mainline there is no point in checking stable as it must pass through mainline first.
Edit2:
Should clarify the commit id will be different if it was applied as part of a stable release rather than an upstream mainline release.
What patch in particular are are looking for?

Last edited by loqs (2017-09-16 20:12:51)

Offline

Board footer

Powered by FluxBB