NetBSD Problem Report #45297

From bouyer@antioche.eu.org  Thu Aug 25 19:44:20 2011
Return-Path: <bouyer@antioche.eu.org>
Received: from mail.netbsd.org (mail.netbsd.org [204.152.190.11])
	by www.NetBSD.org (Postfix) with ESMTP id EBAC963BAC3
	for <gnats-bugs@gnats.NetBSD.org>; Thu, 25 Aug 2011 19:44:19 +0000 (UTC)
Message-Id: <201108251944.p7PJiEWR004759@rochebonne.antioche.eu.org>
Date: Thu, 25 Aug 2011 21:44:14 +0200 (CEST)
From: bouyer@antioche.eu.org
Reply-To: bouyer@antioche.eu.org
To: gnats-bugs@gnats.NetBSD.org
Subject: wscons ioctls are not compat_netbsd32 friendly
X-Send-Pr-Version: 3.95

>Number:         45297
>Category:       kern
>Synopsis:       wscons ioctls are not compat_netbsd32 friendly
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    kern-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Thu Aug 25 19:45:01 +0000 2011
>Originator:     Manuel Bouyer
>Release:        NetBSD 5.99.55
>Organization:
>Environment:
System: NetBSD java.soc.lip6.fr 5.99.55 NetBSD 5.99.55 (LOONGSON) #22: Thu Aug 25 19:51:06 CEST 2011  bouyer@roll:/dsk/l1/misc/bouyer/tmp/evbmips64el/obj/dsk/l1/misc/bouyer/current/src/sys/arch/evbmips/compile/LOONGSON evbmips
Architecture: mipsel
Machine: evbmips
>Description:
	On a system running a 64bit evbmips kernel with a N32 userland
	(NetBSD doesn't provide 64bit userland by default):
java# wsconscfg 0
wsconscfg: WSDISPLAYIO_ADDSCREEN: Inappropriate ioctl for device
	I tracked it down to the WSDISPLAYIO_ADDSCREEN ioctl definition being
	different between LP32 and LP64 (from sys/dev/wscons/wsconsio.h):
struct wsdisplay_addscreendata {
	int idx; /* screen index */
	char *screentype;
	char *emul;
};
#define WSDISPLAYIO_ADDSCREEN   _IOW('W', 78, struct wsdisplay_addscreendata)

	sizeof(struct wsdisplay_addscreendata) is not the same on lp32 and
	lp64.
	Some other ioctls in this file also have eiter long or pointers
	as part of their argument.
>How-To-Repeat:
	try to use a 32bit wsconscfg on a 64bit kernel
>Fix:
	define and implement 32bit version of the affected ioctls in kernel.

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.