Commit Graph

4792 Commits

Author SHA1 Message Date
plunky
1a7622f6a7 tidy up include pathname to exclude undefined behaviour
"If the characters ', \, ", //, or /* occur in the sequence between
  the < and > delimiters, the behavior is undefined."
2011-03-29 20:10:31 +00:00
bouyer
d9210c2405 Add a new libquota library, which contains some blocks to build and/or
parse quota plists; as well as a getfsquota() function to retrieve quotas
for a single id from a single filesystem (whatever filesystem this is:
a local quota-enabled fs or NFS). This is build on functions getufsquota()
(for local filesystems with UFS-like quotas) and getnfsquota();
which are also available to userland programs.
move functions from quota2_subr.c to libquota or libprop as appropriate,
and ajust in-tree quota tools.
move some declarations from kernel headers to either sys/quota.h or
quota/quota.h as appropriate. ufs/ufs/quota.h still installed because
it's needed by other installed ufs headers.
ufs/ufs/quota1.h still installed as a quick&dirty way to get a code
using the old quotactl() to compile (just include ufs/ufs/quota1.h instead of
ufs/ufs/quota.h - old code won't compile without this change and this is
on purpose).
Discussed on tech-kern@ and tech-net@ (long thread, but not much about
libquota itself ...)
2011-03-24 17:05:39 +00:00
cliff
8c2354cc52 include flashio.h 2011-03-19 13:47:43 +00:00
cliff
0d7e06e2aa compat/netbsd32 ioctl support for FLASH_GET_INFO 2011-03-19 04:07:35 +00:00
bouyer
6e3787a787 Regen: use COMPAT_50 quotactl, not the native one 2011-03-07 19:27:27 +00:00
bouyer
f5e8243c9d Use the COMPAT_50 quotactl, not the native one.
Should fix build of COMPAT_AOUT_M68K
2011-03-07 19:26:35 +00:00
joerg
5c3ccd6eba Pass down ELF Auxillary Vectors for static NetBSD binaries too.
Rename __libc_init to _libc_init and call it explicitly from CSU code.
This enforces the constructor run order for newly linked programs.
Keep it as constructor with run-once semantic for binary compatibility.
Implement dl_iterate_phdr for statically linked programs.

This material is based upon work partially supported by
The NetBSD Foundation under a contract with Joerg Sonnenberger.
2011-03-07 05:09:09 +00:00
bouyer
063f96f3c2 merge the bouyer-quota2 branch. This adds a new on-disk format
to store disk quota usage and limits, integrated with ffs
metadata. Usage is checked by fsck_ffs (no more quotacheck)
and is covered by the WAPBL journal. Enabled with kernel
option QUOTA2 (added where QUOTA was enabled in kernel config files),
turned on with tunefs(8) on a per-filesystem
basis. mount_mfs(8) can also turn quotas on.

See http://mail-index.netbsd.org/tech-kern/2011/02/19/msg010025.html
for details.
2011-03-06 17:08:10 +00:00
joerg
3fb7a604bd Fix compilation 2011-03-05 23:51:47 +00:00
joerg
557eb4273a Forward define of ps_strings. 2011-03-05 19:08:40 +00:00
joerg
48717cfc00 Refactor ps_strings access. Based on PK_32, write either the normal
version or the 32bit compat layout in execve1. Introduce a new function
copyin_psstrings for reading it back from userland and converting it to
the native layout. Refactor procfs to share most of the code with the
kern.proc_args sysctl handler.

This material is based upon work partially supported by
The NetBSD Foundation under a contract with Joerg Sonnenberger.
2011-03-04 22:25:24 +00:00
christos
af8f930405 PR/44674: Taylor R Campbell: Fix compat copyin and copyout routines which
were obviously broken.
2011-03-04 01:36:56 +00:00
kiyohara
5fda4e37f1 Fix build failed.
Need separator `,'.
2011-02-25 09:54:23 +00:00
joerg
13d02bb5bf Fix ucontext32_t on AMD64. Add optional compile time assertions for
ucontext_t and ucontext32_t to ensure that they don't change.
Provide the constants for AMD64, ARM, i386, and M68K.
2011-02-23 02:58:38 +00:00
matt
aa306c700f Deal with differences in signal delivery between o32/n32/n64. 2011-02-20 08:14:10 +00:00
matt
6a385f43c2 Regen. 2011-02-20 08:13:29 +00:00
matt
6ab83fddf5 Change some ints to longs (for LP64). 2011-02-20 08:09:46 +00:00
matt
e2862cc1f2 Deal with mips trapframe changes. 2011-02-20 08:08:57 +00:00
matt
91200c4c26 Don't bother the iov in netbsd32_to_msghdr since it needs to handled specially. 2011-02-20 08:07:09 +00:00
rmind
9b6bd2d968 Remove clause 3 (UCB advertising clause) from the University of Utah
copyright.  Confirmed by Mike Hibler, mike at cs.utah.edu - thanks!
Also, merge UCB and Utah copyright texts back into one, as they
originally were.

Extra verification by snj@.
2011-02-08 20:20:06 +00:00
chs
1bb795ff6c move macros for validating fs/gs to segments.h and use them
in the linux32 code as well.
2011-02-07 03:54:45 +00:00
yamt
37bfe1821b netbsd32__lwp_create: add a comment and CTASSERT. 2011-02-05 13:46:44 +00:00
joerg
13011308e4 Explicitly initialize ucontext before calling getmcontext. 2011-02-03 21:45:31 +00:00
chuck
afca0358a6 udpate license clauses on my code to match the new-style BSD licenses.
verified with Mike Hibler it is ok to remove clause 3 on utah copyright,
as per UCB.
based on diff that rmind@ sent me.

no functional change with this commit.
2011-02-02 20:07:25 +00:00
matt
4d5d6d9aa5 Add a new AF/PF_ROUTE which is 64-bit clean which makes the routing socket
interface (and its associated sysctls) act identically for both 32 and 64 bit
programs.  The old unclean one remains for backward compatibility.
2011-02-01 01:39:19 +00:00
matt
0f0d22769a Define 32bit version of SIOC[GS]IFADDRPREF32. We wouldn't need this to
if i386 actually aligned a uint64_t on a 64bit boundary but it doesn't.
So all that work in sockaddr_storage goes for naught.
2011-02-01 00:53:22 +00:00
matt
8e5809d382 Add the ability to mount NFS filesystems in COMPAT_NETBSD32
If in the kernel and NFS_ARGS_ONLY, just export struct nfs_args and its flags.
2011-01-22 22:26:10 +00:00
matt
fc2c6c78f2 Fix c&p error. 2011-01-22 20:51:21 +00:00
tron
e0e90b2355 Fix build of ndiscvt(8). Not sure what broke it in the first place. 2011-01-22 12:06:51 +00:00
he
68cb75d86c save_fpu_lwp() was renamed to fpu_save_lwp(), so follow suit. 2011-01-20 11:59:24 +00:00
tsutsui
dcd10dc42d Remove includes <sys/mount.h> and <sys/sched.h> added for <sys/syscallargs.h>.
Now they are handled by $sysarghdrextra in sys/kern/syscalls.conf.
2011-01-19 10:21:16 +00:00
matt
ad396e28d0 Make struct disklabel 8 byte aligned. This increases its size by 4 bytes
on IPL32 platforms so add code in sys_ioctl (and netbsd32_ioctl) to deal
with the older/smaller diskabel size.  This change makes disklabel the
same for both IPL32 and LP64 platforms.
2011-01-18 19:52:23 +00:00
matt
773e544e8c Deal with changes in the trapframe. 2011-01-18 01:13:03 +00:00
pooka
4ded7232b9 Put async i/o compat routines in a separate source module from the
ones related to clock and process management.
2011-01-17 15:57:04 +00:00
njoly
fd24721ce5 In stat structure conversions, do set st_birthtimespec member values
if exists.
2011-01-16 23:21:16 +00:00
rmind
7146b2f61d Retire struct user, remove sys/user.h inclusions. Note sys/user.h header
as obsolete.  Remove USER_TO_UAREA/UAREA_TO_USER macros.

Various #include fixes and review by matt@.
2011-01-14 02:06:22 +00:00
pgoyette
f54a432784 Fix the build breakage, at least on amd64 2011-01-04 20:23:40 +00:00
matt
b99d2248b0 Need to deal with msg_iov in netbsd32_to_msghdr. 2011-01-04 11:00:31 +00:00
matt
701acb9073 Make the SA support as optional as is possible. 2011-01-04 10:59:28 +00:00
dholland
14402d0ff1 Abolish the SAVENAME and HASBUF flags. There is now always a buffer,
so the path in a struct componentname is now always valid during VOP
calls.
2010-11-30 10:43:01 +00:00
dholland
d4eb05390d Abolish struct componentname's cn_pnbuf. Use the path buffer in the
pathbuf object passed to namei as work space instead. (For now a pnbuf
pointer appears in struct nameidata, to support certain unclean things
that haven't been fixed yet, but it will be going away in the future.)

This removes the need for the SAVENAME and HASBUF namei flags.
2010-11-30 10:29:57 +00:00
dholland
8f6ed30d57 Introduce struct pathbuf. This is an abstraction to hold a pathname
and the metadata required to interpret it. Callers of namei must now
create a pathbuf and pass it to NDINIT (instead of a string and a
uio_seg), then destroy the pathbuf after the namei session is
complete.

Update all namei call sites accordingly. Add a pathbuf(9) man page and
update namei(9).

The pathbuf interface also now appears in a couple of related
additional places that were passing string/uio_seg pairs that were
later fed into NDINIT. Update other call sites accordingly.
2010-11-19 06:44:33 +00:00
uebayasi
01fb76730e Include sys/ioccom.h directly because it's used. 2010-11-14 15:36:47 +00:00
pooka
6e72867f8d If someone wants to define COMPAT_OIFDATA / COMPAT_OIFREQ outside
of config, let them.
2010-11-07 19:45:06 +00:00
christos
988094ed68 can't map the old and the new SIO calls the way we did before because the
numbers have changed. Instead provide a switch. Keep the old code there,
to handle cases we did not handle in the first switch, but this is a hack
and should be removed.
2010-11-06 17:20:07 +00:00
chs
6842940109 personality() now interprets its parameter as having
the base personality type in the low byte and
various flags in the upper bytes.  for now just mask off
the flags to make sure the base type is one we accept.
store the current personality in the emuldata so that
we can return the expected value for PER_QUERY.
2010-11-02 18:18:07 +00:00
chs
45bce0e50a regen 2010-11-02 18:15:39 +00:00
chs
fc7a196102 implement the following syscalls for linux32:
truncate64
  ftruncate64
  profil
  ioperm
  iopl
  setdomainname
  modify_ldt
  statfs64
  fstatfs64

note that iopl(), ioperm() and modify_ldt() just call
the respective 64-bit handlers, which don't do anything yet.
2010-11-02 18:14:05 +00:00
chs
3c3115da20 update linux_sys_socket() to understand the flags that are now
included in the "type" parameter.  in linux_sys_sendmsg(),
if we see an SCM_CREDENTIALS control message, just drop it
instead of giving an error.  the linux and native versions of
the cred-passing operation are very different and some apps
(eg. linux pulseaudio library talking to a native server)
will work without the control data.
2010-11-02 18:02:59 +00:00
chs
069ef5a4d0 define LINUX_O_CLOEXEC.
sort definitions by value.
consistently use hex instead of octal for the values.
2010-11-02 18:01:25 +00:00