All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] kexec_lock:Fix comment for kexec_lock
@ 2023-07-24  3:45 ` Wenyu Liu(D)
  0 siblings, 0 replies; 10+ messages in thread
From: Wenyu Liu(D) @ 2023-07-24  3:45 UTC (permalink / raw)
  To: kexec, linux-integrity, linux-security-module
  Cc: ebiederm, zohar, dmitry.kasatkin, paul, jmorris, serge

kexec_mutex is replaced by an atomic variable in
56314b90fd43bd2444 (panic, kexec: make __crash_kexec() NMI safe).

Fix some comment that still using kexec_mutex.

Signed-off-by: Wenyu Liu  <liuwenyu7@huawei.com>
---
 kernel/kexec_file.c                | 2 +-
 security/integrity/ima/ima_kexec.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/kernel/kexec_file.c b/kernel/kexec_file.c
index 881ba0d1714c..b5bbb2fe0668 100644
--- a/kernel/kexec_file.c
+++ b/kernel/kexec_file.c
@@ -624,7 +624,7 @@ int kexec_locate_mem_hole(struct kexec_buf *kbuf)
  * kexec_add_buffer - place a buffer in a kexec segment
  * @kbuf:  Buffer contents and memory parameters.
  *
- * This function assumes that kexec_mutex is held.
+ * This function assumes that kexec_lock is held.
  * On successful return, @kbuf->mem will have the physical address of
  * the buffer in memory.
  *
diff --git a/security/integrity/ima/ima_kexec.c b/security/integrity/ima/ima_kexec.c
index 419dc405c831..ad133fe120db 100644
--- a/security/integrity/ima/ima_kexec.c
+++ b/security/integrity/ima/ima_kexec.c
@@ -77,7 +77,7 @@ static int ima_dump_measurement_list(unsigned long *buffer_size, void **buffer,
  * Called during kexec_file_load so that IMA can add a segment to the kexec
  * image for the measurement list for the next kernel.
  *
- * This function assumes that kexec_mutex is held.
+ * This function assumes that kexec_lock is held.
  */
 void ima_add_kexec_buffer(struct kimage *image)
 {
--
2.33.0

_______________________________________________
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec

^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [PATCH] kexec_lock:Fix comment for kexec_lock
@ 2023-07-24  3:45 ` Wenyu Liu(D)
  0 siblings, 0 replies; 10+ messages in thread
From: Wenyu Liu(D) @ 2023-07-24  3:45 UTC (permalink / raw)
  To: kexec, linux-integrity, linux-security-module
  Cc: ebiederm, zohar, dmitry.kasatkin, paul, jmorris, serge

kexec_mutex is replaced by an atomic variable in
56314b90fd43bd2444 (panic, kexec: make __crash_kexec() NMI safe).

Fix some comment that still using kexec_mutex.

Signed-off-by: Wenyu Liu  <liuwenyu7@huawei.com>
---
 kernel/kexec_file.c                | 2 +-
 security/integrity/ima/ima_kexec.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/kernel/kexec_file.c b/kernel/kexec_file.c
index 881ba0d1714c..b5bbb2fe0668 100644
--- a/kernel/kexec_file.c
+++ b/kernel/kexec_file.c
@@ -624,7 +624,7 @@ int kexec_locate_mem_hole(struct kexec_buf *kbuf)
  * kexec_add_buffer - place a buffer in a kexec segment
  * @kbuf:  Buffer contents and memory parameters.
  *
- * This function assumes that kexec_mutex is held.
+ * This function assumes that kexec_lock is held.
  * On successful return, @kbuf->mem will have the physical address of
  * the buffer in memory.
  *
diff --git a/security/integrity/ima/ima_kexec.c b/security/integrity/ima/ima_kexec.c
index 419dc405c831..ad133fe120db 100644
--- a/security/integrity/ima/ima_kexec.c
+++ b/security/integrity/ima/ima_kexec.c
@@ -77,7 +77,7 @@ static int ima_dump_measurement_list(unsigned long *buffer_size, void **buffer,
  * Called during kexec_file_load so that IMA can add a segment to the kexec
  * image for the measurement list for the next kernel.
  *
- * This function assumes that kexec_mutex is held.
+ * This function assumes that kexec_lock is held.
  */
 void ima_add_kexec_buffer(struct kimage *image)
 {
--
2.33.0

^ permalink raw reply related	[flat|nested] 10+ messages in thread

* Re: [PATCH] kexec_lock:Fix comment for kexec_lock
  2023-07-24  3:45 ` Wenyu Liu(D)
@ 2023-07-24  8:23   ` Baoquan He
  -1 siblings, 0 replies; 10+ messages in thread
From: Baoquan He @ 2023-07-24  8:23 UTC (permalink / raw)
  To: Wenyu Liu(D)
  Cc: kexec, linux-integrity, linux-security-module, ebiederm, zohar,
	dmitry.kasatkin, paul, jmorris, serge

On 07/24/23 at 11:45am, Wenyu Liu(D) wrote:
> kexec_mutex is replaced by an atomic variable in
> 56314b90fd43bd2444 (panic, kexec: make __crash_kexec() NMI safe).

You could use a distros kernel or customized kernel and made change
based on that. The commit id isn't correct. I pasted the right one
at below.

commit 05c6257433b ("panic, kexec: make __crash_kexec() NMI safe")

Other than this, this looks good. You can post a new one with my ack.

Acked-by: Baoquan He <bhe@redhat.com>

> 
> Fix some comment that still using kexec_mutex.
> 
> Signed-off-by: Wenyu Liu  <liuwenyu7@huawei.com>
> ---
>  kernel/kexec_file.c                | 2 +-
>  security/integrity/ima/ima_kexec.c | 2 +-
>  2 files changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/kernel/kexec_file.c b/kernel/kexec_file.c
> index 881ba0d1714c..b5bbb2fe0668 100644
> --- a/kernel/kexec_file.c
> +++ b/kernel/kexec_file.c
> @@ -624,7 +624,7 @@ int kexec_locate_mem_hole(struct kexec_buf *kbuf)
>   * kexec_add_buffer - place a buffer in a kexec segment
>   * @kbuf:  Buffer contents and memory parameters.
>   *
> - * This function assumes that kexec_mutex is held.
> + * This function assumes that kexec_lock is held.
>   * On successful return, @kbuf->mem will have the physical address of
>   * the buffer in memory.
>   *
> diff --git a/security/integrity/ima/ima_kexec.c b/security/integrity/ima/ima_kexec.c
> index 419dc405c831..ad133fe120db 100644
> --- a/security/integrity/ima/ima_kexec.c
> +++ b/security/integrity/ima/ima_kexec.c
> @@ -77,7 +77,7 @@ static int ima_dump_measurement_list(unsigned long *buffer_size, void **buffer,
>   * Called during kexec_file_load so that IMA can add a segment to the kexec
>   * image for the measurement list for the next kernel.
>   *
> - * This function assumes that kexec_mutex is held.
> + * This function assumes that kexec_lock is held.
>   */
>  void ima_add_kexec_buffer(struct kimage *image)
>  {
> --
> 2.33.0
> 
> _______________________________________________
> kexec mailing list
> kexec@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/kexec
> 


_______________________________________________
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH] kexec_lock:Fix comment for kexec_lock
@ 2023-07-24  8:23   ` Baoquan He
  0 siblings, 0 replies; 10+ messages in thread
From: Baoquan He @ 2023-07-24  8:23 UTC (permalink / raw)
  To: Wenyu Liu(D)
  Cc: kexec, linux-integrity, linux-security-module, ebiederm, zohar,
	dmitry.kasatkin, paul, jmorris, serge

On 07/24/23 at 11:45am, Wenyu Liu(D) wrote:
> kexec_mutex is replaced by an atomic variable in
> 56314b90fd43bd2444 (panic, kexec: make __crash_kexec() NMI safe).

You could use a distros kernel or customized kernel and made change
based on that. The commit id isn't correct. I pasted the right one
at below.

commit 05c6257433b ("panic, kexec: make __crash_kexec() NMI safe")

Other than this, this looks good. You can post a new one with my ack.

Acked-by: Baoquan He <bhe@redhat.com>

> 
> Fix some comment that still using kexec_mutex.
> 
> Signed-off-by: Wenyu Liu  <liuwenyu7@huawei.com>
> ---
>  kernel/kexec_file.c                | 2 +-
>  security/integrity/ima/ima_kexec.c | 2 +-
>  2 files changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/kernel/kexec_file.c b/kernel/kexec_file.c
> index 881ba0d1714c..b5bbb2fe0668 100644
> --- a/kernel/kexec_file.c
> +++ b/kernel/kexec_file.c
> @@ -624,7 +624,7 @@ int kexec_locate_mem_hole(struct kexec_buf *kbuf)
>   * kexec_add_buffer - place a buffer in a kexec segment
>   * @kbuf:  Buffer contents and memory parameters.
>   *
> - * This function assumes that kexec_mutex is held.
> + * This function assumes that kexec_lock is held.
>   * On successful return, @kbuf->mem will have the physical address of
>   * the buffer in memory.
>   *
> diff --git a/security/integrity/ima/ima_kexec.c b/security/integrity/ima/ima_kexec.c
> index 419dc405c831..ad133fe120db 100644
> --- a/security/integrity/ima/ima_kexec.c
> +++ b/security/integrity/ima/ima_kexec.c
> @@ -77,7 +77,7 @@ static int ima_dump_measurement_list(unsigned long *buffer_size, void **buffer,
>   * Called during kexec_file_load so that IMA can add a segment to the kexec
>   * image for the measurement list for the next kernel.
>   *
> - * This function assumes that kexec_mutex is held.
> + * This function assumes that kexec_lock is held.
>   */
>  void ima_add_kexec_buffer(struct kimage *image)
>  {
> --
> 2.33.0
> 
> _______________________________________________
> kexec mailing list
> kexec@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/kexec
> 


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH] kexec_lock:Fix comment for kexec_lock
  2023-07-24  3:45 ` Wenyu Liu(D)
@ 2023-07-24  8:49   ` Paul Menzel
  -1 siblings, 0 replies; 10+ messages in thread
From: Paul Menzel @ 2023-07-24  8:49 UTC (permalink / raw)
  To: Wenyu Liu
  Cc: kexec, linux-integrity, linux-security-module, ebiederm, zohar,
	dmitry.kasatkin, paul, jmorris, serge

Dear Wenyu,


Thank you for your patch. Some minor comments, you can ignore.

Am 24.07.23 um 05:45 schrieb Wenyu Liu(D):

The (D) looks strange. At least a space should be added before the (.

> kexec_mutex is replaced by an atomic variable in
> 56314b90fd43bd2444 (panic, kexec: make __crash_kexec() NMI safe).
> 
> Fix some comment that still using kexec_mutex.

comment*s*

> 
> Signed-off-by: Wenyu Liu  <liuwenyu7@huawei.com>

Due to the (D) this doesn’t exactly match with the Author field. You 
also have two spaces before < instead of one.

Also for the commit message summary you could be more specific:

 > kexec_lock: Replace kexec_mutex() by kexec_lock() in two comments

At least, please add a space after the colon (:).

> ---
>   kernel/kexec_file.c                | 2 +-
>   security/integrity/ima/ima_kexec.c | 2 +-
>   2 files changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/kernel/kexec_file.c b/kernel/kexec_file.c
> index 881ba0d1714c..b5bbb2fe0668 100644
> --- a/kernel/kexec_file.c
> +++ b/kernel/kexec_file.c
> @@ -624,7 +624,7 @@ int kexec_locate_mem_hole(struct kexec_buf *kbuf)
>    * kexec_add_buffer - place a buffer in a kexec segment
>    * @kbuf:  Buffer contents and memory parameters.
>    *
> - * This function assumes that kexec_mutex is held.
> + * This function assumes that kexec_lock is held.
>    * On successful return, @kbuf->mem will have the physical address of
>    * the buffer in memory.
>    *
> diff --git a/security/integrity/ima/ima_kexec.c b/security/integrity/ima/ima_kexec.c
> index 419dc405c831..ad133fe120db 100644
> --- a/security/integrity/ima/ima_kexec.c
> +++ b/security/integrity/ima/ima_kexec.c
> @@ -77,7 +77,7 @@ static int ima_dump_measurement_list(unsigned long *buffer_size, void **buffer,
>    * Called during kexec_file_load so that IMA can add a segment to the kexec
>    * image for the measurement list for the next kernel.
>    *
> - * This function assumes that kexec_mutex is held.
> + * This function assumes that kexec_lock is held.
>    */
>   void ima_add_kexec_buffer(struct kimage *image)
>   {
> --
> 2.33.0


Kind regards,

Paul

_______________________________________________
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH] kexec_lock:Fix comment for kexec_lock
@ 2023-07-24  8:49   ` Paul Menzel
  0 siblings, 0 replies; 10+ messages in thread
From: Paul Menzel @ 2023-07-24  8:49 UTC (permalink / raw)
  To: Wenyu Liu
  Cc: kexec, linux-integrity, linux-security-module, ebiederm, zohar,
	dmitry.kasatkin, paul, jmorris, serge

Dear Wenyu,


Thank you for your patch. Some minor comments, you can ignore.

Am 24.07.23 um 05:45 schrieb Wenyu Liu(D):

The (D) looks strange. At least a space should be added before the (.

> kexec_mutex is replaced by an atomic variable in
> 56314b90fd43bd2444 (panic, kexec: make __crash_kexec() NMI safe).
> 
> Fix some comment that still using kexec_mutex.

comment*s*

> 
> Signed-off-by: Wenyu Liu  <liuwenyu7@huawei.com>

Due to the (D) this doesn’t exactly match with the Author field. You 
also have two spaces before < instead of one.

Also for the commit message summary you could be more specific:

 > kexec_lock: Replace kexec_mutex() by kexec_lock() in two comments

At least, please add a space after the colon (:).

> ---
>   kernel/kexec_file.c                | 2 +-
>   security/integrity/ima/ima_kexec.c | 2 +-
>   2 files changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/kernel/kexec_file.c b/kernel/kexec_file.c
> index 881ba0d1714c..b5bbb2fe0668 100644
> --- a/kernel/kexec_file.c
> +++ b/kernel/kexec_file.c
> @@ -624,7 +624,7 @@ int kexec_locate_mem_hole(struct kexec_buf *kbuf)
>    * kexec_add_buffer - place a buffer in a kexec segment
>    * @kbuf:  Buffer contents and memory parameters.
>    *
> - * This function assumes that kexec_mutex is held.
> + * This function assumes that kexec_lock is held.
>    * On successful return, @kbuf->mem will have the physical address of
>    * the buffer in memory.
>    *
> diff --git a/security/integrity/ima/ima_kexec.c b/security/integrity/ima/ima_kexec.c
> index 419dc405c831..ad133fe120db 100644
> --- a/security/integrity/ima/ima_kexec.c
> +++ b/security/integrity/ima/ima_kexec.c
> @@ -77,7 +77,7 @@ static int ima_dump_measurement_list(unsigned long *buffer_size, void **buffer,
>    * Called during kexec_file_load so that IMA can add a segment to the kexec
>    * image for the measurement list for the next kernel.
>    *
> - * This function assumes that kexec_mutex is held.
> + * This function assumes that kexec_lock is held.
>    */
>   void ima_add_kexec_buffer(struct kimage *image)
>   {
> --
> 2.33.0


Kind regards,

Paul

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH] kexec_lock:Fix comment for kexec_lock
  2023-07-24  8:23   ` Baoquan He
@ 2023-07-24  9:12     ` Wenyu Liu(D)
  -1 siblings, 0 replies; 10+ messages in thread
From: Wenyu Liu(D) @ 2023-07-24  9:12 UTC (permalink / raw)
  To: Baoquan He
  Cc: kexec, linux-integrity, linux-security-module, ebiederm, zohar,
	dmitry.kasatkin, paul, jmorris, serge

Thanks for the tips, I will post a new one later

在 2023/7/24 16:23, Baoquan He 写道:
> On 07/24/23 at 11:45am, Wenyu Liu(D) wrote:
>> kexec_mutex is replaced by an atomic variable in
>> 56314b90fd43bd2444 (panic, kexec: make __crash_kexec() NMI safe).
> 
> You could use a distros kernel or customized kernel and made change
> based on that. The commit id isn't correct. I pasted the right one
> at below.
> 
> commit 05c6257433b ("panic, kexec: make __crash_kexec() NMI safe")
> 
> Other than this, this looks good. You can post a new one with my ack.
> 
> Acked-by: Baoquan He <bhe@redhat.com>
> 
>>
>> Fix some comment that still using kexec_mutex.
>>
>> Signed-off-by: Wenyu Liu  <liuwenyu7@huawei.com>
>> ---
>>  kernel/kexec_file.c                | 2 +-
>>  security/integrity/ima/ima_kexec.c | 2 +-
>>  2 files changed, 2 insertions(+), 2 deletions(-)
>>
>> diff --git a/kernel/kexec_file.c b/kernel/kexec_file.c
>> index 881ba0d1714c..b5bbb2fe0668 100644
>> --- a/kernel/kexec_file.c
>> +++ b/kernel/kexec_file.c
>> @@ -624,7 +624,7 @@ int kexec_locate_mem_hole(struct kexec_buf *kbuf)
>>   * kexec_add_buffer - place a buffer in a kexec segment
>>   * @kbuf:  Buffer contents and memory parameters.
>>   *
>> - * This function assumes that kexec_mutex is held.
>> + * This function assumes that kexec_lock is held.
>>   * On successful return, @kbuf->mem will have the physical address of
>>   * the buffer in memory.
>>   *
>> diff --git a/security/integrity/ima/ima_kexec.c b/security/integrity/ima/ima_kexec.c
>> index 419dc405c831..ad133fe120db 100644
>> --- a/security/integrity/ima/ima_kexec.c
>> +++ b/security/integrity/ima/ima_kexec.c
>> @@ -77,7 +77,7 @@ static int ima_dump_measurement_list(unsigned long *buffer_size, void **buffer,
>>   * Called during kexec_file_load so that IMA can add a segment to the kexec
>>   * image for the measurement list for the next kernel.
>>   *
>> - * This function assumes that kexec_mutex is held.
>> + * This function assumes that kexec_lock is held.
>>   */
>>  void ima_add_kexec_buffer(struct kimage *image)
>>  {
>> --
>> 2.33.0
>>
>> _______________________________________________
>> kexec mailing list
>> kexec@lists.infradead.org
>> http://lists.infradead.org/mailman/listinfo/kexec
>>
> 

_______________________________________________
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH] kexec_lock:Fix comment for kexec_lock
@ 2023-07-24  9:12     ` Wenyu Liu(D)
  0 siblings, 0 replies; 10+ messages in thread
From: Wenyu Liu(D) @ 2023-07-24  9:12 UTC (permalink / raw)
  To: Baoquan He
  Cc: kexec, linux-integrity, linux-security-module, ebiederm, zohar,
	dmitry.kasatkin, paul, jmorris, serge

Thanks for the tips, I will post a new one later

在 2023/7/24 16:23, Baoquan He 写道:
> On 07/24/23 at 11:45am, Wenyu Liu(D) wrote:
>> kexec_mutex is replaced by an atomic variable in
>> 56314b90fd43bd2444 (panic, kexec: make __crash_kexec() NMI safe).
> 
> You could use a distros kernel or customized kernel and made change
> based on that. The commit id isn't correct. I pasted the right one
> at below.
> 
> commit 05c6257433b ("panic, kexec: make __crash_kexec() NMI safe")
> 
> Other than this, this looks good. You can post a new one with my ack.
> 
> Acked-by: Baoquan He <bhe@redhat.com>
> 
>>
>> Fix some comment that still using kexec_mutex.
>>
>> Signed-off-by: Wenyu Liu  <liuwenyu7@huawei.com>
>> ---
>>  kernel/kexec_file.c                | 2 +-
>>  security/integrity/ima/ima_kexec.c | 2 +-
>>  2 files changed, 2 insertions(+), 2 deletions(-)
>>
>> diff --git a/kernel/kexec_file.c b/kernel/kexec_file.c
>> index 881ba0d1714c..b5bbb2fe0668 100644
>> --- a/kernel/kexec_file.c
>> +++ b/kernel/kexec_file.c
>> @@ -624,7 +624,7 @@ int kexec_locate_mem_hole(struct kexec_buf *kbuf)
>>   * kexec_add_buffer - place a buffer in a kexec segment
>>   * @kbuf:  Buffer contents and memory parameters.
>>   *
>> - * This function assumes that kexec_mutex is held.
>> + * This function assumes that kexec_lock is held.
>>   * On successful return, @kbuf->mem will have the physical address of
>>   * the buffer in memory.
>>   *
>> diff --git a/security/integrity/ima/ima_kexec.c b/security/integrity/ima/ima_kexec.c
>> index 419dc405c831..ad133fe120db 100644
>> --- a/security/integrity/ima/ima_kexec.c
>> +++ b/security/integrity/ima/ima_kexec.c
>> @@ -77,7 +77,7 @@ static int ima_dump_measurement_list(unsigned long *buffer_size, void **buffer,
>>   * Called during kexec_file_load so that IMA can add a segment to the kexec
>>   * image for the measurement list for the next kernel.
>>   *
>> - * This function assumes that kexec_mutex is held.
>> + * This function assumes that kexec_lock is held.
>>   */
>>  void ima_add_kexec_buffer(struct kimage *image)
>>  {
>> --
>> 2.33.0
>>
>> _______________________________________________
>> kexec mailing list
>> kexec@lists.infradead.org
>> http://lists.infradead.org/mailman/listinfo/kexec
>>
> 

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH] kexec_lock:Fix comment for kexec_lock
  2023-07-24  8:49   ` Paul Menzel
@ 2023-07-24  9:15     ` Wenyu Liu(D)
  -1 siblings, 0 replies; 10+ messages in thread
From: Wenyu Liu(D) @ 2023-07-24  9:15 UTC (permalink / raw)
  To: Paul Menzel
  Cc: kexec, linux-integrity, linux-security-module, ebiederm, zohar,
	dmitry.kasatkin, paul, jmorris, serge

Thanks for the tips, I'll make a double-checkpost and post a new one later

在 2023/7/24 16:49, Paul Menzel 写道:
> Dear Wenyu,
> 
> 
> Thank you for your patch. Some minor comments, you can ignore.
> 
> Am 24.07.23 um 05:45 schrieb Wenyu Liu(D):
> 
> The (D) looks strange. At least a space should be added before the (.
> 
>> kexec_mutex is replaced by an atomic variable in
>> 56314b90fd43bd2444 (panic, kexec: make __crash_kexec() NMI safe).
>>
>> Fix some comment that still using kexec_mutex.
> 
> comment*s*
> 
>>
>> Signed-off-by: Wenyu Liu  <liuwenyu7@huawei.com>
> 
> Due to the (D) this doesn’t exactly match with the Author field. You also have two spaces before < instead of one.
> 
> Also for the commit message summary you could be more specific:
> 
>> kexec_lock: Replace kexec_mutex() by kexec_lock() in two comments
> 
> At least, please add a space after the colon (:).
> 
>> ---
>>   kernel/kexec_file.c                | 2 +-
>>   security/integrity/ima/ima_kexec.c | 2 +-
>>   2 files changed, 2 insertions(+), 2 deletions(-)
>>
>> diff --git a/kernel/kexec_file.c b/kernel/kexec_file.c
>> index 881ba0d1714c..b5bbb2fe0668 100644
>> --- a/kernel/kexec_file.c
>> +++ b/kernel/kexec_file.c
>> @@ -624,7 +624,7 @@ int kexec_locate_mem_hole(struct kexec_buf *kbuf)
>>    * kexec_add_buffer - place a buffer in a kexec segment
>>    * @kbuf:  Buffer contents and memory parameters.
>>    *
>> - * This function assumes that kexec_mutex is held.
>> + * This function assumes that kexec_lock is held.
>>    * On successful return, @kbuf->mem will have the physical address of
>>    * the buffer in memory.
>>    *
>> diff --git a/security/integrity/ima/ima_kexec.c b/security/integrity/ima/ima_kexec.c
>> index 419dc405c831..ad133fe120db 100644
>> --- a/security/integrity/ima/ima_kexec.c
>> +++ b/security/integrity/ima/ima_kexec.c
>> @@ -77,7 +77,7 @@ static int ima_dump_measurement_list(unsigned long *buffer_size, void **buffer,
>>    * Called during kexec_file_load so that IMA can add a segment to the kexec
>>    * image for the measurement list for the next kernel.
>>    *
>> - * This function assumes that kexec_mutex is held.
>> + * This function assumes that kexec_lock is held.
>>    */
>>   void ima_add_kexec_buffer(struct kimage *image)
>>   {
>> -- 
>> 2.33.0
> 
> 
> Kind regards,
> 
> Paul
> 

_______________________________________________
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH] kexec_lock:Fix comment for kexec_lock
@ 2023-07-24  9:15     ` Wenyu Liu(D)
  0 siblings, 0 replies; 10+ messages in thread
From: Wenyu Liu(D) @ 2023-07-24  9:15 UTC (permalink / raw)
  To: Paul Menzel
  Cc: kexec, linux-integrity, linux-security-module, ebiederm, zohar,
	dmitry.kasatkin, paul, jmorris, serge

Thanks for the tips, I'll make a double-checkpost and post a new one later

在 2023/7/24 16:49, Paul Menzel 写道:
> Dear Wenyu,
> 
> 
> Thank you for your patch. Some minor comments, you can ignore.
> 
> Am 24.07.23 um 05:45 schrieb Wenyu Liu(D):
> 
> The (D) looks strange. At least a space should be added before the (.
> 
>> kexec_mutex is replaced by an atomic variable in
>> 56314b90fd43bd2444 (panic, kexec: make __crash_kexec() NMI safe).
>>
>> Fix some comment that still using kexec_mutex.
> 
> comment*s*
> 
>>
>> Signed-off-by: Wenyu Liu  <liuwenyu7@huawei.com>
> 
> Due to the (D) this doesn’t exactly match with the Author field. You also have two spaces before < instead of one.
> 
> Also for the commit message summary you could be more specific:
> 
>> kexec_lock: Replace kexec_mutex() by kexec_lock() in two comments
> 
> At least, please add a space after the colon (:).
> 
>> ---
>>   kernel/kexec_file.c                | 2 +-
>>   security/integrity/ima/ima_kexec.c | 2 +-
>>   2 files changed, 2 insertions(+), 2 deletions(-)
>>
>> diff --git a/kernel/kexec_file.c b/kernel/kexec_file.c
>> index 881ba0d1714c..b5bbb2fe0668 100644
>> --- a/kernel/kexec_file.c
>> +++ b/kernel/kexec_file.c
>> @@ -624,7 +624,7 @@ int kexec_locate_mem_hole(struct kexec_buf *kbuf)
>>    * kexec_add_buffer - place a buffer in a kexec segment
>>    * @kbuf:  Buffer contents and memory parameters.
>>    *
>> - * This function assumes that kexec_mutex is held.
>> + * This function assumes that kexec_lock is held.
>>    * On successful return, @kbuf->mem will have the physical address of
>>    * the buffer in memory.
>>    *
>> diff --git a/security/integrity/ima/ima_kexec.c b/security/integrity/ima/ima_kexec.c
>> index 419dc405c831..ad133fe120db 100644
>> --- a/security/integrity/ima/ima_kexec.c
>> +++ b/security/integrity/ima/ima_kexec.c
>> @@ -77,7 +77,7 @@ static int ima_dump_measurement_list(unsigned long *buffer_size, void **buffer,
>>    * Called during kexec_file_load so that IMA can add a segment to the kexec
>>    * image for the measurement list for the next kernel.
>>    *
>> - * This function assumes that kexec_mutex is held.
>> + * This function assumes that kexec_lock is held.
>>    */
>>   void ima_add_kexec_buffer(struct kimage *image)
>>   {
>> -- 
>> 2.33.0
> 
> 
> Kind regards,
> 
> Paul
> 

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2023-07-24  9:15 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-07-24  3:45 [PATCH] kexec_lock:Fix comment for kexec_lock Wenyu Liu(D)
2023-07-24  3:45 ` Wenyu Liu(D)
2023-07-24  8:23 ` Baoquan He
2023-07-24  8:23   ` Baoquan He
2023-07-24  9:12   ` Wenyu Liu(D)
2023-07-24  9:12     ` Wenyu Liu(D)
2023-07-24  8:49 ` Paul Menzel
2023-07-24  8:49   ` Paul Menzel
2023-07-24  9:15   ` Wenyu Liu(D)
2023-07-24  9:15     ` Wenyu Liu(D)

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.