NetBSD Problem Report #59075

From www@netbsd.org  Thu Feb 13 17:08:58 2025
Return-Path: <www@netbsd.org>
Received: from mail.netbsd.org (mail.netbsd.org [199.233.217.200])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256
	 client-signature RSA-PSS (2048 bits) client-digest SHA256)
	(Client CN "mail.NetBSD.org", Issuer "mail.NetBSD.org CA" (not verified))
	by mollari.NetBSD.org (Postfix) with ESMTPS id F0F341A923A
	for <gnats-bugs@gnats.NetBSD.org>; Thu, 13 Feb 2025 17:08:57 +0000 (UTC)
Message-Id: <20250213170856.EF4571A923C@mollari.NetBSD.org>
Date: Thu, 13 Feb 2025 17:08:56 +0000 (UTC)
From: emmankoko519@gmail.com
Reply-To: emmankoko519@gmail.com
To: gnats-bugs@NetBSD.org
Subject: `gem0: no Ethernet address found'
X-Send-Pr-Version: www-1.0

>Number:         59075
>Category:       kern
>Synopsis:       `gem0: no Ethernet address found'
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    joe
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Thu Feb 13 17:10:00 +0000 2025
>Last-Modified:  Thu Feb 13 17:28:49 +0000 2025
>Originator:     Emmanuel Nyarko
>Release:        10.0
>Organization:
>Environment:
NetBSD 10.99.12
>Description:
https://nxr.netbsd.org/xref/src/sys/dev/pci/if_gem_pci.c?r=1.52#156
https://nxr.netbsd.org/xref/src/sys/dev/pci/if_gem_pci.c?r=1.52#234
https://nxr.netbsd.org/xref/src/sys/dev/pci/if_gem_pci.c?r=1.52#265
https://nxr.netbsd.org/xref/src/sys/dev/pci/if_gem_pci.c?r=1.52#266

was broken by this commit:

https://mail-index.netbsd.org/source-changes/2020/05/30/msg117884.html
>How-To-Repeat:
I found that through code inspection
using the gem device over the pci bus on a machine where the MAC address comes from the extended ROM
>Fix:
the wrong buffer size( sizeof pointer) used when reading data through the pci bus. so we should use the right size.

>Release-Note:

>Audit-Trail:

Responsible-Changed-From-To: kern-bug-people->joe
Responsible-Changed-By: joe@NetBSD.org
Responsible-Changed-When: Thu, 13 Feb 2025 17:23:17 +0000
Responsible-Changed-Why:


>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.47 2022/09/11 19:34:41 kim Exp $
$NetBSD: gnats_config.sh,v 1.9 2014/08/02 14:16:04 spz Exp $
Copyright © 1994-2025 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.