NetBSD Problem Report #44515
From www@NetBSD.org Fri Feb 4 19:52:41 2011
Return-Path: <www@NetBSD.org>
Received: from mail.netbsd.org (mail.netbsd.org [204.152.190.11])
by www.NetBSD.org (Postfix) with ESMTP id C4A5063B8E3
for <gnats-bugs@gnats.NetBSD.org>; Fri, 4 Feb 2011 19:52:41 +0000 (UTC)
Message-Id: <20110204195240.E0C7163B8DE@www.NetBSD.org>
Date: Fri, 4 Feb 2011 19:52:40 +0000 (UTC)
From: pooka@iki.fi
Reply-To:
To: gnats-bugs@NetBSD.org
Subject: cgd dies on non-aligned writes to the raw device
X-Send-Pr-Version: www-1.0
>Number: 44515
>Category: kern
>Synopsis: cgd dies on non-aligned writes to the raw device
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: kern-bug-people
>State: closed
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Fri Feb 04 19:55:00 +0000 2011
>Closed-Date: Sun May 29 04:42:23 +0000 2011
>Last-Modified: Sun May 29 04:42:23 +0000 2011
>Originator: Antti Kantee
>Release:
>Organization:
>Environment:
>Description:
Writing a non-aligned "block" to a raw cgd device causes a kernel
panic. DIAGNOSTIC kernels die this way:
#5 0xbbb80ce8 in panic (fmt=0xbb95c990 "cgd_cipher: len %% blocksize != 0")
at /usr/allsrc/src/sys/rump/librump/rumpkern/../../../kern/subr_prf.c:302
#6 0xbb95b87d in cgd_cipher (cs=0xb9e8fc88, dstv=0xbb88f000, srcv=0xbb82e400,
len=123, blkno=0, secsize=512, dir=2)
at /usr/allsrc/src/sys/rump/dev/lib/libcgd/../../../../dev/cgd.c:862
#7 0xbb95a789 in cgdstart (dksc=0xb9e8fc8c, bp=0xbb8a1f20)
at /usr/allsrc/src/sys/rump/dev/lib/libcgd/../../../../dev/cgd.c:392
#8 0xbb961299 in dk_start (di=0xbb95dda0, dksc=0xb9e8fc8c)
at /usr/allsrc/src/sys/rump/dev/lib/libdisk/../../../../dev/dksubr.c:239
#9 0xbb9611ec in dk_strategy (di=0xbb95dda0, dksc=0xb9e8fc8c, bp=0xbb8a1f20)
at /usr/allsrc/src/sys/rump/dev/lib/libdisk/../../../../dev/dksubr.c:225
#10 0xbb95a4b4 in cgdstrategy (bp=0xbb8a1f20)
at /usr/allsrc/src/sys/rump/dev/lib/libcgd/../../../../dev/cgd.c:297
#11 0xbb9cbdee in physio (strategy=0xbb95a46b <cgdstrategy>, obp=0x0,
dev=65283, flags=0, min_phys=0xbb9cc08c <minphys>, uio=0xb85ffe9c)
at /usr/allsrc/src/sys/rump/librump/rumpvfs/../../../kern/kern_physio.c:345
and GENERIC dies this way:
uvm_fault(0xc0c466c0, 0xca3c1000, 1) -> 0xe
fatal page fault in supervisor mode
trap type 6 code 0 eip c06bfb75 cs 8 eflags 202 cr2 ca3c1000 ilevel 6
panic: trap
>How-To-Repeat:
tests/dev/cgd/t_cgd non512
>Fix:
>Release-Note:
>Audit-Trail:
From: Antti Kantee <pooka@cs.hut.fi>
To: gnats-bugs@netbsd.org
Cc:
Subject: Re: kern/44515
Date: Fri, 4 Feb 2011 21:57:31 +0200
Ok, I'll not mix up the "email" and "your name" fields the next time ;)
From: "Antti Kantee" <pooka@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc:
Subject: PR/44515 CVS commit: src/tests/dev/cgd
Date: Fri, 4 Feb 2011 19:58:10 +0000
Module Name: src
Committed By: pooka
Date: Fri Feb 4 19:58:10 UTC 2011
Modified Files:
src/tests/dev/cgd: t_cgd.sh
Log Message:
test case for PR kern/44515
To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/tests/dev/cgd/t_cgd.sh
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
From: "Taylor R Campbell" <riastradh@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc:
Subject: PR/44515 CVS commit: src/sys/dev
Date: Thu, 19 May 2011 20:34:13 +0000
Module Name: src
Committed By: riastradh
Date: Thu May 19 20:34:13 UTC 2011
Modified Files:
src/sys/dev: cgd.c
Log Message:
Reject unaligned writes to cgd.
Fixes the following PRs:
PR kern/44515 (cgd dies on non-aligned writes to the raw device)
PR kern/44964 (cgd seems to panic on unaligned writes instead of giving EINVAL)
ok christos
To generate a diff of this commit:
cvs rdiff -u -r1.71 -r1.72 src/sys/dev/cgd.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
From: "Taylor R Campbell" <riastradh@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc:
Subject: PR/44515 CVS commit: src/tests/dev/cgd
Date: Thu, 19 May 2011 20:37:50 +0000
Module Name: src
Committed By: riastradh
Date: Thu May 19 20:37:50 UTC 2011
Modified Files:
src/tests/dev/cgd: t_cgd.sh
Log Message:
Expand tests for unaligned writes to cgd. No more xfail.
PR kern/44515
PR kern/44965
To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 src/tests/dev/cgd/t_cgd.sh
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
State-Changed-From-To: open->closed
State-Changed-By: dholland@NetBSD.org
State-Changed-When: Sun, 29 May 2011 04:42:23 +0000
State-Changed-Why:
Fixed.
>Unformatted:
(Contact us)
$NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD: gnats_config.sh,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2007
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.