* [PATCH] integrity: ima scatterlist bug fix
@ 2009-02-20 2:23 Mimi Zohar
2009-02-20 10:51 ` Alexander Beregalov
0 siblings, 1 reply; 3+ messages in thread
From: Mimi Zohar @ 2009-02-20 2:23 UTC (permalink / raw)
To: linux-next
Cc: Mimi Zohar, Alexander Beregalov, David Safford, LKML, Mimi Zohar
Based on Alexander Beregalov's post http://lkml.org/lkml/2009/2/19/198
- replaced sg_set_buf() with sg_init_one()
kernel BUG at include/linux/scatterlist.h:65!
invalid opcode: 0000 [#1] PREEMPT SMP DEBUG_PAGEALLOC
last sysfs file:
CPU 2
Modules linked in:
Pid: 1, comm: swapper Not tainted 2.6.29-rc5-next-20090219 #5 PowerEdge 1950
RIP: 0010:[<ffffffff8045ec70>] [<ffffffff8045ec70>] ima_calc_hash+0xc0/0x160
RSP: 0018:ffff88007f46bc40 EFLAGS: 00010286
RAX: ffffe200032c45e8 RBX: 00000000fffffff4 RCX: 0000000087654321
RDX: 0000000000000002 RSI: 0000000000000001 RDI: ffff88007cf71048
RBP: ffff88007f46bcd0 R08: 0000000000000000 R09: 0000000000000163
R10: ffff88007f4707a8 R11: 0000000000000000 R12: ffff88007cf71048
R13: 0000000000001000 R14: 0000000000000000 R15: 0000000000009d98
FS: 0000000000000000(0000) GS:ffff8800051ac000(0000) knlGS:0000000000000000
CS: 0010 DS: 0018 ES: 0018 CR0: 000000008005003b
CR2: 0000000000000000 CR3: 0000000000201000 CR4: 00000000000006e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400
Signed-off-by: Mimi Zohar <zohar@us•ibm.com>
---
security/integrity/ima/ima_crypto.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/security/integrity/ima/ima_crypto.c b/security/integrity/ima/ima_crypto.c
index c2a46e4..50d572b 100644
--- a/security/integrity/ima/ima_crypto.c
+++ b/security/integrity/ima/ima_crypto.c
@@ -68,7 +68,7 @@ int ima_calc_hash(struct file *file, char *digest)
break;
}
offset += rbuf_len;
- sg_set_buf(sg, rbuf, rbuf_len);
+ sg_init_one(sg, rbuf, rbuf_len);
rc = crypto_hash_update(&desc, sg, rbuf_len);
if (rc)
@@ -95,7 +95,7 @@ int ima_calc_template_hash(int template_len, void *template, char *digest)
if (rc != 0)
return rc;
- sg_set_buf(sg, template, template_len);
+ sg_init_one(sg, template, template_len);
rc = crypto_hash_update(&desc, sg, template_len);
if (!rc)
rc = crypto_hash_final(&desc, digest);
--
1.5.6.6
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] integrity: ima scatterlist bug fix
2009-02-20 2:23 [PATCH] integrity: ima scatterlist bug fix Mimi Zohar
@ 2009-02-20 10:51 ` Alexander Beregalov
2009-02-20 13:31 ` James Morris
0 siblings, 1 reply; 3+ messages in thread
From: Alexander Beregalov @ 2009-02-20 10:51 UTC (permalink / raw)
To: Mimi Zohar; +Cc: linux-next, David Safford, LKML, Mimi Zohar
2009/2/20 Mimi Zohar <zohar@linux•vnet.ibm.com>:
> Based on Alexander Beregalov's post http://lkml.org/lkml/2009/2/19/198
>
> - replaced sg_set_buf() with sg_init_one()
>
> kernel BUG at include/linux/scatterlist.h:65!
> invalid opcode: 0000 [#1] PREEMPT SMP DEBUG_PAGEALLOC
> last sysfs file:
> CPU 2
> Modules linked in:
> Pid: 1, comm: swapper Not tainted 2.6.29-rc5-next-20090219 #5 PowerEdge 1950
> RIP: 0010:[<ffffffff8045ec70>] [<ffffffff8045ec70>] ima_calc_hash+0xc0/0x160
> RSP: 0018:ffff88007f46bc40 EFLAGS: 00010286
> RAX: ffffe200032c45e8 RBX: 00000000fffffff4 RCX: 0000000087654321
> RDX: 0000000000000002 RSI: 0000000000000001 RDI: ffff88007cf71048
> RBP: ffff88007f46bcd0 R08: 0000000000000000 R09: 0000000000000163
> R10: ffff88007f4707a8 R11: 0000000000000000 R12: ffff88007cf71048
> R13: 0000000000001000 R14: 0000000000000000 R15: 0000000000009d98
> FS: 0000000000000000(0000) GS:ffff8800051ac000(0000) knlGS:0000000000000000
> CS: 0010 DS: 0018 ES: 0018 CR0: 000000008005003b
> CR2: 0000000000000000 CR3: 0000000000201000 CR4: 00000000000006e0
> DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
> DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400
>
> Signed-off-by: Mimi Zohar <zohar@us•ibm.com>
Tested-by: Alexander Beregalov <a.beregalov@gmail•com>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] integrity: ima scatterlist bug fix
2009-02-20 10:51 ` Alexander Beregalov
@ 2009-02-20 13:31 ` James Morris
0 siblings, 0 replies; 3+ messages in thread
From: James Morris @ 2009-02-20 13:31 UTC (permalink / raw)
To: Alexander Beregalov
Cc: Mimi Zohar, linux-next, David Safford, LKML, Mimi Zohar
On Fri, 20 Feb 2009, Alexander Beregalov wrote:
> > Signed-off-by: Mimi Zohar <zohar@us•ibm.com>
> Tested-by: Alexander Beregalov <a.beregalov@gmail•com>
Applied to
git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/security-testing-2.6#next
--
James Morris
<jmorris@namei•org>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2009-02-20 13:31 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-02-20 2:23 [PATCH] integrity: ima scatterlist bug fix Mimi Zohar
2009-02-20 10:51 ` Alexander Beregalov
2009-02-20 13:31 ` James Morris
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox