Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S261689AbVBHXcW (ORCPT ); Tue, 8 Feb 2005 18:32:22 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S261691AbVBHXcW (ORCPT ); Tue, 8 Feb 2005 18:32:22 -0500 Received: from mx1.redhat.com ([66.187.233.31]:1967 "EHLO mx1.redhat.com") by vger.kernel.org with ESMTP id S261689AbVBHXan (ORCPT ); Tue, 8 Feb 2005 18:30:43 -0500 Date: Tue, 8 Feb 2005 18:30:23 -0500 (EST) From: James Morris X-X-Sender: jmorris@thoron.boston.redhat.com To: Fruhwirth Clemens cc: Andrew Morton , , , "David S. Miller" , "Adam J. Richter" Subject: Re: [PATCH 01/04] Adding cipher mode context information to crypto_tfm In-Reply-To: <1107880759.15942.109.camel@ghanima> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1558 Lines: 43 On Tue, 8 Feb 2005, Fruhwirth Clemens wrote: > I shot out the last patch too quickly. Having reviewed the mapping one > more time I noticed, that there as the possibility of "off-by-one" > unmapping, and instead of doing doubtful guesses, if that's the case, I > added a base pointer to scatter_walk, which is the pointer returned by > kmap. Exactly this pointer will be unmapped again, so the vaddr > comparison in crypto_kunmap doesn't have to do any masking. You can't call kmap() in softirq context (why was it even trying?): Debug: sleeping function called from invalid context at arch/i386/mm/highmem.c:5 in_atomic():1, irqs_disabled():0 [] dump_stack+0x17/0x19 [] __might_sleep+0xc4/0xd7 [] kmap+0x15/0x2e [] scatterwalk_map+0x5a/0x68 [] scatterwalk_walk+0x2e/0x45b [] cbc_decrypt_iv+0x11a/0x15f [] cbc_decrypt+0x19/0x1f [] esp_input+0x17d/0x409 [esp4] [] xfrm4_rcv_encap+0x102/0x512 [] ip_local_deliver+0x9d/0x28c [] ip_rcv+0x251/0x508 [] netif_receive_skb+0x1f6/0x223 [] process_backlog+0x7c/0x10f [] net_rx_action+0x79/0xfb [] __do_softirq+0x62/0xcc [] do_softirq+0x57/0x5b - James -- James Morris - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/