linux-security-module.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2] integrity: Add declarations to init_once void arguments.
@ 2021-04-07  1:44 Jiele Zhao
  2021-04-09  1:24 ` Jiele Zhao
  2021-04-09 18:55 ` Mimi Zohar
  0 siblings, 2 replies; 4+ messages in thread
From: Jiele Zhao @ 2021-04-07  1:44 UTC (permalink / raw)
  To: zohar
  Cc: jmorris, linux-security-module, linux-kernel, linux-integrity,
	Jiele Zhao

init_once is a callback to kmem_cache_create. The parameter
type of this function is void *, so it's better to give a
explicit cast here.

Signed-off-by: Jiele Zhao <unclexiaole@gmail.com>
---
 security/integrity/iint.c         | 2 +-
 security/integrity/ima/ima_main.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/security/integrity/iint.c b/security/integrity/iint.c
index 0ba01847e836..fca8a9409e4a 100644
--- a/security/integrity/iint.c
+++ b/security/integrity/iint.c
@@ -160,7 +160,7 @@ void integrity_inode_free(struct inode *inode)
 
 static void init_once(void *foo)
 {
-	struct integrity_iint_cache *iint = foo;
+	struct integrity_iint_cache *iint = (struct integrity_iint_cache *) foo;
 
 	memset(iint, 0, sizeof(*iint));
 	iint->ima_file_status = INTEGRITY_UNKNOWN;
diff --git a/security/integrity/ima/ima_main.c b/security/integrity/ima/ima_main.c
index 9ef748ea829f..03bef720ab44 100644
--- a/security/integrity/ima/ima_main.c
+++ b/security/integrity/ima/ima_main.c
@@ -482,7 +482,7 @@ int ima_bprm_check(struct linux_binprm *bprm)
 }
 
 /**
- * ima_path_check - based on policy, collect/store measurement.
+ * ima_file_check - based on policy, collect/store measurement.
  * @file: pointer to the file to be measured
  * @mask: contains MAY_READ, MAY_WRITE, MAY_EXEC or MAY_APPEND
  *
-- 
2.25.1


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

* Re: [PATCH v2] integrity: Add declarations to init_once void arguments.
  2021-04-07  1:44 [PATCH v2] integrity: Add declarations to init_once void arguments Jiele Zhao
@ 2021-04-09  1:24 ` Jiele Zhao
  2021-04-09 18:55 ` Mimi Zohar
  1 sibling, 0 replies; 4+ messages in thread
From: Jiele Zhao @ 2021-04-09  1:24 UTC (permalink / raw)
  To: zohar; +Cc: jmorris, linux-security-module, linux-kernel, linux-integrity

Hi Mimi,

And this is another patch that has been modified.

On 2021/4/7 9:44, Jiele Zhao wrote:
> init_once is a callback to kmem_cache_create. The parameter
> type of this function is void *, so it's better to give a
> explicit cast here.
>
> Signed-off-by: Jiele Zhao <unclexiaole@gmail.com>
> ---
>   security/integrity/iint.c         | 2 +-
>   security/integrity/ima/ima_main.c | 2 +-
>   2 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/security/integrity/iint.c b/security/integrity/iint.c
> index 0ba01847e836..fca8a9409e4a 100644
> --- a/security/integrity/iint.c
> +++ b/security/integrity/iint.c
> @@ -160,7 +160,7 @@ void integrity_inode_free(struct inode *inode)
>   
>   static void init_once(void *foo)
>   {
> -	struct integrity_iint_cache *iint = foo;
> +	struct integrity_iint_cache *iint = (struct integrity_iint_cache *) foo;
>   
>   	memset(iint, 0, sizeof(*iint));
>   	iint->ima_file_status = INTEGRITY_UNKNOWN;
> diff --git a/security/integrity/ima/ima_main.c b/security/integrity/ima/ima_main.c
> index 9ef748ea829f..03bef720ab44 100644
> --- a/security/integrity/ima/ima_main.c
> +++ b/security/integrity/ima/ima_main.c
> @@ -482,7 +482,7 @@ int ima_bprm_check(struct linux_binprm *bprm)
>   }
>   
>   /**
> - * ima_path_check - based on policy, collect/store measurement.
> + * ima_file_check - based on policy, collect/store measurement.
>    * @file: pointer to the file to be measured
>    * @mask: contains MAY_READ, MAY_WRITE, MAY_EXEC or MAY_APPEND
>    *

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

* Re: [PATCH v2] integrity: Add declarations to init_once void arguments.
  2021-04-07  1:44 [PATCH v2] integrity: Add declarations to init_once void arguments Jiele Zhao
  2021-04-09  1:24 ` Jiele Zhao
@ 2021-04-09 18:55 ` Mimi Zohar
  2021-04-10  3:19   ` Jiele Zhao
  1 sibling, 1 reply; 4+ messages in thread
From: Mimi Zohar @ 2021-04-09 18:55 UTC (permalink / raw)
  To: Jiele Zhao; +Cc: jmorris, linux-security-module, linux-kernel, linux-integrity

Hi Jiele,

On Wed, 2021-04-07 at 01:44 +0000, Jiele Zhao wrote:
> init_once is a callback to kmem_cache_create. The parameter
> type of this function is void *, so it's better to give a
> explicit cast here.
> 
> Signed-off-by: Jiele Zhao <unclexiaole@gmail.com>
> ---
>  security/integrity/iint.c         | 2 +-
>  security/integrity/ima/ima_main.c | 2 +-
>  2 files changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/security/integrity/iint.c b/security/integrity/iint.c
> index 0ba01847e836..fca8a9409e4a 100644
> --- a/security/integrity/iint.c
> +++ b/security/integrity/iint.c
> @@ -160,7 +160,7 @@ void integrity_inode_free(struct inode *inode)
>  
>  static void init_once(void *foo)
>  {
> -	struct integrity_iint_cache *iint = foo;
> +	struct integrity_iint_cache *iint = (struct integrity_iint_cache *) foo;
>  
>  	memset(iint, 0, sizeof(*iint));
>  	iint->ima_file_status = INTEGRITY_UNKNOWN;
> diff --git a/security/integrity/ima/ima_main.c b/security/integrity/ima/ima_main.c
> index 9ef748ea829f..03bef720ab44 100644
> --- a/security/integrity/ima/ima_main.c
> +++ b/security/integrity/ima/ima_main.c
> @@ -482,7 +482,7 @@ int ima_bprm_check(struct linux_binprm *bprm)
>  }
>  
>  /**
> - * ima_path_check - based on policy, collect/store measurement.
> + * ima_file_check - based on policy, collect/store measurement.
>   * @file: pointer to the file to be measured
>   * @mask: contains MAY_READ, MAY_WRITE, MAY_EXEC or MAY_APPEND
>   *

This change was already posted as "ima: Fix function name error in
comment".  I've dropped this hunk.  In the future, please review your
patch line by line before posting.

Applied to
git://git.kernel.org/pub/scm/linux/kernel/git/zohar/linux-integrity.git 
next-integrity

thanks,

Mimi


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

* Re: [PATCH v2] integrity: Add declarations to init_once void arguments.
  2021-04-09 18:55 ` Mimi Zohar
@ 2021-04-10  3:19   ` Jiele Zhao
  0 siblings, 0 replies; 4+ messages in thread
From: Jiele Zhao @ 2021-04-10  3:19 UTC (permalink / raw)
  To: Mimi Zohar; +Cc: jmorris, linux-security-module, linux-kernel, linux-integrity

Okay, thank you. I'll keep an eye on that !

On 2021/4/10 2:55, Mimi Zohar wrote:
> Hi Jiele,
>
> On Wed, 2021-04-07 at 01:44 +0000, Jiele Zhao wrote:
>> init_once is a callback to kmem_cache_create. The parameter
>> type of this function is void *, so it's better to give a
>> explicit cast here.
>>
>> Signed-off-by: Jiele Zhao <unclexiaole@gmail.com>
>> ---
>>   security/integrity/iint.c         | 2 +-
>>   security/integrity/ima/ima_main.c | 2 +-
>>   2 files changed, 2 insertions(+), 2 deletions(-)
>>
>> diff --git a/security/integrity/iint.c b/security/integrity/iint.c
>> index 0ba01847e836..fca8a9409e4a 100644
>> --- a/security/integrity/iint.c
>> +++ b/security/integrity/iint.c
>> @@ -160,7 +160,7 @@ void integrity_inode_free(struct inode *inode)
>>   
>>   static void init_once(void *foo)
>>   {
>> -	struct integrity_iint_cache *iint = foo;
>> +	struct integrity_iint_cache *iint = (struct integrity_iint_cache *) foo;
>>   
>>   	memset(iint, 0, sizeof(*iint));
>>   	iint->ima_file_status = INTEGRITY_UNKNOWN;
>> diff --git a/security/integrity/ima/ima_main.c b/security/integrity/ima/ima_main.c
>> index 9ef748ea829f..03bef720ab44 100644
>> --- a/security/integrity/ima/ima_main.c
>> +++ b/security/integrity/ima/ima_main.c
>> @@ -482,7 +482,7 @@ int ima_bprm_check(struct linux_binprm *bprm)
>>   }
>>   
>>   /**
>> - * ima_path_check - based on policy, collect/store measurement.
>> + * ima_file_check - based on policy, collect/store measurement.
>>    * @file: pointer to the file to be measured
>>    * @mask: contains MAY_READ, MAY_WRITE, MAY_EXEC or MAY_APPEND
>>    *
> This change was already posted as "ima: Fix function name error in
> comment".  I've dropped this hunk.  In the future, please review your
> patch line by line before posting.
>
> Applied to
> git://git.kernel.org/pub/scm/linux/kernel/git/zohar/linux-integrity.git
> next-integrity
>
> thanks,
>
> Mimi
>

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

end of thread, other threads:[~2021-04-10  3:19 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-07  1:44 [PATCH v2] integrity: Add declarations to init_once void arguments Jiele Zhao
2021-04-09  1:24 ` Jiele Zhao
2021-04-09 18:55 ` Mimi Zohar
2021-04-10  3:19   ` Jiele Zhao

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).