edef struct X { } X_t', so break 'typedef
> struct pmf_private { ... } pmf_private_t' into a struct definition and a
> typedef definition.
Surely it is better to fix ctags
David
--
David Laight: da...@l8s.co.uk
therwise a -ve value can result and the behaviour
is undefined.
Looking at that function - it is absolutely horrid.
It almost contains:
foo[strlen(foo)] = 0;
David
--
David Laight: da...@l8s.co.uk
realised that
> vast quantities of code didn't do it correctly, and the easiest fix
> was just to alter the implementation, rather than attempt to
> enforce that rule - so it was deleted years ago.
Actually islower() used to be a requirement, old SYSV systems used the
same array for toupper() and tolower().
David
--
David Laight: da...@l8s.co.uk
tless. So you have:
return 0;
out:
if (kauth_authorize_generic(ISSUSER) != 0)
return error;
return 0;
The 'all functions only have one exit' style makes reading code hard!
David
--
David Laight: da...@l8s.co.uk
y difficult to ensure you see every process [1], and that the
count of processes is correct.
[1] consider what happens if the proc table has to be extended,
or when a process is in a fork/exit loop.
David
--
David Laight: da...@l8s.co.uk
ock vnodes doesn't seem right to me - since it
is only likely to cause locking violations in layered fs.
The fact that the caller has a reference to the vnode at all should
really be enough, surely??
David
--
David Laight: da...@l8s.co.uk
cess the device that had been your ctty. (Which was rather
fun when the ctty was a clone device from the network stack, and the
program was a network daemon.)
David
--
David Laight: da...@l8s.co.uk
On Fri, Jun 26, 2009 at 01:38:32PM -0400, Christos Zoulas wrote:
>
> I think this utility should be renamed wakeonlan because wake is too generic.
FWIW I agree ...
David
--
David Laight: da...@l8s.co.uk
match the places where the previous emul code did all
it's faffing about.
But yes, I didn't do a full sanity audit at that time.
David
--
David Laight: da...@l8s.co.uk
On Thu, Jul 30, 2009 at 09:46:44PM -0400, Perry E. Metzger wrote:
>
> David Laight writes:
> > Module Name:src
> > Committed By: dsl
> > Date: Thu Jul 30 21:42:06 UTC 2009
> >
> > Modified Files:
> > src/lib/libc/stri
es against
header files for these functions.
The recent changes I made to the libc makefile don't use the Lint_xxx.c
stubs for files where the presence of a .S file in SRCS auto-removes
the corresponding .c file.
David
--
David Laight: da...@l8s.co.uk
AST(type, value) in headers so that modern c++ with
> -Wold-style-casts does not bitch.
Do we really have to do that, it starts making files completely unreadable.
David
--
David Laight: da...@l8s.co.uk
guage that is designed to be C
> compatible is plain stupid.
>
> Besides, there should be no casts in system headers ;-}
What happens if these casts are put into inline functions inside the
'exterrn "C"' block. The compiler really has no excuse to warn
then, if it doe
On Thu, Aug 13, 2009 at 08:41:36PM +0200, Alan Barrett wrote:
> What is an "undescribed, direct ioctl", and where is it documented?
Probably one that doesn't abuse the cmd field to include the length etc!
David
--
David Laight: da...@l8s.co.uk
id.
Are you sure the change doesn't break if the compiler adds any
'end of structure' padding ?
David
--
David Laight: da...@l8s.co.uk
igh part in %o0 and the low part in %o1.
Since most system calls return 'int' the return value should be int.
To get anything else you'd need to cast the __syscall() itself to
a different function type.
David
--
David Laight: da...@l8s.co.uk
struct, define it as packed
>so it is the same on 32 and 64 bit. (I might need to version this)
You probably just want to use the '64bit integer with 32bit alignment'
rather than marking the structure as packed.
David
--
David Laight: da...@l8s.co.uk
UG builds and not fail anywhere?
>
> The proper fix would be to dynamically size this somehow, so that no
> space is ever wasted.
One possible option is to 'ld -r' all the kernel except the symtab bit.
Then generate the symtab data (or just its size!) and include in a
final link phase.
David
--
David Laight: da...@l8s.co.uk
its output part way through an
sbus master cycle [1]. Get it slightly wrong and the sbus locks.
I've never looked to see if netbsd has the appropraite code!
David
[1] it all goes badly pear-shaped when an sbus master cycle takes exactly 255
clocks. Part of the lance times the cycle out on clock 255, and parts on
clock 256!
--
David Laight: da...@l8s.co.uk
specfs vnode - which is common to all opens of the major/minor.
For 'clone' opens the 'file' structure directly references the specfs
vnode.
For mount you only want to remember the specfs vnode, not the one of the
fs that contained the disk inode containing the dev_t number.
Th
#x27;.
(when modules are loaded it is possibly to do a symbol lookup...)
There are probably other places where it is difficult to call an
explicit initialiser.
It is all rather similar to the proliferation of memory pools - for
things where 'malloc' would be fine.
David
--
David Laight: da...@l8s.co.uk
;d parser doesn't obey them!
> as well as using unquoted variables
> which will break for strings with whitespace.
Sometimes I empty IFS
David
--
David Laight: da...@l8s.co.uk
On Sun, Sep 20, 2009 at 05:32:17PM -0400, Christos Zoulas wrote:
>
> | Although posix defines strict rules for expressions with small
> | numbers of arguments, netbsd'd parser doesn't obey them!
>
> Really? Can you give me an example.
See PR/34646
$ test ! = foo
On Thu, Oct 15, 2009 at 12:01:01AM +0200, Alan Barrett wrote:
> On Wed, 14 Oct 2009, David Laight wrote:
> > Module Name:src
> > Committed By: dsl
> > Date: Wed Oct 14 21:25:52 UTC 2009
> >
> > Modified Files:
> > src/lib/libc
cially ones between integer
types. Probably because I've been caught out once too often by an
unexpected cast converting beteen pointers and integers.
Some of these lint checks really should have been killed once
ANSI function prototypes were invernted.
David
--
David Laight: da...@l8s.co.uk
lock OBJ_MUTEX' test is a try_mutex_enter() then
it may fail because another lwp owns it ...
I hope it is only the checkin comment that is inverted!
David
--
David Laight: da...@l8s.co.uk
n addresses further back is ~impossible.
I wouldn't want to assume that the kernel is always compiled
using %ebp as a frame pointer - x86 has few enough registers that
freeing %ebp is probably a performance gain!
David
--
David Laight: da...@l8s.co.uk
On Sat, Nov 07, 2009 at 12:48:16AM -0700, M. Warner Losh wrote:
>
> which ones have the same name, but different behavior on OS X? A quick read
> of the man pages suggests they are identical...
Check about whether they need a \n at the end of the format.
David
--
David L
On Sun, Nov 15, 2009 at 08:10:20PM +, David Holland wrote:
> On Sun, Nov 15, 2009 at 01:39:00PM +0000, David Laight wrote:
> > Avoids problems with awk processing floating point numbers when LC_NUMERIC
> > give a decimal point of ','.
>
> Isn't it a bug
On Sun, Nov 22, 2009 at 12:09:33AM +, Christos Zoulas wrote:
> In article <20091121223029.1e0d263b...@mail.netbsd.org>,
> Mindaugas Rasiukevicius wrote:
> >Hello,
> >
> >David Laight wrote:
> >> Module Name: src
> >> Committed By:
lwp, l_addr) generating
a global symbol.
One of the forms for defining a symbol is MI.
David
--
David Laight: da...@l8s.co.uk
addr =
> lwp_getpcb(&lwp0) at the beginning of main().
The above is defining a global symbol that referes to the middle of
a struct, not setting a memory location to the address of the it.
David
--
David Laight: da...@l8s.co.uk
On Sat, Nov 28, 2009 at 11:21:30PM +0100, Joerg Sonnenberger wrote:
> Are you sure about the PR?
should have been 31368 :-(
David
--
David Laight: da...@l8s.co.uk
efined(V)) in .for v in ${V} ... .endfor.
> Tested by running build.sh distribution.
Some versions of make error ${V} when V is undefined.
Safer is ${V:U}
David
--
David Laight: da...@l8s.co.uk
ever generate a subshell there
is no need for the complication.
David
--
David Laight: da...@l8s.co.uk
owing valid command:
echo $(case x in x) echo hello;; esac)
David
--
David Laight: da...@l8s.co.uk
n it generates ${OBJS} from ${SRCS}.
Make will use the rules from the appropriate suffix rule, but
it will force the specific dependency.
So if SRCS contains foo.c the will be built, even if there is a foo.S
David
--
David Laight: da...@l8s.co.uk
th.y
Then the commands can be run twice - and may be run twice at the
same time.
Thinks
It might be best have:
arith.h: arith.y
arith.o: arith.h
[ -f ${@:.o=c} ] || { rm ${@:.o=.h}; exit 1; }
ie having no real dependency against arith.c
David
--
David Laight: da...@l8s.co.uk
age:
> Shut down the PXE network stack when we are done with it.
I seem to remember some issues where certain bios locked up if/when
that was called. Which is why it was commented out.
David
--
David Laight: da...@l8s.co.uk
On Mon, Dec 14, 2009 at 06:21:55AM +, David Holland wrote:
> On Sun, Dec 13, 2009 at 08:02:24PM +0000, David Laight wrote:
> > Log Message:
> > Another, better, fix for PR/26567.
> > Only sleep once within each pipe_read/pipe_write call.
> > If there is no da
number!
I actually suspect that most failures are only be a few fd - where the
application is reserving a few low-numbered slots for specific uses.
David
--
David Laight: da...@l8s.co.uk
T unless one thread closes
an fd while other threads are doing io on that fd.)
David
--
David Laight: da...@l8s.co.uk
On Wed, Dec 16, 2009 at 06:24:04AM +, David Holland wrote:
> On Tue, Dec 15, 2009 at 06:35:18PM +0000, David Laight wrote:
> > Modified Files:
> >src/sys/kern: sys_pipe.c
> >
> > Log Message:
> > Don't ERESTART write() calls for now.
> >
Module Name:src
Committed By: dsl
Date: Sat Jan 2 16:08:20 UTC 2010
Modified Files:
src/usr.bin/msgc: msg_sys.def
Log Message:
Remove some sign compare warnings.
To generate a diff of this commit:
cvs rdiff -u -r1.37 -r1.38 src/usr.bin/msgc/msg_sys.def
Please note that
Module Name:src
Committed By: dsl
Date: Sat Jan 2 17:15:07 UTC 2010
Modified Files:
src/distrib/utils/sysinst/arch/mac68k: menus.md.de menus.md.en
menus.md.es menus.md.pl
Log Message:
Sanitise whitespace to minimise the differences between these files.
To ge
Module Name:src
Committed By: dsl
Date: Sat Jan 2 18:06:58 UTC 2010
Modified Files:
src/distrib/utils/sysinst: aout2elf.c disks.c util.c wskbd.c
src/distrib/utils/sysinst/arch/acorn32: md.c
src/distrib/utils/sysinst/arch/cobalt: md.c
src/distrib/uti
Module Name:src
Committed By: dsl
Date: Sat Jan 2 20:54:46 UTC 2010
Modified Files:
src/distrib/utils/sysinst/arch/mvme68k: md.c
src/distrib/utils/sysinst/arch/x68k: md.c
Log Message:
Fix another couple of signed v unsigned comparisons of disk block numbers.
To
Module Name:src
Committed By: dsl
Date: Sat Jan 2 21:16:47 UTC 2010
Modified Files:
src/distrib/utils/sysinst: Makefile.inc defs.h label.c mbr.c
Log Message:
Change most of the variables that hold disk sector number to be (at least)
uint32_t. Might make sysinst work on di
Module Name:src
Committed By: dsl
Date: Sun Jan 10 15:21:36 UTC 2010
Modified Files:
src/sys/arch/i386/i386: trap.c vector.S
Log Message:
If we fault on the 'iret' during return to userpace (eg if %eip is outside
the bounds of %cs) then hack the stack to contain a normal f
Module Name:src
Committed By: dsl
Date: Sun Jan 10 15:37:36 UTC 2010
Modified Files:
src/sys/arch/i386/i386: trap.c
Log Message:
If we fault on the iret during return to userspace, see if we need to
do a lazy update of %cs to make the stack executable.
If a change is made,
Module Name:src
Committed By: dsl
Date: Sun Jan 17 22:21:18 UTC 2010
Modified Files:
src/sys/arch/i386/i386: trap.c vector.S
Log Message:
Fix 'fault on load of %gs during retirn to userspace' to look for the
correct instruction bytes.
Take the 'fault on load segment regi
ll locals to the stack! But no, the 'status function'
(which just copies info into a big buffer with a few local actions)
managed to generate temporaries all of its own! In this case marking
the target buffer 'volatile' helped no end!
David
--
David Laight: da...@l8s.co.uk
Module Name:src
Committed By: dsl
Date: Sat Feb 6 10:50:52 UTC 2010
Modified Files:
src/crypto/external/bsd/netpgp/dist/src/lib: packet-parse.c validate.c
Log Message:
Fix printf formats on amd64 (and probably other 64bit systems).
To generate a diff of this commit:
cvs
) && ${HAVE_GCC} == 4
>
> rather than
>
> .if ${HAVE_GCC} == 4
>
> as HAVE_GCC may be undefined
That construct may not help size make needs to parse the entire line.
Shorter and safer is:
.if ${HAVE_GCC:U0} == 4
David
--
David Laight: da...@l8s.co.uk
erspace isn't allowed to change the user %cs - well
not to a value the kernel doesn't verify - all bets are off as to what
happens next.
(putting in the kernel %cs might leave you running user code with
kernel privelege)
David
--
David Laight: da...@l8s.co.uk
parate cache line for dtrace_vtime_active and
> use __predict_false().
__predict_false() yes, but separating things into their own cache lines
is probably a pessimalisation - mainly because it increases the working
set (of cache lines) of the code.
David
--
David Laight: da...@l8s.co.uk
Module Name:src
Committed By: dsl
Date: Mon Feb 22 08:19:38 UTC 2010
Modified Files:
src/gnu/dist/gdb6/gdb: amd64nbsd-tdep.c
Log Message:
Fix check for old trap frame layout.
To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/gnu/dist/gdb6/gdb/amd64nbsd-tdep
Module Name:src
Committed By: dsl
Date: Mon Feb 22 08:19:38 UTC 2010
Modified Files:
src/gnu/dist/gdb6/gdb: amd64nbsd-tdep.c
Log Message:
Fix check for old trap frame layout.
To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/gnu/dist/gdb6/gdb/amd64nbsd-tdep
er that
the number of TLBs ??
David
--
David Laight: da...@l8s.co.uk
faster than:
(*bar_baz)();
since the indirect jump is (IIRC) always unpredicted.
the 'if' version stands a chance of correctly predicting the jump.
David
--
David Laight: da...@l8s.co.uk
kernel
(excluding any modules) to generate a 'netbsd.o' and then do a
final link to include a desired set of modules into a kernel image.
David
--
David Laight: da...@l8s.co.uk
new locore.h.
If you move memcpy/memset into src/common then they get auto built
as part of libc (or whatever the kernel version is called).
David
--
David Laight: da...@l8s.co.uk
ly trying it ...
David
--
David Laight: da...@l8s.co.uk
> write as a side-effect?
The bus barrier is extremely unlikely to be able to get the write
past the first PCI bus.
The usual time this causes grief is when the write is a request to remove
an IRQ, and is executed immediately before the ISR returns.
David
--
David Laight: da...@l8s.co.uk
7;prime factors' should be prime numbers, they
shouldn't include -1, but maybe the smallest factor should be negative.
David
--
David Laight: da...@l8s.co.uk
On Sun, May 16, 2010 at 11:37:43AM +0200, Martin Husemann wrote:
> On Sun, May 16, 2010 at 09:54:49AM +0100, David Laight wrote:
> > The notion of 'primes' is valid in Z - the definition of a prime is a
> > number that has no non-unit factors.
>
> Well, I only t
is way.
In any case, as you know, the .WAIT processing is painfull enough as it is!
David
--
David Laight: da...@l8s.co.uk
lines - which have delayed
expansion. For control lines (processed during file parsing) the
value can just be put into the symbol table.
It would solve all the quoting issues.
David
--
David Laight: da...@l8s.co.uk
gt; @echo ${BAR}
> % make -f M
> 1 3 a 3 b 3 c
> 3
> %
>
> Not sure if this is "correct" or "expected" but it strikes me as
> "useful" and changes to this behavior would break things...
That is the expected/correct behaviour.
David
--
David Laight: da...@l8s.co.uk
t the relevant source file when the files are added to $(OBJS)
instead of relying on the suffix rules.
If no commands are defined I think make will still use those from the
relevant suffix rule (as happens when the 'stupid rule' is added above).
David
--
David Laight: da...@l8s.co.uk
seeing solaris systems stuck when more than 1 (or a few)
drivers slept in the kernel threads.
David
--
David Laight: da...@l8s.co.uk
mbedding the integer type in a struct/union also makes any places
where it is used incorrectly rather more obvious.)
David
--
David Laight: da...@l8s.co.uk
mine whether the string was malloc'ed or not.
David
--
David Laight: da...@l8s.co.uk
nd the
other for the file data itself.
David
--
David Laight: da...@l8s.co.uk
() like:
>
> int pgsz = getpagesize();
> char *q;
> volatile char c;
>
> for (q = p; q < p+fs->st_size; q += pgsz)
> c = *q;
That won't really help - the pages could easily be discarded almost
immediately - eg in order to fault in a later page.
David
--
David Laight: da...@l8s.co.uk
t also has to lock the file size, and that's going
> to deny stat() until it's done.
A stat request during a write can safely return the old size.
David
--
David Laight: da...@l8s.co.uk
It might run slower due to disk head thrashing.)
David
--
David Laight: da...@l8s.co.uk
ood for a change?
Ditto - which probably means it is less portable that -print0 :-)
David
--
David Laight: da...@l8s.co.uk
symbols that userland needs;
> kernel-only material should be kept elsewhere.
One start would be to add a sys/proc_internal.h so that sys/proc
can be reduced to only stuff that userspace and some kernel parts
are really expected to use.
David
--
David Laight: da...@l8s.co.uk
would be more appropriate to make thye rump kernel directly
forward some paths to the real kernel?
David
--
David Laight: da...@l8s.co.uk
is used to 'escape'
from the emulation root.
But maybe just mount the real filesystem within the rump kernel?
Making something work well enough to copy files is probably not that hard!
David
--
David Laight: da...@l8s.co.uk
ce driver can always access the buffer length implied
from the command.
To my mind this is a horrid hack :-)
David
--
David Laight: da...@l8s.co.uk
(from fork()), but now has a more general description.
David
--
David Laight: da...@l8s.co.uk
panded in different ways.
(Hmmm... that can't be used for errno, since the values have to be #defines
and not an enum).
David
--
David Laight: da...@l8s.co.uk
ter code
> > with conditional compilation.
>
> And maybe that's why NetBSD kernels continue to bloat in size.
>
> Removing code from a kernel that could never be executed is a great
> use of condition compilation.
>
My preference would be to #if the header to #define away the function call
(instead of defining the prototype)
David
--
David Laight: da...@l8s.co.uk
rotected %sp/%esp offset in 'gdt_fixup' using all 32-bits.
> Allows the case of %ss being less than %cs to work.
> Also, completely save and restore the general-purpose registers we use.
It ought to be possible to initialise the gdt (etc) as compile time.
The addresses are always
dangerous if anything other than code ends up in the
kernel text ?
David
--
David Laight: da...@l8s.co.uk
ust __attribute__((aligned(n))) for
some fields?
This doesn't make much difference on i386, but will on archs that
don't support misaligned accesses.
David
--
David Laight: da...@l8s.co.uk
printf code so that it can convert
long long to decimal without requiring the 64bit division code
(or any division code!).
(Similarly you can avoid the double-word shifts for %x.)
David
--
David Laight: da...@l8s.co.uk
netbsd's nfs server does additional checks but
they are expensive to do on every nfs request.
David
--
David Laight: da...@l8s.co.uk
ire a
> > different test framework that sends raw nfs packets.
>
> Hmm, no, maybe I misunderstood. Anyway, the mountd permissions issue
> is PR 3019, the longest-lived-without-attention bug in the whole bug
> database.
Hm, yes the client side is expected to check for -ro m
ssing down the VOP_REVOKE().
>
> This way vclean() check for active (vp->v_usecount > 1) vnodes gets it right.
Randomly changing v_usecount sounds bogus to me?
Probably hiding some other bug somewhere else.
David
--
David Laight: da...@l8s.co.uk
up getting called on the layer vnode.
What about other references to the 'lower' vnode?
If the revoke of the lower vnode is done one for each reference of
the layer vnode - then you need to add 'n - 1' to the ref count
of the lower vnode, not set it to 'n'.
David
--
David Laight: da...@l8s.co.uk
very
nasty surprises.
David
--
David Laight: da...@l8s.co.uk
he
header that contains the real definition.
David
--
David Laight: da...@l8s.co.uk
rn.c
>
> Log Message:
> prop_*_copyout takes an object as second parameter, not a pointer to object.
I hope an 'object' is actually a pointer?
Or is the code passing structures by value ?
David
--
David Laight: da...@l8s.co.uk
27; PHY isn't used
because of specific (non-standard) media requirements.
I'm also not exactly sure what happens when MII crossover is used to
directly connect 2 MAC units on the same PCB.
David
--
David Laight: da...@l8s.co.uk
in the printf format string.
That seems strange - what type are the actual items being printed?
If they aren't already vaddr_t then PRIxVADDR probably shouldn't be
bing used.
David
--
David Laight: da...@l8s.co.uk
; :-)
David
[1] Otherwise we wouldn't need support for byteswapped fs.
--
David Laight: da...@l8s.co.uk
On Sun, Feb 06, 2011 at 07:46:23PM +, David Holland wrote:
> Making .PARSEDIR always absolute should fix this problem, but in the
> general case requires realpath().
It will also give problems to anyone using bmake under cygwin to
run windows binaries.
David
--
David Laig
1 - 100 of 350 matches
Mail list logo