Project

General

Profile

Actions

Bug #1128

closed

WARNING: kb8042: inconsistent getinfo(9E) implementation

Added by Alexey Zaytsev over 12 years ago. Updated 11 months ago.

Status:
Closed
Priority:
Low
Assignee:
Category:
driver - device drivers
Start date:
2011-06-19
Due date:
% Done:

100%

Estimated time:
Difficulty:
Medium
Tags:
Gerrit CR:
External Bug:

Description

Getting this warning first thing when running in qemu/kvm:

SunOS Release 5.11 Version illumos-gate-xl0 64-bit
Copyright (c) 1983, 2010, Oracle and/or its affiliates. All rights reserved.
DEBUG enabled
WARNING: kb8042: inconsistent getinfo(9E) implementation

Seems to be harmless, but anyway.

Testing done: the warning is not present in debug build any more.


Related issues

Has duplicate illumos gate - Bug #4813: WARNING: kb8042: inconsistent getinfo(9E) implementationDuplicateToomas Soome2014-04-26

Actions
Actions #1

Updated by Garrett D'Amore over 12 years ago

Its harmless as long as you don't try to do Dynamic Reconfiguration on this device. It should be fixed.

That said, I have never seen this error before, and I have just checked the getinfo() implementation of kb8042. It is correct. This strongly smells of something else in your system that is bad... perhaps you have heap corruption? Is this 100% reproducible? If so I'd like to get remote access to your system so I can debug it.

Actions #2

Updated by Alexey Zaytsev over 12 years ago

Garrett D'Amore wrote:

Its harmless as long as you don't try to do Dynamic Reconfiguration on this device. It should be fixed.

That said, I have never seen this error before, and I have just checked the getinfo() implementation of kb8042. It is correct. This strongly smells of something else in your system that is bad... perhaps you have heap corruption? Is this 100% reproducible?

Yes, it seems to happen on every boot, including cold. I'm only getting the warning when running qemu with the default pc platform, and not with the q35 (pci-e).

If so I'd like to get remote access to your system so I can debug it.

Access info sent.

Actions #3

Updated by Garrett D'Amore over 12 years ago

  • % Done changed from 0 to 20

So the problem is this:

Jun 23 01:46:06 oi genunix: [ID 936769 kern.info] kb80421 is /pci@0,0/isa@1/i8042@1,60/keyboard@0
Jun 23 01:46:06 oi kb8042: [ID 464191 kern.info] kb8042 instance #1 READY
Jun 23 01:46:06 oi genunix: [ID 913973 kern.warning] WARNING: kb8042: inconsistent getinfo(9E) implementation
xl0@oi:~# grep kb8042 /etc/path_to_inst
"/pci@0,0/isa@1f/i8042@1,60/keyboard@0" 0 "kb8042" 
"/pci@0,0/isa@1/i8042@1,60/keyboard@0" 1 "kb8042" 

Normally kb8042 doesn't move around. The fact that it did here is the problem. The getinfo(9e) implementation for kb8042 doesn't like this, as it assumes that it will always be instance 0:

    case DDI_INFO_DEVT2INSTANCE:
        *result = (void *)0;
        error = DDI_SUCCESS;
        break;

I recommend changing this to use the following:

        if (kb8042_dip == NULL) {
            error = DDI_FAILURE;
        } else {
            *result = (void *)ddi_get_instance(kb8042_dip);
            error = DDI_SUCCESS;
        }
        break;

Note that this complaint is probably benign, since nothing is ever going to try to DDI detach kb8042.

Actions #4

Updated by Electric Monk 11 months ago

  • Gerrit CR set to 2585
Actions #5

Updated by Toomas Soome 11 months ago

  • Status changed from New to In Progress
  • Assignee set to Toomas Soome
  • % Done changed from 20 to 90
Actions #6

Updated by Toomas Soome 11 months ago

  • Category changed from kernel to driver - device drivers
Actions #7

Updated by Marcel Telka 11 months ago

  • Has duplicate Bug #4813: WARNING: kb8042: inconsistent getinfo(9E) implementation added
Actions #8

Updated by Toomas Soome 11 months ago

  • Description updated (diff)
Actions #9

Updated by Toomas Soome 11 months ago

  • Status changed from In Progress to Pending RTI
Actions #10

Updated by Electric Monk 11 months ago

  • Status changed from Pending RTI to Closed
  • % Done changed from 90 to 100

git commit db335908e0bf7069476de0103b658d6962a6c751

commit  db335908e0bf7069476de0103b658d6962a6c751
Author: Toomas Soome <tsoome@me.com>
Date:   2023-01-04T05:31:00.000Z

    1128 WARNING: kb8042: inconsistent getinfo(9E) implementation
    Reviewed by: Andy Fiddaman <illumos@fiddaman.net>
    Reviewed by: Jason King <jason.brian.king+illumos@gmail.com>
    Approved by: Rich Lowe <richlowe@richlowe.net>

Actions

Also available in: Atom PDF