Re: [Linux-ima-devel] [PATCH v2 3/4] ima: check appraisal flag in the ima_file_free() hook

2014-10-02 Thread Dmitry Kasatkin
ized' removal patch merged to this patch (requested by Mimi) Signed-off-by: Dmitry Kasatkin Acked-by: Roberto Sassu -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info

Re: [Linux-ima-devel] [PATCH v2 3/4] ima: check appraisal flag in the ima_file_free() hook

2014-10-02 Thread Dmitry Kasatkin
On 02/10/14 13:06, Roberto Sassu wrote: > On 10/02/2014 11:30 AM, Dmitry Kasatkin wrote: >> On 02/10/14 11:26, Roberto Sassu wrote: >>> On 10/01/2014 08:43 PM, Dmitry Kasatkin wrote: >>>> ima_file_free() hook is only used by appraisal module to update hash >

Re: [Linux-ima-devel] [PATCH v2 3/4] ima: check appraisal flag in the ima_file_free() hook

2014-10-02 Thread Dmitry Kasatkin
On 02/10/14 11:26, Roberto Sassu wrote: > On 10/01/2014 08:43 PM, Dmitry Kasatkin wrote: >> ima_file_free() hook is only used by appraisal module to update hash >> when file was modified. When there were no integrity checks on inode, >> S_IMA flag is not set, integrity_iin

[PATCH 1/1] ima: check ima_policy_flag in the ima_file_free() hook

2014-10-02 Thread Dmitry Kasatkin
-off-by: Dmitry Kasatkin --- security/integrity/iint.c | 3 --- security/integrity/ima/ima_main.c | 2 +- security/integrity/integrity.h| 3 --- 3 files changed, 1 insertion(+), 7 deletions(-) diff --git a/security/integrity/iint.c b/security/integrity/iint.c index a521edf..cc3eb4d

[PATCH 1/1] ima: check ima_policy_flag in the ima_file_free() hook

2014-10-02 Thread Dmitry Kasatkin
-off-by: Dmitry Kasatkin d.kasat...@samsung.com --- security/integrity/iint.c | 3 --- security/integrity/ima/ima_main.c | 2 +- security/integrity/integrity.h| 3 --- 3 files changed, 1 insertion(+), 7 deletions(-) diff --git a/security/integrity/iint.c b/security/integrity/iint.c index

Re: [Linux-ima-devel] [PATCH v2 3/4] ima: check appraisal flag in the ima_file_free() hook

2014-10-02 Thread Dmitry Kasatkin
On 02/10/14 11:26, Roberto Sassu wrote: On 10/01/2014 08:43 PM, Dmitry Kasatkin wrote: ima_file_free() hook is only used by appraisal module to update hash when file was modified. When there were no integrity checks on inode, S_IMA flag is not set, integrity_iint_find() returns NULL

Re: [Linux-ima-devel] [PATCH v2 3/4] ima: check appraisal flag in the ima_file_free() hook

2014-10-02 Thread Dmitry Kasatkin
On 02/10/14 13:06, Roberto Sassu wrote: On 10/02/2014 11:30 AM, Dmitry Kasatkin wrote: On 02/10/14 11:26, Roberto Sassu wrote: On 10/01/2014 08:43 PM, Dmitry Kasatkin wrote: ima_file_free() hook is only used by appraisal module to update hash when file was modified. When there were

Re: [Linux-ima-devel] [PATCH v2 3/4] ima: check appraisal flag in the ima_file_free() hook

2014-10-02 Thread Dmitry Kasatkin
) Signed-off-by: Dmitry Kasatkin d.kasat...@samsung.com Acked-by: Roberto Sassu roberto.sa...@polito.it -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo

Re: [PATCH 08/13] KEYS: Overhaul key identification when searching for asymmetric keys

2014-10-02 Thread Dmitry Kasatkin
Hi David, I just took latest #next branch from James's security tree which includes latest KEYs patches and noticed following: [9.812332] Request for unknown module key 'Magrathea: Glacier signing key: 926305d6dda66f47139eb4e3cb25a6adef527f08' err -11 Also I noticed that output of 'keyctl

Re: [PATCH 08/13] KEYS: Overhaul key identification when searching for asymmetric keys

2014-10-02 Thread Dmitry Kasatkin
On 02/10/14 18:49, Dmitry Kasatkin wrote: Hi David, I just took latest #next branch from James's security tree which includes latest KEYs patches and noticed following: [9.812332] Request for unknown module key 'Magrathea: Glacier signing key: 926305d6dda66f47139eb4e3cb25a6adef527f08

Re: [PATCH 08/13] KEYS: Overhaul key identification when searching for asymmetric keys

2014-10-02 Thread Dmitry Kasatkin
On 2 October 2014 19:04, Dmitry Kasatkin d.kasat...@samsung.com wrote: On 02/10/14 18:49, Dmitry Kasatkin wrote: Hi David, I just took latest #next branch from James's security tree which includes latest KEYs patches and noticed following: [9.812332] Request for unknown module key

[PATCH v2 2/4] evm: skip replacing EVM signature with HMAC on read-only filesystem

2014-10-01 Thread Dmitry Kasatkin
according to Lindent (requested by Mimi) Signed-off-by: Dmitry Kasatkin --- security/integrity/evm/evm_main.c | 11 --- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/security/integrity/evm/evm_main.c b/security/integrity/evm/evm_main.c index 9685af3..b392fe6 100644 --- a/security

[PATCH v2 1/4] integrity: add missing '__init' keyword for integrity_init_keyring()

2014-10-01 Thread Dmitry Kasatkin
integrity_init_keyring() is used only from kernel '__init' functions. Add it there as well. Signed-off-by: Dmitry Kasatkin --- security/integrity/digsig.c| 2 +- security/integrity/integrity.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/security/integrity/digsig.c

[PATCH v2 3/4] ima: check appraisal flag in the ima_file_free() hook

2014-10-01 Thread Dmitry Kasatkin
kernel initialization. So this variable is unnecessary and thus this patch removes it. Changes in v2: * 'iint_initialized' removal patch merged to this patch (requested by Mimi) Signed-off-by: Dmitry Kasatkin --- security/integrity/iint.c | 3 --- security/integrity/ima/ima_main.c | 2

[PATCH v2 0/4] integrity: few code cleanups

2014-10-01 Thread Dmitry Kasatkin
Here is few simple code cleanups. Please refer to the patch descriptions for details. They previously were posted on linux-ima-devel mailing list and feedback was addressed. - Dmitry Dmitry Kasatkin (4): integrity: add missing '__init' keyword for integrity_init_keyring() evm: skip replacing

[PATCH v2 4/4] ima: use path names cache

2014-10-01 Thread Dmitry Kasatkin
__getname() uses slab allocation which is faster than kmalloc. Make use of it. Signed-off-by: Dmitry Kasatkin --- security/integrity/ima/ima_api.c | 4 ++-- security/integrity/ima/ima_main.c | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/security/integrity/ima

[PATCH v2 4/4] ima: use path names cache

2014-10-01 Thread Dmitry Kasatkin
__getname() uses slab allocation which is faster than kmalloc. Make use of it. Signed-off-by: Dmitry Kasatkin d.kasat...@samsung.com --- security/integrity/ima/ima_api.c | 4 ++-- security/integrity/ima/ima_main.c | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/security

[PATCH v2 0/4] integrity: few code cleanups

2014-10-01 Thread Dmitry Kasatkin
Here is few simple code cleanups. Please refer to the patch descriptions for details. They previously were posted on linux-ima-devel mailing list and feedback was addressed. - Dmitry Dmitry Kasatkin (4): integrity: add missing '__init' keyword for integrity_init_keyring() evm: skip replacing

[PATCH v2 1/4] integrity: add missing '__init' keyword for integrity_init_keyring()

2014-10-01 Thread Dmitry Kasatkin
integrity_init_keyring() is used only from kernel '__init' functions. Add it there as well. Signed-off-by: Dmitry Kasatkin d.kasat...@samsung.com --- security/integrity/digsig.c| 2 +- security/integrity/integrity.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git

[PATCH v2 3/4] ima: check appraisal flag in the ima_file_free() hook

2014-10-01 Thread Dmitry Kasatkin
kernel initialization. So this variable is unnecessary and thus this patch removes it. Changes in v2: * 'iint_initialized' removal patch merged to this patch (requested by Mimi) Signed-off-by: Dmitry Kasatkin d.kasat...@samsung.com --- security/integrity/iint.c | 3 --- security

[PATCH v2 2/4] evm: skip replacing EVM signature with HMAC on read-only filesystem

2014-10-01 Thread Dmitry Kasatkin
according to Lindent (requested by Mimi) Signed-off-by: Dmitry Kasatkin d.kasat...@samsung.com --- security/integrity/evm/evm_main.c | 11 --- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/security/integrity/evm/evm_main.c b/security/integrity/evm/evm_main.c index 9685af3..b392fe6

Re: [PATCH v4 11/12] security, crypto: LLVMLinux: Remove VLAIS from ima_crypto.c

2014-09-23 Thread Dmitry Kasatkin
_ON_STACK macro. > > The new code can be compiled with both gcc and clang. > > Signed-off-by: Behan Webster > Reviewed-by: Mark Charlebois > Reviewed-by: Jan-Simon Möller > Acked-by: Herbert Xu > Cc: t...@linutronix.de Looks good. Thanks. Acked-by: Dmitry Kasatkin > --- &

Re: [PATCH v4 11/12] security, crypto: LLVMLinux: Remove VLAIS from ima_crypto.c

2014-09-23 Thread Dmitry Kasatkin
good. Thanks. Acked-by: Dmitry Kasatkin d.kasat...@samsung.com --- security/integrity/ima/ima_crypto.c | 47 +++-- 1 file changed, 19 insertions(+), 28 deletions(-) diff --git a/security/integrity/ima/ima_crypto.c b/security/integrity/ima/ima_crypto.c index

Re: [PATCH v3 01/12] crypto: LLVMLinux: Add macro to remove use of VLAIS in crypto code

2014-09-17 Thread Dmitry Kasatkin
On 17/09/14 12:22, Herbert Xu wrote: > On Mon, Sep 15, 2014 at 12:30:23AM -0700, beh...@converseincode.com wrote: >> From: Behan Webster >> >> Add a macro which replaces the use of a Variable Length Array In Struct >> (VLAIS) >> with a C99 compliant equivalent. This macro instead allocates the

Re: [PATCH v3 01/12] crypto: LLVMLinux: Add macro to remove use of VLAIS in crypto code

2014-09-17 Thread Dmitry Kasatkin
On 17/09/14 12:22, Herbert Xu wrote: On Mon, Sep 15, 2014 at 12:30:23AM -0700, beh...@converseincode.com wrote: From: Behan Webster beh...@converseincode.com Add a macro which replaces the use of a Variable Length Array In Struct (VLAIS) with a C99 compliant equivalent. This macro instead

Re: [PATCH 2/6] KEYS: Reinstate EPERM for a key type name beginning with a '.'

2014-09-11 Thread Dmitry Kasatkin
On 11 September 2014 15:27, Dmitry Kasatkin wrote: > On 11 September 2014 15:09, David Howells wrote: >> Mimi Zohar wrote: >> >>> On Wed, 2014-09-10 at 19:36 -0400, Mimi Zohar wrote: >>> > On Wed, 2014-09-10 at 22:22 +0100, David Howells wrote: >&

Re: [PATCH 2/6] KEYS: Reinstate EPERM for a key type name beginning with a '.'

2014-09-11 Thread Dmitry Kasatkin
On 11 September 2014 15:09, David Howells wrote: > Mimi Zohar wrote: > >> On Wed, 2014-09-10 at 19:36 -0400, Mimi Zohar wrote: >> > On Wed, 2014-09-10 at 22:22 +0100, David Howells wrote: >> > > Reinstate the generation of EPERM for a key type name beginning with a >> > > '.' in a userspace

Re: [PATCH 2/6] KEYS: Reinstate EPERM for a key type name beginning with a '.'

2014-09-11 Thread Dmitry Kasatkin
On 11 September 2014 15:09, David Howells dhowe...@redhat.com wrote: Mimi Zohar zo...@linux.vnet.ibm.com wrote: On Wed, 2014-09-10 at 19:36 -0400, Mimi Zohar wrote: On Wed, 2014-09-10 at 22:22 +0100, David Howells wrote: Reinstate the generation of EPERM for a key type name beginning with

Re: [PATCH 2/6] KEYS: Reinstate EPERM for a key type name beginning with a '.'

2014-09-11 Thread Dmitry Kasatkin
On 11 September 2014 15:27, Dmitry Kasatkin dmitry.kasat...@gmail.com wrote: On 11 September 2014 15:09, David Howells dhowe...@redhat.com wrote: Mimi Zohar zo...@linux.vnet.ibm.com wrote: On Wed, 2014-09-10 at 19:36 -0400, Mimi Zohar wrote: On Wed, 2014-09-10 at 22:22 +0100, David Howells

Re: [PATCH] security, crypto: LLVMLinux: Remove VLAIS from ima_crypto.c

2014-09-08 Thread Dmitry Kasatkin
On 07/09/14 05:06, Behan Webster wrote: > On 09/06/14 03:11, Thomas Gleixner wrote: >> On Fri, 5 Sep 2014, Behan Webster wrote: >>> On 09/05/14 17:18, Thomas Gleixner wrote: > Signed-off-by: Behan Webster > Signed-off-by: Mark Charlebois > Signed-off-by: Jan-Simon Möller This

Re: [PATCH] security, crypto: LLVMLinux: Remove VLAIS from ima_crypto.c

2014-09-08 Thread Dmitry Kasatkin
On 07/09/14 05:06, Behan Webster wrote: On 09/06/14 03:11, Thomas Gleixner wrote: On Fri, 5 Sep 2014, Behan Webster wrote: On 09/05/14 17:18, Thomas Gleixner wrote: Signed-off-by: Behan Webster beh...@converseincode.com Signed-off-by: Mark Charlebois charl...@gmail.com Signed-off-by:

Re: [Linux-ima-devel] [PATCH 8/8] ima: initialize only required template

2014-09-03 Thread Dmitry Kasatkin
On 03/09/14 16:45, Roberto Sassu wrote: > On 09/03/2014 09:20 AM, Dmitry Kasatkin wrote: >> IMA uses only one template. This patch initializes only required >> template to avoid unnecessary memory allocations. >> >> Signed-off-by: Dmitry Kasatkin >> --- >>

Re: [PATCH v2 2/3] integrity: move integrity subsystem options to a separate menu

2014-09-03 Thread Dmitry Kasatkin
On 03/09/14 15:35, Mimi Zohar wrote: > On Wed, 2014-09-03 at 10:29 +0300, Dmitry Kasatkin wrote: >> Integrity subsystem got lots of options and takes more than half >> of security menu. >> >> This patch moves integrity subsystem options to a separate menu. >

Re: [PATCH 6/8] ima: remove unnecessary code

2014-09-03 Thread Dmitry Kasatkin
On 03/09/14 16:08, Mimi Zohar wrote: > On Wed, 2014-09-03 at 10:19 +0300, Dmitry Kasatkin wrote: >> If ima_appraise is 0, then action would not mandate to perform >> appraisal and ima_appraise_measurement will never be called. >> >> Signed-off-by: Dmitry Kasatkin >

Re: [PATCH 7/8] ima: remove usage of filename parameter

2014-09-03 Thread Dmitry Kasatkin
On 03/09/14 16:16, Mimi Zohar wrote: > On Wed, 2014-09-03 at 10:20 +0300, Dmitry Kasatkin wrote: >> In all cases except ima_bprm_check() filename was not defined and >> ima_d_path() was used to find full path. >> >> ima_bprm_check() used to select between bprm

Re: [PATCH 2/8] integrity: remove declaration of non-existing functions

2014-09-03 Thread Dmitry Kasatkin
On 03/09/14 15:51, Mimi Zohar wrote: > On Wed, 2014-09-03 at 10:19 +0300, Dmitry Kasatkin wrote: >> Noticed that there are declaration of few non-existing functions. >> Also remove duplicated declaration of inegrity_iint_find(). > Please include the commits, which remov

Re: [PATCH v2 2/3] integrity: move integrity subsystem options to a separate menu

2014-09-03 Thread Dmitry Kasatkin
On 03/09/14 15:35, Mimi Zohar wrote: > On Wed, 2014-09-03 at 10:29 +0300, Dmitry Kasatkin wrote: >> Integrity subsystem got lots of options and takes more than half >> of security menu. >> >> This patch moves integrity subsystem options to a separate menu. >

[PATCH v2 3/3] integrity: make all integrity components as integrity module

2014-09-03 Thread Dmitry Kasatkin
. Signed-off-by: Dmitry Kasatkin --- security/integrity/Makefile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/security/integrity/Makefile b/security/integrity/Makefile index 0793f48..8d1f4bf 100644 --- a/security/integrity/Makefile +++ b/security/integrity/Makefile

[PATCH v2 0/3] integrity: build scripts changes

2014-09-03 Thread Dmitry Kasatkin
Hi, These patches introduce few changes to integrity subsystem build scripts. Patch descriptions provide detailed explanations. Changes in v2: - use 'menu' instead of 'menuconfig' to keep integrity as security option - Dmitry Dmitry Kasatkin (3): integrity: move asymmetric keys config option

[PATCH v2 1/3] integrity: move asymmetric keys config option

2014-09-03 Thread Dmitry Kasatkin
For better visual appearance it is better to co-locate asymmetric key option together with signature support. Signed-off-by: Dmitry Kasatkin --- security/integrity/Kconfig | 24 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/security/integrity/Kconfig b

[PATCH v2 2/3] integrity: move integrity subsystem options to a separate menu

2014-09-03 Thread Dmitry Kasatkin
' menu. This version keeps integrity as a security option (Mimi). Signed-off-by: Dmitry Kasatkin --- security/integrity/Kconfig | 14 -- security/integrity/evm/Kconfig | 9 + security/integrity/ima/Kconfig | 3 +-- 3 files changed, 14 insertions(+), 12 deletions(-) diff

[PATCH 2/8] integrity: remove declaration of non-existing functions

2014-09-03 Thread Dmitry Kasatkin
Noticed that there are declaration of few non-existing functions. Also remove duplicated declaration of inegrity_iint_find(). Signed-off-by: Dmitry Kasatkin --- security/integrity/ima/ima.h | 9 - security/integrity/integrity.h | 1 - 2 files changed, 10 deletions(-) diff --git

[PATCH 6/8] ima: remove unnecessary code

2014-09-03 Thread Dmitry Kasatkin
If ima_appraise is 0, then action would not mandate to perform appraisal and ima_appraise_measurement will never be called. Signed-off-by: Dmitry Kasatkin --- security/integrity/ima/ima_appraise.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/security/integrity/ima/ima_appraise.c b

[PATCH 1/8] integrity: prevent flooding with 'Request for unknown key'

2014-09-03 Thread Dmitry Kasatkin
' to 'pr_err_ratelimited'. Signed-off-by: Dmitry Kasatkin --- security/integrity/digsig_asymmetric.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/security/integrity/digsig_asymmetric.c b/security/integrity/digsig_asymmetric.c index 9eae480..37e0d98 100644 --- a/security

[PATCH 0/8] integrity: miscellaneous cleanups

2014-09-03 Thread Dmitry Kasatkin
Hi, Here is a few miscellaneous cleanups to improve code quality, performance and prevent unnecessary memory allocations. - Dmitry Dmitry Kasatkin (8): integrity: prevent flooding with 'Request for unknown key' integrity: remove declaration of non-existing functions ima: simplify

[PATCH 3/8] ima: simplify conditional statement to improve performance

2014-09-03 Thread Dmitry Kasatkin
Precede bit testing before string comparison makes code faster. Also refactor statement as a single line pointer assignment. Signed-off-by: Dmitry Kasatkin --- security/integrity/ima/ima_main.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/security/integrity/ima

[PATCH 5/8] ima: add missing '__init' keywords

2014-09-03 Thread Dmitry Kasatkin
Add missing keywords to the function definition to cleanup to discard initialization code. Signed-off-by: Dmitry Kasatkin --- security/integrity/ima/ima.h | 2 -- security/integrity/ima/ima_crypto.c | 2 +- security/integrity/ima/ima_template.c | 4 ++-- 3 files changed, 3 insertions

[PATCH 8/8] ima: initialize only required template

2014-09-03 Thread Dmitry Kasatkin
IMA uses only one template. This patch initializes only required template to avoid unnecessary memory allocations. Signed-off-by: Dmitry Kasatkin --- security/integrity/ima/ima_template.c | 28 1 file changed, 4 insertions(+), 24 deletions(-) diff --git a/security

[PATCH 7/8] ima: remove usage of filename parameter

2014-09-03 Thread Dmitry Kasatkin
./foo.sh, pathname: /root/bin/foo.sh filename: ./foo.sh, pathname: /bin/dash bprm->interp filename: ./foo.sh, pathname: /root/bin/foo.sh filename: /bin/sh, pathname: /bin/dash In both cases pathnames are the same. This patch removes usage of filename and interp in favor of d_path. Signed-of

[PATCH 4/8] ima: remove unnecessary extra variable

2014-09-03 Thread Dmitry Kasatkin
'function' variable value can be changed instead of allocating extra '_func' variable. Signed-off-by: Dmitry Kasatkin --- security/integrity/ima/ima_main.c | 9 + 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/security/integrity/ima/ima_main.c b/security/integrity/ima

[PATCH 5/8] ima: add missing '__init' keywords

2014-09-03 Thread Dmitry Kasatkin
Add missing keywords to the function definition to cleanup to discard initialization code. Signed-off-by: Dmitry Kasatkin d.kasat...@samsung.com --- security/integrity/ima/ima.h | 2 -- security/integrity/ima/ima_crypto.c | 2 +- security/integrity/ima/ima_template.c | 4 ++-- 3 files

[PATCH 8/8] ima: initialize only required template

2014-09-03 Thread Dmitry Kasatkin
IMA uses only one template. This patch initializes only required template to avoid unnecessary memory allocations. Signed-off-by: Dmitry Kasatkin d.kasat...@samsung.com --- security/integrity/ima/ima_template.c | 28 1 file changed, 4 insertions(+), 24 deletions

[PATCH 7/8] ima: remove usage of filename parameter

2014-09-03 Thread Dmitry Kasatkin
: /root/bin/foo.sh filename: ./foo.sh, pathname: /bin/dash bprm-interp filename: ./foo.sh, pathname: /root/bin/foo.sh filename: /bin/sh, pathname: /bin/dash In both cases pathnames are the same. This patch removes usage of filename and interp in favor of d_path. Signed-off-by: Dmitry Kasatkin

[PATCH 4/8] ima: remove unnecessary extra variable

2014-09-03 Thread Dmitry Kasatkin
'function' variable value can be changed instead of allocating extra '_func' variable. Signed-off-by: Dmitry Kasatkin d.kasat...@samsung.com --- security/integrity/ima/ima_main.c | 9 + 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/security/integrity/ima/ima_main.c b

[PATCH 2/8] integrity: remove declaration of non-existing functions

2014-09-03 Thread Dmitry Kasatkin
Noticed that there are declaration of few non-existing functions. Also remove duplicated declaration of inegrity_iint_find(). Signed-off-by: Dmitry Kasatkin d.kasat...@samsung.com --- security/integrity/ima/ima.h | 9 - security/integrity/integrity.h | 1 - 2 files changed, 10

[PATCH 6/8] ima: remove unnecessary code

2014-09-03 Thread Dmitry Kasatkin
If ima_appraise is 0, then action would not mandate to perform appraisal and ima_appraise_measurement will never be called. Signed-off-by: Dmitry Kasatkin d.kasat...@samsung.com --- security/integrity/ima/ima_appraise.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/security/integrity/ima

[PATCH 1/8] integrity: prevent flooding with 'Request for unknown key'

2014-09-03 Thread Dmitry Kasatkin
' to 'pr_err_ratelimited'. Signed-off-by: Dmitry Kasatkin d.kasat...@samsung.com --- security/integrity/digsig_asymmetric.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/security/integrity/digsig_asymmetric.c b/security/integrity/digsig_asymmetric.c index 9eae480..37e0d98

[PATCH 0/8] integrity: miscellaneous cleanups

2014-09-03 Thread Dmitry Kasatkin
Hi, Here is a few miscellaneous cleanups to improve code quality, performance and prevent unnecessary memory allocations. - Dmitry Dmitry Kasatkin (8): integrity: prevent flooding with 'Request for unknown key' integrity: remove declaration of non-existing functions ima: simplify

[PATCH 3/8] ima: simplify conditional statement to improve performance

2014-09-03 Thread Dmitry Kasatkin
Precede bit testing before string comparison makes code faster. Also refactor statement as a single line pointer assignment. Signed-off-by: Dmitry Kasatkin d.kasat...@samsung.com --- security/integrity/ima/ima_main.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git

[PATCH v2 2/3] integrity: move integrity subsystem options to a separate menu

2014-09-03 Thread Dmitry Kasatkin
' menu. This version keeps integrity as a security option (Mimi). Signed-off-by: Dmitry Kasatkin d.kasat...@samsung.com --- security/integrity/Kconfig | 14 -- security/integrity/evm/Kconfig | 9 + security/integrity/ima/Kconfig | 3 +-- 3 files changed, 14 insertions(+), 12

[PATCH v2 0/3] integrity: build scripts changes

2014-09-03 Thread Dmitry Kasatkin
Hi, These patches introduce few changes to integrity subsystem build scripts. Patch descriptions provide detailed explanations. Changes in v2: - use 'menu' instead of 'menuconfig' to keep integrity as security option - Dmitry Dmitry Kasatkin (3): integrity: move asymmetric keys config option

[PATCH v2 1/3] integrity: move asymmetric keys config option

2014-09-03 Thread Dmitry Kasatkin
For better visual appearance it is better to co-locate asymmetric key option together with signature support. Signed-off-by: Dmitry Kasatkin d.kasat...@samsung.com --- security/integrity/Kconfig | 24 1 file changed, 12 insertions(+), 12 deletions(-) diff --git

[PATCH v2 3/3] integrity: make all integrity components as integrity module

2014-09-03 Thread Dmitry Kasatkin
. Signed-off-by: Dmitry Kasatkin d.kasat...@samsung.com --- security/integrity/Makefile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/security/integrity/Makefile b/security/integrity/Makefile index 0793f48..8d1f4bf 100644 --- a/security/integrity/Makefile +++ b/security

Re: [PATCH v2 2/3] integrity: move integrity subsystem options to a separate menu

2014-09-03 Thread Dmitry Kasatkin
On 03/09/14 15:35, Mimi Zohar wrote: On Wed, 2014-09-03 at 10:29 +0300, Dmitry Kasatkin wrote: Integrity subsystem got lots of options and takes more than half of security menu. This patch moves integrity subsystem options to a separate menu. It does not affect existing configuration. Re

Re: [PATCH 2/8] integrity: remove declaration of non-existing functions

2014-09-03 Thread Dmitry Kasatkin
On 03/09/14 15:51, Mimi Zohar wrote: On Wed, 2014-09-03 at 10:19 +0300, Dmitry Kasatkin wrote: Noticed that there are declaration of few non-existing functions. Also remove duplicated declaration of inegrity_iint_find(). Please include the commits, which removed these functions, in the patch

Re: [PATCH 7/8] ima: remove usage of filename parameter

2014-09-03 Thread Dmitry Kasatkin
On 03/09/14 16:16, Mimi Zohar wrote: On Wed, 2014-09-03 at 10:20 +0300, Dmitry Kasatkin wrote: In all cases except ima_bprm_check() filename was not defined and ima_d_path() was used to find full path. ima_bprm_check() used to select between bprm-interp and bprm-filename. Following dump

Re: [PATCH 6/8] ima: remove unnecessary code

2014-09-03 Thread Dmitry Kasatkin
On 03/09/14 16:08, Mimi Zohar wrote: On Wed, 2014-09-03 at 10:19 +0300, Dmitry Kasatkin wrote: If ima_appraise is 0, then action would not mandate to perform appraisal and ima_appraise_measurement will never be called. Signed-off-by: Dmitry Kasatkin d.kasat...@samsung.com The policy

Re: [PATCH v2 2/3] integrity: move integrity subsystem options to a separate menu

2014-09-03 Thread Dmitry Kasatkin
On 03/09/14 15:35, Mimi Zohar wrote: On Wed, 2014-09-03 at 10:29 +0300, Dmitry Kasatkin wrote: Integrity subsystem got lots of options and takes more than half of security menu. This patch moves integrity subsystem options to a separate menu. It does not affect existing configuration. Re

Re: [Linux-ima-devel] [PATCH 8/8] ima: initialize only required template

2014-09-03 Thread Dmitry Kasatkin
On 03/09/14 16:45, Roberto Sassu wrote: On 09/03/2014 09:20 AM, Dmitry Kasatkin wrote: IMA uses only one template. This patch initializes only required template to avoid unnecessary memory allocations. Signed-off-by: Dmitry Kasatkin d.kasat...@samsung.com --- security/integrity/ima

Re: [PATCH v1 0/4] ima: require signed user-space initialization

2014-07-29 Thread Dmitry Kasatkin
On Wed, Jul 23, 2014 at 9:08 PM, Mimi Zohar wrote: > On Wed, 2014-07-16 at 23:26 +0300, Dmitry Kasatkin wrote: >> Hello, >> >> >> On Wed, Jul 16, 2014 at 12:33 AM, Andrew Morton >> wrote: >> > On Tue, 15 Jul 2014 15:54:19 +0300 Dmitry Kasatkin >&g

Re: [PATCH v1 0/4] ima: require signed user-space initialization

2014-07-29 Thread Dmitry Kasatkin
On Wed, Jul 23, 2014 at 9:08 PM, Mimi Zohar zo...@linux.vnet.ibm.com wrote: On Wed, 2014-07-16 at 23:26 +0300, Dmitry Kasatkin wrote: Hello, On Wed, Jul 16, 2014 at 12:33 AM, Andrew Morton a...@linux-foundation.org wrote: On Tue, 15 Jul 2014 15:54:19 +0300 Dmitry Kasatkin d.kasat

Re: Making the asymmetric keys config option into a top-level option

2014-07-19 Thread Dmitry Kasatkin
On Thu, Jul 17, 2014 at 10:55 PM, David Howells wrote: > Dmitry Kasatkin wrote: > >> When ASYMMETRIC_KEYS=y, but depends on CRYPTO=m, selections will be also >> modules. >> In random config case OID_REGISTRY, MPILIB and ASN1 became modules producing >> buil

Re: [PATCH 2/2] digsig: make crypto builtin if digsig selected as builtin

2014-07-19 Thread Dmitry Kasatkin
On Thu, Jul 17, 2014 at 10:56 PM, David Howells wrote: > Dmitry Kasatkin wrote: > >> When SIGNATURE=y but depends on CRYPTO=m, it selects MPILIB as module >> producing build break. This patch makes digsig to select crypto for >> correcting dependency. > > I'll appl

Re: [PATCH 2/2] digsig: make crypto builtin if digsig selected as builtin

2014-07-19 Thread Dmitry Kasatkin
On Thu, Jul 17, 2014 at 10:56 PM, David Howells dhowe...@redhat.com wrote: Dmitry Kasatkin d.kasat...@samsung.com wrote: When SIGNATURE=y but depends on CRYPTO=m, it selects MPILIB as module producing build break. This patch makes digsig to select crypto for correcting dependency. I'll

Re: Making the asymmetric keys config option into a top-level option

2014-07-19 Thread Dmitry Kasatkin
On Thu, Jul 17, 2014 at 10:55 PM, David Howells dhowe...@redhat.com wrote: Dmitry Kasatkin d.kasat...@samsung.com wrote: When ASYMMETRIC_KEYS=y, but depends on CRYPTO=m, selections will be also modules. In random config case OID_REGISTRY, MPILIB and ASN1 became modules producing build

Re: [PATCH v1 0/4] ima: require signed user-space initialization

2014-07-16 Thread Dmitry Kasatkin
Hello, On Wed, Jul 16, 2014 at 12:33 AM, Andrew Morton wrote: > On Tue, 15 Jul 2014 15:54:19 +0300 Dmitry Kasatkin > wrote: > >> Currently secure IMA/EVM initialization has to be done from the initramfs, >> embedded in the signed kernel image. Many systems do not wan

Re: [PATCH v1 3/3] ima: pass 'opened' flag to identify newly created files

2014-07-16 Thread Dmitry Kasatkin
On 16/07/14 01:12, Mimi Zohar wrote: > On Fri, 2014-07-11 at 14:47 +0300, Dmitry Kasatkin wrote: >> Empty file size and missing xattrs do not guaranty that file > ^guarantee > >> was just created. It could be originally made empty and labeled >> with needed LSM lab

Re: [Linux-ima-devel] [PATCH v1 1/3] ima: provide flag to identify new empty files

2014-07-16 Thread Dmitry Kasatkin
On 16/07/14 01:12, Mimi Zohar wrote: > On Tue, 2014-07-15 at 10:00 -0400, Mimi Zohar wrote: >> On Fri, 2014-07-11 at 14:46 +0300, Dmitry Kasatkin wrote: >>> Newly created empty files do not get initial security.ima >>> value because iversion does not change. It can be

Re: [Linux-ima-devel] [PATCH v1 1/3] ima: provide flag to identify new empty files

2014-07-16 Thread Dmitry Kasatkin
On 16/07/14 01:12, Mimi Zohar wrote: On Tue, 2014-07-15 at 10:00 -0400, Mimi Zohar wrote: On Fri, 2014-07-11 at 14:46 +0300, Dmitry Kasatkin wrote: Newly created empty files do not get initial security.ima value because iversion does not change. It can be checked from the shell

Re: [PATCH v1 3/3] ima: pass 'opened' flag to identify newly created files

2014-07-16 Thread Dmitry Kasatkin
On 16/07/14 01:12, Mimi Zohar wrote: On Fri, 2014-07-11 at 14:47 +0300, Dmitry Kasatkin wrote: Empty file size and missing xattrs do not guaranty that file ^guarantee was just created. It could be originally made empty and labeled with needed LSM labels. Current implementation makes

Re: [PATCH v1 0/4] ima: require signed user-space initialization

2014-07-16 Thread Dmitry Kasatkin
Hello, On Wed, Jul 16, 2014 at 12:33 AM, Andrew Morton a...@linux-foundation.org wrote: On Tue, 15 Jul 2014 15:54:19 +0300 Dmitry Kasatkin d.kasat...@samsung.com wrote: Currently secure IMA/EVM initialization has to be done from the initramfs, embedded in the signed kernel image. Many

[PATCH v1 2/4] integrity: provide file reading API

2014-07-15 Thread Dmitry Kasatkin
Signed-off-by: Dmitry Kasatkin --- security/integrity/Kconfig | 3 +++ security/integrity/digsig.c| 41 + security/integrity/integrity.h | 2 +- 3 files changed, 45 insertions(+), 1 deletion(-) diff --git a/security/integrity/Kconfig b/security

[PATCH v1 4/4] ima: require signed user-space initialization

2014-07-15 Thread Dmitry Kasatkin
X509 certificate into the .ima trusted kernel keyring from root filesystem. It forces embedded policy to check signature. Signed initialization script can initialize EVM key, update the IMA policy and change requirement of everything to be signed. Signed-off-by: Dmitry Kasatkin --- security

[PATCH v1 1/4] ima: provide hook to load IMA keys when rootfs is ready

2014-07-15 Thread Dmitry Kasatkin
Keys can only be loaded when rootfs is mounted. Initcalls are not suitable for that. Provide a special hook. Signed-off-by: Dmitry Kasatkin --- include/linux/ima.h | 9 + init/main.c | 6 +- 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/include/linux/ima.h b

[PATCH v1 0/4] ima: require signed user-space initialization

2014-07-15 Thread Dmitry Kasatkin
and configuration files under dedicated directory, for example '/ima', and run signed init process by providing a kernel command line parameter 'init=/ima/init' -Dmitry Dmitry Kasatkin (4): ima: provide hook to load IMA keys when rootfs is ready integrity: provide file reading API integrity: provide

[PATCH v1 3/4] integrity: provide x509 certificate loading from the kernel

2014-07-15 Thread Dmitry Kasatkin
Provide API to load x509 certificates from the kernel into the integrity kernel keyrings. Signed-off-by: Dmitry Kasatkin --- security/integrity/Kconfig | 4 security/integrity/digsig.c| 37 + security/integrity/integrity.h | 9 + 3

[PATCH v1 3/4] integrity: provide x509 certificate loading from the kernel

2014-07-15 Thread Dmitry Kasatkin
Provide API to load x509 certificates from the kernel into the integrity kernel keyrings. Signed-off-by: Dmitry Kasatkin d.kasat...@samsung.com --- security/integrity/Kconfig | 4 security/integrity/digsig.c| 37 + security/integrity/integrity.h

[PATCH v1 0/4] ima: require signed user-space initialization

2014-07-15 Thread Dmitry Kasatkin
and configuration files under dedicated directory, for example '/ima', and run signed init process by providing a kernel command line parameter 'init=/ima/init' -Dmitry Dmitry Kasatkin (4): ima: provide hook to load IMA keys when rootfs is ready integrity: provide file reading API integrity: provide

[PATCH v1 1/4] ima: provide hook to load IMA keys when rootfs is ready

2014-07-15 Thread Dmitry Kasatkin
Keys can only be loaded when rootfs is mounted. Initcalls are not suitable for that. Provide a special hook. Signed-off-by: Dmitry Kasatkin d.kasat...@samsung.com --- include/linux/ima.h | 9 + init/main.c | 6 +- 2 files changed, 14 insertions(+), 1 deletion(-) diff --git

[PATCH v1 4/4] ima: require signed user-space initialization

2014-07-15 Thread Dmitry Kasatkin
X509 certificate into the .ima trusted kernel keyring from root filesystem. It forces embedded policy to check signature. Signed initialization script can initialize EVM key, update the IMA policy and change requirement of everything to be signed. Signed-off-by: Dmitry Kasatkin d.kasat...@samsung.com

[PATCH v1 2/4] integrity: provide file reading API

2014-07-15 Thread Dmitry Kasatkin
Signed-off-by: Dmitry Kasatkin d.kasat...@samsung.com --- security/integrity/Kconfig | 3 +++ security/integrity/digsig.c| 41 + security/integrity/integrity.h | 2 +- 3 files changed, 45 insertions(+), 1 deletion(-) diff --git a/security

Re: IMA: kernel reading files opened with O_DIRECT

2014-07-11 Thread Dmitry Kasatkin
On 11 July 2014 23:10, Pavel Machek wrote: > On Wed 2014-07-02 11:40:50, Christoph Hellwig wrote: >> On Wed, Jul 02, 2014 at 11:55:41AM -0400, Jeff Moyer wrote: >> > It's acceptable. >> >> It's not because it will then also affect other reads going on at the >> same time. >> >> The whole concept

[PATCH 1/2] asymmetric_keys: make crypto builtin if asymmetric keys selected as builtin

2014-07-11 Thread Dmitry Kasatkin
. Signed-off-by: Dmitry Kasatkin --- crypto/Kconfig | 6 +- crypto/asymmetric_keys/Kconfig | 2 ++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/crypto/Kconfig b/crypto/Kconfig index ce4012a..96835d6 100644 --- a/crypto/Kconfig +++ b/crypto/Kconfig @@ -10,6 +10,11

[PATCH 0/2] Fix build break on dependency from CRYPTO

2014-07-11 Thread Dmitry Kasatkin
;> (.text+0x9e4): undefined reference to `look_up_OID' crypto/built-in.o: In function `x509_note_OID': >> (.text+0xa01): undefined reference to `sprint_oid' crypto/built-in.o: In function `rsa_extract_mpi': - Dmitry Dmitry Kasatkin (2): asymmetric_keys: make crypto builtin

[PATCH 2/2] digsig: make crypto builtin if digsig selected as builtin

2014-07-11 Thread Dmitry Kasatkin
When SIGNATURE=y but depends on CRYPTO=m, it selects MPILIB as module producing build break. This patch makes digsig to select crypto for correcting dependency. Signed-off-by: Dmitry Kasatkin --- lib/Kconfig | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/Kconfig b/lib

[PATCH v1 2/3] evm: skip integrity verification for newly created files

2014-07-11 Thread Dmitry Kasatkin
;security.SMACK64", value, sizeof(value), 0); close(fd); This patch skips integrity verification if IMA_NEW_FILE flag is set. Signed-off-by: Dmitry Kasatkin --- security/integrity/evm/evm_main.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/security/integr

[PATCH v1 0/3] fixes for missing security.ima on new empty files

2014-07-11 Thread Dmitry Kasatkin
came to the kernel. - Dmitry Dmitry Kasatkin (3): ima: provide flag to identify new empty files evm: skip integrity verification for newly created files ima: pass 'opened' flag to identify newly created files fs/namei.c| 2 +- fs/nfsd/vfs.c

[PATCH v1 1/3] ima: provide flag to identify new empty files

2014-07-11 Thread Dmitry Kasatkin
ted. It is checked upon ima_file_free hook to set initial security.ima value. Signed-off-by: Dmitry Kasatkin --- security/integrity/ima/ima_appraise.c | 7 +-- security/integrity/ima/ima_main.c | 12 +++- security/integrity/integrity.h| 1 + 3 files changed, 13 insertions(+)

[PATCH v1 3/3] ima: pass 'opened' flag to identify newly created files

2014-07-11 Thread Dmitry Kasatkin
security.evm to 'fake' LSM xattrs. This patch passes FILE_CREATED flag to IMA to reliably identify new files. Signed-off-by: Dmitry Kasatkin --- fs/namei.c| 2 +- fs/nfsd/vfs.c | 2 +- include/linux/ima.h | 4 ++-- security

[PATCH v1 3/3] ima: pass 'opened' flag to identify newly created files

2014-07-11 Thread Dmitry Kasatkin
security.evm to 'fake' LSM xattrs. This patch passes FILE_CREATED flag to IMA to reliably identify new files. Signed-off-by: Dmitry Kasatkin d.kasat...@samsung.com --- fs/namei.c| 2 +- fs/nfsd/vfs.c | 2 +- include/linux/ima.h

<    1   2   3   4   5   6   7   8   >