NetBSD Problem Report #48754

From martin@duskware.de  Fri Apr 18 06:16:15 2014
Return-Path: <martin@duskware.de>
Received: from mail.netbsd.org (mail.netbsd.org [149.20.53.66])
	(using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits))
	(Client CN "mail.netbsd.org", Issuer "Postmaster NetBSD.org" (verified OK))
	by mollari.NetBSD.org (Postfix) with ESMTPS id 6D09BA5810
	for <gnats-bugs@gnats.NetBSD.org>; Fri, 18 Apr 2014 06:16:15 +0000 (UTC)
Date: Fri, 18 Apr 2014 08:16:11 CEST
From: martin@NetBSD.org
Reply-To: martin@NetBSD.org
To: gnats-bugs@NetBSD.org
Subject: ahcisata hardware alignement requirements not guaranteed by driver
X-Send-Pr-Version: 3.95

>Number:         48754
>Category:       kern
>Synopsis:       ahcisata hardware alignement requirements not guaranteed by driver
>Confidential:   no
>Severity:       critical
>Priority:       medium
>Responsible:    kern-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Fri Apr 18 06:20:00 +0000 2014
>Last-Modified:  Fri Apr 18 06:25:00 +0000 2014
>Originator:     Martin Husemann
>Release:        NetBSD 6.99.40
>Organization:
The NetBSD foundation, Inc.
>Environment:
System: NetBSD night-owl.duskware.de 6.99.40 NetBSD 6.99.40 (NIGHT-OWL) #248: Fri Apr 18 07:41:17 CEST 2014 martin@night-owl.duskware.de:/usr/src/sys/arch/amd64/compile/NIGHT-OWL amd64
Architecture: x86_64
Machine: amd64
>Description:
As discussed in PR kern/48550 we may call the ahcisata driver with misaligned
target buffers. The case in that PR has been worked around, but in general
the backend drivers should be able to deal with this.

The hardware seems to require 2-byte alignement of buffers.

>How-To-Repeat:
Pass an unaligned target buffer to ahcisata and run a command, watch results
being delivered at buffer address & ~2UL.

>Fix:
Use bounce buffers in this case?

>Audit-Trail:
From: "Martin Husemann" <martin@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/48754 CVS commit: src/sys/dev/scsipi
Date: Fri, 18 Apr 2014 06:23:32 +0000

 Module Name:	src
 Committed By:	martin
 Date:		Fri Apr 18 06:23:32 UTC 2014

 Modified Files:
 	src/sys/dev/scsipi: cd.c

 Log Message:
 Fix PR kern/48550 by aligning the single instance of scsipi_read_cd_cap_data
 that we found misaligned in the wild so far properly for the ahcisata
 driver. Also point at PR kern/48754 for the real issue.


 To generate a diff of this commit:
 cvs rdiff -u -r1.318 -r1.319 src/sys/dev/scsipi/cd.c

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

NetBSD Home
NetBSD PR Database Search

(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.