NetBSD Problem Report #33186

From www@netbsd.org  Mon Apr  3 22:47:23 2006
Return-Path: <www@netbsd.org>
Received: by narn.netbsd.org (Postfix, from userid 31301)
	id 5FDB263B8A7; Mon,  3 Apr 2006 22:47:23 +0000 (UTC)
Message-Id: <20060403224723.5FDB263B8A7@narn.netbsd.org>
Date: Mon,  3 Apr 2006 22:47:23 +0000 (UTC)
From: uwe@netbsd.org
Reply-To: uwe@netbsd.org
To: gnats-bugs@netbsd.org
Subject: WSDISPLAYIO_GBORDER/WSDISPLAYIO_SBORDER implementation is broken
X-Send-Pr-Version: www-1.0

>Number:         33186
>Category:       kern
>Synopsis:       WSDISPLAYIO_GBORDER/WSDISPLAYIO_SBORDER implementation is broken
>Confidential:   no
>Severity:       non-critical
>Priority:       high
>Responsible:    jmmv
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon Apr 03 22:50:01 +0000 2006
>Closed-Date:    Sun Jul 02 07:58:47 +0000 2006
>Last-Modified:  Sun Jul 02 07:58:47 +0000 2006
>Originator:     Valeriy E. Ushakov
>Release:        -current as of April 2006
>Organization:
>Environment:
NetBSD fart 3.99.17 NetBSD 3.99.17 (SERIAL_FART) #46: Tue Apr  4 02:30:21 MSD 2006  uwe@pandita:/usr/src/sys/arch/netwinder/compile/SERIAL_FART netwinder

>Description:
getborder and setborder are in wsdisplay_accessops,
but when wsdisplay_internal_ioctl calls them it passes them
emulcookie!

>How-To-Repeat:
Try to implement support for getborder/setborder,
expect accesscookie passed, panic.



>Fix:

>Release-Note:

>Audit-Trail:

Responsible-Changed-From-To: kern-bug-people->jmmv@NetBSD.org
Responsible-Changed-By: uwe@netbsd.org
Responsible-Changed-When: Mon, 03 Apr 2006 22:53:48 +0000
Responsible-Changed-Why:
Assigned to the author of the code.


From: "Valeriy E. Ushakov" <uwe@ptc.spbu.ru>
To: gnats-bugs@netbsd.org
Cc: 
Subject: Re: kern/33186 (WSDISPLAYIO_GBORDER/WSDISPLAYIO_SBORDER implementation is broken)
Date: Tue, 4 Apr 2006 02:55:44 +0400

 WSDISPLAYIO_PUTWSCHAR and WSDISPLAYIO_GETWSCHAR have the same flaw.

 -uwe

Responsible-Changed-From-To: jmmv@NetBSD.org->jmmv
Responsible-Changed-By: wiz@netbsd.org
Responsible-Changed-When: Tue, 04 Apr 2006 18:14:53 +0000
Responsible-Changed-Why:
No email addresses, just login names.


From: Matthias Drochner <M.Drochner@fz-juelich.de>
To: gnats-bugs@netbsd.org
Cc: kern-bug-people@netbsd.org, gnats-admin@netbsd.org,
	netbsd-bugs@netbsd.org
Subject: Re: kern/33186: WSDISPLAYIO_GBORDER/WSDISPLAYIO_SBORDER 
 implementation is broken
Date: Tue, 04 Apr 2006 21:07:44 +0200

 uwe@NetBSD.org said:
 > getborder and setborder are in wsdisplay_accessops, 

 This wasn't a good idea from the beginning imho; it is just
 bloat for display drivers which don't support border colors.
 It should be handled by the driver's ioctl entry instead.

 I believe it is not too late to correct this.

 best regards
 Matthias


From: Martin Husemann <martin@duskware.de>
To: Matthias Drochner <M.Drochner@fz-juelich.de>
Cc: gnats-bugs@netbsd.org
Subject: Re: kern/33186: WSDISPLAYIO_GBORDER/WSDISPLAYIO_SBORDER implementation is broken
Date: Tue, 4 Apr 2006 23:05:48 +0200

 On Tue, Apr 04, 2006 at 09:07:44PM +0200, Matthias Drochner wrote:
 > It should be handled by the driver's ioctl entry instead.
 > 
 > I believe it is not too late to correct this.

 I agree with both.

 Martin

From: Matthias Drochner <drochner@netbsd.org>
To: gnats-bugs@netbsd.org
Cc: 
Subject: PR/33186 CVS commit: src/sys/dev/wscons
Date: Wed,  5 Apr 2006 15:18:25 +0000 (UTC)

 Module Name:	src
 Committed By:	drochner
 Date:		Wed Apr  5 15:18:25 UTC 2006

 Modified Files:
 	src/sys/dev/wscons: wsdisplay.c wsdisplayvar.h

 Log Message:
 Use the existing ioctl path to call WSDISPLAYIO_GBORDER/WSDISPLAYIO_SBORDER
 instead of a separate accessops entry. There is no need to introduce bloat
 for the majority of drivers which don't implement this feature.
 This should also resolve PR kern/33186 by Valeriy E. Ushakov.


 To generate a diff of this commit:
 cvs rdiff -r1.92 -r1.93 src/sys/dev/wscons/wsdisplay.c
 cvs rdiff -r1.35 -r1.36 src/sys/dev/wscons/wsdisplayvar.h

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

State-Changed-From-To: open->feedback
State-Changed-By: drochner@netbsd.org
State-Changed-When: Wed, 05 Apr 2006 15:33:16 +0000
State-Changed-Why:
I've changed the code path to use the ioctl accessop as suggested.
Can you live with this?


From: "Valeriy E. Ushakov" <uwe@ptc.spbu.ru>
To: gnats-bugs@netbsd.org
Cc: jmmv@netbsd.org, netbsd-bugs@netbsd.org, gnats-admin@netbsd.org,
	drochner@netbsd.org
Subject: Re: kern/33186 (WSDISPLAYIO_GBORDER/WSDISPLAYIO_SBORDER implementation is broken)
Date: Wed, 5 Apr 2006 20:01:25 +0400

 On Wed, Apr 05, 2006 at 15:33:17 +0000, drochner@netbsd.org wrote:

 > I've changed the code path to use the ioctl accessop as suggested.
 > Can you live with this?

 Thanks.  Please, close it.

 I will refile {GET,PUT}WSCHAR as a separate bug.

 -uwe

State-Changed-From-To: feedback->closed
State-Changed-By: jmmv@netbsd.org
State-Changed-When: Sun, 02 Jul 2006 07:58:47 +0000
State-Changed-Why:
This was fixed by drochner@ a while ago and requester is happy with the
solution.


>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.51 2026/08/10 02:28:17 riastradh Exp $
$NetBSD: gnats_config.sh,v 1.10 2026/05/13 22:00:09 riastradh Exp $
Copyright © 1994-2026 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.