The patch titled SLIM LSM getprocattr hook API change has been added to the -mm tree. Its filename is slim-main-lsm-getprocattr-hook-api-change.patch *** Remember to use Documentation/SubmitChecklist when testing your code *** See http://www.zip.com.au/~akpm/linux/patches/stuff/added-to-mm.txt to find out what to do about this ------------------------------------------------------ Subject: SLIM LSM getprocattr hook API change From: Mimi Zohar <zohar@xxxxxxxxxxxxxxxxxx> This patch addresses the 2.6.21-rc4 LSM getprocattr hook API change. Signed-off-by: Mimi Zohar <zohar@xxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- security/slim/slm_main.c | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff -puN security/slim/slm_main.c~slim-main-lsm-getprocattr-hook-api-change security/slim/slm_main.c --- a/security/slim/slm_main.c~slim-main-lsm-getprocattr-hook-api-change +++ a/security/slim/slm_main.c @@ -1057,25 +1057,29 @@ static int slm_setprocattr(struct task_s } static int slm_getprocattr(struct task_struct *tsk, - char *name, void *value, size_t size) + char *name, char **value) { struct slm_tsec_data *tsec = tsk->security; size_t len = 0; + int buf_size = 31; + char buf[buf_size]; if (is_kernel_thread(tsk)) - len = snprintf(value, size, "KERNEL"); + len = snprintf(buf, buf_size, "KERNEL"); else { spin_lock(&tsec->lock); if (tsec->iac_wx != tsec->iac_r) - len = snprintf(value, size, "GUARD wx:%s r:%s", + len = snprintf(buf, buf_size, "GUARD wx:%s r:%s", slm_iac_str[tsec->iac_wx], slm_iac_str[tsec->iac_r]); else - len = snprintf(value, size, "%s", + len = snprintf(buf, buf_size, "%s", slm_iac_str[tsec->iac_wx]); spin_unlock(&tsec->lock); } - return min(len, size); + *value = kzalloc(len, GFP_KERNEL); + memcpy(*value, buf, len); + return len; } /* _ Patches currently in -mm which might be from zohar@xxxxxxxxxxxxxxxxxx are slim-main-lsm-getprocattr-hook-api-change.patch slim-integrity-patch.patch integrity-new-hooks.patch integrity-fs-hook-placement.patch integrity-evm-as-an-integrity-service-provider.patch integrity-evm-as-an-integrity-service-provider-tidy.patch integrity-ima-integrity_measure-support.patch integrity-ima-integrity_measure-support-tidy.patch integrity-tpm-internal-kernel-interface.patch integrity-tpm-internal-kernel-interface-tidy.patch ibac-patch.patch - To unsubscribe from this list: send the line "unsubscribe mm-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html