| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
|
|
| |
exposed by the security fix in FreeBSD-SA-11:05.unix.
Approved by: so (cperciva)
Approved by: re (kib)
Security: Related to FreeBSD-SA-11:05.unix, but not actually
a security fix.
Notes:
svn path=/releng/7.3/; revision=226023
|
| |
|
|
|
|
|
|
|
|
|
| |
Add new sysconfig bits, Fix the bogus numbering of the old bits.
Submitted by: "Pedro f. Giffuni" <giffunip asme org>
Obtained from: NetBSD
PR: kern/91293
Notes:
svn path=/stable/7/; revision=201413
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
Supply AT_EXECPATH auxinfo entry to the interpreter, both for native and
compat32 binaries.
Note that the merge was edited due to fexecve(2) support not present in
stable/7.
Tested by: bms, Mykola Dzham <freebsd levsha org ua>
Notes:
svn path=/stable/7/; revision=200864
|
| |
|
|
|
|
|
|
|
|
| |
AT_DEBUG and AT_BRK were OBE like 10 years ago, so retire them.
MFC r186225:
Remove two remnant uses of AT_DEBUG.
Notes:
svn path=/stable/7/; revision=200858
|
| |
|
|
|
|
|
|
|
|
| |
Remove obselete PECOFF image activator support.
Discussed with: secteam, kib
Approved by: re (kensmith)
Notes:
svn path=/stable/7/; revision=199901
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
that it is unsigned rather than possibly set to something negative
by a malicious binary.
This is just the immediate fix to the problem mentioned in
PR kern/80742 and by http://milw0rm.com/exploits/9206 but does
not fix all possible problems imgact_pecoff has.
As this feature does not work and is not compiled in by default,
the security team considers this vulnerability to be of low risk
to the user population and will not be issuing an advisory.
Note that this is a direct commit to stable/7 as pecoff support has
been removed from head and stable/8 already.
PR: kern/80742
Reported by: Oliver Pinter (oliver.pntr gmail.com) via freebsd-security
Help reproducing and testing by: Damian Weber (dweber htw-saarland.de)
MFC After: 3 days
Notes:
svn path=/stable/7/; revision=199330
|
| |
|
|
|
|
|
|
|
|
| |
Fix typo in kernel message. The fix is based upon the patch in the PR.
PR: kern/140279
Submitted by: Alexander Best <alexbestms@math.uni-muenster.de>
Notes:
svn path=/stable/7/; revision=199224
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Make sure FreeBSD binaries without .note.ABI-tag section work
correctly and do not match a colliding Debian GNU/kFreeBSD
brandinfo statements.
For this mark the Debian GNU/kFreeBSD brandinfo that it must have
an .note.ABI-tag section and ignore the old EI_OSABI brandinfo
when comparing a possibly colliding set of options.
Due to SYSINIT we add the brandinfo in a non-deterministic order,
so native FreeBSD is not always first. We may want to consider
to force native FreeBSD to come first as well.
The only way a problem could currently be noticed is when running an
i386 binary without the .note.ABI-tag on amd64 and the Debian GNU/kFreeBSD
brandinfo was matched first, as the fallback to ld-elf32.so.1 does
not exist in that case.
Reported and tested by: ticso
In collaboration with: kib
Notes:
svn path=/stable/7/; revision=196924
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Fix handling of .note.ABI-tag section for GNU systems [1].
Handle GNU/Linux according to LSB Core Specification 4.0,
Chapter 11. Object Format, 11.8. ABI note tag.
Also check the first word of desc, not only name, according to
glibc abi-tags specification to distinguish between Linux and
kFreeBSD.
Add explicit handling for Debian GNU/kFreeBSD, which runs
on our kernels as well [2].
In {amd64,i386}/trap.c, when checking osrel of the current process,
also check the ABI to not change the signal behaviour for Linux
binary processes, now that we save an osrel version for all three
from the lists above in struct proc [2] (slightly different to HEAD).
These changes make it possible to run FreeBSD, Debian GNU/kFreeBSD
and Linux binaries on the same machine again for at least i386 and
amd64, and no longer break kFreeBSD which was detected as GNU(/Linux).
PR: kern/135468
Submitted by: dchagin [1] (initial patch)
Suggested by: kib [2]
Tested by: Petr Salinger (Petr.Salinger seznam.cz) for kFreeBSD
Reviewed by: kib
Notes:
svn path=/stable/7/; revision=196602
|
| |
|
|
| |
Notes:
svn path=/stable/7/; revision=196009
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- Various members of struct ipc_perm use appropriate types instead of
unsigned short.
- The shm_segsz member of struct shmid_ds is now a size_t instead of an
int which should allow for complete support of SYSV SHM regions >= 2GB.
- The shm_nattch member of struct shmid_ds is now an int instead of a
short.
- The existing versions of the __semctl(), msgctl(), and shmctl() system
calls have been renamed to freebsd7_*() and implement the old ABI. New
versions of these system calls provide the new ABI. The new system
calls also use newer symbol versions in libc so old and new binaries
will both work under new kernels.
- Specific to 7.x: the kern_msgctl(), kern_semctl(), and kern_shmctl()
functions now use ABI shims that transparently "rename" the functions
to kern_new_*() for all new modules. Existing compat functions under
the old names remain to provide compatibility for older kernel modules.
Notes:
svn path=/stable/7/; revision=196006
|
| |
|
|
| |
Notes:
svn path=/stable/7/; revision=195856
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- Add explicit prototypes for lkmnosys() and lkmressys() in <sys/sysent.h>
and remove hacks for those routines from makesyscalls.sh.
- Change the LKM syscall entries in the freebsd32 table to use lkmnosys
rather than nosys.
- Use NOPROTO for __syscall() to remove more magic logic from
makesyscalls.sh.
- Retire the unused nfsclnt() system call and mark it as UNIMPL rather than
NOIMPL.
- Remove the NOIMPL system call type.
- Allow multiple flags in the type system call type field. Use this to
retire CPT_NOA.
- Update the comment descriptions for COMPAT[45] system calls in various
generated files.
- Update comments in syscalls.master.
- Include defintions for audit identifiers for compat system calls in
<sys/sysproto.h>.
Notes:
svn path=/stable/7/; revision=195854
|
| |
|
|
| |
Notes:
svn path=/stable/7/; revision=195695
|
| |
|
|
|
|
|
|
| |
closes any open file descriptors >= 'lowfd'. Bump __FreeBSD_version to
702104.
Notes:
svn path=/stable/7/; revision=195694
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
add basic VIA Nano processor support for amd64 and i386.
r186797 - Add Centaur/IDT/VIA vendor ID for Nano family.
r187101 - Allow VIA Nano processors to boot FreeBSD/amd64.
r187117 - Replace more cpu_vendor with cpu_vendor_id.
r187118 - Add basic i386 support for VIA Nano processors.
r187157 - Enable MSI support for VIA Nano processors on i386.
r187594 - Replace more cpu_vendor with cpu_vendor_id.
r187597 - Include a missing header file.
r187598 - VIA Nano processor has P-state invariant TSC.
r187633 - Add more VIA bridges to agp_via.c.
Notes:
svn path=/stable/7/; revision=195667
|
| |
|
|
|
|
|
|
|
| |
Implement MSG_CMSG_CLOEXEC flag for linux_recvmsg().
Approved by: kib (mentor)
Notes:
svn path=/stable/7/; revision=194405
|
| |
|
|
|
|
|
|
|
|
|
|
| |
Make linux_sendmsg() and linux_recvmsg() work on linux32/amd64.
Change types used in the linux' struct msghdr and struct cmsghdr
definitions to the properly-sized architecture-specific types.
Move ancillary data handler from linux_sendit() to linux_sendmsg().
Approved by: kib (mentor)
Notes:
svn path=/stable/7/; revision=194404
|
| |
|
|
|
|
|
|
|
| |
Unlock process lock when return error from getrobustlist call.
Approved by: kib (mentor)
Notes:
svn path=/stable/7/; revision=194375
|
| |
|
|
| |
Notes:
svn path=/stable/7/; revision=194360
|
| |
|
|
|
|
|
| |
Add several syscall compat32 entries for extattr manipulation syscalls.
Notes:
svn path=/stable/7/; revision=194359
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
Somewhere between 2.6.23 and 2.6.27, Linux added SOCK_CLOEXEC and
SOCK_NONBLOCK flags, that allow to save fcntl() calls.
Implement a variation of the socket() syscall which takes a flags
in addition to the type argument.
Approved by: kib (mentor)
Notes:
svn path=/stable/7/; revision=194284
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
Return EINVAL in case when the incorrect or unsupported
type argument is specified.
Do not map type argument value as its Linux values are
identical to FreeBSD values.
Approved by: kib (mentor)
Notes:
svn path=/stable/7/; revision=194283
|
| |
|
|
|
|
|
|
|
|
| |
Use the protocol family constants for the domain argument validation.
Return immediately when the socket() failed.
Approved by: kib (mentor)
Notes:
svn path=/stable/7/; revision=194282
|
| |
|
|
|
|
|
|
|
|
|
|
| |
Emulate SO_PEERCRED socket option.
Temporarily use 0 for pid member as the FreeBSD does not cache remote
UNIX domain socket peer pid.
PR: kern/102956
Approved by: kib (mentor)
Notes:
svn path=/stable/7/; revision=194281
|
| |
|
|
|
|
|
| |
Approved by: jhb (mentor)
Notes:
svn path=/stable/7/; revision=194036
|
| |
|
|
|
|
|
|
|
| |
Add KTR(9) tracing for futex emulation.
Approved by: kib (mentor)
Notes:
svn path=/stable/7/; revision=193581
|
| |
|
|
|
|
|
|
|
|
| |
To avoid excessive code duplication move MI definitions to the MI
header file. As it is defined in Linux.
Approved by: kib (mentor)
Notes:
svn path=/stable/7/; revision=193580
|
| |
|
|
|
|
|
|
|
|
| |
Return EAFNOSUPPORT instead of EINVAL in case when the incorrect or
unsupported domain argument to linux_socket() is specified.
Approved by: kib (mentor)
Notes:
svn path=/stable/7/; revision=193297
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Linux socketpair() call expects explicit specified protocol for
AF_LOCAL domain unlike FreeBSD which expects 0 in this case.
Return EAFNOSUPPORT in case when the incorrect domain argument
is specified.
Return EPROTONOSUPPORT instead of passing values that are not 0
to the BSD layer.
Approved by: kib (mentor)
Notes:
svn path=/stable/7/; revision=193295
|
| |
|
|
|
|
|
|
|
| |
Move extern variable definitions to the header file.
Approved by: kib (mentor)
Notes:
svn path=/stable/7/; revision=193196
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Reimplement futexes.
Old implemention used Giant to protect the kernel data structures,
but at the same time called malloc(M_WAITOK), that could cause the
calling thread to sleep and lost Giant protection. User-visible
result was the missed wakeup.
New implementation uses one sx lock per futex. The sx protects
the futex structures and allows to sleep while copyin or copyout
are performed.
Unlike linux, we return EINVAL when FUTEX_CMP_REQUEUE operation
is requested and either caller specified futexes are equial or
second futex already exists. This is acceptable since the situation
can only occur from the application error, and glibc falls back to
old FUTEX_WAKE operation when FUTEX_CMP_REQUEUE returns an error.
Approved by: kib (mentor)
Notes:
svn path=/stable/7/; revision=193152
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Linux exports HZ value to user space via AT_CLKTCK auxiliary vector
entry since 2.4.0.
Being exported, AT_CLKTCK is returned by sysconf(_SC_CLK_TCK),
glibc falls back to the hard-coded CLK_TCK value when aux entry
is not present.
Glibc versions prior to 2.2.1 always use hard-coded CLK_TCK value.
For older applications/libc's which depends on hard-coded CLK_TCK
value user should set compat.linux.osrelease less than 2.4.0.
linux_times() shall use the value that is exported to user space.
PR: kern/134251
Approved by: kib (mentor)
Notes:
svn path=/stable/7/; revision=192987
|
| |
|
|
|
|
|
|
|
|
|
| |
Osrel variable should be initialized before use.
Pointyhat to: me
Approved by: kib (mentor)
Notes:
svn path=/stable/7/; revision=192981
|
| |
|
|
|
|
|
|
|
|
|
|
| |
Validate user-supplied arguments values.
Args argument is a pointer to the structure located in user space in
which the socketcall arguments are packed. The structure must be
copied to the kernel instead of direct dereferencing.
Approved by: kib (mentor)
Notes:
svn path=/stable/7/; revision=192952
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
Introduce linux_kernver() interface which is intended for an exact
designation of the emulated kernel version.
linux_kernver() returns integer value formatted as 'VVVMMMIII' where
VVV - version, MMM - major revision, III - minor revision.
Approved by: kib (mentor)
Notes:
svn path=/stable/7/; revision=192950
|
| |
|
|
|
|
|
| |
Fix memory leak in an error case.
Notes:
svn path=/stable/7/; revision=192889
|
| |
|
|
|
|
|
|
|
| |
Add preliminary KTR(9) support to the linux emulation layer.
Approved by: kib (mentor)
Notes:
svn path=/stable/7/; revision=192806
|
| |
|
|
|
|
|
|
|
| |
Change linux struct tms definition to match actual linux one.
Approved by: kib (mentor)
Notes:
svn path=/stable/7/; revision=192770
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Translate l_timeval arg to native struct timeval in
linux_setsockopt()/linux_getsockopt() for SO_RCVTIMEO,
SO_SNDTIMEO opts as l_timeval has MD members.
Remove bogus __packed attribute from l_timeval struct on __amd64__.
PR: kern/134276
Submitted by: Thomas Mueller <tmueller sysgo com>
Approved by: kib (mentor)
Notes:
svn path=/stable/7/; revision=192769
|
| |
|
|
|
|
|
|
|
|
|
| |
Add forgotten linux to bsd flags argument mapping into the linux_recv().
PR: kern/134276
Submitted by: Thomas Mueller <tmueller sysgo com>
Approved by: kib (mentor)
Notes:
svn path=/stable/7/; revision=192767
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Remove support for FUTEX_REQUEUE operation.
Glibc does not use this operation since 2.3.3 version (Jun 2004),
as it is racy and replaced by FUTEX_CMP_REQUEUE operation.
Glibc versions prior to 2.3.3 fall back to FUTEX_WAKE when
FUTEX_REQUEUE returned EINVAL.
Any application directly using FUTEX_REQUEUE without return
value checking are definitely broken.
Limit quantity of messages per process about unsupported
operation.
Approved by: kib(mentor)
Notes:
svn path=/stable/7/; revision=192759
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
below) as well as the following:
- the recurring deadlock was fixed by deferring vinactive to a dedicated thread
- zfs boot for all pool types now works
Submitted by: dfr
- kmem now goes up to 512GB so arc is now limited by physmem
- the arc now experiences backpressure from the vm (which can be too
much - but this allows ZFS to work without any tunables on amd64)
- frequently recurring LOR in the ARC fixed
- zfs send coredump fix
- fixes for various PRs
Supported by: Barrett Lyon, BitGravity
Revision 185029 - (view) (annotate) - [select for diffs]
Modified Mon Nov 17 20:49:29 2008 UTC (6 months ago) by pjd
File length: 38244 byte(s)
Diff to previous 177698
Update ZFS from version 6 to 13 and bring some FreeBSD-specific changes.
This bring huge amount of changes, I'll enumerate only user-visible changes:
- Delegated Administration
Allows regular users to perform ZFS operations, like file system
creation, snapshot creation, etc.
- L2ARC
Level 2 cache for ZFS - allows to use additional disks for cache.
Huge performance improvements mostly for random read of mostly
static content.
- slog
Allow to use additional disks for ZFS Intent Log to speed up
operations like fsync(2).
- vfs.zfs.super_owner
Allows regular users to perform privileged operations on files stored
on ZFS file systems owned by him. Very careful with this one.
- chflags(2)
Not all the flags are supported. This still needs work.
- ZFSBoot
Support to boot off of ZFS pool. Not finished, AFAIK.
Submitted by: dfr
- Snapshot properties
- New failure modes
Before if write requested failed, system paniced. Now one
can select from one of three failure modes:
Before if write requested failed, system paniced. Now one
can select from one of three failure modes:
- panic - panic on write error
- wait - wait for disk to reappear
- continue - serve read requests if possible, block write requests
- Refquota, refreservation properties
Just quota and reservation properties, but don't count space consumed
by children file systems, clones and snapshots.
- Sparse volumes
ZVOLs that don't reserve space in the pool.
- External attributes
Compatible with extattr(2).
- NFSv4-ACLs
Not sure about the status, might not be complete yet.
Submitted by: trasz
- Creation-time properties
- Regression tests for zpool(8) command.
Obtained from: OpenSolaris
Notes:
svn path=/stable/7/; revision=192498
|
| |
|
|
| |
Notes:
svn path=/stable/7/; revision=192072
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
r189861:
Include linux_futex.h before linux_emul.h
r189862:
Ignore FUTEX_FD op, as it is done by linux.
r189867:
Sort include files in the alphabetical order.
Approved by: kib (mentor)
Notes:
svn path=/stable/7/; revision=191823
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
r178976 (rdivacky):
Implement robust futexes. Most of the code is modelled after
what Linux does. This is because robust futexes are mostly
userspace thing which we cannot alter. Two syscalls maintain
pointer to userspace list and when process exits a routine
walks this list waking up processes sleeping on futexes
from that list.
r183871:
Make robust futexes work on linux32/amd64. Use PTRIN to read
user-mode pointers. Change types used in the structures definitions to
properly-sized architecture-specific types.
r185002:
In the robust futexes list head, futex_offset shall be signed,
and glibc actually supplies negative offsets. Change l_ulong to l_long.
Approved by: kib (mentor)
Notes:
svn path=/stable/7/; revision=191820
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Fix KBI breakage by r190520 which affects older linux.ko binaries:
1) Move the new field (brand_note) to the end of the Brandinfo structure.
2) Add a new flag BI_BRAND_NOTE that indicates that the brand_note pointer
is valid.
3) Use the brand_note field if the flag BI_BRAND_NOTE is set and as old
modules won't have the flag set, so the new field brand_note would be
ignored.
Suggested by: jhb
Reviewed by: jhb
Approved by: re (Ken Smith), kib (mentor)
Notes:
svn path=/stable/7/; revision=191210
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
r186211:
Remove obsolete AT_DEBUG stuff. It never should have been committed
in the first place, let alone migrated to linux emulation.
r189362:
Add AT_PLATFORM, AT_HWCAP and AT_CLKTCK auxiliary vector entries which
are used by glibc. This silents the message "2.4+ kernel w/o ELF notes?"
from some programs at start, among them are top and pkill.
Do the assignment of the vector entries in elf_linux_fixup()
as it is done in glibc.
Fix some minor style issues.
Approved by: re (Ken Smith), kib(mentor)
Notes:
svn path=/stable/7/; revision=190893
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
r189771:
Implement new way of branding ELF binaries by looking to a
".note.ABI-tag" section.
The search order of a brand is changed, now first of all the
".note.ABI-tag" is looked through.
Move code which fetch osreldate for ELF binary to check_note() handler.
r189919:
Use the properly sized types for ELF object header and program headers.
This fixes osrel fetching from the FreeBSD branding note for the 64bit
platforms (bug introduced by r189771).
r190264:
Fix several issues with parsing the notes for ELF objects.
Badly formed ELF note may cause the caclulated pointer to the next note
to point both after the note region, that was checked in the code, but
also to point before the region, that was not checked [1]. Remember the
first note location in note0 and leap out if the note is not between
note0 and note_end.
In the similar way, badly formed note may cause infinite loop by
pointing next note into the same or previous note. Guard against this
by
limiting amount of loop iterations by arbitrary choosen big number.
For clarity, check the calculated note alignment in each iteration.
PR: kern/132886
Approved by: re(Ken Smith)
Notes:
svn path=/stable/7/; revision=190520
|
| |
|
|
|
|
|
|
|
|
|
|
| |
amd64 and i386. This fixes a bug were 32-bit binaries would run with a
different floating point exception mask under FreeBSD/amd64 vs FreeBSD/i386.
This commit also includes a few other minor changes to keep the code in
sync with 8.
Approved by: re (kib)
Notes:
svn path=/stable/7/; revision=190418
|