Re: CVS commit: src

2012-11-29 Thread Matthias Drochner

On Thu, 29 Nov 2012 19:20:14 +
Nick Hudson nick.hud...@gmx.co.uk wrote:
 On Sunday 18 November 2012 17:41:55 Emmanuel Dreyfus wrote:
  -#if defined(_INCOMPLETE_XOPEN_C063)
  +#if (_POSIX_C_SOURCE - 0) = 200809L || (_XOPEN_SOURCE - 0 = 700)
  || \
  +defined(_INCOMPLETE_XOPEN_C063) || defined(_KERNEL)

 Shouldn't this be

 #if (_POSIX_C_SOURCE - 0) = 200809L || (_XOPEN_SOURCE - 0 = 700) ||
 \ defined(_INCOMPLETE_XOPEN_C063) || defined(_NETBSD_SOURCE)

I've added (locally)

#if defined(_NETBSD_SOURCE)
#define _INCOMPLETE_XOPEN_C063
#endif

to sys/types.h in the meantime, as a quick hack to fix
build problems with various userland software.
Has about the same effect -- something like this
is definitely necessary.

nest regards
Matthias




Forschungszentrum Juelich GmbH
52425 Juelich
Sitz der Gesellschaft: Juelich
Eingetragen im Handelsregister des Amtsgerichts Dueren Nr. HR B 3498
Vorsitzender des Aufsichtsrats: MinDir Dr. Karl Eugen Huthmacher
Geschaeftsfuehrung: Prof. Dr. Achim Bachem (Vorsitzender),
Karsten Beneke (stellv. Vorsitzender), Prof. Dr.-Ing. Harald Bolt,
Prof. Dr. Sebastian M. Schmidt




Re: CVS commit: src/sys/external/bsd/drm/dist/bsd-core

2012-01-29 Thread Matthias Drochner

lars.heidie...@googlemail.com said:
 where does the diagnostic panic occur?

It was in the course of a realloc() from drm code. It did
apparently assume that the to be free'd block was allocated
by the pool code where it was allocated by kmem.

best regards
Matthias



---
---
Forschungszentrum Juelich GmbH
52425 Juelich
Sitz der Gesellschaft: Juelich
Eingetragen im Handelsregister des Amtsgerichts Dueren Nr. HR B 3498
Vorsitzender des Aufsichtsrats: MinDir Dr. Karl Eugen Huthmacher
Geschaeftsfuehrung: Prof. Dr. Achim Bachem (Vorsitzender),
Karsten Beneke (stellv. Vorsitzender), Prof. Dr.-Ing. Harald Bolt,
Prof. Dr. Sebastian M. Schmidt
---
---

Kennen Sie schon unsere app? http://www.fz-juelich.de/app


Re: CVS commit: src/sys/arch/i386/i386

2012-01-20 Thread Matthias Drochner

m...@eterna.com.au said:
 alloc/free here for whatever is using a lot of memory would be much
 better than increasing the minimum each LWP requires.

Agreed. In the ppbattach case, it should be sufficient
to put the devinfo printf into a separate function, so
that it doesn't stack up when called recursively. (One
just needs to make sure that the compiler doesn't
inline it again.)

best regards
Matthias





Forschungszentrum Juelich GmbH
52425 Juelich
Sitz der Gesellschaft: Juelich
Eingetragen im Handelsregister des Amtsgerichts Dueren Nr. HR B 3498
Vorsitzender des Aufsichtsrats: MinDir Dr. Karl Eugen Huthmacher
Geschaeftsfuehrung: Prof. Dr. Achim Bachem (Vorsitzender),
Karsten Beneke (stellv. Vorsitzender), Prof. Dr.-Ing. Harald Bolt,
Prof. Dr. Sebastian M. Schmidt



Kennen Sie schon unsere app? http://www.fz-juelich.de/app


Re: CVS commit: src/sys/arch/i386/i386

2012-01-20 Thread Matthias Drochner

chris...@astron.com said:
 /.*sub.*,%[er]sp/

very nice

 18648 80494b55:stbi_gif_load_from_memory+0xd

So this can never have worked on x86, with only 12k stack.

best regards
Matthias





Forschungszentrum Juelich GmbH
52425 Juelich
Sitz der Gesellschaft: Juelich
Eingetragen im Handelsregister des Amtsgerichts Dueren Nr. HR B 3498
Vorsitzender des Aufsichtsrats: MinDir Dr. Karl Eugen Huthmacher
Geschaeftsfuehrung: Prof. Dr. Achim Bachem (Vorsitzender),
Karsten Beneke (stellv. Vorsitzender), Prof. Dr.-Ing. Harald Bolt,
Prof. Dr. Sebastian M. Schmidt



Kennen Sie schon unsere app? http://www.fz-juelich.de/app


Re: CVS commit: src/sys/arch/i386/i386

2012-01-19 Thread Matthias Drochner

dyo...@pobox.com said:
  increased stack use lead to stack overflow on amd64
  with a deep PCI hierarchy
 Tell me more about this.

It was sys/dev/pci/pci.c rev.1.141 which triggered it.
Stack use must already have been tight, and the additional
device number array was the last straw.
The question is now whether it is sufficient in the long run
to trim down stack usage (eg devinfo in ppbattach()),
or whether the kernel stack needs to be increased.

 Please revert the reversion.  I will add a big, fat comment.

It makes more sense if you commit the code together with
the comment, and cvs annotate's output would be more
sensible too.

best regards
Matthias





Forschungszentrum Juelich GmbH
52425 Juelich
Sitz der Gesellschaft: Juelich
Eingetragen im Handelsregister des Amtsgerichts Dueren Nr. HR B 3498
Vorsitzender des Aufsichtsrats: MinDir Dr. Karl Eugen Huthmacher
Geschaeftsfuehrung: Prof. Dr. Achim Bachem (Vorsitzender),
Karsten Beneke (stellv. Vorsitzender), Prof. Dr.-Ing. Harald Bolt,
Prof. Dr. Sebastian M. Schmidt



Kennen Sie schon unsere app? http://www.fz-juelich.de/app


Re: CVS commit: src/sys/arch/i386/i386

2012-01-18 Thread Matthias Drochner

dyo...@pobox.com said:
  was setting pba_sub = 255 causing material problems for someone, or
 are you concerned that lossage will eventually occur on certain
 server-class machines?

No, this wasn't causing damage. I was tracking another problem which
was incidentally triggered by another of your changes -- increased
stack use lead to stack overflow on amd64 with a deep PCI hierarchy
(a MicroTCA system).

Just stumbled over this. But it is obviously wrong. If you think
it should be in the public tree there should be at least a big fat
comment telling that it is for testing purposes and nothing uses
it really and it will be removed before it can cause damage.

best regards
Matthias





Forschungszentrum Juelich GmbH
52425 Juelich
Sitz der Gesellschaft: Juelich
Eingetragen im Handelsregister des Amtsgerichts Dueren Nr. HR B 3498
Vorsitzender des Aufsichtsrats: MinDir Dr. Karl Eugen Huthmacher
Geschaeftsfuehrung: Prof. Dr. Achim Bachem (Vorsitzender),
Karsten Beneke (stellv. Vorsitzender), Prof. Dr.-Ing. Harald Bolt,
Prof. Dr. Sebastian M. Schmidt



Kennen Sie schon unsere app? http://www.fz-juelich.de/app


Re: CVS commit: src/sys/compat

2012-01-04 Thread Matthias Drochner

 Module Name:src
 Committed By:   apb
 Date:   Wed Jan  4 13:45:55 UTC 2012
 Modified Files:
 src/sys/compat/common: kern_time_50.c
 src/sys/compat/sys: clockctl.h
 Log Message: Provide a COMPAT_50 version of the CLOCKCTL_NTP_ADJTIME
 ioctl. When time_t was changed from 32 to 64 bits, this ioctl's number
 was changed from _IOWR('C', 0x4, struct clockctl_ntp_adjtime) to
 _IOWR('C', 0x8, struct clockctl_ntp_adjtime), but the data structure
 did not change, so all the compat code has to do is change the number
 and try again.

If this just fixes a mistake which doesn't affect a released version,
it should be OK to fix the ioctl number (and send a heads-up to
current-users).

best regards
Matthias





Forschungszentrum Juelich GmbH
52425 Juelich
Sitz der Gesellschaft: Juelich
Eingetragen im Handelsregister des Amtsgerichts Dueren Nr. HR B 3498
Vorsitzender des Aufsichtsrats: MinDirig Dr. Karl Eugen Huthmacher
Geschaeftsfuehrung: Prof. Dr. Achim Bachem (Vorsitzender),
Karsten Beneke (stellv. Vorsitzender), Prof. Dr.-Ing. Harald Bolt,
Prof. Dr. Sebastian M. Schmidt



Kennen Sie schon unsere app? http://www.fz-juelich.de/app


Re: CVS commit: src/lib/libcrypt

2011-11-29 Thread Matthias Drochner

jo...@britannica.bec.de said:
 Well, the way it is done, it won't help.

What do you mean - a duplication of efforts?
Just noticed this myself... I'm not sure it is a good idea to
do this in MD5Final because it might be unnecessary if the
hash is just used for indexing or so. In addition, this is
handled inconsistently among the hash functions, eg SHA1Final
doesn't do it.
Anyway, for now  I've left this as it was.

best regards
Matthias





Forschungszentrum Juelich GmbH
52425 Juelich
Sitz der Gesellschaft: Juelich
Eingetragen im Handelsregister des Amtsgerichts Dueren Nr. HR B 3498
Vorsitzender des Aufsichtsrats: MinDirig Dr. Karl Eugen Huthmacher
Geschaeftsfuehrung: Prof. Dr. Achim Bachem (Vorsitzender),
Karsten Beneke (stellv. Vorsitzender), Prof. Dr.-Ing. Harald Bolt,
Prof. Dr. Sebastian M. Schmidt




Re: CVS commit: src/lib/libcrypt

2011-11-29 Thread Matthias Drochner

m.droch...@fz-juelich.de said:
 a disassembly of MD5Final() on i386 shows that the final zeroing is
 present in the binary

OK, this is no surprise. At this point the compiler can't know that
it is a dead store.

best regards
Matthias





Forschungszentrum Juelich GmbH
52425 Juelich
Sitz der Gesellschaft: Juelich
Eingetragen im Handelsregister des Amtsgerichts Dueren Nr. HR B 3498
Vorsitzender des Aufsichtsrats: MinDirig Dr. Karl Eugen Huthmacher
Geschaeftsfuehrung: Prof. Dr. Achim Bachem (Vorsitzender),
Karsten Beneke (stellv. Vorsitzender), Prof. Dr.-Ing. Harald Bolt,
Prof. Dr. Sebastian M. Schmidt




Re: CVS commit: src/lib/libcrypt

2011-11-29 Thread Matthias Drochner

dholland-sourcechan...@netbsd.org said:
 You also want to take steps to make sure that the zeroed cache line is
 flushed out.

This would be good, but it is a bit hard on x86 from userland
because wbinv is a privileged instruction. Would need a system
call.
Anyway, here is a first cut on an explicit_bzero function
which doesn't get optimized away. I've put it to src/common
because the same thing makes sense in the kernel too.
Comments?

best regards
Matthias




Forschungszentrum Juelich GmbH
52425 Juelich
Sitz der Gesellschaft: Juelich
Eingetragen im Handelsregister des Amtsgerichts Dueren Nr. HR B 3498
Vorsitzender des Aufsichtsrats: MinDirig Dr. Karl Eugen Huthmacher
Geschaeftsfuehrung: Prof. Dr. Achim Bachem (Vorsitzender),
Karsten Beneke (stellv. Vorsitzender), Prof. Dr.-Ing. Harald Bolt,
Prof. Dr. Sebastian M. Schmidt


# HG changeset patch
# Parent 2aacac6262cc9007f8dfb28f30add312d2a8168c
diff -r 2aacac6262cc -r 3417b12dcb66 common/lib/libc/string/explicit_bzero.c
--- /dev/null   Thu Jan 01 00:00:00 1970 +
+++ b/common/lib/libc/string/explicit_bzero.c   Tue Nov 29 20:32:08 2011 +0100
@@ -0,0 +1,14 @@
+/* $NetBSD$ */
+
+#include string.h
+
+#if !defined(_KERNEL)
+#define explicit_bzero __explicit_bzero
+#endif
+
+void
+explicit_bzero(void *p, size_t l)
+{
+
+   memset(p, 0, l);
+}
diff -r 2aacac6262cc -r 3417b12dcb66 include/string.h
--- a/include/string.h  Tue Nov 29 18:12:59 2011 +0100
+++ b/include/string.h  Tue Nov 29 20:32:08 2011 +0100
@@ -107,6 +107,7 @@
 char   *stresep(char **, const char *, int);
 char   *strndup(const char *, size_t);
 void   *memrchr(const void *, int, size_t);
+void   __explicit_bzero(void *, size_t);
 #endif
 __END_DECLS
 
diff -r 2aacac6262cc -r 3417b12dcb66 lib/libc/string/Makefile.inc
--- a/lib/libc/string/Makefile.inc  Tue Nov 29 18:12:59 2011 +0100
+++ b/lib/libc/string/Makefile.inc  Tue Nov 29 20:32:08 2011 +0100
@@ -19,6 +19,7 @@
 SRCS+= strcat.c strcmp.c strcpy.c strcspn.c strlen.c
 SRCS+= strncat.c strncmp.c strncpy.c strpbrk.c strsep.c
 SRCS+= strspn.c strstr.c swab.c
+SRCS+= explicit_bzero.c
 
 SRCS+= memccpy.c memcpy.c memmem.c memmove.c
 SRCS+= strchr.c strrchr.c
diff -r 2aacac6262cc -r 3417b12dcb66 lib/libcrypt/bcrypt.c
--- a/lib/libcrypt/bcrypt.c Tue Nov 29 18:12:59 2011 +0100
+++ b/lib/libcrypt/bcrypt.c Tue Nov 29 20:32:08 2011 +0100
@@ -313,7 +313,7 @@
encode_base64((u_int8_t *) encrypted + i + 3, csalt, BCRYPT_MAXSALT);
encode_base64((u_int8_t *) encrypted + strlen(encrypted), ciphertext,
4 * BCRYPT_BLOCKS - 1);
-   memset(state, 0, sizeof(state));
+   __explicit_bzero(state, sizeof(state));
return encrypted;
 }
 
diff -r 2aacac6262cc -r 3417b12dcb66 lib/libcrypt/crypt-sha1.c
--- a/lib/libcrypt/crypt-sha1.c Tue Nov 29 18:12:59 2011 +0100
+++ b/lib/libcrypt/crypt-sha1.c Tue Nov 29 20:32:08 2011 +0100
@@ -190,7 +190,7 @@
 *ep = '\0';
 
 /* Don't leave anything around in vm they could use. */
-memset(hmac_buf, 0, sizeof hmac_buf);
+__explicit_bzero(hmac_buf, sizeof hmac_buf);
 
 return passwd;
 }  
diff -r 2aacac6262cc -r 3417b12dcb66 lib/libcrypt/md5crypt.c
--- a/lib/libcrypt/md5crypt.c   Tue Nov 29 18:12:59 2011 +0100
+++ b/lib/libcrypt/md5crypt.c   Tue Nov 29 20:32:08 2011 +0100
@@ -143,6 +143,6 @@
*p = '\0';
 
/* Don't leave anything around in vm they could use. */
-   memset(final, 0, sizeof(final));
+   __explicit_bzero(final, sizeof(final));
return (passwd);
 }


Re: CVS commit: src/lib/libm/arch/i387

2011-06-20 Thread Matthias Drochner

jo...@britannica.bec.de said:
 why do you think it is incorrect?

You just did an unifdef.

best regards
Matthias





Forschungszentrum Juelich GmbH
52425 Juelich
Sitz der Gesellschaft: Juelich
Eingetragen im Handelsregister des Amtsgerichts Dueren Nr. HR B 3498
Vorsitzender des Aufsichtsrats: MinDirig Dr. Karl Eugen Huthmacher
Geschaeftsfuehrung: Prof. Dr. Achim Bachem (Vorsitzender),
Dr. Ulrich Krafft (stellv. Vorsitzender), Prof. Dr.-Ing. Harald Bolt,
Prof. Dr. Sebastian M. Schmidt



Besuchen Sie uns auf unserem neuen Webauftritt unter www.fz-juelich.de


Re: CVS commit: src/sys/dev/usb

2011-05-28 Thread Matthias Drochner

[toggle bit]
jakll...@kollasch.net said:
 These are basically the same changes FreeBSD and OpenBSD made?

Possibly... I had this patch in my tree for almost a year and
just stumbled over it when I switched my local VCS.

 I'll work on OHCI anyway.

Great -- the problem is not easily reproduced. I noticed
with pkgsrc/urjtag and a less common USB-to-JTAG adapter.
Software usually recovers with a clear endpoint stall
command IIRC, some drivers do this on start which hides
the problem.

best regards
Matthias





Forschungszentrum Juelich GmbH
52425 Juelich
Sitz der Gesellschaft: Juelich
Eingetragen im Handelsregister des Amtsgerichts Dueren Nr. HR B 3498
Vorsitzender des Aufsichtsrats: MinDirig Dr. Karl Eugen Huthmacher
Geschaeftsfuehrung: Prof. Dr. Achim Bachem (Vorsitzender),
Dr. Ulrich Krafft (stellv. Vorsitzender), Prof. Dr.-Ing. Harald Bolt,
Prof. Dr. Sebastian M. Schmidt



Besuchen Sie uns auf unserem neuen Webauftritt unter www.fz-juelich.de


Re: CVS commit: src/sys/arch/amd64/conf

2011-02-19 Thread Matthias Drochner

jeanyves.mig...@free.fr said:
 I can't see why MONOLITHIC is needed in the first place

I think before modular kernels are forced onto the masses,
at least 2 design problems should be fixed:
1. Autoloading needs to be done differently: The kernel doesn't
   have the smarts to know which module is needed in which situation,
   and there is no fine-grained administrative control. I've
   complained in some other mail about the idiotic behavior
   in case of exec format loaders.
2. I don't want tons of modules which I'll never need installed
   into my root file system. As it was common in good old times (tm),
   my root filesystems are as small as possible. Now, with modules
   being added to the build, I have to squeeze out stuff after
   each update to keep some percent free space in /.

best regards
Matthias





Forschungszentrum Juelich GmbH
52425 Juelich
Sitz der Gesellschaft: Juelich
Eingetragen im Handelsregister des Amtsgerichts Dueren Nr. HR B 3498
Vorsitzender des Aufsichtsrats: MinDirig Dr. Karl Eugen Huthmacher
Geschaeftsfuehrung: Prof. Dr. Achim Bachem (Vorsitzender),
Dr. Ulrich Krafft (stellv. Vorsitzender), Prof. Dr.-Ing. Harald Bolt,
Prof. Dr. Sebastian M. Schmidt




Re: CVS commit: src/sys/arch/amd64/conf

2011-02-19 Thread Matthias Drochner

jruoho...@iki.fi said:
 Have you measured how much modules supposedly increase the size
 compared to compiling things directly to the kernel? This seems like a
 rather silly point to me (without numbers, at least).

The difference is that I can control what is built into my
kernel, but I can't control what modules are installed.

best regards
Matthias





Forschungszentrum Juelich GmbH
52425 Juelich
Sitz der Gesellschaft: Juelich
Eingetragen im Handelsregister des Amtsgerichts Dueren Nr. HR B 3498
Vorsitzender des Aufsichtsrats: MinDirig Dr. Karl Eugen Huthmacher
Geschaeftsfuehrung: Prof. Dr. Achim Bachem (Vorsitzender),
Dr. Ulrich Krafft (stellv. Vorsitzender), Prof. Dr.-Ing. Harald Bolt,
Prof. Dr. Sebastian M. Schmidt




Re: CVS commit: src/lib/csu

2011-02-01 Thread Matthias Drochner

jo...@britannica.bec.de said:
 The attached patch seems to sort this out.

Yes, thanks, this works.

best regards
Matthias





Forschungszentrum Juelich GmbH
52425 Juelich
Sitz der Gesellschaft: Juelich
Eingetragen im Handelsregister des Amtsgerichts Dueren Nr. HR B 3498
Vorsitzender des Aufsichtsrats: MinDirig Dr. Karl Eugen Huthmacher
Geschaeftsfuehrung: Prof. Dr. Achim Bachem (Vorsitzender),
Dr. Ulrich Krafft (stellv. Vorsitzender), Prof. Dr.-Ing. Harald Bolt,
Prof. Dr. Sebastian M. Schmidt




Re: CVS commit: src/lib/csu

2011-01-31 Thread Matthias Drochner

jo...@britannica.bec.de said:
 $ ~/work/NetBSD/obj/clang-base/tools/bin/nbmake-amd64 -V .OBJDIR
 /home/joerg/work/NetBSD/obj/clang-base/amd64/lib/csu

This shows that you are not using an .OBJDIR, in the sense that it is
different from .CURDIR. See the make(1) manpage.

There are various rules which use this in mk/bsd.obj.mk. I'm
setting BUILDID and BSDOBJDIR in my /etc/mk.conf.

best regards
Matthias





Forschungszentrum Juelich GmbH
52425 Juelich
Sitz der Gesellschaft: Juelich
Eingetragen im Handelsregister des Amtsgerichts Dueren Nr. HR B 3498
Vorsitzender des Aufsichtsrats: MinDirig Dr. Karl Eugen Huthmacher
Geschaeftsfuehrung: Prof. Dr. Achim Bachem (Vorsitzender),
Dr. Ulrich Krafft (stellv. Vorsitzender), Prof. Dr.-Ing. Harald Bolt,
Prof. Dr. Sebastian M. Schmidt




Re: CVS commit: src/lib/csu

2011-01-31 Thread Matthias Drochner

jo...@britannica.bec.de said:
 BSDOBJDIR doesn't seem to do anything. BUILDID breaks this. I have no
 idea why those variables even exist, the code in bsd.own.mk is messy
 at best

I agree that the code is messy, but at least BUILDID serves a useful
purpose: I can use the same source tree from different machines
(NFS mounted) with different directory layouts.
This has always worked, for as long as I've been using NetBSD.

It seems that the PARSEDIR feature is broken. Can't tell whether
make(1) or the mess in share/mk is to blame, but this should
be solved before deploying it in the source tree.

best regards
Matthias





Forschungszentrum Juelich GmbH
52425 Juelich
Sitz der Gesellschaft: Juelich
Eingetragen im Handelsregister des Amtsgerichts Dueren Nr. HR B 3498
Vorsitzender des Aufsichtsrats: MinDirig Dr. Karl Eugen Huthmacher
Geschaeftsfuehrung: Prof. Dr. Achim Bachem (Vorsitzender),
Dr. Ulrich Krafft (stellv. Vorsitzender), Prof. Dr.-Ing. Harald Bolt,
Prof. Dr. Sebastian M. Schmidt




Re: CVS commit: src/sys/kern

2010-09-11 Thread Matthias Drochner

tsugutomo.en...@jp.sony.com said:
 Does malloc(3) return zero-initialized memory?

You are right - seems that I confused the macros.
So it might make sense to pull this up. I'll ask for testers.

best regards
Matthias





Forschungszentrum Juelich GmbH
52425 Juelich
Sitz der Gesellschaft: Juelich
Eingetragen im Handelsregister des Amtsgerichts Dueren Nr. HR B 3498
Vorsitzender des Aufsichtsrats: MinDirig Dr. Karl Eugen Huthmacher
Geschaeftsfuehrung: Prof. Dr. Achim Bachem (Vorsitzender),
Dr. Ulrich Krafft (stellv. Vorsitzender), Prof. Dr.-Ing. Harald Bolt,
Prof. Dr. Sebastian M. Schmidt




Re: CVS commit: src/sys/arch

2010-07-26 Thread Matthias Drochner

c...@cubidou.net said:
  keep out paddr_t from the kernel ABI relevant to modules.
 You won't keep bus_addr_t out of the ABI any time soon, so this is not
 a fix.

It is not correct anyway to tie bus_addr_t to paddr_t -- the semantics
of the buses don't depend on the CPU but on chipsets, or are defined MI.
So leaving bus_addr_t at 32bit would be a good first step to get things
untangled.

 Anyway, this is why I ask about measurements.  That would at least
 allow a discussion based on facts instead of suppositions.

Measurements are good, but then they need also to be done on
a low-end board, like the somewhat popular Soekris. (I've got
an ElanSC520 board with 16M RAM myself.)
There is also increased kernel memory usage. Largest part due to
growth of vm_page probably, and cache footprint caused by it.
And if the box is memory starved anyway, the more the page lists
are walked the more it matters.
Just want to say one can prove or disprove anything with the
right benchmark.

m...@eterna.com.au said:
  i386pae and i386?
 FWIW, having a different module load path and choosing the right set
 of modules is an incoming feature but i have no time line for it.

The appeal of such a solution is that it can be taken back easily
if it is not needed anymore. If paddr_t gets extended it will stay,
and there will be little motication to clean up the APIs.

best regards
Matthias





Forschungszentrum Juelich GmbH
52425 Juelich
Sitz der Gesellschaft: Juelich
Eingetragen im Handelsregister des Amtsgerichts Dueren Nr. HR B 3498
Vorsitzender des Aufsichtsrats: MinDirig Dr. Karl Eugen Huthmacher
Geschaeftsfuehrung: Prof. Dr. Achim Bachem (Vorsitzender),
Dr. Ulrich Krafft (stellv. Vorsitzender), Prof. Dr.-Ing. Harald Bolt,
Prof. Dr. Sebastian M. Schmidt




Re: CVS commit: src/sys/arch

2010-07-24 Thread Matthias Drochner

christoph_eg...@gmx.de said:
 How about making paddr_t always 64bit? That makes it much easier to
 deal with in libkvm.

I don't think this is a good argument. The little gain of making
a rarely used library like libkvm simpler can't justify adding
overhead to the kernel.
PAE is a bridge technology, interesting only for few systems.
Users of low-end i386 systems would be penalized, and most users
of boxes with 4G memory would gain nothing because they run
a 64-bit system anyway.
So, imho, no kernel overhead is acceptable.

best regards
Matthias





Forschungszentrum Juelich GmbH
52425 Juelich
Sitz der Gesellschaft: Juelich
Eingetragen im Handelsregister des Amtsgerichts Dueren Nr. HR B 3498
Vorsitzender des Aufsichtsrats: MinDirig Dr. Karl Eugen Huthmacher
Geschaeftsfuehrung: Prof. Dr. Achim Bachem (Vorsitzender),
Dr. Ulrich Krafft (stellv. Vorsitzender), Prof. Dr.-Ing. Harald Bolt,
Prof. Dr. Sebastian M. Schmidt




Re: CVS commit: src/sys/arch

2010-07-24 Thread Matthias Drochner

c...@cubidou.net said:
 Kernel modules, on the other hand...

Hmm, didn't think of that. (using them myself only for testing)

 a gaping ABI incompatibility is completely unacceptable

There are two ways to fix this without the 64-bit-paddr overhead,
a short-term and a long-term one.
The short-term fix would be to use another module load path.
This is close to calling it a different port, but it would
not affect userland.
A more correct but more expensive fix would be to keep out
paddr_t from the kernel ABI relevant to modules.

best regards
Matthias





Forschungszentrum Juelich GmbH
52425 Juelich
Sitz der Gesellschaft: Juelich
Eingetragen im Handelsregister des Amtsgerichts Dueren Nr. HR B 3498
Vorsitzender des Aufsichtsrats: MinDirig Dr. Karl Eugen Huthmacher
Geschaeftsfuehrung: Prof. Dr. Achim Bachem (Vorsitzender),
Dr. Ulrich Krafft (stellv. Vorsitzender), Prof. Dr.-Ing. Harald Bolt,
Prof. Dr. Sebastian M. Schmidt




Re: CVS commit: src/lib/libpthread

2010-05-17 Thread Matthias Drochner

 Is the SEE ALSO section meant to refer to external sources?

Just as a data point, OSF/1 does this.
To cite eg inet(7):

RELATED INFORMATION
  Functions: ioctl(2), socket(2).
  Network Information: netintro(7), tcp(7), udp(7), ip(7), icmp(7).
  Network Programmer's Guide
  Technical Overview
  RFC 2373, IP Version 6 Addressing Architecture, July 1998

Or pthread_create(3);

RELATED INFORMATION
  Functions: pthread_atfork(3), pthread_attr_destroy(3),
  pthread_attr_init(3), pthread_attr_setdetachstate(3),
  pthread_attr_setinheritsched(3), pthread_attr_setschedparam(3),
  pthread_attr_setschedpolicy(3), pthread_attr_setstacksize(3),
  pthread_cancel(3), pthread_detach(3), pthread_exit(3), pthread_join(3)
  Manuals: Guide to DECthreads and Programmer's Guide

Also, the xrefs are not sorted strictly alphabetically but
in some logical order which is good imo.

best regards
Matthias





Forschungszentrum Juelich GmbH
52425 Juelich
Sitz der Gesellschaft: Juelich
Eingetragen im Handelsregister des Amtsgerichts Dueren Nr. HR B 3498
Vorsitzende des Aufsichtsrats: MinDir'in Baerbel Brumme-Bothe
Geschaeftsfuehrung: Prof. Dr. Achim Bachem (Vorsitzender),
Dr. Ulrich Krafft (stellv. Vorsitzender), Prof. Dr.-Ing. Harald Bolt,
Prof. Dr. Sebastian M. Schmidt




Re: CVS commit: src/lib/libc/compat/gen

2010-04-27 Thread Matthias Drochner

m...@eterna.com.au said:
  the mono runtime dlopen(3)s some libc functions
  directly and misses the RENAMEs apparently.)
 sounds like this was already not working properly anyway!  it would
 have picked the wrong symbol, but one that may have sort of worked..

Yes I know. Fixing this in mono isn't easy because dllimport
statements are scattered all around. We'd also need
conditionals for different names in different NetBSD versions.
Or build C glue code and make dlopen() find it first.
It is just a single C# application (f-spot) whose feature set
I like, and that is told to be unstable even on Linux if the
picture database grows too large. Maintaining extensive patches
for mono is more than my time budget allows. (just seeing
that a new realease is out)

best regards
Matthias





Forschungszentrum Juelich GmbH
52425 Juelich
Sitz der Gesellschaft: Juelich
Eingetragen im Handelsregister des Amtsgerichts Dueren Nr. HR B 3498
Vorsitzende des Aufsichtsrats: MinDir'in Baerbel Brumme-Bothe
Geschaeftsfuehrung: Prof. Dr. Achim Bachem (Vorsitzender),
Dr. Ulrich Krafft (stellv. Vorsitzender), Prof. Dr.-Ing. Harald Bolt,
Prof. Dr. Sebastian M. Schmidt




Re: CVS commit: src/sys/dev/isa

2010-03-23 Thread Matthias Drochner

[reposting, was sent to s-c first]

 Module Name:src
 Committed By:   dyoung
 Date:   Mon Mar 22 22:30:58 UTC 2010
 Modified Files:
 src/sys/dev/isa: isadma.c pcdisplay.c
 Log Message:
 [...]
 pcdisplay.c: #if 0 some code that compares two bus_space_tag_t's
 in order to see if pcdisplay0 is console.  It does not seem to
 be helpful to compare the tags; maybe the author intended to
 compare some other bus property?

What you are doing is rather destructive.
This is not about bus properties but to find out whether a specific
device is the same (which means it is located at the same base address)
as the console device which was established before all the device tree.
A base address is defined by a tag-handle tuple. MI code needs to be
able to check for equality at least.
This has been fine all the time -- what are you trying to accomplish?
Even if you turn the tag into a pointer, it should be fine for MI
code to compare this to other tags.

best regards
Matthias





Forschungszentrum Juelich GmbH
52425 Juelich
Sitz der Gesellschaft: Juelich
Eingetragen im Handelsregister des Amtsgerichts Dueren Nr. HR B 3498
Vorsitzende des Aufsichtsrats: MinDir'in Baerbel Brumme-Bothe
Geschaeftsfuehrung: Prof. Dr. Achim Bachem (Vorsitzender),
Dr. Ulrich Krafft (stellv. Vorsitzender), Prof. Dr.-Ing. Harald Bolt,
Prof. Dr. Sebastian M. Schmidt




Re: CVS commit: src/sys/dev/isa

2010-03-23 Thread Matthias Drochner

dyo...@pobox.com said:
 How many pcdisplay at isa can there be one machine?

Iirc, this code is originating from alpha where you can have
multiple independant PCI/ISA/EISA hierarchies and thus
multiple pcdisplay/ega/vga devices.

 Can the two tags that pcdisplay_is_console() compared ever come from
 different spaces?

Yes, if there are independant ISA buses they are distinguished
by their tags.

 pcdisplay_is_console does not compare tag-handle tuples, it compares
 only tags.  Can it tell two instances of pcdisplay apart in that way?

I think this is just a simplification -- since you can have only one
pcdisplay per bus hierarchy you can have only one per tag.

  MI code needs to be able to check for equality at least.
 I don't see the need.

This is done at other places as well, eg in com.c, which is used
by many (also embedded) architectures. (In this case, tag _and_
handle are compared -- one can have multiple com devices in any
of multiple address spaces.)

best regards
Matthias





Forschungszentrum Juelich GmbH
52425 Juelich
Sitz der Gesellschaft: Juelich
Eingetragen im Handelsregister des Amtsgerichts Dueren Nr. HR B 3498
Vorsitzende des Aufsichtsrats: MinDir'in Baerbel Brumme-Bothe
Geschaeftsfuehrung: Prof. Dr. Achim Bachem (Vorsitzender),
Dr. Ulrich Krafft (stellv. Vorsitzender), Prof. Dr.-Ing. Harald Bolt,
Prof. Dr. Sebastian M. Schmidt




Re: CVS commit: src/sys/dev/isa

2010-03-23 Thread Matthias Drochner

dyo...@pobox.com said:
 How many pcdisplay at isa can there be one machine?

Iirc, this code is originating from alpha where you can have
multiple independant PCI/ISA/EISA hierarchies and thus
multiple pcdisplay/ega/vga devices.

 Can the two tags that pcdisplay_is_console() compared ever come from
 different spaces?

Yes, if there are independant ISA buses they are distinguished
by their tags.

 pcdisplay_is_console does not compare tag-handle tuples, it compares
 only tags.  Can it tell two instances of pcdisplay apart in that way?

I think this is just a simplification -- since you can have only one
pcdisplay per bus hierarchy you can have only one per tag.

  MI code needs to be able to check for equality at least.
 I don't see the need.
This is done at other places as well, eg in com.c, which is used
by many (also embedded) architectures. (In this case, tag _and_
handle are compared -- one can have multiple com devices in any
of multiple address spaces.)
Not understanding some code is no excuse for breaking it.

best regards
Matthias





Forschungszentrum Juelich GmbH
52425 Juelich
Sitz der Gesellschaft: Juelich
Eingetragen im Handelsregister des Amtsgerichts Dueren Nr. HR B 3498
Vorsitzende des Aufsichtsrats: MinDir'in Baerbel Brumme-Bothe
Geschaeftsfuehrung: Prof. Dr. Achim Bachem (Vorsitzender),
Dr. Ulrich Krafft (stellv. Vorsitzender), Prof. Dr.-Ing. Harald Bolt,
Prof. Dr. Sebastian M. Schmidt




Re: CVS commit: src/sys/dev/isa

2010-03-23 Thread Matthias Drochner

dyo...@pobox.com said:
 Let us add a bus_space_is_equal(bus_space_tag_t t1, bus_space_tag_t
 t2) for implementation in MD code

That's generally OK. (We have this in pthread_equal().)

return memcpy(t1, t2, sizeof(t1)) == 0;
 That will work even if bus_space_tag_t is a struct.

I hope you don't really consider to pass structs as arguments to
functions. Int-alikes and pointers make sense, but I doubt anything
else does. But then, a bus_space_is_equal() doesn't buy us much,
it only adds bloat.

best regards
Matthias






Forschungszentrum Juelich GmbH
52425 Juelich
Sitz der Gesellschaft: Juelich
Eingetragen im Handelsregister des Amtsgerichts Dueren Nr. HR B 3498
Vorsitzende des Aufsichtsrats: MinDir'in Baerbel Brumme-Bothe
Geschaeftsfuehrung: Prof. Dr. Achim Bachem (Vorsitzender),
Dr. Ulrich Krafft (stellv. Vorsitzender), Prof. Dr.-Ing. Harald Bolt,
Prof. Dr. Sebastian M. Schmidt




CVS commit: src/external/bsd/tre/dist/po

2010-02-27 Thread Matthias Drochner
Module Name:src
Committed By:   drochner
Date:   Sat Feb 27 12:08:56 UTC 2010

Removed Files:
src/external/bsd/tre/dist/po: fi.gmo sv.gmo

Log Message:
remove generated binary files


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.1 -r0 src/external/bsd/tre/dist/po/fi.gmo \
src/external/bsd/tre/dist/po/sv.gmo

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/external/bsd/tre/dist/po

2010-02-27 Thread Matthias Drochner
Module Name:src
Committed By:   drochner
Date:   Sat Feb 27 12:08:56 UTC 2010

Removed Files:
src/external/bsd/tre/dist/po: fi.gmo sv.gmo

Log Message:
remove generated binary files


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.1 -r0 src/external/bsd/tre/dist/po/fi.gmo \
src/external/bsd/tre/dist/po/sv.gmo

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



Re: CVS commit: src/sys/dev

2010-02-26 Thread Matthias Drochner

m...@eterna.com.au said:
 this is a pretty serious change to have only compile tested! can you
 please get some real testing done on this?

Seconded.
And: Starting to commit without having an idea what it breaks
and where it ends isn't great engineering either.

best regards
Matthias





Forschungszentrum Juelich GmbH
52425 Juelich
Sitz der Gesellschaft: Juelich
Eingetragen im Handelsregister des Amtsgerichts Dueren Nr. HR B 3498
Vorsitzende des Aufsichtsrats: MinDir'in Baerbel Brumme-Bothe
Geschaeftsfuehrung: Prof. Dr. Achim Bachem (Vorsitzender),
Dr. Ulrich Krafft (stellv. Vorsitzender), Prof. Dr.-Ing. Harald Bolt,
Prof. Dr. Sebastian M. Schmidt




CVS commit: src/lib/libcurses

2010-02-25 Thread Matthias Drochner
Module Name:src
Committed By:   drochner
Date:   Thu Feb 25 10:56:25 UTC 2010

Modified Files:
src/lib/libcurses: acs.c

Log Message:
fix wrong widechar assignment for up arrow


To generate a diff of this commit:
cvs rdiff -u -r1.18 -r1.19 src/lib/libcurses/acs.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/dev

2010-02-25 Thread Matthias Drochner
Module Name:src
Committed By:   drochner
Date:   Thu Feb 25 11:20:10 UTC 2010

Modified Files:
src/sys/dev/ic: pcdisplay_chars.c vga.c
src/sys/dev/wscons: unicode.h wsemul_vt100_chars.c

Log Message:
retire our private definitions for the scan1/3/5/7/9 DEC graphics
symbols, use the unicode definitions instead (which apparently didn't
exist when I wrote that)


To generate a diff of this commit:
cvs rdiff -u -r1.15 -r1.16 src/sys/dev/ic/pcdisplay_chars.c
cvs rdiff -u -r1.101 -r1.102 src/sys/dev/ic/vga.c
cvs rdiff -u -r1.3 -r1.4 src/sys/dev/wscons/unicode.h
cvs rdiff -u -r1.13 -r1.14 src/sys/dev/wscons/wsemul_vt100_chars.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/lib/libcurses

2010-02-24 Thread Matthias Drochner
Module Name:src
Committed By:   drochner
Date:   Wed Feb 24 13:02:13 UTC 2010

Modified Files:
src/lib/libcurses: curses_cursor.3 curses_touch.3

Log Message:
document wsyncup/wsyncdown/wcursyncup


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/lib/libcurses/curses_cursor.3
cvs rdiff -u -r1.7 -r1.8 src/lib/libcurses/curses_touch.3

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/dev/ic

2010-02-24 Thread Matthias Drochner
Module Name:src
Committed By:   drochner
Date:   Wed Feb 24 18:33:45 UTC 2010

Modified Files:
src/sys/dev/ic: pcdisplay_chars.c

Log Message:
map some more punctuation to more or less good replacements in the IBM
character set


To generate a diff of this commit:
cvs rdiff -u -r1.14 -r1.15 src/sys/dev/ic/pcdisplay_chars.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/external/gpl3/binutils/dist/bfd

2010-02-23 Thread Matthias Drochner
Module Name:src
Committed By:   drochner
Date:   Tue Feb 23 20:42:40 UTC 2010

Modified Files:
src/external/gpl3/binutils/dist/bfd: elf32-i386.c

Log Message:
adjust INTERP path for NetBSD (needed eg for -static -pie)


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/external/gpl3/binutils/dist/bfd/elf32-i386.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src

2010-02-21 Thread Matthias Drochner
Module Name:src
Committed By:   drochner
Date:   Sun Feb 21 13:17:51 UTC 2010

Modified Files:
src/share/man/man4: options.4
src/share/man/man7: sysctl.7
src/sys/uvm: files.uvm uvm_map.c

Log Message:
rename the va0_disabled option and cpp conditional to disable as well,
for consistency, and document option and sysctl flag


To generate a diff of this commit:
cvs rdiff -u -r1.382 -r1.383 src/share/man/man4/options.4
cvs rdiff -u -r1.30 -r1.31 src/share/man/man7/sysctl.7
cvs rdiff -u -r1.17 -r1.18 src/sys/uvm/files.uvm
cvs rdiff -u -r1.289 -r1.290 src/sys/uvm/uvm_map.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/uvm

2010-02-20 Thread Matthias Drochner
Module Name:src
Committed By:   drochner
Date:   Sat Feb 20 13:21:58 UTC 2010

Modified Files:
src/sys/uvm: uvm_map.c

Log Message:
rename the new sysctl to vm.user_va0_disable, for consistency
with the majority of existing sysctl flags, suggested by yamt


To generate a diff of this commit:
cvs rdiff -u -r1.288 -r1.289 src/sys/uvm/uvm_map.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



Re: CVS commit: src/sys/uvm

2010-02-19 Thread Matthias Drochner

e...@netbsd.org said:
  (cannot be cleared at securelevel0)
 I was wondering how you achieved that without modifying any of the
 secmodel code itself

Well, that's the problem with kauth: If it needs code changes
for each simple check added in other parts of the kernel, it
twarts modularity and extensibility.
There is some abstaction missing.

 Who's going to take care of that XXX referring to the use of an
 undocumented action, meant to be used only in file-systems?

I did circulate the patch a couple of days ago and raised
exactly that question. You should have read it.
(The semantics of the CHSYSFLAGS check is actually similar
to the va0_disable one: It basically means: you are not
allowed to weaken security related mechanisms at seclevel0.)

best regards
Matthias





Forschungszentrum Juelich GmbH
52425 Juelich
Sitz der Gesellschaft: Juelich
Eingetragen im Handelsregister des Amtsgerichts Dueren Nr. HR B 3498
Vorsitzende des Aufsichtsrats: MinDir'in Baerbel Brumme-Bothe
Geschaeftsfuehrung: Prof. Dr. Achim Bachem (Vorsitzender),
Dr. Ulrich Krafft (stellv. Vorsitzender), Prof. Dr.-Ing. Harald Bolt,
Prof. Dr. Sebastian M. Schmidt




CVS commit: src/lib/libcurses

2010-02-19 Thread Matthias Drochner
Module Name:src
Committed By:   drochner
Date:   Fri Feb 19 19:09:15 UTC 2010

Modified Files:
src/lib/libcurses: curses_line.3

Log Message:
explain a non-portable behavior


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/lib/libcurses/curses_line.3

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/uvm

2010-02-18 Thread Matthias Drochner
Module Name:src
Committed By:   drochner
Date:   Thu Feb 18 14:57:01 UTC 2010

Modified Files:
src/sys/uvm: files.uvm uvm_map.c

Log Message:
Disable mapping of virtual address 0 by user programs per default.
This blocks an easy exploit of kernel bugs leading to dereference
of a NULL pointer on some architectures (eg i386).
The check can be disabled in various ways:
-by CPP definitions in machine/types.h (portmaster's choice)
-by a kernel config option USER_VA0_DISABLED_DEFAULT=0
-at runtime by sysctl vm.user_va0_disabled (cannot be cleared
 at securelevel0)


To generate a diff of this commit:
cvs rdiff -u -r1.16 -r1.17 src/sys/uvm/files.uvm
cvs rdiff -u -r1.287 -r1.288 src/sys/uvm/uvm_map.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



Re: CVS commit: src/sys/arch/i386/i386

2010-02-16 Thread Matthias Drochner

da...@l8s.co.uk said:
 I presume the panic was in the 'return to user' sequence?

Yes, in the iret.

 Does it now SIGSEGV the program?

Yes, which is a bit strange because this happened before
even the first instruction was fetched, and no user-supplied
data are involved (as opposed to setmcontext).
It was entirely the kernel's fault, so a panic would be
only fair.

 (putting in the kernel %cs might leave you running user code with
 kernel privelege)

This couldn't happen here because the CPL=3 is set together with
the CS descriptor, so one should get a GPF on any attempt to
use a kernel descriptor.

best regards
Matthias





Forschungszentrum Juelich GmbH
52425 Juelich
Sitz der Gesellschaft: Juelich
Eingetragen im Handelsregister des Amtsgerichts Dueren Nr. HR B 3498
Vorsitzende des Aufsichtsrats: MinDir'in Baerbel Brumme-Bothe
Geschaeftsfuehrung: Prof. Dr. Achim Bachem (Vorsitzender),
Dr. Ulrich Krafft (stellv. Vorsitzender), Prof. Dr.-Ing. Harald Bolt,
Prof. Dr. Sebastian M. Schmidt




CVS commit: src/sys/arch/i386/i386

2010-02-14 Thread Matthias Drochner
Module Name:src
Committed By:   drochner
Date:   Sun Feb 14 11:09:54 UTC 2010

Modified Files:
src/sys/arch/i386/i386: ibcs2_machdep.c svr4_machdep.c

Log Message:
fix confused CS selector, fixes the panic reported by Mark Davis
per PR port-i386/42787 (the panic happens due to a GPF when a
privileged descriptor is tried to be loaded with the UPL bit set)
The original bug is very old (pre-2.0, i386/svr4_machdep.c rev. 1.69),
but it was relatively harmless until the order of GDT entries was
shuffled (pre-5.0, i386/segments.h rev. 1.42). Before, it caused
a userlevel data selector to be used for CS which broke the emulation
(likely the reason of PR port-i386/32424). The shuffle made that
a privileged selector was used, causing the GPF.
(recent -current doesn't panic on that GPF which seems to be a
side effect of another change)


To generate a diff of this commit:
cvs rdiff -u -r1.39 -r1.40 src/sys/arch/i386/i386/ibcs2_machdep.c
cvs rdiff -u -r1.95 -r1.96 src/sys/arch/i386/i386/svr4_machdep.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/compat/svr4

2010-02-14 Thread Matthias Drochner
Module Name:src
Committed By:   drochner
Date:   Sun Feb 14 11:54:03 UTC 2010

Modified Files:
src/sys/compat/svr4: files.svr4

Log Message:
add missing glue file, otherwise the emulation will not work if
compiled into the kernel (and the module loader will load another
instance, causing symbol duplication)


To generate a diff of this commit:
cvs rdiff -u -r1.16 -r1.17 src/sys/compat/svr4/files.svr4

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



Re: CVS commit: src/sys/dev/wscons (wsemul_vt100.c)

2010-02-11 Thread Matthias Drochner

nick.hud...@gmx.co.uk said:
 On Thursday 11 February 2010 00:28:23 Geoff Wing wrote:
  This reversal removed variables that were being used.
 I have no idea if my quick hack was correct.

The variables are really needed, for that obscure
WSDISPLAY_CUSTOM_OUTPUT hack which I had missed
initially.
I've just put them back.

best regards
Matthias





Forschungszentrum Juelich GmbH
52425 Juelich
Sitz der Gesellschaft: Juelich
Eingetragen im Handelsregister des Amtsgerichts Dueren Nr. HR B 3498
Vorsitzende des Aufsichtsrats: MinDir'in Baerbel Brumme-Bothe
Geschaeftsfuehrung: Prof. Dr. Achim Bachem (Vorsitzender),
Dr. Ulrich Krafft (stellv. Vorsitzender), Prof. Dr.-Ing. Harald Bolt,
Prof. Dr. Sebastian M. Schmidt




CVS commit: src/sys/dev/wscons

2010-02-10 Thread Matthias Drochner
Module Name:src
Committed By:   drochner
Date:   Wed Feb 10 19:39:39 UTC 2010

Modified Files:
src/sys/dev/wscons: wsemul_vt100.c wsemul_vt100_chars.c
wsemul_vt100_keys.c wsemul_vt100_subr.c wsemul_vt100var.h
Added Files:
src/sys/dev/wscons: vt100_base.h

Log Message:
Allow big parts of the vt100 emulation code (what is in
wsemul_vt100_subr.c) to be used by alternative terminal emulators
(which are not in-tree yet but can be loaded as LKMs).
For this, split out that part of the state structure which is used
by the sharable code and include that in the original vt100 state.
This is only a query-replace and sed(1) job for now, it makes sense
to rearrange things a bit so that even more code can be changed --
will do so later.


To generate a diff of this commit:
cvs rdiff -u -r0 -r1.1 src/sys/dev/wscons/vt100_base.h
cvs rdiff -u -r1.31 -r1.32 src/sys/dev/wscons/wsemul_vt100.c
cvs rdiff -u -r1.12 -r1.13 src/sys/dev/wscons/wsemul_vt100_chars.c
cvs rdiff -u -r1.10 -r1.11 src/sys/dev/wscons/wsemul_vt100_keys.c
cvs rdiff -u -r1.19 -r1.20 src/sys/dev/wscons/wsemul_vt100_subr.c
cvs rdiff -u -r1.13 -r1.14 src/sys/dev/wscons/wsemul_vt100var.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/dev/ic

2010-02-10 Thread Matthias Drochner
Module Name:src
Committed By:   drochner
Date:   Wed Feb 10 19:45:30 UTC 2010

Modified Files:
src/sys/dev/ic: pcdisplay_chars.c

Log Message:
add some more mappings from punctuation and accented characters to
more or less adequate replacements in the builtin IBM character set


To generate a diff of this commit:
cvs rdiff -u -r1.13 -r1.14 src/sys/dev/ic/pcdisplay_chars.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/usr.bin/hexdump

2010-02-09 Thread Matthias Drochner
Module Name:src
Committed By:   drochner
Date:   Tue Feb  9 14:06:37 UTC 2010

Modified Files:
src/usr.bin/hexdump: conv.c hexdump.c hexdump.h od.1 odsyntax.c

Log Message:
remove agitation that od(1) was deprecated -- it is still POSIX


To generate a diff of this commit:
cvs rdiff -u -r1.12 -r1.13 src/usr.bin/hexdump/conv.c
cvs rdiff -u -r1.14 -r1.15 src/usr.bin/hexdump/hexdump.c
cvs rdiff -u -r1.10 -r1.11 src/usr.bin/hexdump/hexdump.h
cvs rdiff -u -r1.23 -r1.24 src/usr.bin/hexdump/od.1
cvs rdiff -u -r1.25 -r1.26 src/usr.bin/hexdump/odsyntax.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/dev/wscons

2010-02-05 Thread Matthias Drochner
Module Name:src
Committed By:   drochner
Date:   Fri Feb  5 18:26:38 UTC 2010

Modified Files:
src/sys/dev/wscons: wskbdutil.c

Log Message:
add some missing (mostly hungarian or polish) dead accent combinations,
from lkundrak's netbsd-sk_cz-howto


To generate a diff of this commit:
cvs rdiff -u -r1.17 -r1.18 src/sys/dev/wscons/wskbdutil.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/dev/wscons

2010-02-02 Thread Matthias Drochner
Module Name:src
Committed By:   drochner
Date:   Tue Feb  2 16:54:40 UTC 2010

Modified Files:
src/sys/dev/wscons: wsdisplay.c wsdisplayvar.h

Log Message:
give up some silly macros which were only used ~once, and reduce
dependency on locators.h
makes the code more LKM frienly


To generate a diff of this commit:
cvs rdiff -u -r1.129 -r1.130 src/sys/dev/wscons/wsdisplay.c
cvs rdiff -u -r1.47 -r1.48 src/sys/dev/wscons/wsdisplayvar.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



Re: CVS commit: src

2010-02-02 Thread Matthias Drochner

Hi -

t...@back-street.net said:
 the version of libutil's shared library should be changed in some way,
 shoudn't it?

Maybe as a matter of principle... Technically, I see no need for this.
The code has never been used in the NetBSD tree, so there is no
compatibility issue. And it is extremely unlikely that external
software used it -- it is not of general use.

best regards
Matthias





Forschungszentrum Juelich GmbH
52425 Juelich
Sitz der Gesellschaft: Juelich
Eingetragen im Handelsregister des Amtsgerichts Dueren Nr. HR B 3498
Vorsitzende des Aufsichtsrats: MinDir'in Baerbel Brumme-Bothe
Geschaeftsfuehrung: Prof. Dr. Achim Bachem (Vorsitzender),
Dr. Ulrich Krafft (stellv. Vorsitzender), Prof. Dr.-Ing. Harald Bolt,
Prof. Dr. Sebastian M. Schmidt




CVS commit: src/lib/libc

2010-01-27 Thread Matthias Drochner
Module Name:src
Committed By:   drochner
Date:   Wed Jan 27 14:10:41 UTC 2010

Modified Files:
src/lib/libc/compat/gen: compat_modf_ieee754.c
src/lib/libc/gen: modf_ieee754.c

Log Message:
fix behavior in case of +-Inf or NaN input: return the proper
values and set *iptr
(This code is only used under non-default build options, and on m68k.)


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/lib/libc/compat/gen/compat_modf_ieee754.c
cvs rdiff -u -r1.2 -r1.3 src/lib/libc/gen/modf_ieee754.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src

2010-01-27 Thread Matthias Drochner
Module Name:src
Committed By:   drochner
Date:   Wed Jan 27 19:10:31 UTC 2010

Modified Files:
src/distrib/sets/lists/comp: mi
src/include: util.h
src/lib/libutil: Makefile
Removed Files:
src/lib/libutil: pw_policy.3 pw_policy.c

Log Message:
retire pw_policy(3) -- it is not found useful, there are other
(more common) ways to enforce a password strength policy
approved by elad


To generate a diff of this commit:
cvs rdiff -u -r1.1378 -r1.1379 src/distrib/sets/lists/comp/mi
cvs rdiff -u -r1.53 -r1.54 src/include/util.h
cvs rdiff -u -r1.62 -r1.63 src/lib/libutil/Makefile
cvs rdiff -u -r1.9 -r0 src/lib/libutil/pw_policy.3
cvs rdiff -u -r1.14 -r0 src/lib/libutil/pw_policy.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/lib/libm/src

2010-01-27 Thread Matthias Drochner
Module Name:src
Committed By:   drochner
Date:   Wed Jan 27 20:23:53 UTC 2010

Modified Files:
src/lib/libm/src: k_standard.c

Log Message:
fix return values for atan2(+-0,+-0) in the POSIX case


To generate a diff of this commit:
cvs rdiff -u -r1.14 -r1.15 src/lib/libm/src/k_standard.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/dev/acpi

2010-01-27 Thread Matthias Drochner
Module Name:src
Committed By:   drochner
Date:   Wed Jan 27 22:17:28 UTC 2010

Modified Files:
src/sys/dev/acpi: acpi_bat.c

Log Message:
the Battery Present Rate is only required to be valid if the battery
is discharging; it might make sense when charging, but it doesn't
make sense if neither is the case -- remove a wrong assertion and
arrange the code to make this obvious
(actually, the ACPI spec says that the requirement is only for
rechargeable batteries)


To generate a diff of this commit:
cvs rdiff -u -r1.78 -r1.79 src/sys/dev/acpi/acpi_bat.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



Re: CVS commit: src

2010-01-27 Thread Matthias Drochner

[removal from pw_policy from libutil]
thor...@shagadelic.org said:
 bump the major version # of this library?

Hmm, in theory yes, but the code has never been used inside
the NetBSD tree, and there are good reasons to assume that
noone outside hasn't either.

best regards
Matthias





Forschungszentrum Juelich GmbH
52425 Juelich
Sitz der Gesellschaft: Juelich
Eingetragen im Handelsregister des Amtsgerichts Dueren Nr. HR B 3498
Vorsitzende des Aufsichtsrats: MinDir'in Baerbel Brumme-Bothe
Geschaeftsfuehrung: Prof. Dr. Achim Bachem (Vorsitzender),
Dr. Ulrich Krafft (stellv. Vorsitzender), Prof. Dr.-Ing. Harald Bolt,
Prof. Dr. Sebastian M. Schmidt




Re: CVS commit: src/dist/dhcp/dst

2010-01-26 Thread Matthias Drochner

chris...@astron.com said:
 I think that the EREPORT macro should be changed instead. Macros that
 look like statements, should behave like statements.

OK, I'll check whether/how upstream fixed it first.
best regards
Matthias





Forschungszentrum Juelich GmbH
52425 Juelich
Sitz der Gesellschaft: Juelich
Eingetragen im Handelsregister des Amtsgerichts Dueren Nr. HR B 3498
Vorsitzende des Aufsichtsrats: MinDir'in Baerbel Brumme-Bothe
Geschaeftsfuehrung: Prof. Dr. Achim Bachem (Vorsitzender),
Dr. Ulrich Krafft (stellv. Vorsitzender), Prof. Dr.-Ing. Harald Bolt,
Prof. Dr. Sebastian M. Schmidt




Re: CVS commit: src/dist/dhcp/dst

2010-01-26 Thread Matthias Drochner

m.droch...@fz-juelich.de said:
 OK, I'll check whether/how upstream fixed it first.

Found that bind9 (bundling the same library) sets the
macro to (void)0, so I've done likewise.

best regards
Matthias





Forschungszentrum Juelich GmbH
52425 Juelich
Sitz der Gesellschaft: Juelich
Eingetragen im Handelsregister des Amtsgerichts Dueren Nr. HR B 3498
Vorsitzende des Aufsichtsrats: MinDir'in Baerbel Brumme-Bothe
Geschaeftsfuehrung: Prof. Dr. Achim Bachem (Vorsitzender),
Dr. Ulrich Krafft (stellv. Vorsitzender), Prof. Dr.-Ing. Harald Bolt,
Prof. Dr. Sebastian M. Schmidt




CVS commit: src/dist/dhcp/dst

2010-01-25 Thread Matthias Drochner
Module Name:src
Committed By:   drochner
Date:   Mon Jan 25 20:33:57 UTC 2010

Modified Files:
src/dist/dhcp/dst: dst_api.c prandom.c

Log Message:
fix some cases where the EREPORT macro defined to null (as in the NetBSD
build) could change the behaviour of the code in unexpected ways


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/dist/dhcp/dst/dst_api.c
cvs rdiff -u -r1.4 -r1.5 src/dist/dhcp/dst/prandom.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/etc/rc.d

2010-01-23 Thread Matthias Drochner
Module Name:src
Committed By:   drochner
Date:   Sat Jan 23 17:44:44 UTC 2010

Modified Files:
src/etc/rc.d: mdnsd

Log Message:
fix an obvious typo in directory check


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/etc/rc.d/mdnsd

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/lib/libm/src

2010-01-20 Thread Matthias Drochner
Module Name:src
Committed By:   drochner
Date:   Wed Jan 20 16:49:43 UTC 2010

Modified Files:
src/lib/libm/src: k_standard.c

Log Message:
let the previous fix apply to acos rather than atan2,
and get rid of #ifdef vax


To generate a diff of this commit:
cvs rdiff -u -r1.13 -r1.14 src/lib/libm/src/k_standard.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src

2010-01-17 Thread Matthias Drochner
Module Name:src
Committed By:   drochner
Date:   Sun Jan 17 14:54:44 UTC 2010

Modified Files:
src/sys/arch/i386/stand/boot: boot2.c
src/sys/arch/i386/stand/lib: boot_params.S
src/sys/arch/i386/stand/pxeboot: Makefile main.c
src/sys/sys: bootblock.h
src/usr.sbin/installboot/arch: i386.c

Log Message:
Invert the flag bits to control module loading: rename
LOADMODULES-NOMODULES and READBOOTCONF-NOBOOTCONF.
This way, the default value (0) wired into old bootxx_* and installed
to file systems remains valid and we avoid problems on partial updates.


To generate a diff of this commit:
cvs rdiff -u -r1.46 -r1.47 src/sys/arch/i386/stand/boot/boot2.c
cvs rdiff -u -r1.5 -r1.6 src/sys/arch/i386/stand/lib/boot_params.S
cvs rdiff -u -r1.18 -r1.19 src/sys/arch/i386/stand/pxeboot/Makefile
cvs rdiff -u -r1.23 -r1.24 src/sys/arch/i386/stand/pxeboot/main.c
cvs rdiff -u -r1.49 -r1.50 src/sys/sys/bootblock.h
cvs rdiff -u -r1.35 -r1.36 src/usr.sbin/installboot/arch/i386.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/arch/i386/stand/pxeboot

2010-01-17 Thread Matthias Drochner
Module Name:src
Committed By:   drochner
Date:   Sun Jan 17 17:02:47 UTC 2010

Modified Files:
src/sys/arch/i386/stand/pxeboot: Makefile

Log Message:
fix tyop in default flag definition


To generate a diff of this commit:
cvs rdiff -u -r1.19 -r1.20 src/sys/arch/i386/stand/pxeboot/Makefile

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/dev/pci

2010-01-13 Thread Matthias Drochner
Module Name:src
Committed By:   drochner
Date:   Wed Jan 13 12:18:55 UTC 2010

Modified Files:
src/sys/dev/pci: pci_subr.c

Log Message:
fix some bitmask in PCI Express capabilities decoding
being here, fix some typos and add a comma for clarity


To generate a diff of this commit:
cvs rdiff -u -r1.77 -r1.78 src/sys/dev/pci/pci_subr.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



Re: CVS commit: src/sys/dev/pci

2009-09-10 Thread Matthias Drochner

jo...@britannica.bec.de said:
 I would have said that the suspend/resume and shutdown hooks could be
 part of device_t directly

Shutdown handlers are often bus frontend specific because
they deal with power and/or interrupts. I think it makes
a lot of sense to have them installed by the frontends.
(Whether by a function call or static initialization is another
question, but IMHO the current situation is not so bad that
it is worth wasting energy to change it.)

best regards
Matthias





Forschungszentrum Juelich GmbH
52425 Juelich
Sitz der Gesellschaft: Juelich
Eingetragen im Handelsregister des Amtsgerichts Dueren Nr. HR B 3498
Vorsitzende des Aufsichtsrats: MinDir'in Baerbel Brumme-Bothe
Geschaeftsfuehrung: Prof. Dr. Achim Bachem (Vorsitzender),
Dr. Ulrich Krafft (stellv. Vorsitzender), Prof. Dr.-Ing. Harald Bolt,
Prof. Dr. Sebastian M. Schmidt




Re: CVS commit: src/sys/kern

2009-08-13 Thread Matthias Drochner

a...@cequrux.com said:
 What is an undescribed, direct ioctl, and where is it documented?

As I understand it this is where the third ioctl argument is used
as data instead of a pointer to data.
This is only useful to provide source compatibility to non-BSD
sources, and there are ways to get that without tainting the
interface at that high level.
Also, there might be problems with 32/64bit compatibility.
Look for the term gross and disgusting hack in
sys/dev/wscons/wsdisplay_compat_usl.c.

best regards
Matthias





Forschungszentrum Juelich GmbH
52425 Juelich
Sitz der Gesellschaft: Juelich
Eingetragen im Handelsregister des Amtsgerichts Dueren Nr. HR B 3498
Vorsitzende des Aufsichtsrats: MinDir'in Baerbel Brumme-Bothe
Geschaeftsfuehrung: Prof. Dr. Achim Bachem (Vorsitzender),
Dr. Ulrich Krafft (stellv. Vorsitzender), Prof. Dr.-Ing. Harald Bolt,
Prof. Dr. Sebastian M. Schmidt




Re: CVS commit: src/sys/kern

2009-07-27 Thread Matthias Drochner

m...@msys.ch said:
 yes, please mail me some hints, I find it gross myself, but did not
 yet find a better way.

It is pretty easy:
-in files.gpio, change the declaration to
 defpseudodev gpiosim: gpiobus
 and remove the attach line
-in the kernel config, change gpiosim0 at root (or what you have there) to
 pseudo-device gpiosim 1
 (or a higher number if you want multiple instances)
-add a gpiosimattach(int) function to gpiosim.c. It will be called
 automatically, with the integer argument from the config file, as
 usual for pseudo devices.
 In that function, you can call config_attach_pseudo(9) to attach
 the actual instances. See eg sys/dev/vnd.c for an example.
 You can do that multiple times, hinted by the integer argument,
 if you want to allow multiple instances.
 (You can attach or detach at runtime as well if you have a way
 to initiate that from a control program or so.)

best regards
Matthias





Forschungszentrum Juelich GmbH
52425 Juelich
Sitz der Gesellschaft: Juelich
Eingetragen im Handelsregister des Amtsgerichts Dueren Nr. HR B 3498
Vorsitzende des Aufsichtsrats: MinDir'in Baerbel Brumme-Bothe
Geschaeftsfuehrung: Prof. Dr. Achim Bachem (Vorsitzender),
Dr. Ulrich Krafft (stellv. Vorsitzender), Prof. Dr.-Ing. Harald Bolt,
Prof. Dr. Sebastian M. Schmidt




Re: CVS commit: src/sys/kern

2009-07-27 Thread Matthias Drochner

lacom...@gmail.com said:
 config(9) doesn't seem to know anything about 'defpseudodev'

config(5) mentions it. (I've written that part. It anyone has
suggestions for better wording please tell me.)

best regards
Matthias





Forschungszentrum Juelich GmbH
52425 Juelich
Sitz der Gesellschaft: Juelich
Eingetragen im Handelsregister des Amtsgerichts Dueren Nr. HR B 3498
Vorsitzende des Aufsichtsrats: MinDir'in Baerbel Brumme-Bothe
Geschaeftsfuehrung: Prof. Dr. Achim Bachem (Vorsitzender),
Dr. Ulrich Krafft (stellv. Vorsitzender), Prof. Dr.-Ing. Harald Bolt,
Prof. Dr. Sebastian M. Schmidt




Re: CVS commit: src/sys/kern

2009-07-27 Thread Matthias Drochner

m.droch...@fz-juelich.de said:
  In that function, you can call config_attach_pseudo(9) to attach
  the actual instances. See eg sys/dev/vnd.c for an example.

Forgot to mention that you need to call
config_cfattach_attach()
before. sys/dev/md.c is a better example.

best regards
Matthias





Forschungszentrum Juelich GmbH
52425 Juelich
Sitz der Gesellschaft: Juelich
Eingetragen im Handelsregister des Amtsgerichts Dueren Nr. HR B 3498
Vorsitzende des Aufsichtsrats: MinDir'in Baerbel Brumme-Bothe
Geschaeftsfuehrung: Prof. Dr. Achim Bachem (Vorsitzender),
Dr. Ulrich Krafft (stellv. Vorsitzender), Prof. Dr.-Ing. Harald Bolt,
Prof. Dr. Sebastian M. Schmidt




Re: CVS commit: src/sys/arch/x86/x86

2009-07-07 Thread Matthias Drochner

p...@whooppee.com said:
 I guess maybe the minus signs shouldn't ever happen?

someone out here with a liquid nitrogen cooler?

best regards
Matthias





Forschungszentrum Juelich GmbH
52425 Juelich
Sitz der Gesellschaft: Juelich
Eingetragen im Handelsregister des Amtsgerichts Dueren Nr. HR B 3498
Vorsitzende des Aufsichtsrats: MinDir'in Baerbel Brumme-Bothe
Geschaeftsfuehrung: Prof. Dr. Achim Bachem (Vorsitzender),
Dr. Ulrich Krafft (stellv. Vorsitzender), Prof. Dr.-Ing. Harald Bolt,
Prof. Dr. Sebastian M. Schmidt




Re: CVS commit: src/sys/uvm

2009-04-18 Thread Matthias Drochner

christoph_eg...@gmx.de said:
 if (flags  FLAG1)
 do_something(); 

What is wrong with this?

best regards
Matthias




---
---
Forschungszentrum Juelich GmbH
52425 Juelich

Sitz der Gesellschaft: Juelich
Eingetragen im Handelsregister des Amtsgerichts Dueren Nr. HR B 3498
Vorsitzende des Aufsichtsrats: MinDir'in Baerbel Brumme-Bothe
Geschaeftsfuehrung: Prof. Dr. Achim Bachem (Vorsitzender),
Dr. Ulrich Krafft (stellv. Vorsitzender), Prof. Dr. Harald Bolt,
Dr. Sebastian M. Schmidt
---
---