NetBSD Problem Report #51736

From mlelstv@serpens.de  Fri Dec 23 00:10:11 2016
Return-Path: <mlelstv@serpens.de>
Received: from mail.netbsd.org (mail.netbsd.org [199.233.217.200])
	(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
	(Client CN "mail.netbsd.org", Issuer "Postmaster NetBSD.org" (verified OK))
	by mollari.NetBSD.org (Postfix) with ESMTPS id 945D07A292
	for <gnats-bugs@gnats.NetBSD.org>; Fri, 23 Dec 2016 00:10:11 +0000 (UTC)
Message-Id: <20161223000929.GA12284@serpens.de>
Date: Fri, 23 Dec 2016 01:09:31 +0100
From: Michael van Elst <mlelstv@serpens.de>
To: gnats-bugs@netbsd.org
Subject: wsfb driver uses revoked descriptors

>Number:         51736
>Category:       xsrc
>Synopsis:       wsfb driver uses revoked descriptors
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    xsrc-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Fri Dec 23 00:15:00 +0000 2016
>Originator:     Michael van Elst
>Release:        NetBSD 7.99.51
>Organization:

>Environment:


System: NetBSD tazz 7.99.51 NetBSD 7.99.51 (TAZZ) #3: Mon Dec 19 00:59:32 CET 2016 mlelstv@gossam:/home/netbsd-current/obj.amd64/home/netbsd-current/src/sys/arch/amd64/compile/TAZZ amd64
Architecture: x86_64
Machine: amd64
>Description:
The standard setup with xdm is to run X on vt04 which is /dev/ttyE4.
The wsfb driver however falls back to /dev/ttyE0 unless there is
also a driver option set in xorg.conf that specifies /dev/ttyE4.

When xdm is started when the system is booted, it therefore uses
the wrong terminal to map the framebufer or to control the screen
saver. This works until getty is launched on that terminal which
revokes every open file descriptor.

The consequence are X crashes, mixup between wscons and X11 display,
and/or lacking functionality.

Restarting xdm solves the problem until you log into /dev/ttyE0
which revokes /dev/ttyE0 again.

>How-To-Repeat:
Boot a machine using wsfb and xdm enabled in rc.conf

>Fix:
Tell wsfb to use /dev/ttyE4 with an option in xorg.conf like:

Section "Device"
	Driver	"wsfb"
	Option	"device" "/dev/ttyE4"
EndSection "Device"

The real fix is of course to teach wsfb to find out the "virtual terminal"
parameter to the X server and deduce the correct device from that.

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-2014 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.