From dan@kulesh.obluda.cz  Fri Sep  3 09:17:12 2004
Return-Path: <dan@kulesh.obluda.cz>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id 0EF6616A4CE
	for <FreeBSD-gnats-submit@freebsd.org>; Fri,  3 Sep 2004 09:17:12 +0000 (GMT)
Received: from kulesh.obluda.cz (kulesh.obluda.cz [193.179.22.243])
	by mx1.FreeBSD.org (Postfix) with ESMTP id B402F43D48
	for <FreeBSD-gnats-submit@freebsd.org>; Fri,  3 Sep 2004 09:17:10 +0000 (GMT)
	(envelope-from dan@kulesh.obluda.cz)
Received: from kulesh.obluda.cz (localhost.eunet.cz [127.0.0.1])
	by kulesh.obluda.cz (8.13.1/8.13.1) with ESMTP id i839H7xd025128
	for <FreeBSD-gnats-submit@freebsd.org>; Fri, 3 Sep 2004 11:17:08 +0200 (CEST)
	(envelope-from dan@kulesh.obluda.cz)
Received: (from root@localhost)
	by kulesh.obluda.cz (8.13.1/8.13.1/Submit) id i839DGBE023806;
	Fri, 3 Sep 2004 11:13:16 +0200 (CEST)
	(envelope-from dan)
Message-Id: <200409030913.i839DGBE023806@xkulesh.vol.cz>
Date: Fri, 3 Sep 2004 11:13:16 +0200 (CEST)
From: Dan Lukes <dan@obluda.cz>
Reply-To: Dan Lukes <dan@obluda.cz>
To: FreeBSD-gnats-submit@freebsd.org
Cc:
Subject: [ PATCH ] mem_range_attr_{set|get} are no longer kernel-callable
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         71334
>Category:       kern
>Synopsis:       [mem] [patch] mem_range_attr_{set|get} are no longer kernel-callable
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    antoine
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Fri Sep 03 09:20:23 GMT 2004
>Closed-Date:    Mon Mar 10 22:16:33 UTC 2008
>Last-Modified:  Mon Mar 10 22:16:33 UTC 2008
>Originator:     Dan Lukes
>Release:        FreeBSD 5.3-BETA2 i386
>Organization:
Obludarium
>Environment:
System: FreeBSD 5.3-BETA2 #1: Thu Sep 2 10:07:36 CEST 2004 i386

src/sys/dev/mem/memutil.c,v 1.1 2004/08/04 18:30:31 markm

>Description:
	The mem_range_attr_{set|get} functions has been moved from kernel
into separate module. After it, they are no longer avaiable for other kernel
modules
>How-To-Repeat:

	Try to load any kernel-loadable module which use mem_range_attr_{set|get} 
function

>Fix:

	Make those functions kernel-callable again:

*** sys/dev/mem/memutil.c.ORIG  Wed Aug  4 20:30:31 2004
--- sys/dev/mem/memutil.c       Fri Sep  3 10:55:59 2004
***************
*** 36,42 ****
   * Implementation-neutral, kernel-callable functions for manipulating
   * memory range attributes.
   */
! int
  mem_range_attr_get(struct mem_range_desc *mrd, int *arg)
  {
        /* can we handle this? */
--- 36,42 ----
   * Implementation-neutral, kernel-callable functions for manipulating
   * memory range attributes.
   */
! static int
  mem_range_attr_get(struct mem_range_desc *mrd, int *arg)
  {
        /* can we handle this? */
***************
*** 51,57 ****
        return (0);
  }

! int
  mem_range_attr_set(struct mem_range_desc *mrd, int *arg)
  {
        /* can we handle this? */
--- 51,57 ----
        return (0);
  }

! static int
  mem_range_attr_set(struct mem_range_desc *mrd, int *arg)
  {
        /* can we handle this? */
>Release-Note:
>Audit-Trail:

From: Dan Lukes <dan@obluda.cz>
To: freebsd-gnats-submit@FreeBSD.org
Cc:  
Subject: Re: kern/71334: [ PATCH ] mem_range_attr_{set|get} are no longer
 kernel-callable
Date: Sun, 05 Sep 2004 04:06:41 +0200

 This is a multi-part message in MIME format.
 --------------020308090205080700030809
 Content-Type: text/plain; charset=ISO-8859-2; format=flowed
 Content-Transfer-Encoding: 7bit
 
 I'm sorry, but the attached patch is mistake. I attached another file 
 that I want. The correct patch follows.
 
 					Dan
 
 -- 
 Dan Lukes     tel: +420 2 21914205, fax: +420 2 21914206
 root of  FIONet, KolejNET,  webmaster  of www.freebsd.cz
 AKA: dan@obluda.cz, dan@freebsd.cz,dan@kolej.mff.cuni.cz
 
 --------------020308090205080700030809
 Content-Type: text/plain;
  name="Makefile.diff"
 Content-Transfer-Encoding: 7bit
 Content-Disposition: inline;
  filename="Makefile.diff"
 
 --- sys/modules/mem/Makefile.ORIG	Sun Sep  5 03:59:44 2004
 +++ sys/modules/mem/Makefile	Sun Sep  5 03:59:44 2004
 @@ -7,6 +7,8 @@
  SRCS=	memdev.c mem.c
  .if ${MACHINE_ARCH} == "amd64" || ${MACHINE_ARCH} == "i386"
  SRCS+=	memutil.c
 +EXPORT_SYMS=    mem_range_attr_get    \
 +                mem_range_attr_set
  .endif
  SRCS+=	bus_if.h device_if.h vnode_if.h
  
 
 --------------020308090205080700030809--
Responsible-Changed-From-To: freebsd-bugs->antoine 
Responsible-Changed-By: antoine 
Responsible-Changed-When: Sat Mar 8 23:21:49 UTC 2008 
Responsible-Changed-Why:  
Take. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=71334 
State-Changed-From-To: open->feedback 
State-Changed-By: antoine 
State-Changed-When: Mon Mar 10 19:59:28 UTC 2008 
State-Changed-Why:  
Asking for feedback: can you provide evidence that these 
2 functions are no longer callable? 
I can't reproduce this. (I built a kernel with "nodevice mem" 
and the drm module still works) 
As long as you "MODULE_DEPEND(foo, mem, 1, 1, 1);" in the 
calling module there should be no problem. 
You can also have a look at 
http://lists.freebsd.org/pipermail/freebsd-standards/2004-June/000619.html 
to know what EXPORT_SYMS must be used for. 
Thanks. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=71334 

From: Dan Lukes <dan@obluda.cz>
To: antoine@FreeBSD.org, bug-followup@FreeBSD.org
Cc:  
Subject: Re: kern/71334: [mem] [patch] mem_range_attr_{set|get} are no longer
 kernel-callable
Date: Mon, 10 Mar 2008 23:08:35 +0100

 Forty months past submission of the PR I remember no details that are 
 not recorded here. Nor I have FreeBSD 5.3-BETA2 or something similar 
 anywhere. It seems there is no such problem on 6.3-RELEASE.
 
 I aprecitate your's interest but it's too late for such problem.
 
 Let close it.
 
 Thank you.
 
 					Dan
 
 
State-Changed-From-To: feedback->closed 
State-Changed-By: antoine 
State-Changed-When: Mon Mar 10 22:15:15 UTC 2008 
State-Changed-Why:  
Close at submitters request, it appears to be fixed. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=71334 
>Unformatted:
