Skip to contentSkip to conversation

arch:x86:coco:sev: Initialize ctxt variable

PATCH In review Ragavendra 4 participants 16 messages Nov 15, 2024 – Nov 18, 2024 x86

lore
Share & tools
lore

Ragavendra

author
#0 lore raw

PATCH 1/1 arch:x86:coco:sev: Initialize ctxt variable

Updating the ctxt value to NULL in the svsm_perform_ghcb_protocol as it was not initialized.

Fixes 2e1b3cc9d7f7 (grafted) Merge tag 'arm-fixes-6.12-2' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc
---
 arch/x86/coco/sev/shared.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/x86/coco/sev/shared.c +1 -1
index 71de53194089..a0fe7fc9bdc7 100644
@@ -335,7 +335,7 @@ static int svsm_perform_msr_protocol(struct svsm_call *call)
 
 static int svsm_perform_ghcb_protocol(struct ghcb *ghcb, struct svsm_call *call)
 {
-	struct es_em_ctxt ctxt;
+	struct es_em_ctxt ctxt = NULL;
 	u8 pending = 0;
 
 	vc_ghcb_invalidate(ghcb);
Signature · 1 line
2.46.1
#1 lore raw
Quoted 4 lines · Ragavendra

Updating the ctxt value to NULL in the svsm_perform_ghcb_protocol as it was not initialized.

Fixes 2e1b3cc9d7f7 (grafted) Merge tag 'arm-fixes-6.12-2' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc

This 'Fixes' tag looks bogus.

Thanks,

Ingo

#2 lore raw
Quoted 11 lines · Ingo Molnar
Quoted 4 lines · Ragavendra

Updating the ctxt value to NULL in the svsm_perform_ghcb_protocol as it was not initialized.

Fixes 2e1b3cc9d7f7 (grafted) Merge tag 'arm-fixes-6.12-2' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc

This 'Fixes' tag looks bogus.

So does the patch itself - 'struct es_em_ctxt ctxt' is not a pointer.

#3 lore raw
Quoted 8 lines · Ard Biesheuvel
Quoted 7 lines · Ingo Molnar
Quoted 3 lines · Ragavendra

Updating the ctxt value to NULL in the svsm_perform_ghcb_protocol as it was not initialized.

Quoted 6 lines
Quoted 4 lines
Quoted 1 line
Fixes 2e1b3cc9d7f7 (grafted) Merge tag 'arm-fixes-6.12-2' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc

This 'Fixes' tag looks bogus.

So does the patch itself - 'struct es_em_ctxt ctxt' is not a pointer.

Thank you very much for your response. I am relatively new to kernel development.

I know we can use kmalloc for memory allocation. Please advice.

struct es_em_ctxt ctxt = kmalloc(sizeof(struct es_em_ctxt), GFP_KERNEL);

I am thinking to update like above, but like you mentioned, ctxt is not a pointer. I can update this to be a pointer if needed.

--
Thanks,
Ragavendra

#4 lore raw
Quoted 15 lines · Ragavendra B.N.
Quoted 13 lines · Ard Biesheuvel
Quoted 11 lines · Ingo Molnar
Quoted 4 lines · Ragavendra

Updating the ctxt value to NULL in the svsm_perform_ghcb_protocol as it was not initialized.

Fixes 2e1b3cc9d7f7 (grafted) Merge tag 'arm-fixes-6.12-2' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc

This 'Fixes' tag looks bogus.

Quoted 9 lines
Quoted 1 line

So does the patch itself - 'struct es_em_ctxt ctxt' is not a pointer.

Thank you very much for your response. I am relatively new to kernel development.

I know we can use kmalloc for memory allocation. Please advice.

struct es_em_ctxt ctxt = kmalloc(sizeof(struct es_em_ctxt), GFP_KERNEL);

I am thinking to update like above, but like you mentioned, ctxt is not a pointer. I can update this to be a pointer if needed.

The code is fine as is. Let's end this thread here, shall we?

#5 lore raw
Quoted 19 lines · Ard Biesheuvel
Quoted 18 lines · Ragavendra B.N.
Quoted 8 lines · Ard Biesheuvel
Quoted 7 lines · Ingo Molnar
Quoted 3 lines · Ragavendra

Updating the ctxt value to NULL in the svsm_perform_ghcb_protocol as it was not initialized.

Quoted 6 lines
Quoted 4 lines
Quoted 1 line
Fixes 2e1b3cc9d7f7 (grafted) Merge tag 'arm-fixes-6.12-2' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc

This 'Fixes' tag looks bogus.

So does the patch itself - 'struct es_em_ctxt ctxt' is not a pointer.

Thank you very much for your response. I am relatively new to kernel development.

Quoted 8 lines
Quoted 6 lines

I know we can use kmalloc for memory allocation. Please advice.

struct es_em_ctxt ctxt = kmalloc(sizeof(struct es_em_ctxt), GFP_KERNEL);

I am thinking to update like above, but like you mentioned, ctxt is not a pointer. I can update this to be a pointer if needed.

The code is fine as is. Let's end this thread here, shall we?

I was assuming he got some kind of warning from some compiler options or a static checker. Is that the case Ragavendra?

When I look at the code, it is possible for ctxt->fi.error_code to be left uninitialized. The simple fix is to just initialize ctxt as:

	struct es_em_ctxt ctxt = {};

Thanks,
Tom

#6 lore raw
Quoted 29 lines · Tom Lendacky
Quoted 19 lines · Ard Biesheuvel
Quoted 18 lines · Ragavendra B.N.
Quoted 8 lines · Ard Biesheuvel
Quoted 7 lines · Ingo Molnar
Quoted 3 lines · Ragavendra

Updating the ctxt value to NULL in the svsm_perform_ghcb_protocol as it was not initialized.

Quoted 6 lines
Quoted 4 lines
Quoted 1 line
Fixes 2e1b3cc9d7f7 (grafted) Merge tag 'arm-fixes-6.12-2' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc

This 'Fixes' tag looks bogus.

So does the patch itself - 'struct es_em_ctxt ctxt' is not a pointer.

Thank you very much for your response. I am relatively new to kernel development.

Quoted 8 lines
Quoted 6 lines

I know we can use kmalloc for memory allocation. Please advice.

struct es_em_ctxt ctxt = kmalloc(sizeof(struct es_em_ctxt), GFP_KERNEL);

I am thinking to update like above, but like you mentioned, ctxt is not a pointer. I can update this to be a pointer if needed.

The code is fine as is. Let's end this thread here, shall we?

Quoted 7 lines

I was assuming he got some kind of warning from some compiler options or a static checker. Is that the case Ragavendra?

When I look at the code, it is possible for ctxt->fi.error_code to be left uninitialized. The simple fix is to just initialize ctxt as:

	struct es_em_ctxt ctxt = {};

Although to cover all cases now and going forwared, the es_em_ctxt fi member should just be zeroed in verify_exception_info() when ES_EXCEPTION is going to be returned.

Thanks,
Tom

Quoted 3 lines

Thanks,
Tom

#7 lore raw
Quoted 36 lines · Tom Lendacky
Quoted 35 lines · Tom Lendacky
Quoted 19 lines · Ard Biesheuvel
Quoted 18 lines · Ragavendra B.N.
Quoted 8 lines · Ard Biesheuvel
Quoted 7 lines · Ingo Molnar
Quoted 3 lines · Ragavendra

Updating the ctxt value to NULL in the svsm_perform_ghcb_protocol as it was not initialized.

Quoted 6 lines
Quoted 4 lines
Quoted 1 line
Fixes 2e1b3cc9d7f7 (grafted) Merge tag 'arm-fixes-6.12-2' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc

This 'Fixes' tag looks bogus.

So does the patch itself - 'struct es_em_ctxt ctxt' is not a pointer.

Thank you very much for your response. I am relatively new to kernel development.

Quoted 8 lines
Quoted 6 lines

I know we can use kmalloc for memory allocation. Please advice.

struct es_em_ctxt ctxt = kmalloc(sizeof(struct es_em_ctxt), GFP_KERNEL);

I am thinking to update like above, but like you mentioned, ctxt is not a pointer. I can update this to be a pointer if needed.

The code is fine as is. Let's end this thread here, shall we?

I was assuming he got some kind of warning from some compiler options or a static checker. Is that the case Ragavendra?

When I look at the code, it is possible for ctxt->fi.error_code to be left uninitialized. The simple fix is to just initialize ctxt as:

Quoted 12 lines
Quoted 1 line
	struct es_em_ctxt ctxt = {};

Although to cover all cases now and going forwared, the es_em_ctxt fi member should just be zeroed in verify_exception_info() when ES_EXCEPTION is going to be returned.

Thanks,
Tom

Quoted 3 lines

Thanks,
Tom

Yes Tom, that is exactly the reason I worked on it the first place. The issue was reported by the Coverity tool.

I can send the below fix if that is fine.

Quoted 1 line
Quoted 1 line
	struct es_em_ctxt ctxt = {};

For the es_em_ctxt fi member to be zeroed, I can go ahead and assign 0 to all the three long members like below in verify_exception_info()

	if (info & SVM_EVTINJ_VALID_ERR) {
		ctxt->fi.error_code = info >> 32;
	} else {
		ctxt->fi.error_code = 0;
		ctxt->fi.vector = 0;
		ctxt->fi.cr2 = 0;

	}

return ES_EXCEPTION;

Thanks,
Ragavendra N.

#8 lore raw
Quoted 58 lines · Ragavendra B.N.
Quoted 36 lines · Tom Lendacky
Quoted 35 lines · Tom Lendacky
Quoted 19 lines · Ard Biesheuvel
Quoted 18 lines · Ragavendra B.N.
Quoted 8 lines · Ard Biesheuvel
Quoted 7 lines · Ingo Molnar
Quoted 3 lines · Ragavendra

Updating the ctxt value to NULL in the svsm_perform_ghcb_protocol as it was not initialized.

Quoted 6 lines
Quoted 4 lines
Quoted 1 line
Fixes 2e1b3cc9d7f7 (grafted) Merge tag 'arm-fixes-6.12-2' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc

This 'Fixes' tag looks bogus.

So does the patch itself - 'struct es_em_ctxt ctxt' is not a pointer.

Thank you very much for your response. I am relatively new to kernel development.

Quoted 8 lines
Quoted 6 lines

I know we can use kmalloc for memory allocation. Please advice.

struct es_em_ctxt ctxt = kmalloc(sizeof(struct es_em_ctxt), GFP_KERNEL);

I am thinking to update like above, but like you mentioned, ctxt is not a pointer. I can update this to be a pointer if needed.

The code is fine as is. Let's end this thread here, shall we?

I was assuming he got some kind of warning from some compiler options or a static checker. Is that the case Ragavendra?

When I look at the code, it is possible for ctxt->fi.error_code to be left uninitialized. The simple fix is to just initialize ctxt as:

Quoted 12 lines
Quoted 1 line
	struct es_em_ctxt ctxt = {};

Although to cover all cases now and going forwared, the es_em_ctxt fi member should just be zeroed in verify_exception_info() when ES_EXCEPTION is going to be returned.

Thanks,
Tom

Quoted 3 lines

Thanks,
Tom

Yes Tom, that is exactly the reason I worked on it the first place. The issue was reported by the Coverity tool.

I can send the below fix if that is fine.

Quoted 1 line
Quoted 1 line
	struct es_em_ctxt ctxt = {};

For the es_em_ctxt fi member to be zeroed, I can go ahead and assign 0 to all the three long members like below in verify_exception_info()

Quoted 6 lines
	if (info & SVM_EVTINJ_VALID_ERR) {
		ctxt->fi.error_code = info >> 32;
	} else {
		ctxt->fi.error_code = 0;
		ctxt->fi.vector = 0;
		ctxt->fi.cr2 = 0;

But then the cr2 value isn't set/zeroed in the true path of the if statement. I think a simple memset() at the beginning of the if path that will return ES_EXCEPTION is simplest.

Thanks,
Tom

Quoted 7 lines
	}

return ES_EXCEPTION;

Thanks,
Ragavendra N.

#9 lore raw
Quoted 66 lines · Tom Lendacky
Quoted 58 lines · Ragavendra B.N.
Quoted 36 lines · Tom Lendacky
Quoted 35 lines · Tom Lendacky
Quoted 19 lines · Ard Biesheuvel
Quoted 18 lines · Ragavendra B.N.
Quoted 8 lines · Ard Biesheuvel
Quoted 7 lines · Ingo Molnar
Quoted 3 lines · Ragavendra

Updating the ctxt value to NULL in the svsm_perform_ghcb_protocol as it was not initialized.

Quoted 6 lines
Quoted 4 lines
Quoted 1 line
Fixes 2e1b3cc9d7f7 (grafted) Merge tag 'arm-fixes-6.12-2' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc

This 'Fixes' tag looks bogus.

So does the patch itself - 'struct es_em_ctxt ctxt' is not a pointer.

Thank you very much for your response. I am relatively new to kernel development.

Quoted 8 lines
Quoted 6 lines

I know we can use kmalloc for memory allocation. Please advice.

struct es_em_ctxt ctxt = kmalloc(sizeof(struct es_em_ctxt), GFP_KERNEL);

I am thinking to update like above, but like you mentioned, ctxt is not a pointer. I can update this to be a pointer if needed.

The code is fine as is. Let's end this thread here, shall we?

I was assuming he got some kind of warning from some compiler options or a static checker. Is that the case Ragavendra?

When I look at the code, it is possible for ctxt->fi.error_code to be left uninitialized. The simple fix is to just initialize ctxt as:

Quoted 12 lines
Quoted 1 line
	struct es_em_ctxt ctxt = {};

Although to cover all cases now and going forwared, the es_em_ctxt fi member should just be zeroed in verify_exception_info() when ES_EXCEPTION is going to be returned.

Thanks,
Tom

Quoted 3 lines

Thanks,
Tom

Yes Tom, that is exactly the reason I worked on it the first place. The issue was reported by the Coverity tool.

I can send the below fix if that is fine.

Quoted 1 line
Quoted 1 line
	struct es_em_ctxt ctxt = {};

For the es_em_ctxt fi member to be zeroed, I can go ahead and assign 0 to all the three long members like below in verify_exception_info()

Quoted 6 lines
	if (info & SVM_EVTINJ_VALID_ERR) {
		ctxt->fi.error_code = info >> 32;
	} else {
		ctxt->fi.error_code = 0;
		ctxt->fi.vector = 0;
		ctxt->fi.cr2 = 0;
Quoted 14 lines

But then the cr2 value isn't set/zeroed in the true path of the if statement. I think a simple memset() at the beginning of the if path that will return ES_EXCEPTION is simplest.

Thanks,
Tom

Quoted 7 lines
	}

return ES_EXCEPTION;

Thanks,
Ragavendra N.

I am assuming something like below.

/* Check if exception information from hypervisor is sane. */ if ((info & SVM_EVTINJ_VALID) &&

		((v == X86_TRAP_GP) || (v == X86_TRAP_UD)) &&
		((info & SVM_EVTINJ_TYPE_MASK) == SVM_EVTINJ_TYPE_EXEPT)) {

	memset(ctxt->fi, 0, sizeof(es_fault_info));

	ctxt->fi.vector = v;

PS - My C skills is not that great as well, as I am from Java/ C# background.

Thanks,
Ragavendra N.

#10 lore raw
Quoted 86 lines · Ragavendra B.N.
Quoted 66 lines · Tom Lendacky
Quoted 58 lines · Ragavendra B.N.
Quoted 36 lines · Tom Lendacky
Quoted 35 lines · Tom Lendacky
Quoted 19 lines · Ard Biesheuvel
Quoted 18 lines · Ragavendra B.N.
Quoted 8 lines · Ard Biesheuvel
Quoted 7 lines · Ingo Molnar
Quoted 3 lines · Ragavendra

Updating the ctxt value to NULL in the svsm_perform_ghcb_protocol as it was not initialized.

Quoted 6 lines
Quoted 4 lines
Quoted 1 line
Fixes 2e1b3cc9d7f7 (grafted) Merge tag 'arm-fixes-6.12-2' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc

This 'Fixes' tag looks bogus.

So does the patch itself - 'struct es_em_ctxt ctxt' is not a pointer.

Thank you very much for your response. I am relatively new to kernel development.

Quoted 8 lines
Quoted 6 lines

I know we can use kmalloc for memory allocation. Please advice.

struct es_em_ctxt ctxt = kmalloc(sizeof(struct es_em_ctxt), GFP_KERNEL);

I am thinking to update like above, but like you mentioned, ctxt is not a pointer. I can update this to be a pointer if needed.

The code is fine as is. Let's end this thread here, shall we?

I was assuming he got some kind of warning from some compiler options or a static checker. Is that the case Ragavendra?

When I look at the code, it is possible for ctxt->fi.error_code to be left uninitialized. The simple fix is to just initialize ctxt as:

Quoted 12 lines
Quoted 1 line
	struct es_em_ctxt ctxt = {};

Although to cover all cases now and going forwared, the es_em_ctxt fi member should just be zeroed in verify_exception_info() when ES_EXCEPTION is going to be returned.

Thanks,
Tom

Quoted 3 lines

Thanks,
Tom

Yes Tom, that is exactly the reason I worked on it the first place. The issue was reported by the Coverity tool.

I can send the below fix if that is fine.

Quoted 1 line
Quoted 1 line
	struct es_em_ctxt ctxt = {};

For the es_em_ctxt fi member to be zeroed, I can go ahead and assign 0 to all the three long members like below in verify_exception_info()

Quoted 6 lines
	if (info & SVM_EVTINJ_VALID_ERR) {
		ctxt->fi.error_code = info >> 32;
	} else {
		ctxt->fi.error_code = 0;
		ctxt->fi.vector = 0;
		ctxt->fi.cr2 = 0;
Quoted 14 lines

But then the cr2 value isn't set/zeroed in the true path of the if statement. I think a simple memset() at the beginning of the if path that will return ES_EXCEPTION is simplest.

Thanks,
Tom

Quoted 7 lines
	}

return ES_EXCEPTION;

Thanks,
Ragavendra N.

I am assuming something like below.

/* Check if exception information from hypervisor is sane. */ if ((info & SVM_EVTINJ_VALID) &&

Quoted 8 lines
		((v == X86_TRAP_GP) || (v == X86_TRAP_UD)) &&
		((info & SVM_EVTINJ_TYPE_MASK) == SVM_EVTINJ_TYPE_EXEPT)) {

	memset(ctxt->fi, 0, sizeof(es_fault_info));

	ctxt->fi.vector = v;

PS - My C skills is not that great as well, as I am from Java/ C# background.

Yes, that is the general idea.

Please be sure that whatever you submit builds properly before submitting. For example, the above will fail to build (as would have your first patch).

Be sure to read Documentation/process/coding-style.rst and Documentation/process/submitting-patches.rst.

Thanks,
Tom

Quoted 4 lines

Thanks,
Ragavendra N.

#11 lore raw
Quoted 102 lines · Tom Lendacky
Quoted 86 lines · Ragavendra B.N.
Quoted 66 lines · Tom Lendacky
Quoted 58 lines · Ragavendra B.N.
Quoted 36 lines · Tom Lendacky
Quoted 35 lines · Tom Lendacky
Quoted 19 lines · Ard Biesheuvel
Quoted 18 lines · Ragavendra B.N.
Quoted 8 lines · Ard Biesheuvel
Quoted 7 lines · Ingo Molnar
Quoted 3 lines · Ragavendra

Updating the ctxt value to NULL in the svsm_perform_ghcb_protocol as it was not initialized.

Quoted 6 lines
Quoted 4 lines
Quoted 1 line
Fixes 2e1b3cc9d7f7 (grafted) Merge tag 'arm-fixes-6.12-2' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc

This 'Fixes' tag looks bogus.

So does the patch itself - 'struct es_em_ctxt ctxt' is not a pointer.

Thank you very much for your response. I am relatively new to kernel development.

Quoted 8 lines
Quoted 6 lines

I know we can use kmalloc for memory allocation. Please advice.

struct es_em_ctxt ctxt = kmalloc(sizeof(struct es_em_ctxt), GFP_KERNEL);

I am thinking to update like above, but like you mentioned, ctxt is not a pointer. I can update this to be a pointer if needed.

The code is fine as is. Let's end this thread here, shall we?

I was assuming he got some kind of warning from some compiler options or a static checker. Is that the case Ragavendra?

When I look at the code, it is possible for ctxt->fi.error_code to be left uninitialized. The simple fix is to just initialize ctxt as:

Quoted 12 lines
Quoted 1 line
	struct es_em_ctxt ctxt = {};

Although to cover all cases now and going forwared, the es_em_ctxt fi member should just be zeroed in verify_exception_info() when ES_EXCEPTION is going to be returned.

Thanks,
Tom

Quoted 3 lines

Thanks,
Tom

Yes Tom, that is exactly the reason I worked on it the first place. The issue was reported by the Coverity tool.

I can send the below fix if that is fine.

Quoted 1 line
Quoted 1 line
	struct es_em_ctxt ctxt = {};

For the es_em_ctxt fi member to be zeroed, I can go ahead and assign 0 to all the three long members like below in verify_exception_info()

Quoted 6 lines
	if (info & SVM_EVTINJ_VALID_ERR) {
		ctxt->fi.error_code = info >> 32;
	} else {
		ctxt->fi.error_code = 0;
		ctxt->fi.vector = 0;
		ctxt->fi.cr2 = 0;
Quoted 14 lines

But then the cr2 value isn't set/zeroed in the true path of the if statement. I think a simple memset() at the beginning of the if path that will return ES_EXCEPTION is simplest.

Thanks,
Tom

Quoted 7 lines
	}

return ES_EXCEPTION;

Thanks,
Ragavendra N.

I am assuming something like below.

/* Check if exception information from hypervisor is sane. */ if ((info & SVM_EVTINJ_VALID) &&

Quoted 8 lines
		((v == X86_TRAP_GP) || (v == X86_TRAP_UD)) &&
		((info & SVM_EVTINJ_TYPE_MASK) == SVM_EVTINJ_TYPE_EXEPT)) {

	memset(ctxt->fi, 0, sizeof(es_fault_info));

	ctxt->fi.vector = v;

PS - My C skills is not that great as well, as I am from Java/ C# background.

Yes, that is the general idea.

Please be sure that whatever you submit builds properly before submitting. For example, the above will fail to build (as would have your first patch).

Quoted 10 lines

Be sure to read Documentation/process/coding-style.rst and Documentation/process/submitting-patches.rst.

Thanks,
Tom

Quoted 4 lines

Thanks,
Ragavendra N.

Sure Tom, I will certainly check if I can build correctly and read the suggested documentation as well before sending my patch.

Thanks & regards,
Ragavendra

#12 lore raw
In reply to Ingo Molnar
Quoted 6 lines · Ingo Molnar
Quoted 3 lines · Ragavendra

Updating the ctxt value to NULL in the svsm_perform_ghcb_protocol as it was not initialized.

Quoted 7 lines
Quoted 1 line
Fixes 2e1b3cc9d7f7 (grafted) Merge tag 'arm-fixes-6.12-2' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc

This 'Fixes' tag looks bogus.

Thanks,

Ingo

Please feel free to suggest the valid tag as the file was renamed and I am not able to fetch the correct commit id. git log --oneline arch/x86/coco/sev/shared.c
f50cd034d24d (HEAD -> 1594023) arch:x86:coco:sev: Initialize ctxt variable
2e1b3cc9d7f7 (grafted) Merge tag 'arm-fixes-6.12-2' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc

--
Thanks,
Ragavendra

#13 lore raw
Quoted 11 lines · Ragavendra B.N.
Quoted 10 lines · Ingo Molnar
Quoted 4 lines · Ragavendra

Updating the ctxt value to NULL in the svsm_perform_ghcb_protocol as it was not initialized.

Fixes 2e1b3cc9d7f7 (grafted) Merge tag 'arm-fixes-6.12-2' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc

This 'Fixes' tag looks bogus.

Quoted 7 lines
Quoted 3 lines

Thanks,

Ingo

Please feel free to suggest the valid tag as the file was renamed and I am not able to fetch the correct commit id. git log --oneline arch/x86/coco/sev/shared.c
f50cd034d24d (HEAD -> 1594023) arch:x86:coco:sev: Initialize ctxt variable
2e1b3cc9d7f7 (grafted) Merge tag 'arm-fixes-6.12-2' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc

A quick git annotate arch/x86/coco/sev/shared.c shows that function was created with:

34ff65901735 ("x86/sev: Use kernel provided SVSM Calling Areas")

Thanks,
Tom

Quoted 4 lines

--
Thanks,
Ragavendra

#14 lore raw
Quoted 20 lines · Tom Lendacky
Quoted 11 lines · Ragavendra B.N.
Quoted 10 lines · Ingo Molnar
Quoted 4 lines · Ragavendra

Updating the ctxt value to NULL in the svsm_perform_ghcb_protocol as it was not initialized.

Fixes 2e1b3cc9d7f7 (grafted) Merge tag 'arm-fixes-6.12-2' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc

This 'Fixes' tag looks bogus.

Quoted 7 lines
Quoted 3 lines

Thanks,

Ingo

Please feel free to suggest the valid tag as the file was renamed and I am not able to fetch the correct commit id. git log --oneline arch/x86/coco/sev/shared.c
f50cd034d24d (HEAD -> 1594023) arch:x86:coco:sev: Initialize ctxt variable
2e1b3cc9d7f7 (grafted) Merge tag 'arm-fixes-6.12-2' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc

Quoted 4 lines

A quick git annotate arch/x86/coco/sev/shared.c shows that function was created with:

34ff65901735 ("x86/sev: Use kernel provided SVSM Calling Areas")

Also, the subject line should be:

x86/sev: Initialize ctxt variable

Thanks,
Tom

Quoted 8 lines

Thanks,
Tom

Quoted 4 lines

--
Thanks,
Ragavendra

#15 lore raw
In reply to Tom Lendacky
Quoted 20 lines · Tom Lendacky
Quoted 11 lines · Ragavendra B.N.
Quoted 10 lines · Ingo Molnar
Quoted 4 lines · Ragavendra

Updating the ctxt value to NULL in the svsm_perform_ghcb_protocol as it was not initialized.

Fixes 2e1b3cc9d7f7 (grafted) Merge tag 'arm-fixes-6.12-2' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc

This 'Fixes' tag looks bogus.

Quoted 7 lines
Quoted 3 lines

Thanks,

Ingo

Please feel free to suggest the valid tag as the file was renamed and I am not able to fetch the correct commit id. git log --oneline arch/x86/coco/sev/shared.c
f50cd034d24d (HEAD -> 1594023) arch:x86:coco:sev: Initialize ctxt variable
2e1b3cc9d7f7 (grafted) Merge tag 'arm-fixes-6.12-2' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc

Quoted 12 lines

A quick git annotate arch/x86/coco/sev/shared.c shows that function was created with:

34ff65901735 ("x86/sev: Use kernel provided SVSM Calling Areas")

Thanks,
Tom

Quoted 4 lines

--
Thanks,
Ragavendra

Thanks a lot Tom.

I figured why I ran into it in the first place. When I cloned, I cloned with --depth 1 as I had less free space in that partition. The annotate flag certainly helped to retrieve the exact commit id.

--
Regards,
Ragavendra N
,