Revision
11983 -
Directory Listing
-
[select for diffs]
Modified
Mon Aug 6 22:14:56 2018 UTC
(5 years, 10 months ago)
by
root
Diff to
previous 11979
,
to
selected 10146
One of the data structures that holds TCP segments uses an inefficient
algorithm to reassemble the data. This causes the CPU time spent on
segment processing to grow linearly with the number of segments in the
reassembly queue.
As a temporary solution to this problem, these patches limit the size
of each TCP connection's reassembly queue. The value is controlled by
a sysctl (net.inet.tcp.reass.maxqueuelen), which sets the maximum
number of TCP segments that can be outstanding on a session's
reassembly queue. This value defaults to 100.
Note that setting this value too low could impact the throughput of
TCP connections which experience significant loss or
reordering. However, the higher this number is set, the more resources
can be consumed on TCP reassembly processing.
Obtained from: FreeBSD
Revision
11931 -
Directory Listing
-
[select for diffs]
Modified
Sat Jul 21 13:30:22 2018 UTC
(5 years, 10 months ago)
by
laffer1
Diff to
previous 11930
,
to
selected 10146
Fix a panic during boot caused by inadequate locking of some vt(4) driver
data structures.
vt_change_font() calls vtbuf_grow() to change some vt driver data
structures. It uses TF_MUTE to prevent the console from trying to use
those data structures while it changes them.
During the early stage of the boot process, the vt driver's tc_done
routine uses those data structures; however, it is currently called
outside the TF_MUTE check.
Move the tc_done routine inside the locked TF_MUTE check.
Obtained from: FreeBSD svn 332831
Revision
11918 -
Directory Listing
-
[select for diffs]
Modified
Fri Jul 20 12:20:34 2018 UTC
(5 years, 10 months ago)
by
laffer1
Diff to
previous 11917
,
to
selected 10146
The current biosmem code is walking bios smap entries and looking for smap
entry just below 4GB line, if there is such entry, its base and size is set
for heap base and size. Instead of entry base, we should use last HEAP_MIN
(currently 64MB) bytes just below 4GB, to make maximum space for kernel and
modules.
The problem was revealed on ASUS B350M-A system board, an AMD Ryzen 3 1200 CPU
memory map:
SMAP type=01 base=0000000000000000 len=000000000009d400 attr=01
SMAP type=02 base=000000000009d400 len=0000000000002c00 attr=01
SMAP type=02 base=00000000000e0000 len=0000000000020000 attr=01
SMAP type=01 base=0000000000100000 len=0000000009c00000 attr=01
SMAP type=02 base=0000000009d00000 len=0000000000300000 attr=01
SMAP type=01 base=000000000a000000 len=00000000be69b000 attr=01
SMAP type=03 base=00000000c869b000 len=0000000000016000 attr=01
SMAP type=01 base=00000000c86b1000 len=00000000124e7000 attr=01
SMAP type=02 base=00000000dab98000 len=0000000000138000 attr=01
SMAP type=03 base=00000000dacd0000 len=0000000000008000 attr=01
SMAP type=01 base=00000000dacd8000 len=0000000000100000 attr=01
SMAP type=04 base=00000000dadd8000 len=00000000003b3000 attr=01
SMAP type=02 base=00000000db18b000 len=0000000000d42000 attr=01
SMAP type=01 base=00000000dbecd000 len=0000000002133000 attr=01
SMAP type=01 base=0000000100000000 len=000000011f380000 attr=01
SMAP type=02 base=00000000de000000 len=0000000002000000 attr=01
SMAP type=02 base=00000000f8000000 len=0000000004000000 attr=01
SMAP type=02 base=00000000fdf00000 len=0000000000100000 attr=01
SMAP type=02 base=00000000fea00000 len=0000000000010000 attr=01
SMAP type=02 base=00000000feb80000 len=0000000000082000 attr=01
SMAP type=02 base=00000000fec10000 len=0000000000001000 attr=01
SMAP type=02 base=00000000fec30000 len=0000000000001000 attr=01
SMAP type=02 base=00000000fed00000 len=0000000000001000 attr=01
SMAP type=02 base=00000000fed40000 len=0000000000005000 attr=01
SMAP type=02 base=00000000fed80000 len=0000000000010000 attr=01
SMAP type=02 base=00000000fedc2000 len=000000000000e000 attr=01
SMAP type=02 base=00000000fedd4000 len=0000000000002000 attr=01
SMAP type=02 base=00000000fee00000 len=0000000000100000 attr=01
SMAP type=02 base=00000000ff000000 len=0000000001000000 attr=01
Obtained from: FreeBSD
Revision
11869 -
Directory Listing
-
[select for diffs]
Modified
Sun Jul 15 18:12:49 2018 UTC
(5 years, 10 months ago)
by
laffer1
Diff to
previous 11868
,
to
selected 10146
Fix the sleep event for layout recall.
The sleep for I/O completion during an NFSv4.1 pNFS layout recall used
the wrong event value and could result in the "[nfscl]" thread hung
for the mount.
This patch fixes the event to be the correct.
This bug will only affect NFSv4.1 pnfs mounts and only when the server
does a layout recall callback, so it won't affect many. Without the patch,
a mount without the "pnfs" option will avoid the problem.
Found during testing of the pNFS server.
Obtained from: FreeBSD r334252
Revision
11868 -
Directory Listing
-
[select for diffs]
Modified
Sun Jul 15 18:10:40 2018 UTC
(5 years, 10 months ago)
by
laffer1
Diff to
previous 11863
,
to
selected 10146
Fix the eir_server_scope reply argument for NFSv4.1 ExchangeID.
In the reply to an ExchangeID operation, the NFSv4.1 server returns a
"scope" value (eir_server_scope). If this value is the same, it indicates
that two servers share state, which is never the case for FreeBSD servers.
As such, the value needs to be unique and it was without this patch.
However, I just found out that it is not supposed to change when the
server reboots and without this patch, it did change.
This patch fixes eir_server_scope so that it does not change when the
server is rebooted.
The only affect not having this patch has is that Linux clients don't
reclaim opens and locks after a server reboot, which meant they lost
any byte range locks held before the server rebooted.
It only affects NFSv4.1 mounts and the FreeBSD NFSv4.1 client was not
affected by this bug.
Obtained from: FreeBSD svn 334633
Revision
9812 -
Directory Listing
-
[select for diffs]
Modified
Wed Apr 4 12:59:39 2018 UTC
(6 years, 2 months ago)
by
laffer1
Diff to
previous 9811
,
to
selected 10146
The length field of the option header does not count the size of the option
header itself. This causes a problem when the length is zero, the count is
then incremented by zero, which causes an infinite loop.
In addition there are pointer/offset mistakes in the handling of IPv4
options.
Obtained from: FreeBSD
Revision
9604 -
Directory Listing
-
[select for diffs]
Modified
Sun Oct 1 22:18:58 2017 UTC
(6 years, 8 months ago)
by
laffer1
Diff to
previous 9603
,
to
selected 10146
similar to the coretemp driver, revert to freebsd coretemp until we can fix some issues with sensors framework. On the upside, this adds support for AMD FX and A series chips.
Revision
9490 -
Directory Listing
-
[select for diffs]
Modified
Sun Mar 5 20:14:27 2017 UTC
(7 years, 3 months ago)
by
laffer1
Diff to
previous 9489
,
to
selected 10146
Some fixes to snd_envy24ht(4) driver:
- Allow DMA addresses anywhere in the lower 4GB; Envy24HT has a 32-bit DMA
engine, not 28-bit like Envy24.
- Mark interrupt handler as MPSAFE, seems to be correctly synchronized.
Revision
9488 -
Directory Listing
-
[select for diffs]
Modified
Sun Mar 5 20:07:14 2017 UTC
(7 years, 3 months ago)
by
laffer1
Diff to
previous 9487
,
to
selected 10146
Post-r248567, there were times when the client would return a
truncated directory for some NFS servers. This turned out to
be because the size of a directory reported by an NFS server
can be smaller that the ufs-like directory created from the
RPC XDR in the client. This patch fixes the problem by changing
r248567 so that vnode_pager_setsize() is only done for regular files.
Revision
9485 -
Directory Listing
-
[select for diffs]
Modified
Sun Mar 5 20:04:43 2017 UTC
(7 years, 3 months ago)
by
laffer1
Diff to
previous 9484
,
to
selected 10146
Enhanced BIO_DELETE support for CAM SCSI to add ATA_TRIM support.
Disable CAM BIO queue sorting for non-rotating media by default.
MFC r249939 Added available delete methods discovery during device probe
MFC r249941 Automatically disable BIO queue sorting for non-rotating media
MFC r250033 Correct comment typo's
MFC r250179 Update probe flow so that devices with lbp can also disable disksort
MFC r250180 Fix probe in progress check in dareprobe
MFC r250181 Check for ATA Information VPD before querying for ATA
MFC r250183 Enable CAM SCSI to choice ATA TRIM during autodetection
MFC r250967 Enforce validation on the selected delete method via sysctl
Obtained from: FreeBSD
Revision
9468 -
Directory Listing
-
[select for diffs]
Modified
Sun Mar 5 19:44:41 2017 UTC
(7 years, 3 months ago)
by
laffer1
Diff to
previous 9467
,
to
selected 10146
- Make ata_str2mode() static, it's not used outside of ata-all.c.
- Move ata_timeout() to ata-all.c so we don't need to expose both this
function and ata_cam_end_transaction() but only the former.
- Move ata_cmd2str() from ata-queue.c to ata-all.c.
- Add some missing prototypes.
Revision
9465 -
Directory Listing
-
[select for diffs]
Modified
Sun Mar 5 19:41:04 2017 UTC
(7 years, 3 months ago)
by
laffer1
Diff to
previous 9464
,
to
selected 10146
Fix two bugs in the current NUMA-aware allocation code:
- vm_phys_alloc_freelist_pages() can be called by vm_page_alloc_freelist()
to allocate a page from a specific freelist. In the NUMA case it did not
properly map the public VM_FREELIST_* constants to the correct backing
freelists, nor did it try all NUMA domains for allocations from
VM_FREELIST_DEFAULT.
- vm_phys_alloc_pages() did not pin the thread and each call to
vm_phys_alloc_freelist_pages() fetched the current domain to choose
which freelist to use. If a thread migrated domains during the loop
in vm_phys_alloc_pages() it could skip one of the freelists. If the
other freelists were out of memory then it is possible that
vm_phys_alloc_pages() would fail to allocate a page even though pages
were available resulting in a panic in vm_page_alloc().
Obtained from: FreeBSD svn 251179
Revision
9457 -
Directory Listing
-
[select for diffs]
Modified
Sun Mar 5 19:36:04 2017 UTC
(7 years, 3 months ago)
by
laffer1
Diff to
previous 9456
,
to
selected 10146
Rework the handling of stop signals in the NFS client. The changes in
195702, 195703, and 195821 prevented a thread from suspending while holding
locks inside of NFS by forcing the thread to fail sleeps with EINTR or
ERESTART but defer the thread suspension to the user boundary. However,
this had the effect that stopping a process during an NFS request could
abort the request and trigger EINTR errors that were visible to userland
processes (previously the thread would have suspended and completed the
request once it was resumed).
This change instead effectively masks stop signals while in the NFS client.
It uses the existing TDF_SBDRY flag to effect this since SIGSTOP cannot
be masked directly. Instead of setting PBDRY on individual sleeps, change
the VFS_*() and VOP_*() methods to defer stop signals for filesystems which
request this behavior via a new VFCF_SBDRY flag. Note that this has to be
a VFC flag rather than a MNTK flag so that it works properly with
VFS_MOUNT() when the mount is not yet fully constructed. For now, only the
NFS clients set this new flag in VFS_SET().
A few other related changes:
- Add an assertion to ensure that TDF_SBDRY doesn't leak to userland.
- When a lookup request uses VOP_READLINK() to follow a symlink, mark
the request as being on behalf of the thread performing the lookup
(cnp_thread) rather than using a NULL thread pointer. This causes
NFS to properly handle signals during this VOP on an interruptible
mount.
- Ignore thread suspend requests due to SIGSTOP if stop signals are
currently deferred. This can occur if a process is stopped via
SIGSTOP while a thread is running or runnable but before it has set
TDF_SBDRY.
Obtained from: FreeBSD
Revision
9455 -
Directory Listing
-
[select for diffs]
Modified
Sun Mar 5 19:34:22 2017 UTC
(7 years, 3 months ago)
by
laffer1
Diff to
previous 9451
,
to
selected 10146
Add currently unused flag argument to the cluster_read(),
cluster_write() and cluster_wbuild() functions. The flags to be
allowed are a subset of the GB_* flags for getblk().
Revision
9451 -
Directory Listing
-
[select for diffs]
Modified
Sun Mar 5 19:32:12 2017 UTC
(7 years, 3 months ago)
by
laffer1
Diff to
previous 9450
,
to
selected 10146
Disable sending Early R_OK on SiI3726/SiI3826 port multipliers.
With "cached read" HDD testing and multiple ports busy on a SATA
host controller, 3726/3826 PMP will very rarely drop a deferred
R_OK that was intended for the host. Symptom will be all 5 drives
under test will timeout, get reset, and recover.
Revision
9447 -
Directory Listing
-
[select for diffs]
Modified
Sun Mar 5 19:29:27 2017 UTC
(7 years, 3 months ago)
by
laffer1
Diff to
previous 9446
,
to
selected 10146
- Make tables, device ID strings etc const. This includes #ifdef'ing 0
aac_command_status_table, which is actually unused since r111532.
While at it, make aac_if a pointer to the now const interface tables
instead of copying them over to the softc (this alone already reduces the
size of aac.ko on amd64 by ~1 KiB).
- Remove redundant softc members.
- Use DEVMETHOD_END.
- Use NULL instead of 0 for pointers.
- Remove redundant bzero(9)'ing of the softc.
- Use pci_enable_busmaster(9) instead of duplicating it.
- Remove redundant checking for PCIM_CMD_MEMEN (resource allocation will
just fail).
- Canonicalize the error messages in case of resource allocation failures.
- Add support for using MSI instead of INTx, controllable via the tunable
hw.aac.enable_msi (defaulting to on).
Obtained from: FreeBSD
Revision
9446 -
Directory Listing
-
[select for diffs]
Modified
Sun Mar 5 19:28:40 2017 UTC
(7 years, 3 months ago)
by
laffer1
Diff to
previous 9445
,
to
selected 10146
- Improve some comments.
- Make bge_lookup_{rev,vendor}() static.
- Factor out chip identification rather than duplicating the code.
- Sanitize bge_probe() a bit (don't hardcode buffer sizes, allow
bge_lookup_vendor() to return NULL so the excessive panic() can
be removed there, etc.) and return BUS_PROBE_DEFAULT rather than
hardcoding 0.
- According to the Linux tg3 driver, BCM57791 and BCM57795 aren't
capable of Gigabit Ethernet.
- Check the return value of taskqueue_start_threads().
- Mention NetLink controllers in the fallback description, too.
Revision
9444 -
Directory Listing
-
[select for diffs]
Modified
Sun Mar 5 19:26:07 2017 UTC
(7 years, 3 months ago)
by
laffer1
Diff to
previous 9443
,
to
selected 10146
Fix the wait6(2) on 32bit architectures and for the compat32, by using
the right type for the argument in syscalls.master. Also fix the
posix_fallocate(2) and posix_fadvise(2) compat32 syscalls on the
architectures which require padding of the 64bit argument.
Revision
9424 -
Directory Listing
-
[select for diffs]
Modified
Sat Mar 4 22:54:00 2017 UTC
(7 years, 3 months ago)
by
laffer1
Diff to
previous 9422
,
to
selected 10146
- Fix nullfs vnode reference leak in nullfs_reclaim_lowervp(). The
null_hashget() obtains the reference on the nullfs vnode, which must
be dropped.
- Fix a wart which existed from the introduction of the nullfs
caching, do not unlock lower vnode in the nullfs_reclaim_lowervp().
It should be innocent, but now it is also formally safe. Inform the
nullfs_reclaim() about this using the NULLV_NOUNLOCK flag set on
nullfs inode.
- Add a callback to the upper filesystems for the lower vnode
unlinking. When inactivating a nullfs vnode, check if the lower
vnode was unlinked, indicated by nullfs flag NULLV_DROP or VV_NOSYNC
on the lower vnode, and reclaim upper vnode if so. This allows
nullfs to purge cached vnodes for the unlinked lower vnode, avoiding
excessive caching.
Revision
9416 -
Directory Listing
-
[select for diffs]
Modified
Sat Mar 4 22:48:13 2017 UTC
(7 years, 3 months ago)
by
laffer1
Diff to
previous 9415
,
to
selected 10146
Refine the "nojail" rc keyword, adding "nojailvnet" for files that don't
apply to most jails but do apply to vnet jails. This includes adding
a new sysctl "security.jail.vnet" to identify vnet jails.
Revision
9415 -
Directory Listing
-
[select for diffs]
Modified
Sat Mar 4 22:47:23 2017 UTC
(7 years, 3 months ago)
by
laffer1
Diff to
previous 9414
,
to
selected 10146
Several fixes and improvements to sendfile()
1. If we wanted to send exactly as many bytes as the socket buffer is
sized for, the inner loop of kern_sendfile() would see that the
socket is full before seeing that it had no more bytes left to send.
This would cause it to return EAGAIN to the caller instead of
success. Fix by changing the order that these conditions are tested.
2. Simplify the calculation for the bytes to send in each iteration of
the inner loop of kern_sendfile()
3. Fix some calls with bogus arguments to sf_buf_ext(). These would
only trigger on mbuf allocation failure, but would be hilariously
bad if they did trigger.
Eliminate the layering violation in the kern_sendfile(). When quering
the file size, use VOP_GETATTR() instead of accessing vnode vm_object
un_pager.vnp.vnp_size.
Take the shared vnode lock earlier to cover the added VOP_GETATTR()
call and, as consequence, the whole internal sendfile loop. Reduce vm
object lock scope to not protect the local calculations.
Item 1 in r248830 causes earlier exits from the sendfile(2), before
all requested data was sent. The reason is that xfsize <= 0 condition
must not be tested at all if space == loopbytes. Otherwise, the done
is set to 1, and sendfile(2) is aborted too early.
Instead of moving the condition to exiting the inner loop after the
xfersize check, directly check for the completed transfer before the
testing of the available space in the socket buffer, and revert item 1
of r248830. It is arguably another bug to sleep waiting for socket
buffer space (or return EAGAIN for non-blocking socket) if all bytes
are already transferred.
Obtained from: FreeBSD
Revision
9393 -
Directory Listing
-
[select for diffs]
Modified
Sat Mar 4 21:27:20 2017 UTC
(7 years, 3 months ago)
by
laffer1
Diff to
previous 9391
,
to
selected 10146
Do a sync of the devvp vnode for the mount, which buffers, among other
things, contain FAT blocks. This makes fsync(2) for msdosfs more correct
by syncing the metadata needed to read the synced data.
Revision
9383 -
Directory Listing
-
[select for diffs]
Modified
Sat Mar 4 20:36:28 2017 UTC
(7 years, 3 months ago)
by
laffer1
Diff to
previous 9382
,
to
selected 10146
Isilon reported that sec=krb5p NFS mounts had a problem when m_len == 0
for the last mbuf of the list with an encrypted message. This patch replaces
the KASSERT() with code that handles this case.
Revision
9381 -
Directory Listing
-
[select for diffs]
Modified
Sat Mar 4 20:35:26 2017 UTC
(7 years, 3 months ago)
by
laffer1
Diff to
previous 9380
,
to
selected 10146
For RTL8211B or later PHYs, enable crossover detection and
auto-correction. This change makes re(4) establish a link with
a system using non-crossover UTP cable.
Revision
9380 -
Directory Listing
-
[select for diffs]
Modified
Sat Mar 4 20:34:47 2017 UTC
(7 years, 3 months ago)
by
laffer1
Diff to
previous 9378
,
to
selected 10146
introduced SIS_TYPE_83816 but it was not actually set in
driver such that checking against the type was always false.
To detect NS DP83816, driver should have checked silicon revision
register for NS controllers. While here, remove SIS_TYPE_83816 to
not make the similar mistake again.
Revision
9373 -
Directory Listing
-
[select for diffs]
Modified
Sat Mar 4 20:23:52 2017 UTC
(7 years, 3 months ago)
by
laffer1
Diff to
previous 9368
,
to
selected 10146
Remove all the checks on curthread != NULL with the exception of some MD
trap checks (eg. printtrap()).
Generally this check is not needed anymore, as there is not a legitimate
case where curthread != NULL, after pcpu 0 area has been properly
initialized.
Revision
9368 -
Directory Listing
-
[select for diffs]
Modified
Sat Mar 4 19:53:27 2017 UTC
(7 years, 3 months ago)
by
laffer1
Diff to
previous 9367
,
to
selected 10146
EINTR in POSIX sem_*.
Document that sem_wait() can fail with [EINTR].
Programs often do not expect an [EINTR] return from sem_wait() and POSIX
only allows it if the signal was installed without SA_RESTART. The timeout
in sem_timedwait() is absolute so it can be restarted normally.
The old POSIX semaphore implementation did this correctly, unlike the new
umtx one.
Specific to 9-stable: UMTX_ABSTIME does not exist and therefore
sem_timedwait() is erroneously not restarted after a SA_RESTART signal
handler.
It may be desirable to avoid [EINTR] completely, which matches the pthread
functions and is explicitly permitted by POSIX. However, the kernel must
return [EINTR] at least for signals with SA_RESTART clear, otherwise pthread
cancellation will not abort a semaphore wait. In this commit, only restore
the 8.x behaviour which is also permitted by POSIX, as far as possible with
the ABI in 9-stable.
Obtained from: FreeBSD
Revision
9364 -
Directory Listing
-
[select for diffs]
Modified
Sat Mar 4 19:50:21 2017 UTC
(7 years, 3 months ago)
by
laffer1
Diff to
previous 9363
,
to
selected 10146
Correct the type for the literal used on the left side of the shift up
to 63 bit positions.
Do not fill the save area and do not set the saved bit in the xstate
bit vector for the state which is not marked as enabled in xsave_mask.
Revision
9357 -
Directory Listing
-
[select for diffs]
Modified
Sat Mar 4 19:39:13 2017 UTC
(7 years, 3 months ago)
by
laffer1
Diff to
previous 9356
,
to
selected 10146
Do not sent 120 TEST UNIT READY requests on generic NOT READY statuses.
Some failing disks tend to return vendor-specific ASC/ASCQ codes with
NOT READY sense key. It caused extremely long recovery attempts, repeating
these 120 TURs (it takes at least 1 minute) for every I/O request.
Instead of that use default error handling, doing just few retries.
Revision
9352 -
Directory Listing
-
[select for diffs]
Modified
Sat Mar 4 19:32:15 2017 UTC
(7 years, 3 months ago)
by
laffer1
Diff to
previous 9351
,
to
selected 10146
Add support for getting and setting BBU properties related to battery
relearning. Specifically, add subcommands to mfiutil(8) which allow the
user to set the BBU and autolearn modes when the firmware supports it,
and add a subcommand which kicks off a battery relearn.
Obtained from: FreeBSD
Revision
9348 -
Directory Listing
-
[select for diffs]
Modified
Sat Mar 4 16:51:12 2017 UTC
(7 years, 3 months ago)
by
laffer1
Diff to
previous 9344
,
to
selected 10146
sync the version of netmap with the one in FreeBSD HEAD (around releng 10 2013), including device
drivers (mostly simplifying the code in the interrupt handlers).
Revision
9343 -
Directory Listing
-
[select for diffs]
Modified
Sat Mar 4 16:44:09 2017 UTC
(7 years, 3 months ago)
by
laffer1
Diff to
previous 9342
,
to
selected 10146
Re-factor the code to provide kern_proc_filedesc_out(), kern_proc_out(),
and kern_proc_vmmap_out() functions to output process kinfo structures
to sbuf, to make the code reusable.
The functions are going to be used in the coredump routine to store
procstat info in the core program header notes.
Obtained from: FreeBSD
Revision
9342 -
Directory Listing
-
[select for diffs]
Modified
Sat Mar 4 16:12:20 2017 UTC
(7 years, 3 months ago)
by
laffer1
Diff to
previous 9341
,
to
selected 10146
Return a lun count of 1 and a lun id of 0 when CAM attempts a REPORT_LUNS
command on a disk device. This quieseces some noise on the console that
recently appeared.
Revision
9340 -
Directory Listing
-
[select for diffs]
Modified
Sat Mar 4 16:11:07 2017 UTC
(7 years, 3 months ago)
by
laffer1
Diff to
previous 9339
,
to
selected 10146
Partially saved extended state must be handled always, i.e. for both
fpu-owned context, and for pcb-saved one. More, the XSAVE could do
partial save, same as XSAVEOPT, so qualifier for the handler should be
use_xsave and not use_xsaveopt.
Since xsave_area_desc is now needed regardless of the XSAVEOPT use,
remove the write-only use_xsaveopt variable.
Revision
9339 -
Directory Listing
-
[select for diffs]
Modified
Sat Mar 4 16:10:30 2017 UTC
(7 years, 3 months ago)
by
laffer1
Diff to
previous 9337
,
to
selected 10146
The check to ensure that xstate_bv always has XFEATURE_ENABLED_X87 and
XFEATURE_ENABLED_SSE bits set is not needed. CPU correctly handles
any bitmask which is subset of the enabled bits in %XCR0.
More, CPU instructions XSAVE and XSAVEOPT could write the mask without
e.g. XFEATURE_ENABLED_SSE, after the VZEROALL. The check prevents the
restoration of the otherwise valid FPU save area.
Obtained from: FreeBSD
Revision
9337 -
Directory Listing
-
[select for diffs]
Modified
Sat Mar 4 16:08:55 2017 UTC
(7 years, 3 months ago)
by
laffer1
Diff to
previous 9336
,
to
selected 10146
Re-factor coredump routines. For each type of notes an output
function is provided, which is used either to calculate the note size
or output it to sbuf. On the first pass the notes are registered in a
list and the resulting size is found, on the second pass the list is
traversed outputing notes to sbuf. For the sbuf a drain routine is
provided that writes data to a core file.
The main goal of the change is to make coredump to write notes
directly to the core file, without preliminary preparing them all in a
memory buffer. Storing notes in memory is not a problem for the
current, rather small, set of notes we write to the core, but it may
becomes an issue when we start to store procstat notes.
Obtained from: FreeBSD
Revision
9336 -
Directory Listing
-
[select for diffs]
Modified
Sat Mar 4 16:08:05 2017 UTC
(7 years, 3 months ago)
by
laffer1
Diff to
previous 9334
,
to
selected 10146
Add sbuf_start_section() and sbuf_end_section() functions, which can
be used for automatic section alignment.
Document sbuf_start_section() and sbuf_end_section() functions.
Revision
9332 -
Directory Listing
-
[select for diffs]
Modified
Sat Mar 4 16:00:24 2017 UTC
(7 years, 3 months ago)
by
laffer1
Diff to
previous 9331
,
to
selected 10146
Assert that the object type for the vnode' non-NULL v_object, passed
to vnode_pager_setsize(), is either OBJT_VNODE, or, if vnode was
already reclaimed, OBJT_DEAD.
More, if the object is terminated, do not perform the resizing operation.
Revision
9330 -
Directory Listing
-
[select for diffs]
Modified
Sat Mar 4 15:59:04 2017 UTC
(7 years, 3 months ago)
by
laffer1
Diff to
previous 9329
,
to
selected 10146
When an NFS unmount occurs, once vflush() writes the last dirty
buffer for the last vnode on the mount back to the server, it
returns. At that point, the code continues with the unmount,
including freeing up the nfs specific part of the mount structure.
It is possible that an nfsiod thread will try to check for an
empty I/O queue in the nfs specific part of the mount structure
after it has been free'd by the unmount. This patch avoids this problem by
setting the iodmount entries for the mount back to NULL while holding the
mutex in the unmount and checking the appropriate entry is non-NULL after
acquiring the mutex in the nfsiod thread.
Obtained from: FreeBSD svn 250258
Revision
9329 -
Directory Listing
-
[select for diffs]
Modified
Sat Mar 4 15:58:07 2017 UTC
(7 years, 3 months ago)
by
laffer1
Diff to
previous 9328
,
to
selected 10146
Both NFS clients can deadlock when using the "rdirplus" mount
option. This can occur when an nfsiod thread that already holds
a buffer lock attempts to acquire a vnode lock on an entry in
the directory (a LOR) when another thread holding the vnode lock
is waiting on an nfsiod thread. This patch avoids the deadlock by disabling
readahead for this case, so the nfsiod threads never do readdirplus.
Since readaheads for directories need the directory offset cookie
from the previous read, they cannot normally happen in parallel.
As such, testing by jhb@ and myself didn't find any performance
degredation when this patch is applied. If there is a case where
this results in a significant performance degradation, mounting
without the "rdirplus" option can be done to re-enable readahead
for directories.
Obtained from: FreeBSD svn 250257
Revision
9321 -
Directory Listing
-
[select for diffs]
Modified
Fri Mar 3 00:19:11 2017 UTC
(7 years, 3 months ago)
by
laffer1
Diff to
previous 9319
,
to
selected 10146
Allow the vnode to be unlocked for the weird case of
LK_EXCLOTHER. LK_EXCLOTHER is only used to acquire a
usecount on a vnode during NFSv4 recovery from an
expired lease.
Revision
9319 -
Directory Listing
-
[select for diffs]
Modified
Fri Mar 3 00:18:01 2017 UTC
(7 years, 3 months ago)
by
laffer1
Diff to
previous 9318
,
to
selected 10146
When rebooting (exiting) from the BTX loader, make sure to restore the
GDT from the correct segment, otherwise a triple fault would be caused.
In some virtual environments (VMware, VirtualBox, etc) this could lead
to a unhandled error or hang in the guest emulation software.
Thanks to avg and jhb for a few hints in the right direction.
Revision
9318 -
Directory Listing
-
[select for diffs]
Modified
Fri Mar 3 00:17:11 2017 UTC
(7 years, 3 months ago)
by
laffer1
Diff to
previous 9317
,
to
selected 10146
Do not pretend to have autosense data when no such data is available.
Make umass return an error code if SCSI sense retrieval request
has failed. Make sure scsi_error_action honors SF_NO_RETRY and
SF_NO_RECOVERY in all cases, even if it cannot parse sense bytes.
Revision
9308 -
Directory Listing
-
[select for diffs]
Modified
Thu Mar 2 23:34:51 2017 UTC
(7 years, 3 months ago)
by
laffer1
Diff to
previous 9307
,
to
selected 10146
MFC r249294:
Use IP6STAT_INC/IP6STAT_DEC macros to update ip6 stats.
MFC r249528,249546:
Add accounting to the source address selection algorithm for cases, when
it fails to select an address, also add several another counters to
the statistics.
MFC r249543,249552:
Replace hardcoded numbers.
MFC r249544:
Use IP6S_M2MMAX macro.
MFC r249545:
Replace hardcoded numbers. Also use interface-local scope name instead
of node-local.
Obtained from: FreeBSD
Revision
9304 -
Directory Listing
-
[select for diffs]
Modified
Thu Mar 2 23:30:06 2017 UTC
(7 years, 3 months ago)
by
laffer1
Diff to
previous 9303
,
to
selected 10146
Move hptmv and mpt drivers shutdown a bit later to the SHUTDOWN_PRI_LAST
stage of shutdown_post_sync. That should allow CAM to do final cache flush
at the SHUTDOWN_PRI_DEFAULT without using polling magic.
Revision
9303 -
Directory Listing
-
[select for diffs]
Modified
Thu Mar 2 23:28:54 2017 UTC
(7 years, 3 months ago)
by
laffer1
Diff to
previous 9297
,
to
selected 10146
mqueue,ksem,shm: Fix race condition with setting UF_EXCLOSE.
POSIX mqueue, compatibility ksem and POSIX shm create a file descriptor that
has close-on-exec set. However, they do this incorrectly, leaving a window
where a thread may fork and exec while the flag has not been set yet. The
race is easily reproduced on a multicore system with one thread doing
shm_open and close and another thread doing posix_spawnp and waitpid.
Set UF_EXCLOSE via falloc()'s flags argument instead. This also simplifies
the code.
Revision
9296 -
Directory Listing
-
[select for diffs]
Modified
Thu Mar 2 23:22:37 2017 UTC
(7 years, 3 months ago)
by
laffer1
Diff to
previous 9294
,
to
selected 10146
This fixes the issue with the "randomly changing" default
route. What it was is there are two places in ip_output.c
where we do a goto again. One place was fine, it
copies out the new address and then resets dst = ro->rt_dst;
But the other place does *not* do that, which means earlier
when we found the gateway, we have dst pointing there
aka dst = ro->rt_gateway is done.. then we do a
goto again.. bam now we clobber the default route.
The fix is just to move the again so we are always
doing dst = &ro->rt_dst; in the again loop.
Revision
9294 -
Directory Listing
-
[select for diffs]
Modified
Thu Mar 2 23:17:32 2017 UTC
(7 years, 3 months ago)
by
laffer1
Diff to
previous 9293
,
to
selected 10146
Create controller-level DMA tag, handling range of supported addresses.
That simplifies logic for channels and gives the bus information about what
device actually allocated the tag.
Obtained from: FreeBSD 249853
Revision
9293 -
Directory Listing
-
[select for diffs]
Modified
Thu Mar 2 23:16:46 2017 UTC
(7 years, 3 months ago)
by
laffer1
Diff to
previous 9292
,
to
selected 10146
Read Asynchronous Notification statuses only if Port Multiplier or ATAPI
device are connected. ATA disks are not using ANs, while the extra register
read operation is quite expensive.
Revision
9292 -
Directory Listing
-
[select for diffs]
Modified
Thu Mar 2 23:16:04 2017 UTC
(7 years, 3 months ago)
by
laffer1
Diff to
previous 9287
,
to
selected 10146
Depending on combination of running commands (NCQ/non-NCQ) try to avoid
extra read from PxCI/PxSACT registers. If only NCQ commands are running, we
don't really need PxCI. If only non-NCQ commands are running we don't need
PxSACT. Mixed set may happen only on controllers with FIS-based switching
when port multiplier is attached, and then we have to read both registers.
Obtained from: FreeBSD 249851
Revision
8987 -
Directory Listing
-
[select for diffs]
Modified
Fri Sep 30 01:23:04 2016 UTC
(7 years, 8 months ago)
by
laffer1
Diff to
previous 8967
,
to
selected 10146
Merge several zfs fixes from Illumos and FreeBSD. Sto uninitialized warnings. Merge ZFS I/O deadman thread. This feature panics the system on a hanging zfs. This can be controlled by vfs.zfs.deadman_enabled and vfs.zfs.deadman_synctime. Speedup metaslab_sync.
Revision
8861 -
Directory Listing
-
[select for diffs]
Modified
Mon Sep 26 13:05:44 2016 UTC
(7 years, 8 months ago)
by
laffer1
Diff to
previous 8860
,
to
selected 10146
add an option to not drop options from the third retransmitted SYN. if the SYNs are dropped due to network congestion, then the remote end of the connection may act as if options such as window scaling are enabled but the local end with think they are not. This is not on by default.
Revision
8842 -
Directory Listing
-
[select for diffs]
Modified
Mon Sep 26 04:10:34 2016 UTC
(7 years, 8 months ago)
by
laffer1
Diff to
previous 8840
,
to
selected 10146
Fix a bunch of ZFS issues. zpool create/syseventd race yield non-importable pool. first write to new zvol can fail with EFBIG. Type change in refcount.h vendor zfs fix for arc_read. fix panic in arc_read, add tunable to allow block allocation on degraded vdevs. SA rounding, header size and lyout fix. fix rounding issues. merge zfs_ioctl.c code that was never commited from ZFS v28.
Revision
8776 -
Directory Listing
-
[select for diffs]
Modified
Mon Sep 26 02:59:39 2016 UTC
(7 years, 8 months ago)
by
laffer1
Diff to
previous 8774
,
to
selected 10146
Rework jumbo frame handling. QAC confirmed that the controller requires 8 bytes alignment on RX buffer. Given that non-jumbo frame works on any alignment I guess this DMA limitation for RX buffer could be jumbo frame specific one
Revision
8658 -
Directory Listing
-
[select for diffs]
Modified
Sun Sep 25 20:06:12 2016 UTC
(7 years, 8 months ago)
by
laffer1
Diff to
previous 8657
,
to
selected 10146
simplify vm code by using vmspace_wired_count and reduce kerel size by removing unneccesary pointer indirections. improve readability of sys_obreak and get rid of unused function vmspace_wired_count
Revision
8431 -
Directory Listing
-
[select for diffs]
Modified
Sun Sep 18 21:14:25 2016 UTC
(7 years, 8 months ago)
by
laffer1
Diff to
previous 8430
,
to
selected 10146
Kernel and modules have "set_vnet" linker set, where virtualized
global variables are placed. When a module is loaded by link_elf
linker its variables from "set_vnet" linker set are copied to the
kernel "set_vnet" ("modspace") and all references to these variables
inside the module are relocated accordingly.
The issue is when a module is loaded that has references to global
variables from another, previously loaded module: these references are
not relocated so an invalid address is used when the module tries to
access the variable. The example is V_layer3_chain, defined in ipfw
module and accessed from ipfw_nat.
The same issue is with DPCPU variables, which use "set_pcpu" linker
set.
Fix this making the link_elf linker on a module load recognize
"external" DPCPU/VNET variables defined in the previously loaded
modules and relocate them accordingly. For this set_pcpu_list and
set_vnet_list are used, where the addresses of modules' "set_pcpu" and
"set_vnet" linker sets are stored.
Note, archs that use link_elf_obj (amd64) were not affected by this
issue.
Obtained from: FreeBSD 243308
Revision
8391 -
Directory Listing
-
[select for diffs]
Modified
Sun Sep 18 19:21:59 2016 UTC
(7 years, 8 months ago)
by
laffer1
Diff to
previous 8388
,
to
selected 10146
Remove the tid from the software table (and bump down the in-use
counter) when the syncache doesn't want the driver to reply to an
incoming SYN. This fixes a harmless bug where tids_in_use would
go out of sync with the hardware counter.
Make sure the inp hasn't been dropped before trying to access its socket
and tcpcb.
Revision
8343 -
Directory Listing
-
[select for diffs]
Modified
Sun Sep 18 18:14:37 2016 UTC
(7 years, 8 months ago)
by
laffer1
Diff to
previous 8342
,
to
selected 10146
do not check if found IPv4 rte is dynamic if net.inet.icmp.drop_redirect is enabled. This eliminates one mtx_lock() per each routing lookup thus improving performance in several caes. Icmp redirects should not be used to provide routing direction nowadays, even for end hosts. Routers shoudl not use them too as RFC 4861 restricts it. Obtained from: FreeBSD
Revision
8251 -
Directory Listing
-
[select for diffs]
Modified
Sat Sep 17 21:35:14 2016 UTC
(7 years, 8 months ago)
by
laffer1
Diff to
previous 8250
,
to
selected 10146
Add explicit check for not set time inside cam_periph_freeze_after_event().
System time is set later on boot process then initial bus scan by CAM.
Until that moment microtime() is equal to microuptime(), and if system
boots quickly, the value can be close to zero. That causes settle time
waiting even for buses that don't use reset during probe.
On my test system this reduces boot time by 1 second if USB enabled, or
by 4 seconds if USB disabled. CAM waited for ctl2cam0 bus "settle".
Revision
8231 -
Directory Listing
-
[select for diffs]
Modified
Sat Sep 17 20:34:06 2016 UTC
(7 years, 8 months ago)
by
laffer1
Diff to
previous 8229
,
to
selected 10146
It turns out that as documented, PCF8563_R_SECOND_VL (i.e. battery low)
doesn't automatically clear when VDD rises above Vlow again and needs to be
cleared manually. However, apparently this needs all of the time registers
to be set, i.e. pcf8563_settime(), and not just PCF8563_R_SECOND in order
for PCF8563_R_SECOND_VL to stick. Thus, we just issue a warning during
pcf8563_attach() rather than failing with ENXIO in case it is set.
Obtained from: FreeBSD
Revision
8227 -
Directory Listing
-
[select for diffs]
Modified
Sat Sep 17 20:30:48 2016 UTC
(7 years, 8 months ago)
by
laffer1
Diff to
previous 8226
,
to
selected 10146
Increase device CCB queue array size by CAM_RL_VALUES - 1 (4) elements.
It is required to store extra recovery requests in case of bus resets.
On ATA/SATA this fixes assertion panics on HEAD with INVARIANTS enabled or
possible memory corruptions otherwise if timeout/reset happens when device
CCB queue is already full.
Revision
8226 -
Directory Listing
-
[select for diffs]
Modified
Sat Sep 17 20:30:17 2016 UTC
(7 years, 8 months ago)
by
laffer1
Diff to
previous 8225
,
to
selected 10146
Cast vendor-specific spell on VIA VT1818S codecs alike to VT1708S to
make analog input loopback and dual-stream playback work by enabling
signal mixing by nid 22, as it should be according to info returned by
the CODEC. Otherwise pin nid 28 receives only signal from DAC nid 16.
Revision
8192 -
Directory Listing
-
[select for diffs]
Modified
Sat Sep 17 15:39:36 2016 UTC
(7 years, 8 months ago)
by
laffer1
Diff to
previous 8188
,
to
selected 10146
There is a complex race in in_pcblookup_hash() and in_pcblookup_group().
Both functions need to obtain lock on the found PCB, and they can't do
classic inter-lock with the PCB hash lock, due to lock order reversal.
To keep the PCB stable, these functions put a reference on it and after PCB
lock is acquired drop it. If the reference was the last one, this means
we've raced with in_pcbfree() and the PCB is no longer valid.
This approach works okay only if we are acquiring writer-lock on the PCB.
In case of reader-lock, the following scenario can happen:
- 2 threads locate pcb, and do in_pcbref() on it.
- These 2 threads drop the inp hash lock.
- Another thread comes to delete pcb via in_pcbfree(), it obtains hash
lock, does in_pcbremlists(), drops hash lock, and runs
in_pcbrele_wlocked(), which doesn't free the pcb due to two references
on it. Then it unlocks the pcb.
- 2 aforementioned threads acquire reader lock on the pcb and run
in_pcbrele_rlocked(). One gets 1 from in_pcbrele_rlocked() and continues,
second gets 0 and considers pcb freed, returns.
- The thread that got 1 continutes working with detached pcb, which later
leads to panic in the underlying protocol level.
To plumb that problem an additional INPCB flag introduced - INP_FREED. We
check for that flag in the in_pcbrele_rlocked() and if it is set, we pretend
that that was the last reference.
Obtained from: FreeBSD
Revision
8183 -
Directory Listing
-
[select for diffs]
Modified
Sat Sep 17 02:57:34 2016 UTC
(7 years, 8 months ago)
by
laffer1
Diff to
previous 8182
,
to
selected 10146
Cleanups and fixes for building firmware modules into a kernel:
- Add common rules for building firmware object files (NORMAL_FW to run
uudecode, and NORMAL_FWO to use ld to build the .fwo file) and use those
instead of explicit ld/uudecode invocations in sys/conf/files. Apart from
increasing readability, this makes it possible to adjust the flags used for
firmware objects in one place.
- Similar to how r171350 fixed linking of kernel modules containing
firmware objects by adding --no-warn-mismatch to the linker flags,
add --no-warn-mismatch when linking firmware objects (*.fwo) as
well as to the link of the main kernel file. This permits firmware
modules to be statically linked into an ia64 kernel.
Revision
8182 -
Directory Listing
-
[select for diffs]
Modified
Sat Sep 17 02:56:33 2016 UTC
(7 years, 8 months ago)
by
laffer1
Diff to
previous 8181
,
to
selected 10146
Refine the changes made in r208212 to avoid bogus failures from
if_delmulti() when clearing the configuration for a subinterface when
the parent interface is being detached. The current code was still
triggering an assertion in if_delmulti() due to the parent interface being
partially detached. Fix this by not calling if_delmulti() at all if the
parent interface is being detached. Warn if if_delmulti() fails when the
parent is not being detached (but similar to 208212, still proceed with
tearing down the vlan state).
Obtained from: FreeBSD
Revision
8181 -
Directory Listing
-
[select for diffs]
Modified
Sat Sep 17 02:51:41 2016 UTC
(7 years, 8 months ago)
by
laffer1
Diff to
previous 8180
,
to
selected 10146
Allow static DMA allocations that allow for enough segments to do page-sized
segments for the entire allocation to use kmem_alloc_attr() to allocate
KVM rather than using kmem_alloc_contig(). This avoids requiring
a single physically contiguous chunk in this case.
Revision
8176 -
Directory Listing
-
[select for diffs]
Modified
Sat Sep 17 02:46:45 2016 UTC
(7 years, 8 months ago)
by
laffer1
Diff to
previous 8175
,
to
selected 10146
Attach interrupt handlers during attach instead of during the first time
the interface is brought up. Without this, the boot time interrupt
round-robin assignment does not think the allocated interrupt resources
are active and leaves them assigned to CPU 0.
While here, add descriptive tags to each interrupt handler when MSI-X
is used.
Revision
8166 -
Directory Listing
-
[select for diffs]
Modified
Sat Sep 17 02:33:10 2016 UTC
(7 years, 8 months ago)
by
laffer1
Diff to
previous 8165
,
to
selected 10146
Allow idle threads to steal second threads from other cores on systems with
8 or more cores to improve utilization. None of my tests on 2xXeon (2x6x2)
system shown any slowdown from mentioned "excess thrashing". Same time in
pbzip2 test with number of threads more then number of CPUs I see up to 10%
speedup with SMT disabled and up 5% with SMT enabled. Thinking about
trashing I was trying to limit that stealing within same last level cache,
but got only worse results. Present code any way prefers to steal threads
from topologically closer cores.
Revision
8165 -
Directory Listing
-
[select for diffs]
Modified
Sat Sep 17 02:31:00 2016 UTC
(7 years, 8 months ago)
by
laffer1
Diff to
previous 8164
,
to
selected 10146
Some minor tunings/cleanups inspired by bde@ after previous commits:
- remove extra dynamic variable initializations;
- restore (4BSD) and implement (ULE) hogticks variable setting;
- make sched_rr_interval() more tolerant to options;
- restore (4BSD) and implement (ULE) kern.sched.quantum sysctl, a more
user-friendly wrapper for sched_slice;
- tune some sysctl descriptions;
- make some style fixes.
Obtained from: FreeBSD
Revision
8164 -
Directory Listing
-
[select for diffs]
Modified
Sat Sep 17 02:29:24 2016 UTC
(7 years, 8 months ago)
by
laffer1
Diff to
previous 8163
,
to
selected 10146
Rework r220198 change (by fabient). I believe it solves the problem from
the wrong direction. Before it, if preemption and end of time slice happen
same time, thread was put to the head of the queue as for only preemption.
It could cause single thread to run for indefinitely long time. r220198
handles it by not clearing TDF_NEEDRESCHED in case of preemption. But that
causes delayed context switch every time preemption happens, even when not
needed.
Solve problem by introducing scheduler-specifoc thread flag TDF_SLICEEND,
set when thread's time slice is over and it should be put to the tail of
queue. Using SW_PREEMPT flag for that purpose as it was before just not
enough informative to work correctly.
On my tests this by 2-3 times reduces run time deviation (improves fairness)
in cases when several threads share one CPU.
Obtained from FreeBSD
Revision
8125 -
Directory Listing
-
[select for diffs]
Modified
Fri Sep 16 21:42:57 2016 UTC
(7 years, 8 months ago)
by
laffer1
Diff to
previous 8124
,
to
selected 10146
plug the accounting leak for the wired pages when msync(MS_INVALIDATE) is performed ont eh vnode mapping which is wired in other address space. Obtained from: FreeBSD svn 240989
Revision
8111 -
Directory Listing
-
[select for diffs]
Modified
Fri Sep 16 20:28:32 2016 UTC
(7 years, 8 months ago)
by
laffer1
Diff to
previous 8110
,
to
selected 10146
When an MFI command fails, the driver needs to set bio->bio_resid so that
the upper levels notice. Otherwise we see commands silently failing leading
to data corruption. This mirrors dadone()
Submitted by: Andrew Boyer aboyer@averesystems.com
Revision
8087 -
Directory Listing
-
[select for diffs]
Modified
Thu Sep 15 22:43:25 2016 UTC
(7 years, 8 months ago)
by
laffer1
Diff to
previous 8086
,
to
selected 10146
deadfs VOPs for vop_ioctl and vop_bmap call itself recursively, which is an elaborate way to cause kernel panic. change the vops implementation to return EBADF for a reclaimed vnode.
Revision
8079 -
Directory Listing
-
[select for diffs]
Modified
Thu Sep 15 22:11:47 2016 UTC
(7 years, 8 months ago)
by
laffer1
Diff to
previous 8078
,
to
selected 10146
isci(4): Fix SCSI/ATA translation for SCSI_WRITE_BUFFER w/ mode==0x7
(download microcode with offsets, save, and activate).
SATI translation layer was incorrectly using allocation length instead
of blocks, and was constructing the ATA command incorrectly.
Also change #define to specify that the 512 block size here is
specific for DOWNLOAD_MICROCODE, and does not relate to the device's
logical block size.
Obtained from: FreeBSD
Revision
8078 -
Directory Listing
-
[select for diffs]
Modified
Thu Sep 15 22:10:23 2016 UTC
(7 years, 8 months ago)
by
laffer1
Diff to
previous 8077
,
to
selected 10146
In soreceive_generic() when checking if the type of mbuf has changed
check it for MT_CONTROL type too, otherwise the assertion
"m->m_type == MT_DATA" below may be triggered by the following scenario:
- the sender sends some data (MT_DATA) and then a file descriptor
(MT_CONTROL);
- the receiver calls recv(2) with a MSG_WAITALL asking for data larger
than the receive buffer (uio_resid > hiwat).
In soreceive_generic() remove the optimization for the case when
MSG_WAITALL is set, and it is possible to do the entire receive
operation at once if we block (resid <= hiwat). Actually it might make
the recv(2) with MSG_WAITALL flag get stuck when there is enough space
in the receiver buffer to satisfy the request but not enough to open
the window closed previously due to the buffer being full.
The issue can be reproduced using the following scenario:
On the sender side do 2 send(2) requests:
1) data of size much smaller than SOBUF_SIZE (e.g. SOBUF_SIZE / 10);
2) data of size equal to SOBUF_SIZE.
On the receiver side do 2 recv(2) requests with MSG_WAITALL flag set:
1) recv() data of SOBUF_SIZE / 10 size;
2) recv() data of SOBUF_SIZE size;
We totally fill the receiver buffer with one SOBUF_SIZE/10 size request
and partial SOBUF_SIZE request. When the first request is processed we
get SOBUF_SIZE/10 free space. It is just enough to receive the rest of
bytes for the second request, and soreceive_generic() blocks in the
part that is a subject of this change waiting for the rest. But the
window was closed when the buffer was filled and to avoid silly window
syndrome it opens only when available space is larger than sb_hiwat/4
or maxseg. So it is stuck and pending data is only sent via TCP window
probes.
Obtained from: FreeBSD
Revision
8077 -
Directory Listing
-
[select for diffs]
Modified
Thu Sep 15 22:09:15 2016 UTC
(7 years, 8 months ago)
by
laffer1
Diff to
previous 8071
,
to
selected 10146
When synchronizing, include in the config dump amount of
bytes syncronized.
The rationale behind this is the following: for large disks the
percent synchronisation counter ticks too seldom, and monitoring
software (as well as human operator) can't tell whether
synchronisation goes on or one of disks got stuck. On an idle
server one can look into gstat and see whether synchronisation goes
on or not, but on a busy server that won't work. Also, new value
monitored can be differentiated obtaining the synchronisation speed
quite precisely.
Obtained from: FreeBSD
Revision
8043 -
Directory Listing
-
[select for diffs]
Modified
Thu Sep 15 20:52:03 2016 UTC
(7 years, 8 months ago)
by
laffer1
Diff to
previous 8042
,
to
selected 10146
Fix races between in_lltable_prefix_free(), lla_lookup(),
llentry_free() and arptimer():
o Use callout_init_rw() for lle timeout, this allows us safely
disestablish them.
- This allows us to simplify the arptimer() and make it
race safe.
o Consistently use ifp->if_afdata_lock to lock access to
linked lists in the lle hashes.
o Introduce new lle flag LLE_LINKED, which marks an entry that
is attached to the hash.
- Use LLE_LINKED to avoid double unlinking via consequent
calls to llentry_free().
- Mark lle with LLE_DELETED via |= operation istead of =,
so that other flags won't be lost.
o Make LLE_ADDREF(), LLE_REMREF() and LLE_FREE_LOCKED() more
consistent and provide more informative KASSERTs.
The patch is a collaborative work of all submitters and myself.
Revision
8042 -
Directory Listing
-
[select for diffs]
Modified
Thu Sep 15 20:51:01 2016 UTC
(7 years, 8 months ago)
by
laffer1
Diff to
previous 8041
,
to
selected 10146
The llentry_update() is used only by flowtable and the latter
always passes NULL pointer to it. Thus, code can be simplified
and function renamed to llentry_alloc() to match rtalloc().
Revision
8040 -
Directory Listing
-
[select for diffs]
Modified
Thu Sep 15 20:49:28 2016 UTC
(7 years, 8 months ago)
by
laffer1
Diff to
previous 8038
,
to
selected 10146
When using flowtable llentrys can outlive the interface with
which they're associated at which the lle_tbl pointer points
to freed memory and the llt_free pointer is no longer valid.
Move the free pointer in to the llentry itself and update the
initalization sites.
Revision
8038 -
Directory Listing
-
[select for diffs]
Modified
Thu Sep 15 20:46:20 2016 UTC
(7 years, 8 months ago)
by
laffer1
Diff to
previous 8036
,
to
selected 10146
If ip_output() returns EMSGSIZE to tcp_output(), then the latter calls
tcp_mtudisc(), which in its turn may call tcp_output(). Under certain
conditions (must admit they are very special) an infinite recursion can
happen.
To avoid recursion we can pass struct route to ip_output() and obtain
correct mtu. This allows us not to use tcp_mtudisc() but call tcp_mss_update()
directly.
Obtained from: FreeBSD
Revision
8032 -
Directory Listing
-
[select for diffs]
Modified
Thu Sep 15 20:34:15 2016 UTC
(7 years, 8 months ago)
by
laffer1
Diff to
previous 8031
,
to
selected 10146
Extend GEOM Gate class to handle read I/O requests directly within the kernel.
This will allow HAST to read directly from the local component without
even communicating userland daemon.
Sponsored by: Panzura, http://www.panzura.com
Reorder things in g_gate_create() so at the moment when g_new_geomf()
is called name is properly initialized.
In g_gate_dumpconf() always check the result of g_gate_hold().
This fixes "Negative sc_ref" panic possible when sysctl_kern_geom_confxml()
is run simultaneously with destroying GATE device.
Obtained from: FreeBSD
Revision
8018 -
Directory Listing
-
[select for diffs]
Modified
Thu Sep 15 20:11:39 2016 UTC
(7 years, 8 months ago)
by
laffer1
Diff to
previous 8017
,
to
selected 10146
Update cxgbe
Convert some fixed params to tunables
if_iqdrops should include frames truncated within the chip.
Assume INET/INET6 and TCP_OFFLOAD when the driver is built out of tree.
Fix some buffer sizes.
Revision
8014 -
Directory Listing
-
[select for diffs]
Modified
Thu Sep 15 09:02:47 2016 UTC
(7 years, 8 months ago)
by
laffer1
Diff to
previous 8013
,
to
selected 10146
do not requeue held page or page for which locking failed, just leave them alone. process the act_count updates for the held pages in the vm_pageout loop over the inactive queue, instead of refusing to do anything. clarify the intent of the addl_page_shortage counter
Revision
7972 -
Directory Listing
-
[select for diffs]
Modified
Thu Sep 15 08:10:51 2016 UTC
(7 years, 8 months ago)
by
laffer1
Diff to
previous 7971
,
to
selected 10146
In tcp timers, check INP_DROPPED flag a little later, after
callout_deactivate(), so if INP_DROPPED is set we return with the
timer active flag cleared.
For me this fixes negative keep timer values reported by `netstat -x'
for connections in CLOSE state.
Obtained from: FreeBSD
Revision
7971 -
Directory Listing
-
[select for diffs]
Modified
Thu Sep 15 08:10:01 2016 UTC
(7 years, 8 months ago)
by
laffer1
Diff to
previous 7970
,
to
selected 10146
In epair_clone_destroy(), when destroying the second half, we have to
switch to its vnet before calling ether_ifdetach(). Otherwise if the
second half resides in a different vnet, if_detach() silently fails
leaving a stale pointer in V_ifnet list, and the system crashes trying
to access this pointer later.
Another solution could be not to allow to destroy epair unless both
ends are in the home vnet.
Obtained from: FreeBSD
Revision
7954 -
Directory Listing
-
[select for diffs]
Modified
Wed Sep 14 22:35:01 2016 UTC
(7 years, 8 months ago)
by
laffer1
Diff to
previous 7953
,
to
selected 10146
Make the interval timings for EVFILT_TIMER more accurate. tvtohz() always
adds an extra tick to account for the current partial clock tick. However,
that is not appropriate for a repeating timer when the exact tvtohz() value
should be used for subsequent intervals. Fix repeating callouts for
EVFILT_TIMER by subtracting 1 tick from the tvtohz() result similar to the
fix used in realitexpire() for interval timers.
While here, update a few comments to note that if the EVFILT_TIMER code
were to move out of kern_event.c, it should move to kern_time.c (where the
interval timer code it mimics lives) rather than kern_timeout.c.
Obtained from: FreeBSD svn rev 239915
Revision
7953 -
Directory Listing
-
[select for diffs]
Modified
Wed Sep 14 22:23:25 2016 UTC
(7 years, 8 months ago)
by
laffer1
Diff to
previous 7952
,
to
selected 10146
Add a clts() wrapper around the 'clts' instruction to <machine/cpufunc.h>
on x86 and use that to implement stop_emulating() in the fpu/npx code.
Reimplement start_emulating() in the non-XEN case by using load_cr0() and
rcr0() instead of the 'lmsw' and 'smsw' instructions. Intel explicitly
discourages the use of 'lmsw' and 'smsw' on 80386 and later processors in
the description of these instructions in Volume 2 of the ADM.
Obtained from: FreeBSD svn rev 239914
Revision
7951 -
Directory Listing
-
[select for diffs]
Modified
Wed Sep 14 22:18:44 2016 UTC
(7 years, 8 months ago)
by
laffer1
Diff to
previous 7950
,
to
selected 10146
Put struct ostat and struct nstat under #ifdef _KERNEL. The
compatibility definitions are only needed for implementation of the
syscalls, they cause namespace pollution and are not useful for
applications.
Revision
7943 -
Directory Listing
-
[select for diffs]
Modified
Wed Sep 14 21:53:46 2016 UTC
(7 years, 8 months ago)
by
laffer1
Diff to
previous 7942
,
to
selected 10146
Partially revert r217515 so that the mem_range_softc variable is always
present on x86 kernels. This fixes the build of kernels that include
'device acpi' but do not include 'device mem'.
Obtained from: FreeBSD
Revision
7942 -
Directory Listing
-
[select for diffs]
Modified
Wed Sep 14 21:49:46 2016 UTC
(7 years, 8 months ago)
by
laffer1
Diff to
previous 7941
,
to
selected 10146
Several fixes to the amd64 disassembler:
- Decode the 'xsave', 'xrstor', 'xsaveopt', 'xgetbv', 'xsetbv', and
'rdtscp' instructions.
- Add generic support for opcodes that are escape bytes used for
multi-byte opcodes (such as the 0x0f prefix). Use this to replace
the hard-coded 0x0f special case and add support for three-byte
opcodes that use the 0x0f38 prefix.
- Decode all Intel VMX instructions. invept and invvpid in particular are
three-byte opcodes that use the 0x0f38 escape prefix.
- Rework how the special 'SDEP' size flag works such that the default
instruction name (i_name) is the instruction when the data size
prefix (0x66) is not specified, and the alternate name in i_extra is
used when the prefix is included.
- Add a new 'ADEP' size flag similar to 'SDEP' except that it chooses
between i_name and i_extra based on the address size prefix (0x67).
Use this to fix the decoding for jrcxz vs jecxz which is determined
by the address size prefix, not the operand size prefix. Also, jcxz
is not possible in 64-bit mode, but jrcxz is the default instruction
for that opcode.
- Add support for handling instructions that have a mandatory 'rep'
prefix (this means not outputting the 'repe ' prefix until determining
if it is used as part of an opcode). Make 'pause' less of a special
case this way.
- Decode 'cmpxchg16b' and 'cdqe' which are variants of other instructions
but with a REX.W prefix.
Obtained from: FreeBSD
Revision
7940 -
Directory Listing
-
[select for diffs]
Modified
Wed Sep 14 21:42:08 2016 UTC
(7 years, 8 months ago)
by
laffer1
Diff to
previous 7938
,
to
selected 10146
Fix panics triggered by older mfiutil binaries run on the new mfi(4) driver.
The new driver changed the size of the mfi_dcmd_frame structure in such a
way that a MFI_IOC_PASSTHRU ioctl from an old amd64 binary is treated as an
MFI_IOC_PASSTHRU32 ioctl in the new driver. As a result, the user pointer
is treated as the buffer length. mfi_user_command() doesn't have a bounds
check on the buffer length, so it passes a really big value to malloc()
which panics when it tries to exhaust the kmem_map. Fix this two ways:
- Only honor MFI_IOC_PASSTHRU32 if the binary has the SV_ILP32 flag set,
otherwise treat it as an unknown ioctl.
- Add a bounds check on the buffer length passed by the user. For now
it fails any user attempts to use a buffer larger than 1MB.
While here, fix a few other nits:
- Remove an unnecessary check for a NULL return from malloc(M_WAITOK).
- Use the ENOTTY errno for invalid ioctl commands instead of ENOENT.
Revision
7930 -
Directory Listing
-
[select for diffs]
Modified
Wed Sep 14 21:09:43 2016 UTC
(7 years, 8 months ago)
by
laffer1
Diff to
previous 7929
,
to
selected 10146
Extend the KPI to lock and unlock f_offset member of struct file. It
now fully encapsulates all accesses to f_offset, and extends f_offset
locking to other consumers that need it, in particular, to lseek() and
variants of getdirentries().
Revision
7925 -
Directory Listing
-
[select for diffs]
Modified
Wed Sep 14 20:52:11 2016 UTC
(7 years, 8 months ago)
by
laffer1
Diff to
previous 7924
,
to
selected 10146
Add vn_io_fault(), which is a facility to prevent page faults while
filesystems perform copyin/copyout of the file data into the usermode
buffer.
obtained from: FreeBSD
Revision
7924 -
Directory Listing
-
[select for diffs]
Modified
Wed Sep 14 20:43:02 2016 UTC
(7 years, 8 months ago)
by
laffer1
Diff to
previous 7920
,
to
selected 10146
Add a rangelock implementation, intended to be used to range-locking
the i/o regions of the vnode data space. The implementation is quite
simple-minded, it uses the list of the lock requests, ordered by
arrival time. Each request may be for read or for write. The
implementation is fair FIFO.
Obtained from: FreeBSD
Revision
7920 -
Directory Listing
-
[select for diffs]
Modified
Wed Sep 14 20:04:33 2016 UTC
(7 years, 8 months ago)
by
laffer1
Diff to
previous 7918
,
to
selected 10146
Don't return an error if a kld does not contain any modules (e.g. a
kld that only contained a sysctl). The kernel linker allows such
modules, so the boot loader should not reject them.
Revision
7917 -
Directory Listing
-
[select for diffs]
Modified
Wed Sep 14 19:48:34 2016 UTC
(7 years, 8 months ago)
by
laffer1
Diff to
previous 7916
,
to
selected 10146
Refine the implementation of POSIX_FADV_NOREUSE to perform
POSIX_FADV_DONTNEED requests on the currently accessed portion of the
file on each read(2) or write(2) rather than using direct I/O. This
gives much better performance including read-ahead and write clustering
similar to normal read(2) and write(2) calls.
If subsequent read(2) and write(2) calls are sequential, then the
POSIX_FADV_DONTNEED requests will cover the entire sequentially-accessed
range.
Obtained from: FreeBSD
Revision
7916 -
Directory Listing
-
[select for diffs]
Modified
Wed Sep 14 19:47:16 2016 UTC
(7 years, 8 months ago)
by
laffer1
Diff to
previous 7914
,
to
selected 10146
- Change back "d_ofs" to int8_t to not pessimize padding and size of "struct puc_cfg".
- Use "puc_config_moxa" for Moxa boards that need d_ofs greater than 0x7f
Revision
7914 -
Directory Listing
-
[select for diffs]
Modified
Wed Sep 14 19:42:07 2016 UTC
(7 years, 8 months ago)
by
laffer1
Diff to
previous 7913
,
to
selected 10146
Provide some compat32 shims for sysctl vfs.conflist. It is required
for getvfsbyname(3) operation when called from 32bit process, and
getvfsbyname(3) is used by recent bsdtar import.
Revision
7909 -
Directory Listing
-
[select for diffs]
Modified
Wed Sep 14 19:24:17 2016 UTC
(7 years, 8 months ago)
by
laffer1
Diff to
previous 7907
,
to
selected 10146
Fix/add support for SCSI UNMAP to ATA DSM translation.
This addresses kernel panic observed when sending SCSI UNMAP
commands to SATA disks attached to isci(4).
1) Flesh out callback routines to allocate/free buffers needed for
translating SCSI UNMAP data to ATA DSM data.
2) Add controller-level pool for storing buffers previously allocated
for UNMAP translation, to lessen chance of no buffer available
under memory pressure.
3) Ensure driver properly handles case where buffer pool is empty
and contigmalloc returns NULL.
4) Clear freeze bit in isci_remote_device_release_lun_queue() before
calling xpt_release_devq to ensure that any ccbs which immediately
start during the call to xpt_release_devq() see an accurate picture
of the frozen_lun_mask. This code path is extensively exercised
when tagged read/write commands mix with non-tagged DSM commands.
Obtained from: FreeBSD
Revision
7899 -
Directory Listing
-
[select for diffs]
Modified
Wed Sep 14 18:59:20 2016 UTC
(7 years, 8 months ago)
by
laffer1
Diff to
previous 7898
,
to
selected 10146
Add a sysctl kern.pid_max, which limits the maximum pid the system is
allowed to allocate, and corresponding tunable with the same
name. Note that existing processes with higher pids are left intact.
Revision
7896 -
Directory Listing
-
[select for diffs]
Modified
Wed Sep 14 18:53:28 2016 UTC
(7 years, 8 months ago)
by
laffer1
Diff to
previous 7895
,
to
selected 10146
Add a hackish debugging facility to provide a bit of information about
reason for generated trap. The dump of basic signal information and 8
bytes of the faulting instruction are printed on the controlling
terminal of the process, if the machdep.uprintf_signal syscal is
enabled.
Revision
7895 -
Directory Listing
-
[select for diffs]
Modified
Wed Sep 14 18:52:10 2016 UTC
(7 years, 8 months ago)
by
laffer1
Diff to
previous 7894
,
to
selected 10146
Real hardware, as opposed to QEMU, does not allow to have a call gate
in long mode which transfers control to 32bit code segment. Unbreak
the lcall $7,$0 implementation on amd64 by putting the 64bit user code
segment' selector into call gate, and execute the 64bit trampoline
which converts the return frame into 32bit format and switches back to
32bit mode for executing int $0x80 trampoline.
Revision
7894 -
Directory Listing
-
[select for diffs]
Modified
Wed Sep 14 18:50:08 2016 UTC
(7 years, 8 months ago)
by
laffer1
Diff to
previous 7892
,
to
selected 10146
For old mmap syscall, when executing on amd64 or ia64, enforce the
PROT_EXEC if prot is non-zero, process is 32bit and
kern.elf32.i386_read_exec syscal is enabled.
Revision
7890 -
Directory Listing
-
[select for diffs]
Modified
Wed Sep 14 18:38:19 2016 UTC
(7 years, 8 months ago)
by
laffer1
Diff to
previous 7888
,
to
selected 10146
Adjust the r205536, by allowing a non-zero offset for anonymous
mappings for a.out binaries. Apparently, a.out ld.so from FreeBSD
1.1.5.1 can issue such requests.
Fix a bug with memguard(9) on 32-bit architectures without a
VM_KMEM_MAX_SIZE.
The code was not taking into account the size of the kernel_map, which
the kmem_map is allocated from, so it could produce a sub-map size too
large to fit. The simplest solution is to ignore VM_KMEM_MAX entirely
and base the memguard map's size off the kernel_map's size, since this
is always relevant and always smaller.
Revision
7885 -
Directory Listing
-
[select for diffs]
Modified
Wed Sep 14 16:53:17 2016 UTC
(7 years, 8 months ago)
by
laffer1
Diff to
previous 7880
,
to
selected 10146
Bump dtrace_helper_actions_max from 32 to 128
Dave Pacheco from Joyent (and Dtrace.org) bumped the cap to 1024 but,
according to his blog, 128 is the recommended minimum.
For now bump it safely to 128 although we may have to bump it further
if there is demand in the future.
Revision
7868 -
Directory Listing
-
[select for diffs]
Modified
Wed Sep 14 16:19:37 2016 UTC
(7 years, 8 months ago)
by
laffer1
Diff to
previous 7867
,
to
selected 10146
Add IPPROTO_MPLS (rfc4023) IP protocol definition
There are currently no in-tree consumers; I'm adding it now for use by
vendor code. This matches the change OpenBSD made while implementing
MPLS in gif(4).
Obtained from: FreeBSD/OpenBSD
Revision
7864 -
Directory Listing
-
[select for diffs]
Modified
Wed Sep 14 16:15:09 2016 UTC
(7 years, 8 months ago)
by
laffer1
Diff to
previous 7862
,
to
selected 10146
Implement SIOCGIFMEDIA for if_tap(4)
Appease certain if_tap(4) consumers by providing simulated Ethernet
media status.
DragonFly commit 70d9a675bf5441cc854a843ead702d08928c37f3
Obtained from: DragonFly
Revision
7861 -
Directory Listing
-
[select for diffs]
Modified
Wed Sep 14 16:11:16 2016 UTC
(7 years, 8 months ago)
by
laffer1
Diff to
previous 7859
,
to
selected 10146
Make the addition of the d_gone binary compatible. This allows
storage drivers compiled for 9.0 to work on 9.1 and preserves the ABI
for disks.
Obtained from: FreeBSD
Revision
7857 -
Directory Listing
-
[select for diffs]
Modified
Wed Sep 14 16:05:04 2016 UTC
(7 years, 8 months ago)
by
laffer1
Diff to
previous 7851
,
to
selected 10146
Add rmb() to tsc_read_##x to enforce serialization of rdtsc captures.
Intel Architecture Manual specifies that rdtsc instruction is not serialized,
so without this change, TSC synchronization test would periodically fail,
resulting in use of HPET timecounter instead of TSC-low. This caused
severe performance degradation (40-50%) when running high IO/s workloads due to
HPET MMIO reads and GEOM stat collection.
Tests on Xeon E5-2600 (Sandy Bridge) 8C systems were seeing TSC synchronization
fail approximately 20% of the time.
Obtained from: FreeBSD 9 stable svn rev 283910
Revision
7836 -
Directory Listing
-
[select for diffs]
Modified
Wed Sep 7 01:07:25 2016 UTC
(7 years, 9 months ago)
by
laffer1
Diff to
previous 7834
,
to
selected 10146
Fix a crash in tcp_input(), that happens when mbuf has a fwd_tag on it,
but later after processing and freeing the tag, we need to jump back again
to the findpcb label. Since the fwd_tag pointer wasn't NULL we tried to
process and free the tag for second time.
Revision
7825 -
Directory Listing
-
[select for diffs]
Modified
Wed Sep 7 00:01:22 2016 UTC
(7 years, 9 months ago)
by
laffer1
Diff to
previous 7823
,
to
selected 10146
Don't call bus_dmamap_load in CAM_DIR_NONE case, since there is nothing
to map, and technically this isn't allowed.
Functionally, it works OK (at least on x86) to call bus_dmamap_load with
a NULL data pointer and zero length, so this is primarily for correctness
and consistency with other drivers.
While here, remove check in isci_io_request_construct for nseg==0.
Previously, bus_dmamap_load would pass nseg==1, even for case where
buffer is NULL and length = 0, which allowed CAM_DIR_NONE CCBs
to get processed. This check is not correct though, and needed to be
removed both for the changes elsewhere in this patch, as well as jeff's
preliminary bus_dmamap_load_ccb patch (which uncovered all of this in
the first place).
Obtained from: FreeBSD SVN 244128
Revision
7820 -
Directory Listing
-
[select for diffs]
Modified
Tue Sep 6 23:50:03 2016 UTC
(7 years, 9 months ago)
by
laffer1
Diff to
previous 7811
,
to
selected 10146
Illumos 13879:4eac7a87eff2
3329 spa_sync() spends 10-20% of its time in spa_free_sync_cb()
3330 space_seg_t should have its own kmem_cache
3331 deferred frees should happen after sync_pass 1
3335 make SYNC_PASS_* constants tunable
New loader-only tunables:
vfs.zfs.sync_pass_deferred_free
vfs.zfs.sync_pass_dont_compress
vfs.zfs.sync_pass_rewrite
References:
https://www.illumos.org/issues/3329
https://www.illumos.org/issues/3330
https://www.illumos.org/issues/3331
https://www.illumos.org/issues/3335
Import the zio nop-write improvement from Illumos. To reduce I/O,
nop-write omits overwriting data if the checksum (cryptographically
secure) of new data matches the checksum of existing data.
It also saves space if snapshots are in use.
It currently works only on datasets with enabled compression, disabled
deduplication and sha256 checksums.
IllumOS 13887:196932ec9e6a and 13888:7204b3392a58
3236 zio nop-write
References:
https://www.illumos.org/issues/3236
Add loader(8) tunable to enable/disable nopwrite functionality:
vfs.zfs.nopwrite_enabled
Introduce a new dataset aclmode setting "restricted" to protect ACL's
being destroyed or corrupted by a drive-by chmod.
illumos-gate 13889:a67716f16746
3254 add support in zfs for aclmode=restricted
Update manpage dates in zfs.8 and zpool.8
Revision
7811 -
Directory Listing
-
[select for diffs]
Modified
Tue Sep 6 23:20:50 2016 UTC
(7 years, 9 months ago)
by
laffer1
Diff to
previous 7809
,
to
selected 10146
work around issues with Samsung 840 pro drives. It reports SATA async notification but returns errors on attemps to use it. Now this error is reported but not fatal.
Revision
7807 -
Directory Listing
-
[select for diffs]
Modified
Tue Sep 6 03:22:22 2016 UTC
(7 years, 9 months ago)
by
laffer1
Diff to
previous 7806
,
to
selected 10146
These probes are most useful when looking into the structures
they provide, which are listed in io.d. For example:
dtrace -n 'io:kernel::start { printf("%d\n", args[0]->bio_bcount); }'
Note that the I/O systems in FreeBSD and Solaris/Illumos are sufficiently
different that there is not a 1:1 mapping from scripts that work
with one to the other.
This commit includes the fix so that our probes use "kernel"
instead of the Solaris specific "genunix"
Obtained from: FreeBSD
Revision
7804 -
Directory Listing
-
[select for diffs]
Modified
Tue Sep 6 02:56:10 2016 UTC
(7 years, 9 months ago)
by
laffer1
Diff to
previous 7803
,
to
selected 10146
In pget(9), if PGET_NOTWEXIT flag is not specified, also search the
zombie list for the pid. This allows several kern.proc sysctls to
report useful information for zombies.
Hold the allproc_lock around all searches instead of relocking it.
Remove private pfind_locked() from the new nfs client code.
Look for zombie process only if we were given process id.
Obtained from: FreeBSD
Revision
7800 -
Directory Listing
-
[select for diffs]
Modified
Mon Sep 5 19:36:58 2016 UTC
(7 years, 9 months ago)
by
laffer1
Diff to
previous 7799
,
to
selected 10146
ext2fs fix
While a file is first being written, the dynamic block reallocation realocates t
he file's blocks so as to cluster them together into a contiguous set of blocks
on the disk.
When the cluster crosses the boundary into the first indirect block, the first i
ndirect block is initially allocated in a position immediately following the las
t direct block. Block reallocation would usually destroy locality by moving the
indirect block of the way to keep the data blocks contiguous.
Obtained from: FreeBSD svn 243913
Revision
7799 -
Directory Listing
-
[select for diffs]
Modified
Mon Sep 5 19:33:01 2016 UTC
(7 years, 9 months ago)
by
laffer1
Diff to
previous 7798
,
to
selected 10146
Schedule garbage collection run for the in-flight rights passed over the unix domain sockets to the next tick, coalescing the serial calls until the collection fires.
Obtained from: FreeBSD svn 243851
Revision
7798 -
Directory Listing
-
[select for diffs]
Modified
Mon Sep 5 19:27:25 2016 UTC
(7 years, 9 months ago)
by
laffer1
Diff to
previous 7797
,
to
selected 10146
Add a special meaning to the negative ticks argument for taskqueue_enqueue_timeout. do not ream the callout if it is already armed and the ticks is negative. otherwise rearm it to fire in abs(ticks) ticks in the future.
Obtained from: FreeBSD svn rev 243850
Revision
7796 -
Directory Listing
-
[select for diffs]
Modified
Mon Sep 5 17:05:41 2016 UTC
(7 years, 9 months ago)
by
laffer1
Diff to
previous 7795
,
to
selected 10146
use the generic SCSI commmand building function for JBOD and Thunderbolt disk write commands. Fix dumping on Thunderbolt cards. allow raw disk attachment to CAM via hw.mfi.allow_cam_disk_passthrough=1 Fix aborting of commands. Obtained from: FreeBSD
Revision
7795 -
Directory Listing
-
[select for diffs]
Modified
Mon Sep 5 17:03:08 2016 UTC
(7 years, 9 months ago)
by
laffer1
Diff to
previous 7791
,
to
selected 10146
for mfi, build SCSI command properly so that we do not send 10 byte READ/write commands which cause data corruption when device has more than 2^32 sectors. Obtained from: FreeBSD
Revision
7782 -
Directory Listing
-
[select for diffs]
Modified
Mon Sep 5 16:20:48 2016 UTC
(7 years, 9 months ago)
by
laffer1
Diff to
previous 7781
,
to
selected 10146
Add a resource limit for the total number of kqueues
available to the user. Kqueue now saves the ucred of the
allocating thread, to correctly decrement the counter on close.
Based on FreeBSD SVN 256849
Revision
7775 -
Directory Listing
-
[select for diffs]
Modified
Sun Sep 4 21:08:27 2016 UTC
(7 years, 9 months ago)
by
laffer1
Diff to
previous 7774
,
to
selected 10146
Not all Pmake derived makes quietly tolerate assignment from shell commands
with no output. Add "echo" at the end these shell commands whose output is
assigned to a variable's value to ensure there is some output.
Obtained from: FreeBSD
Revision
7774 -
Directory Listing
-
[select for diffs]
Modified
Sun Sep 4 21:06:44 2016 UTC
(7 years, 9 months ago)
by
laffer1
Diff to
previous 7773
,
to
selected 10146
amd64: use -mno-omit-leaf-frame-pointer in addition to -fno-omit-frame-pointer
... in kernel builds. This is to make behavior of clang consistent with
behavior of gcc.
Obtained from: FreeBSD
Revision
7755 -
Directory Listing
-
[select for diffs]
Modified
Sun Aug 21 04:33:53 2016 UTC
(7 years, 9 months ago)
by
laffer1
Diff to
previous 7754
,
to
selected 10146
Catch known CPUs before using IA32_TEMPERATURE_TARGET.
This way we would have an opportunity to hide the
Tj(target) value doesn't seem right stuff if we know
it's not working there.
Obtained from: FreeBSD
Revision
7754 -
Directory Listing
-
[select for diffs]
Modified
Sun Aug 21 04:32:09 2016 UTC
(7 years, 9 months ago)
by
laffer1
Diff to
previous 7753
,
to
selected 10146
Improve cputemp(4) driver wrt newer Intel processors, especially
Xeon 5500/5600 series:
- Utilize IA32_TEMPERATURE_TARGET, a.k.a. Tj(target) in place
of Tj(max) when a sane value is available, as documented
in Intel whitepaper "CPU Monitoring With DTS/PECI"; (By sane
value we mean 70C - 100C for now);
- Print the probe results when booting verbose;
- Replace cpu_mask with cpu_stepping;
- Use CPUID_* macros instead of rolling our own.
Obtained from: FreeBSD SVN 210624
Revision
7553 -
Directory Listing
-
[select for diffs]
Modified
Thu May 19 12:27:03 2016 UTC
(8 years ago)
by
laffer1
Diff to
previous 7525
,
to
selected 10146
The atkbd(4) driver, together with the atkbdc(4) driver, provides access
to the AT 84 keyboard or the AT enhanced keyboard which is connected to
the AT keyboard controller. The driver is required for the console driver
syscons(4) or vt(4). The driver exposes its own ioctl(2) interface to allow
it to be configured from userland through the kbdcontrol(1) utility.
Incorrect signedness comparison in the ioctl(2) handler allows a malicious
local user to overwrite a portion of the kernel memory.
A local user may crash the kernel, read a portion of kernel memory and
execute arbitrary code in kernel context. The result of executing an
arbitrary kernel code is privilege escalation.
Obtained from: FreeBSD
Revision
7525 -
Directory Listing
-
[select for diffs]
Modified
Thu Apr 14 11:32:56 2016 UTC
(8 years, 1 month ago)
by
laffer1
Diff to
previous 7524
,
to
selected 10146
Fill sin6_scope_id in sockaddr_in6 before passing it from the kernel to
userland via routing socket or sysctl. This eliminates the following
KAME-specific sin6_scope_id handling routine from each userland utility:
sin6.sin6_scope_id = ntohs(*(u_int16_t *)&sin6.sin6_addr.s6_addr[2]);
This behavior can be controlled by net.inet6.ip6.deembed_scopeid. This is
set to 1 by default (sin6_scope_id will be filled in the kernel).
Obtained from: FreeBSD svn rev 243187
Revision
7501 -
Directory Listing
-
[select for diffs]
Modified
Sun Apr 3 15:46:50 2016 UTC
(8 years, 2 months ago)
by
laffer1
Diff to
previous 7481
,
to
selected 10146
Fix jail name checking that disallowed anything that starts with '0'. The intention was to just limit leading zeros on numeric names. That check is now imporved to allow catching the leading spaces and + that strtoul can pass through.
Obained from: FreeBSD rev 292277
Revision
7469 -
Directory Listing
-
[select for diffs]
Modified
Thu Mar 17 12:46:04 2016 UTC
(8 years, 2 months ago)
by
laffer1
Diff to
previous 7460
,
to
selected 10146
Incorrect argument validation in sysarch(2)
A special combination of sysarch(2) arguments, specify a request to
uninstall a set of descriptors from the LDT. The start descriptor
is cleared and the number of descriptors are provided. Due to invalid
use of a signed intermediate value in the bounds checking during argument
validity verification, unbound zero'ing of the process LDT and adjacent
memory can be initiated from usermode.
Obtained from: FreeBSD.
Revision
7447 -
Directory Listing
-
[select for diffs]
Modified
Mon Feb 22 13:05:11 2016 UTC
(8 years, 3 months ago)
by
laffer1
Diff to
previous 7446
,
to
selected 10146
Introduce pipe2 to linux emulation layer.
Based on an earlier FreeBSD patch by Jung-uk Kim. (jkim@freebsd.org)
We don't have the dtrace changes in this code like freebsd 9.2 has.
Revision
7421 -
Directory Listing
-
[select for diffs]
Modified
Thu Jan 14 13:42:09 2016 UTC
(8 years, 4 months ago)
by
laffer1
Diff to
previous 7419
,
to
selected 10146
A lack of proper input checks in the ICMPv6 processing in the SCTP stack
can lead to either a failed kernel assertion or to a NULL pointer
dereference. In either case, a kernel panic will follow.
Obtained from: FreeBSD
Revision
7419 -
Directory Listing
-
[select for diffs]
Modified
Thu Jan 14 13:14:41 2016 UTC
(8 years, 4 months ago)
by
laffer1
Diff to
previous 7415
,
to
selected 10146
TCP MD5 signature denial of service
A programming error in processing a TCP connection with both TCP_MD5SIG
and TCP_NOOPT socket options may lead to kernel crash.
Revision
7355 -
Directory Listing
-
[select for diffs]
Modified
Sun Nov 1 19:03:22 2015 UTC
(8 years, 7 months ago)
by
laffer1
Diff to
previous 7354
,
to
selected 10146
double the max socket queue length by default to 256. this is still quite low for servers, but even desktops are running many apps that communicate with sockets.
Revision
7305 -
Directory Listing
-
[select for diffs]
Modified
Thu Sep 17 12:46:44 2015 UTC
(8 years, 8 months ago)
by
laffer1
Diff to
previous 7303
,
to
selected 10146
Fix kqueue write events for files > 2GB
Due to the use of int's for file offsets in the VOP_WRITE_(PRE|POST)
macros, kqueue write events for files greater 2GB where never fired.
This caused tail -f on a file greater 2GB to never see updates.
Obtained from: FreeBSD svn revision 287886
Revision
7191 -
Directory Listing
-
[select for diffs]
Modified
Wed Jul 29 00:30:12 2015 UTC
(8 years, 10 months ago)
by
laffer1
Diff to
previous 7176
,
to
selected 10146
TCP Resassemly resource exhaustion bug:
There is a mistake with the introduction of VNET, which converted the
global limit on the number of segments that could belong to reassembly
queues into a per-VNET limit. Because mbufs are allocated from a
global pool, in the presence of a sufficient number of VNETs, the
total number of mbufs attached to reassembly queues can grow to the
total number of mbufs in the system, at which point all network
traffic would cease.
Obtained from: FreeBSD 8
Revision
6992 -
Directory Listing
-
[select for diffs]
Modified
Wed Apr 8 01:28:07 2015 UTC
(9 years, 2 months ago)
by
laffer1
Diff to
previous 6991
,
to
selected 10146
The Neighbor Discover Protocol allows a local router to advertise a
suggested Current Hop Limit value of a link, which will replace
Current Hop Limit on an interface connected to the link on the MidnightBSD
system.
Revision
6768 -
Directory Listing
-
[select for diffs]
Modified
Tue Sep 16 23:42:27 2014 UTC
(9 years, 8 months ago)
by
laffer1
Diff to
previous 6766
,
to
selected 10146
20140916:
Fix a security issue with TCP SYN.
When a segment with the SYN flag for an already existing connection arrives,
the TCP stack tears down the connection, bypassing a check that the
sequence number in the segment is in the expected window.
Obtained from: FreeBSD
Revision
6605 -
Directory Listing
-
[select for diffs]
Modified
Thu Jan 23 00:12:59 2014 UTC
(10 years, 4 months ago)
by
laffer1
Diff to
previous 6604
,
to
selected 10146
increase maximum username size to 32 characters. This is already the case for utmpx.h. This improves compatibility with samba and active directory domains as they include DOMAIN/username
Revision
6020 -
Directory Listing
-
[select for diffs]
Modified
Thu Aug 29 01:04:23 2013 UTC
(10 years, 9 months ago)
by
laffer1
Diff to
previous 5983
,
to
selected 10146
Increase dirhashreclaimage to 60.
This is the number of seconds to keep items in the cache before they are eligable for removal in low memory situations.
As this only amounts to a few megabytes on most systems, it is not significant memory use and the cache time outweighs the hit in RAM usage.
Revision
5968 -
Directory Listing
-
[select for diffs]
Modified
Thu Aug 22 11:49:37 2013 UTC
(10 years, 9 months ago)
by
laffer1
Diff to
previous 5946
,
to
selected 10146
Fix two security vulnerabilities.
Fix an integer overflow in IP_MSFILTER (IP MULTICAST). This could be exploited to read memory by a user process.
When initializing the SCTP state cookie being sent in INIT-ACK chunks,
a buffer allocated from the kernel stack is not completely initialized.
Patches obtained from: FreeBSD
Revision
5916 -
Directory Listing
-
[select for diffs]
Modified
Tue Jun 18 12:32:37 2013 UTC
(10 years, 11 months ago)
by
laffer1
Diff to
previous 5909
,
to
selected 10146
Due to insufficient permission checks in the virtual memory system, a
tracing process (such as a debugger) may be able to modify portions of
the traced process's address space to which the traced process itself
does not have write access.
This error can be exploited to allow unauthorized modification of an
arbitrary file to which the attacker has read access, but not write
access. Depending on the file and the nature of the modifications,
this can result in privilege escalation.
To exploit this vulnerability, an attacker must be able to run
arbitrary code with user privileges on the target system.
Obtained from: FreeBSD
Revision
5879 -
Directory Listing
-
[select for diffs]
Modified
Mon Apr 29 22:28:19 2013 UTC
(11 years, 1 month ago)
by
laffer1
Diff to
previous 5866
,
to
selected 10146
Fix a security vulnerability in nfsserver which can allow clients who send malformed requests (readdir) with a file as the path can corrupt memory or do other nasty things.
Fix obtained from: FreeBSD
Revision
4797 -
Directory Listing
-
[select for diffs]
Modified
Mon Apr 2 16:22:51 2012 UTC
(12 years, 2 months ago)
by
laffer1
Diff to
previous 4794
,
to
selected 10146
Implement a minimum version check for kernel modules. When built, the midnightbsd version is used as a baseline version (__MidnightBSD_version)
This is based on a patch / idea from John Baldwin.
Revision
4776 -
Directory Listing
-
[select for diffs]
Modified
Sat Mar 31 17:05:11 2012 UTC
(12 years, 2 months ago)
by
laffer1
Diff to
previous 4775
,
to
selected 10146
Bring in several improvements from OpenSolaris for dtrace, zfs, etc.
Add kernel code for kernel lock manager for nfs, vfs and vm improvements and general compatibility with the recent network stack changes.
Bring in several improvements and bugfixes from FreeBSD 7.1
Tag $MidnightBSD$
Revision
4773 -
Directory Listing
-
[select for diffs]
Modified
Sat Mar 31 16:58:05 2012 UTC
(12 years, 2 months ago)
by
laffer1
Diff to
previous 4772
,
to
selected 10146
Rework "disk" so we expose sector sizes.
Hack gmirror and gstripe to expose stripe sizes.
Get vol to print drive indentifier.
Rework the linux lvm "name" lookup logic.
Revision
4744 -
Directory Listing
-
[select for diffs]
Modified
Sat Mar 24 21:30:06 2012 UTC
(12 years, 2 months ago)
by
laffer1
Diff to
previous 4743
,
to
selected 10146
Connect age(4) to the build.
Remove harp as it's not mpsafe.
Remove idt because it hasn't been useful since at least 0.3-CURRENT.
Add new ipfw_nat module and prepare for kernel lock manager for nfs w/ rpc.
Also connect uslcom module which we added to the kernel recently.
Revision
4737 -
Directory Listing
-
[select for diffs]
Modified
Fri Mar 23 20:48:40 2012 UTC
(12 years, 2 months ago)
by
laffer1
Diff to
previous 4736
,
to
selected 10146
Major feature merge from FreeBSD 7.1
Introduce FIB (Forward Routing Base) aka multiple routing tables to MidnightBSD. This is the kernel piece with userland to follow later.
As part of this work, changes had to be made to the vm subsystem, rwlocks introduced, changes to sleep queues, and modifications to the pf firewall.
Effectively this gives us most of the functionality of the FreeBSD 7.1 network stack including tcp offload.
Revision
4721 -
Directory Listing
-
[select for diffs]
Modified
Thu Mar 15 12:06:20 2012 UTC
(12 years, 2 months ago)
by
laffer1
Diff to
previous 4720
,
to
selected 10146
avoid 256 integer divisions per rc4_init call. Replace it with using an index variable.
Speeds up almost by 2x and helps with VPN software performance.
Obtained from: FreeBSD
Revision
4707 -
Directory Listing
-
[select for diffs]
Modified
Mon Mar 12 23:11:17 2012 UTC
(12 years, 3 months ago)
by
laffer1
Diff to
previous 4703
,
to
selected 10146
Add partial support for Intel Turbo Boost technology on newer i5/i7 and Xeons.
ACPI may report extra level with frequency 1MHz above the nominal to
control Intel Turbo Boost operation. It is not a bug, but feature:
dev.cpu.0.freq_levels: 2934/106000 2933/95000 2800/82000 ...
In this case value 2933 means 2.93GHz, but 2934 means 3.2-3.6GHz.
based on patch by mav @ freebsd
Revision
4642 -
Directory Listing
-
[select for diffs]
Modified
Thu Feb 16 22:44:41 2012 UTC
(12 years, 3 months ago)
by
laffer1
Diff to
previous 4641
,
to
selected 10146
make sysctl node static since this is the only place we're allocating them. move sc_puts into syscons.c only.. it's not used anywhere else and make it static. get rid of bogus layering with sccngetch
Revision
4637 -
Directory Listing
-
[select for diffs]
Modified
Sun Feb 12 21:14:24 2012 UTC
(12 years, 3 months ago)
by
laffer1
Diff to
previous 4629
,
to
selected 10146
Introduce support for preinit, init and fini arrays per the ELF standard.
This patch is based on work by John Marino for DragonFly. This makes us the second BSD to support this feature.
From his comments:
For the main executable file, the .init_array and .fini_array sections
are handled by crt1, just like .init and .fini are. In the case of
a statically linked binary, the .preinit_array section is also handled
by crt1. The real-time linker handles the .init_array and .fini_array
sections for dynamically shared objects (libraries) and .preinit_array
for dynamically-linked binaries. There are no .preinit_array sections
in the DSOs per standard.
These sections are described by the System V Application Binary Interface
http://www.sco.com/developers/gabi/latest/ch4.sheader.html#special_sections
In order for this patch to work, we also introduced several items from NetBSD needed for newer versions of GCC as well as some features used in this patch. (cdefs.h)
Finally, we're also through in manpages for cpu set which is totally unrelated, but an obmission from a previous patch for ULE.
Revision
4543 -
Directory Listing
-
[select for diffs]
Modified
Sat Jan 7 18:37:57 2012 UTC
(12 years, 5 months ago)
by
laffer1
Diff to
previous 4538
,
to
selected 10146
From now on, CURRENT will have witness and invariants enabled by default. This slows down performance, but it makes it much easier to catch kernel problems.
Upon creating a release branch, these options should be removed.
Revision
4526 -
Directory Listing
-
[select for diffs]
Modified
Wed Jan 4 02:14:06 2012 UTC
(12 years, 5 months ago)
by
laffer1
Diff to
previous 4525
,
to
selected 10146
Revert some of the recent changes with misc functions in freebsd compatibility. I have no idea what i was thinking before.
Regen syscall table so we don't try to use them.
Revision
4508 -
Directory Listing
-
[select for diffs]
Modified
Sat Dec 31 16:59:05 2011 UTC
(12 years, 5 months ago)
by
laffer1
Diff to
previous 4501
,
to
selected 10146
Modify kernel elf routines to support ELF NOTES. Specificaly, handle 'MidnightBSD' and 'FreeBSD' notes for now.
This prepares us for binutils changes.
I have not yet modified the linuxolator elf note handling logic. This would be very useful to do.
Revision
4501 -
Directory Listing
-
[select for diffs]
Modified
Fri Dec 30 02:02:36 2011 UTC
(12 years, 5 months ago)
by
laffer1
Diff to
previous 4500
,
to
selected 10146
Get rid of GIANT lock in sensors framework.
I've created a new sensorsdev_lock to protect list operations. More work might be required in the individual sensor drivers (lm, it, amdtemp, etc).
Revision
4488 -
Directory Listing
-
[select for diffs]
Modified
Thu Dec 29 02:33:28 2011 UTC
(12 years, 5 months ago)
by
laffer1
Diff to
previous 4487
,
to
selected 10146
Regenerate syscall table.
Add flag MPSAFE to sysctl leaf nodes so they don't require GIANT lock. More work is necesary to make things MPSAFE but this could allow for some serious performance benefits.
move some of the legacy bsdi/4.4bsd lite 2 stuff into kern_xxx.c and port some freebsd 7 centric things over for sbuf.
Revision
4429 -
Directory Listing
-
[select for diffs]
Modified
Sat Dec 10 22:55:34 2011 UTC
(12 years, 6 months ago)
by
laffer1
Diff to
previous 4428
,
to
selected 10146
create MidnightBSD GPT partition types rather than FreeBSD on i386/amd64. Our sparc port isn't much of anything now, and we're still using the FreeBSD VTOC entries as their hack won't work for us as we don't have an ELFOSABI number.
Revision
4415 -
Directory Listing
-
[select for diffs]
Modified
Sat Dec 10 15:46:16 2011 UTC
(12 years, 6 months ago)
by
laffer1
Diff to
previous 4414
,
to
selected 10146
Bring in several improvements to GEOM from FreeBSD 7-stable.
Drop PC98 support from GEOM in MidnightBSD. We don't support that architecture and it's not worth the effort to maintain.
raid3, label, journal, eli vinum, and part GEOM classes include several bug fixes related to sanity checking, stripe size, disabling debug printing (label), ...
Revision
4381 -
Directory Listing
-
[select for diffs]
Modified
Sun Nov 27 03:39:46 2011 UTC
(12 years, 6 months ago)
by
laffer1
Diff to
previous 4380
,
to
selected 10146
Merge several changes from FreeBSD 7-stable.
Introduce virtualization detection. The kernel knows if it's running with VMWar
e, VirtualBox, Parallels, etc and changes the hz level as well as disables MSI a
s appropriate. We will need to drop the loader support for part of this once it
's tested further. This is more general and allows us to make more changes for s
pecail hardware emulation.
Update alc(4), bge(4), mii(4) and cardbus as well as pci. This fixes several pr
oblems with various devices, particularly alc(4) which often had difficulty dete
cting cables were plugged in and DHCP. bge(4) gains support for several newer ch
ips and disables UDP offloading for stability reasons.
We also had to hack zfs so that the kernel memmove can be used now rather than t
he macro bcopy hack.
Revision
4380 -
Directory Listing
-
[select for diffs]
Modified
Thu Nov 24 19:34:05 2011 UTC
(12 years, 6 months ago)
by
laffer1
Diff to
previous 4379
,
to
selected 10146
add additional controller, use the last part of the serial number on a hard drive for ata array to avoid problems with two serial numbers are similar in a set and a drive is removed. mask disk idx to avoid panic when extra bits are set.
Revision
4301 -
Directory Listing
-
[select for diffs]
Modified
Sun Oct 23 16:17:30 2011 UTC
(12 years, 7 months ago)
by
laffer1
Diff to
previous 4300
,
to
selected 10146
Catch up conf/files and conf/files.[i386|amd64]
tweak our build environment for gnu99/c99.
Add the stack protector from FreeBSD. This relies on a random number generator which is seeded at startup of the kernel (kern/init_main.c, kern/stack_protector.c and sys/kernel.h)
Also introduce qpi which supports workstation chipsets using qpi. It connects to the nexus and then has pci buses under it.
Revision
4234 -
Directory Listing
-
[select for diffs]
Modified
Wed Oct 19 13:56:07 2011 UTC
(12 years, 7 months ago)
by
laffer1
Diff to
previous 4233
,
to
selected 10146
Introduce sysctls for exposing kernel features like PAE, AIO or freebsd 4,5,6 compatibility.
Fix a definition that I missed on a previous commit that was breaking sparc.
Revision
4233 -
Directory Listing
-
[select for diffs]
Modified
Tue Oct 18 21:17:06 2011 UTC
(12 years, 7 months ago)
by
laffer1
Diff to
previous 4231
,
to
selected 10146
Add BUS_BIND_INTR() method to the bus interface to bind an IRQ resource to a CPU.
bus_bind_intr is a wrapper routine for drivers to use. It is supported on all MidnightBSD architectures.
Obtained from: FreeBSD 7.1
Revision
4227 -
Directory Listing
-
[select for diffs]
Modified
Mon Oct 17 10:26:21 2011 UTC
(12 years, 7 months ago)
by
laffer1
Diff to
previous 4226
,
to
selected 10146
add logic to handle the linux gs register and some additional changes related to cpu affinity.
Be sure to set gpart boot partition (mbr compat) active for some bioses to work.
Revision
4217 -
Directory Listing
-
[select for diffs]
Modified
Sat Oct 15 21:45:52 2011 UTC
(12 years, 7 months ago)
by
laffer1
Diff to
previous 4216
,
to
selected 10146
The start of the EFI GPT partiiton in the PMBR can always be used with CHS addressing. Don't use 0xff which is hack in the intel spec for use when CHS won't work. Most PC bioses can't handle this hack and hang or don't detect the disk as bootable.
Revision
4215 -
Directory Listing
-
[select for diffs]
Modified
Sat Oct 15 20:18:31 2011 UTC
(12 years, 7 months ago)
by
laffer1
Diff to
previous 4214
,
to
selected 10146
Introduce CPU Affinity in MidnightBSD.
The ULE scheduler is now default on i386 and amd64 architectures.
cpuset(1) allows the user to limit a process to a group of CPU cores to run on using new system calls.
32bit versions of the system calls were also added to support 32bit binaries running on amd64 boxes. libc's
symbol map was modified to include the cpuset* system calls to expose them to userland.
This is based on work by Jeff Roberson from FreeBSD 7.1.
Revision
4203 -
Directory Listing
-
[select for diffs]
Modified
Sun Oct 9 22:03:38 2011 UTC
(12 years, 8 months ago)
by
laffer1
Diff to
previous 4199
,
to
selected 10146
Supply unique st_dev, st_ino value pair for fstat(2) on pipes. This is required with sus4 and fixes compatibility problems with several linux centric daemons. This is a port from FreeBSD 10-CURRENT.
Filter out some bad traffic with ipv6 /ipfw.
Revision
4175 -
Directory Listing
-
[select for diffs]
Modified
Fri Sep 30 03:02:06 2011 UTC
(12 years, 8 months ago)
by
laffer1
Diff to
previous 4174
,
to
selected 10146
Disable hibernation. This was causing alc(4) to hibernate when the cable was unplugged and then requiring down/up the interface or at least unplug and plugin the cable several times.
Revision
4050 -
Directory Listing
-
[select for diffs]
Modified
Sat Jul 23 21:06:15 2011 UTC
(12 years, 10 months ago)
by
laffer1
Diff to
previous 4049
,
to
selected 10146
td_osd is at the end of struct thread to avoid breaking the ABI
as a side effect it is outside of the td_startzero-td_endzero range,
requiring it to be separately zeroed
Revision
4013 -
Directory Listing
-
[select for diffs]
Modified
Sun Jul 10 17:01:03 2011 UTC
(12 years, 11 months ago)
by
laffer1
Diff to
previous 4002
,
to
selected 10146
Introduce kdb_enter_why as an alternative to kdb_enter. It allows you to specify why you're going into the debugger so scripts can be selected.
FreeBSD 8 has this functionality as kdb_enter. I considered just merging it that way, but it would break binary compatibility with freebsd kernel modules which I don't want to do yet. (think nvidia graphics driver)
Revision
3990 -
Directory Listing
-
[select for diffs]
Modified
Wed Jun 22 23:56:22 2011 UTC
(12 years, 11 months ago)
by
laffer1
Diff to
previous 3989
,
to
selected 10146
some apps are trying to use LINUX_FUTEX_WAIT_BITSET and LINUX_FUTEX_WAIT_REQUEUE_PI which are not supported by 2.6.16 kernels.. only 2.6.26+.
Log it and throw a no-op if these are not defined and REALTIME clock is requested.
Revision
3965 -
Directory Listing
-
[select for diffs]
Modified
Thu Jun 9 12:51:00 2011 UTC
(13 years ago)
by
laffer1
Diff to
previous 3959
,
to
selected 10146
IPFW has two flaws in its handling of IPv6 packets that arrive in
fragments. First, it will deny an IPv6 packet that arrives with
a fragmentation header which has an offset of zero, but no
further fragments. This type of packet is explicitly allowed in
RFC 2460:
In response to an IPv6 packet that is sent to an IPv4 destination
(i.e., a packet that undergoes translation from IPv6 to IPv4),
the originating IPv6 node may receive an ICMP Packet Too Big
message reporting a Next-Hop MTU less than 1280. In that
case, the IPv6 node is not required to reduce the size of
subsequent packets to less than 1280, but must include a
Fragment header in those packets so that the IPv6-to-IPv4
translating router can obtain a suitable Identification value
to use in resulting IPv4 fragments. Note that this means the
payload may have to be reduced to 1232 octets (1280 minus 40
for the IPv6 header and 8 for the Fragment header), and
smaller still if additional extension headers are used.
The second flaw is that the code allows IPv6 packets that arrive in
fragments to avoid transport-layer rules. For example, consider this
ruleset:
00001 deny tcp from 2607:f0b0:0:6:209:87:239:67 80 to 2404:138:4002:4000:205:1cff:fe11:beff dst-port 37822
65534 allow ip from any to any
65535 deny ip from any to any
Rule 1 will not be applied to the fragment with offset zero
because the MF bit is intentionally included in the offset
variable used in ipfw_chk, so the check to see if the transport
header is found in fragment zero will fail. Instead, the rule
will be skipped over, and the next rule which in this example is
an allow will accept the fragment. Where an administrator might
have expected the traffic to be blocked it will instead be
allowed through the firewall.
Attached is a revised patch fixing a third flaw. ipfw will reject
very small IPv6 fragments when it tries to pullup the transport
header. This relaxes the code to be consistent with the IPv4 path
where it only tries to pull up the transport header on fragments with
offset zero.
Reported to FreeBSD by Matthew Luckie , pr 145733.
Revision
3921 -
Directory Listing
-
[select for diffs]
Modified
Thu May 5 00:58:28 2011 UTC
(13 years, 1 month ago)
by
laffer1
Diff to
previous 3914
,
to
selected 10146
Fix a 16 year old bug in the sorting routine for non-contiguous netmasks.
For masks of identical length rn_lexobetter() did not stop on the
first non-equal byte. This leads rn_addroute() to not detecting
duplicate entries and thus we might create a very long list of masks
to check for each node.
This can have a huge impact on IPsec performance, where non-contiguous
masks are used for the flow lookup. In a setup with 1300 flows we
saw 400 duplicate masks and only a third of the expected throughput.
Obtained from: OpenBSD (revision 1.28 src/sys/net/radix.c)
Revision
3909 -
Directory Listing
-
[select for diffs]
Modified
Thu Apr 14 04:04:02 2011 UTC
(13 years, 2 months ago)
by
laffer1
Diff to
previous 3908
,
to
selected 10146
Handle the special ruleset 0 in devfs_ruleset_use(). An attempt set the
current ruleset to 0 with command "devfs ruleset 0" triggered a KASSERT
in devfs_ruleset_create().
Revision
3908 -
Directory Listing
-
[select for diffs]
Modified
Fri Apr 1 02:09:23 2011 UTC
(13 years, 2 months ago)
by
laffer1
Diff to
previous 3904
,
to
selected 10146
Clamp the initial advertised receive window when responding to a SYN/ACK
to the maximum allowed window. Growing the window too large would cause
an underflow in the calculations in tcp_output() to decide if a window
update should be sent which would prevent the persist timer from being
started if data was pending and the other end of the connection advertised
an initial window size of 0.
Obtained from: FreeBSD
Revision
3886 -
Directory Listing
-
[select for diffs]
Modified
Sun Mar 13 21:43:59 2011 UTC
(13 years, 3 months ago)
by
laffer1
Diff to
previous 3845
,
to
selected 10146
Bring in two large changes from FreeBSD 7.1:
* DRM/DRI update for direct rendering on X. This is a large update to support newer ATI and Intel graphics adapters with acceleration. This was original ported from Linux (it's not GPL)
* cdev per open file data.
Implement the per-open file data for the cdev.
The patch does not change the cdevsw KBI. Management of the data is
provided by the functions
int devfs_set_cdevpriv(void *priv, cdevpriv_dtr_t dtr);
int devfs_get_cdevpriv(void **datap);
void devfs_clear_cdevpriv(void);
All of the functions are supposed to be called from the cdevsw method
contexts.
- devfs_set_cdevpriv assigns the priv as private data for the file
descriptor which is used to initiate currently performed driver
operation. dtr is the function that will be called when either the
last refernce to the file goes away, the device is destroyed or
devfs_clear_cdevpriv is called.
- devfs_get_cdevpriv is the obvious accessor.
- devfs_clear_cdevpriv allows to clear the private data for the still
open file.
Implementation keeps the driver-supplied pointers in the struct
cdev_privdata, that is referenced both from the struct file and struct
cdev, and cannot outlive any of the referee.
Obtained from: FreeBSD
Revision
3791 -
Directory Listing
-
[select for diffs]
Modified
Sat Feb 19 18:36:55 2011 UTC
(13 years, 3 months ago)
by
laffer1
Diff to
previous 3788
,
to
selected 10146
Rewrite parts of the amdtemp(4) temp monitor for K8, K10, K11 AMD CPUs to take advantage of the sensors framework.
This is similar to coretemp(4)'s changes in MidnightBSD and to kate(4) in OpenBSD/DragonFly. However, kate(4) only handles K8 CPUs!
I don't have any K8 hardware to test on so if the sensor readings are off, I need someone to let me know.
Tested on an AMD Phenom 9600
Revision
3753 -
Directory Listing
-
[select for diffs]
Modified
Wed Feb 9 00:32:15 2011 UTC
(13 years, 4 months ago)
by
laffer1
Diff to
previous 3751
,
to
selected 10146
Bump MidnightBSD version. We've updated a lot of contrib software lately and the recent window scaling patch. (BIND, file, openssl, openssh, libarchive, unzip, cpio, ...)
Revision
3751 -
Directory Listing
-
[select for diffs]
Modified
Wed Feb 9 00:27:18 2011 UTC
(13 years, 4 months ago)
by
laffer1
Diff to
previous 3750
,
to
selected 10146
If the new window size ends up being the same as the old
size when it is scaled, then don't force a window update.
Obtained from: Patch by John Baldwin, FreeBSD 7-STABLE local patch
Revision
3737 -
Directory Listing
-
[select for diffs]
Modified
Mon Feb 7 00:17:46 2011 UTC
(13 years, 4 months ago)
by
laffer1
Diff to
previous 3736
,
to
selected 10146
Add a preliminary version of alc(4). This version does not support wake on lan and should not be suspend/resume. It's not connected to the build yet, but one can manually build the odule.
Revision
3623 -
Directory Listing
-
[select for diffs]
Modified
Sat Jan 22 19:55:16 2011 UTC
(13 years, 4 months ago)
by
laffer1
Diff to
previous 3612
,
to
selected 10146
Import it(4) and lm(4) for common Super I/O hardware sensors.
This is based on the 2007 Google Summer of Code project by Constantine A. Murenin and code from OpenBSD.
Revision
3598 -
Directory Listing
-
[select for diffs]
Modified
Tue Jan 4 14:23:53 2011 UTC
(13 years, 5 months ago)
by
laffer1
Diff to
previous 3595
,
to
selected 10146
Opteron rev E family of processor expose a bug where, in very rare
ocassions, memory barriers semantic is not honoured by the hardware
itself. As a result, some random breakage can happen in uninvestigable
ways (for further explanation see at the content of the commit itself).
As long as just a specific familly is bugged of an entire architecture
is broken, a complete fix-up is impratical without harming to some
extents the other correct cases.
Considering that (and considering the frequency of the bug exposure)
just print out a warning message if the affected machine is identified.
Pointed out by: Samy Al Bahra <sbahra at repnop dot org>
Obtained from: FreeBSD (revision 198868)
Revision
3595 -
Directory Listing
-
[select for diffs]
Modified
Mon Jan 3 05:43:27 2011 UTC
(13 years, 5 months ago)
by
laffer1
Diff to
previous 3594
,
to
selected 10146
Add support for the 8103E a hardware revision of the 8169.
Follow the lead of vendor's interrupt moderation mechanism.
It seems RTL8169/RTL8168/RTL810xE has a kind of interrupt
moderation mechanism but it is not documented at all. The magic
value dramatically reduced number of interrupts without noticeable
performance drops so apply it to all RTL8169/RTL8169 controllers.
Obtained from FreeBSD & Realtek FreeBSD driver.
Revision
3565 -
Directory Listing
-
[select for diffs]
Modified
Sat Nov 20 17:49:41 2010 UTC
(13 years, 6 months ago)
by
laffer1
Diff to
previous 3562
,
to
selected 10146
Several portions of the kernel and userland code related to UFS file
systems (and UFS2) cannot properly handle inode counts above 2^31 due
to use of int types. Based on a patch from FreeBSD, I've modified
our UFS2 implementation to handle unsigned values for inode counts
which should allow for file systems greater than 16TB.
newfs and growfs was also modified.
Revision
3562 -
Directory Listing
-
[select for diffs]
Modified
Tue Nov 16 14:21:22 2010 UTC
(13 years, 6 months ago)
by
laffer1
Diff to
previous 3554
,
to
selected 10146
Patch from Paul B Mahol:
Following patch fix panic on i386 for drivers using such functions.
Those two functions take 64-bit variable(s) for their arguments.
On i386 that takes additional 32-bit variable per argument.
This is required so that windrv_wrap() can correctly wrap function that
miniport driver calls with stdcall convention.
Similar explanation is provided in subr_ndis.c for other functions.
On amd64 we do not use these numbers.
Revision
3524 -
Directory Listing
-
[select for diffs]
Modified
Mon Sep 27 22:20:09 2010 UTC
(13 years, 8 months ago)
by
laffer1
Diff to
previous 3491
,
to
selected 10146
Conditionally define MAXCPU the same for all kernels regardless of SMP or !SMP.
On i386 and amd64 define MAXCPU to 32 since they exist now. Most kernel structures are resized based on this value.
Revision
3491 -
Directory Listing
-
[select for diffs]
Modified
Mon Sep 6 00:23:34 2010 UTC
(13 years, 9 months ago)
by
laffer1
Diff to
previous 3484
,
to
selected 10146
Move things along.. current is now 0.4-CURRENT. Change the man pages, osreldate and other tunables in the system accordingly. While we're here, update other bsd systems in our mdoc.local.
Revision
3478 -
Directory Listing
-
[select for diffs]
Modified
Tue Aug 31 13:08:08 2010 UTC
(13 years, 9 months ago)
by
laffer1
Diff to
previous 3457
,
to
selected 10146
Sync with FreeBSD 7-stable. Includes NetBSD style changes and 3 clause removal. Also exports mc146818_def_read and mc146818_def_write so the front end can make use of them.
Revision
3427 -
Directory Listing
-
[select for diffs]
Modified
Sat Jul 3 16:49:32 2010 UTC
(13 years, 11 months ago)
by
laffer1
Diff to
previous 3426
,
to
selected 10146
Refactor the linux_mmap_common function to take individual arguments similar to FreeBSD. This is easier to read and similar to other kernel interfaces. This also makes it easier to fix the mmap offsets greater than 32 bits. We can deal with a 64 bit file offset now. This is based on a patch to FreeBSD by Christian Zander @ NVIDIA
Revision
3426 -
Directory Listing
-
[select for diffs]
Modified
Sat Jul 3 16:43:27 2010 UTC
(13 years, 11 months ago)
by
laffer1
Diff to
previous 3425
,
to
selected 10146
Refactor the linux_mmap_common function to take individual arguments similar to FreeBSD. This is easier to read and similar to other kernel interfaces. This also makes it easier to fix the mmap offsets greater than 32 bits. We can deal with a 64 bit file offset now. This is based on a patch to FreeBSD by Christian Zander @ NVIDIA
Revision
3423 -
Directory Listing
-
[select for diffs]
Modified
Sat Jun 19 14:56:05 2010 UTC
(13 years, 11 months ago)
by
laffer1
Diff to
previous 3406
,
to
selected 10146
Do not require pos parameter to be zero in MAP_ANONYMOUS mmap requests
in Linux emulation layer. Linux seems to only require that pos is
page-aligned, but otherwise ignores it. Default FreeBSD mmap parameter
checking is too strict to allow some Linux binaries to run. tsMuxeR is
one example of such a binary.
Obtained from: kan@FreeBSD
Revision
3372 -
Directory Listing
-
[select for diffs]
Modified
Thu Mar 18 00:12:58 2010 UTC
(14 years, 2 months ago)
by
laffer1
Diff to
previous 3368
,
to
selected 10146
bump the midnightbsd version to indicate the presense of updated hda audio, new tme zones and the cpu detection code. we need to do more with this cpu detection code. Note this also includes changes to linprocfs from freebsd 7-stable that might help with newer kernel emulation.
Revision
3368 -
Directory Listing
-
[select for diffs]
Modified
Wed Mar 17 23:40:25 2010 UTC
(14 years, 2 months ago)
by
laffer1
Diff to
previous 3365
,
to
selected 10146
Add support for several newer sound cards including the following ATI and realtek chipsets:
hdac0: <ATI SB600 High Definition Audio Controller> mem 0xfbbf4000-0xfbbf7fff ir
q 16 at device 20.2 on pci0
hdac0: HDA Driver Revision: 20091113_0138
hdac0: [ITHREAD]
hdac0: HDA Codec #0: Realtek ALC887
hdac1: <ATI RV730 High Definition Audio Controller> mem 0xfbcec000-0xfbceffff ir
q 19 at device 0.1 on pci1
hdac1: HDA Driver Revision: 20091113_0138
hdac1: [ITHREAD]
hdac1: HDA Codec #0: ATI R6xx HDMI
hdac2: <ATI RV730 High Definition Audio Controller> mem 0xfbdec000-0xfbdeffff ir
q 17 at device 0.1 on pci2
hdac2: HDA Driver Revision: 20091113_0138
hdac2: [ITHREAD]
hdac2: HDA Codec #0: ATI R6xx HDMI
pcm0: <HDA Realtek ALC887 PCM #0 Analog> at cad 0 nid 1 on hdac0
pcm1: <HDA Realtek ALC887 PCM #1 Analog> at cad 0 nid 1 on hdac0
pcm2: <HDA Realtek ALC887 PCM #2 Digital> at cad 0 nid 1 on hdac0
pcm3: <HDA Realtek ALC887 PCM #3 Digital> at cad 0 nid 1 on hdac0
pcm4: <HDA ATI R6xx HDMI PCM #0 HDMI> at cad 0 nid 1 on hdac1
pcm5: <HDA ATI R6xx HDMI PCM #0 HDMI> at cad 0 nid 1 on hdac2
Revision
3364 -
Directory Listing
-
[select for diffs]
Modified
Sat Mar 13 19:15:51 2010 UTC
(14 years, 3 months ago)
by
laffer1
Diff to
previous 3355
,
to
selected 10146
Update our cpu types and include a list of vendors of CPUs. This will be used with identcpu and kernel modules later to "detect" cpu vendors to enable/disable features.
Revision
3310 -
Directory Listing
-
[select for diffs]
Modified
Fri Mar 5 04:50:31 2010 UTC
(14 years, 3 months ago)
by
laffer1
Diff to
previous 3309
,
to
selected 10146
If we are unable to obtain a frequency list from either ACPI or the
static tables, then attempt to build a simple list containing just the high
and low frequencies if the hw.est.msr_info tunable is set to 1. By default
this is disabled.
Obtained from FreeBSD
Revision
3307 -
Directory Listing
-
[select for diffs]
Modified
Fri Mar 5 04:36:59 2010 UTC
(14 years, 3 months ago)
by
laffer1
Diff to
previous 3306
,
to
selected 10146
1.13: Use correct bitmask for checking CPU identities.
1.16: Add XXX comment about the table in general.
Increase time we wait for things to settle to 1 millisecond,
10 microseconds is too short.
Revision
3301 -
Directory Listing
-
[select for diffs]
Modified
Fri Mar 5 03:48:39 2010 UTC
(14 years, 3 months ago)
by
laffer1
Diff to
previous 3300
,
to
selected 10146
Probe CPUs after the PCI hierarchy on i386 and amd64. This allows
the cpufreq drivers to reliably use properties of PCI devices for quirks,
etc.
- For the legacy drivers, add CPU devices via an identify routine in the
CPU driver itself rather than in the legacy driver's attach routine.
- Add CPU devices after Host-PCI bridges in the acpi bus driver.
- Change the ichss(4) driver to use pci_find_bsf() to locate the ICH and
check its device ID rather than having a bogus PCI attachment that only
checked for the ID in probe and always failed. As a side effect, you
can now kldload ichss after boot.
- Fix the ichss(4) driver to use the correct device_t for the ICH (and not
for ichss0) when doing PCI config space operations to enable SpeedStep.
Revision
3277 -
Directory Listing
-
[select for diffs]
Modified
Sat Feb 6 06:49:38 2010 UTC
(14 years, 4 months ago)
by
laffer1
Diff to
previous 3240
,
to
selected 10146
Sync re(4) and rl(4) with FreeBSD 7-Stable from a few months ago.
The big difference here is that wake on lan support has been disabled since we don't support it.
re(4) has been tested on a pciE nic, testing pci will happen shortly and we need more testing on other parts including rl(4)s.
This adds several newer cards, plus a few old ones we missed.
Revision
3239 -
Directory Listing
-
[select for diffs]
Modified
Sun Jan 10 21:55:09 2010 UTC
(14 years, 5 months ago)
by
laffer1
Diff to
previous 3232
,
to
selected 10146
Enable options P1003_1B_SEMAPHORES # POSIX-style semaphores
This option is required by many modern applications including Firefox 3.5. We also need this to support libdispatch!
Enable on all three architectures.
Revision
3221 -
Directory Listing
-
[select for diffs]
Modified
Thu Jan 7 00:32:39 2010 UTC
(14 years, 5 months ago)
by
laffer1
Diff to
previous 3220
,
to
selected 10146
ZFS is a file-system originally developed by Sun Microsystems.
The ZFS Intent Log ("ZIL") is a mechanism that gathers together in memory
transactions of writes, and is flushed onto disk when synchronous
semantics is necessary. In the event of crash or power failure, the
log is examined and the uncommitted transaction would be replayed to
maintain the synchronous semantics.
When replaying setattr transaction, the replay code would set the
attributes with certain insecure defaults, when the logged
transaction did not touch these attributes.
A system crash or power fail would leave some file with mode set
to 07777. This could leak sensitive information or cause privilege
escalation.
Based on FreeBSD security advisory SA-10:03.zfs (freebsd 7.x)
Revision
3207 -
Directory Listing
-
[select for diffs]
Modified
Sun Dec 13 01:09:44 2009 UTC
(14 years, 6 months ago)
by
laffer1
Diff to
previous 3206
,
to
selected 10146
Add the fdclone KPI. fdclone was originally developed for FreeBSD7-CURRENT by Kostik Belousov and Peter Holm.
This was developed to allow drivers to clone on open(2). The cloned cdev is
not accessible for lookup through devfs and is destroyed automatically.
The implementation is based on version 9 of Kostik's patch. I've also included
a sample program in share/examples/kld/fdclone on use.
$MidnightBSD$ tagged in share/examples/kld
Revision
3199 -
Directory Listing
-
[select for diffs]
Modified
Sat Nov 28 22:44:36 2009 UTC
(14 years, 6 months ago)
by
laffer1
Diff to
previous 3185
,
to
selected 10146
Import OpenBSD's sysctl sensors framework. This is based on work by Constantine A. Murenin for the 2007 Google summer of code for FreeBSD.
Includes:
sample config file for sensord
rc scripts
documentation fixes and updates
sys/kern/kern_sensors.c
sys/sensors.h
This is compatible with OpenBSD 4.1 and 4.2 in terms of the userland bits.
Revision
3158 -
Directory Listing
-
[select for diffs]
Modified
Thu Nov 19 01:34:17 2009 UTC
(14 years, 6 months ago)
by
laffer1
Diff to
previous 3156
,
to
selected 10146
Experimental patch to get the nic to stop re-initializing so much on boot. This is caused when DHCP occurs for instance and causes problems with sendmail and other services on startup.
This requires extensive testing on re hardware
Revision
3156 -
Directory Listing
-
[select for diffs]
Modified
Sat Nov 7 01:41:53 2009 UTC
(14 years, 7 months ago)
by
laffer1
Diff to
previous 3128
,
to
selected 10146
soreceive() will send an ACK right away if data was drained from a TCP socket that advertized a 0 sized window. However, the receive window had to be exactly zero. Change the code to check the raw window value instead.
Revision
2996 -
Directory Listing
-
[select for diffs]
Modified
Sat Jun 6 03:50:38 2009 UTC
(15 years ago)
by
laffer1
Diff to
previous 2995
,
to
selected 10146
Add a workaround for the CYPRESS USB PATA chipset used for many usb drive enclosures (including the one on my desk). This fixes the SYNCHRONIZE CACHE errors people get with this device. I've noticed it under testing with ZFS.
Revision
2903 -
Directory Listing
-
[select for diffs]
Modified
Wed May 20 16:34:47 2009 UTC
(15 years ago)
by
laffer1
Diff to
previous 2902
,
to
selected 10146
Overhaul re(4).
o Increased number of Rx/Tx descriptors to 256 for 8169 GigEs
because it's hard to push the hardware to the limit with default
64 descriptors.
TSO requires large number of Tx descriptors to pass a full sized
TCP segment(65535 bytes IP packet) to hardware. Previously it
consumed 32 Tx descriptors, assuming MCLBYTES DMA segment size,
to send the TCP segment which means re(4) couldn't queue more
than two full sized IP packets.
For 8139C+ it still uses 64 Rx/Tx descriptors due to its hardware
limitations. With this changes there are (very) small waste of
memory for 8139C+ users but I don't think it would affect 8139C+
users for most cases.
o Various bus_dma(9) fixes.
- The hardware supports DAC so allow 64bit DMA operations.
- Removed BUS_DMA_ALLOC_NOW flag.
- Increased DMA segment size to 4096 from MCLBYTES because TSO
consumes too many descriptors with MCLBYTES DMA segment size.
- Tx/Rx side bus_dmamap_load_mbuf_sg(9) support. With these
changes the code is more readable than previous one and got a
(slightly) better performance as it doesn't need to pass/
decode arguments to/from callback function.
- Removed unnecessary callback function re_dmamap_desc() and
nuked rl_dmaload_arg structure which was used in the callback.
- Additional protection for DMA map load failure. In case of
failure reuse current map instead of returning a bogus DMA
map.
- Deferred DMA map unloading/sync operation for maximum
performance until we really need to load new DMA map. If we
happen to reuse current map(e.g. input error) there is no need
to sync/unload/load again.
- The number of allowable Tx DMA segments for a mbuf chains are
now 32 instead of magic nseg value. If the number of available
Tx descriptors are short enough to send highly fragmented mbuf
chains an optimized re_defrag() is called to collapse mbuf
chains which is supposed to be much faster than m_defrag(9).
re_defrag() was borrowed from ath(4).
- Separated Rx/Tx DMA tag from a common DMA tag such that Rx DMA
tag correctly uses DMA maps that were created with DMA alignment
restriction(8bytes alignments). Tx DMA tag does not have such
alignment limitation.
- Added additional sanity checks for DMA ring map load failure.
- Added additional spare Rx DMA map for graceful handling of Rx
DMA map load failure.
- Fixed misused bus_dmamap_sync(9) and added missing
bus_dmamap_sync(9) in re_encap()/re_txeof()/re_rxeof().
o Enabled TSO again as re(4) have reasonable number of Tx
descriptors.
o Don't touch DMA address of a Tx descriptor in re_txeof(). It's
not needed.
o Fix incorrect update of if_ierrors counter. For Rx buffer
shortage it should update if_qdrops as the buffer is reused.
o Added checks for unsupported H/W revisions and return ENXIO for
these hardwares. This is required to remove resource allocation
code in re_probe as other drivers do in device probe routine.
o Modified descriptor index manipulation macros as it's now possible
to have different number of descriptors for Rx/Tx.
o In re_start, to save a lock operation, use IFQ_DRV_IS_EMPTY before
trying to invoke IFQ_DRV_DEQUEUE. Also don't blindly call re_encap
since we already know the number of available Tx descriptors in
advance.
o Removed RL_TX_DESC_THLD which was used to reserve RL_TX_DESC_THLD
descriptors in Tx path. There is no such a limitation mentioned in
8139C+/8169/8110/8168/8101/8111 datasheet and it seems to work ok
without reserving RL_TX_DESC_THLD descriptors.
o Fix a comment for RL_GTXSTART. The register is 8bits register.
o Added comments for 8169/8139C+ hardware restrictions on descriptors.
o Removed forward declaration for "struct rl_softc", it's not needed.
o Added a new structure rl_txdesc for Tx descriptor managements and
a structure rl_rxdesc for Rx descriptor managements.
o Removed unused member variable rl_intlock in driver softc. There are
still several unused member variables which are supposed to be used
to access hardware statistics counters. But it seems that accessing
hardware counters were not implemented yet.
Obtained from: FreeBSD , RELENG_7 if_re.c 1.101, if_re.c 1.102, if_rlreg.h 1.70
Revision
2901 -
Directory Listing
-
[select for diffs]
Modified
Wed May 20 16:25:39 2009 UTC
(15 years ago)
by
laffer1
Diff to
previous 2899
,
to
selected 10146
By definition promiscuous mode should see all unicast frames as well
as multicast/broadcast frames. Previously re(4) ignored multicast
frames in promiscuous mode. The RTL8169 datasheet was not clear
how it handles multicast frames in promiscuous mode.
Obtained from: FreeBSD
Revision
2886 -
Directory Listing
-
[select for diffs]
Modified
Sat May 16 18:38:51 2009 UTC
(15 years ago)
by
laffer1
Diff to
previous 2885
,
to
selected 10146
add CPUID bits to ident phenom processor
There are several new CPUIDs to recognize AMD Extended Features, ECX 07FFh for Phenom processor.
According to [1], they are:
Bit 0: LAHF/SAHF
Bit 1: CMP
Bit 2: SVM (Secure Virtual Mode)
Bit 3: APIC
Bit 4: MOV CR8
*Bit 5: Advanced Bit Manipulation (LZCNT)
*Bit 6: SSE4A (EXTRQ, INSERTQ, MOVNTSS, MOVNTSD)
*Bit 7: Misalign SSE
Bit 8: 3DNow! (PREFETCH и PREFTECHW)
*Bit 9: OS Visible Workaround
*Bit 10: Instruction Based Sampling
* - missing bits in amd64/identcpu.c
[1]http://www.amd.com/us-en/assets/content_type/white_papers_and_tech_docs/31116.pdf
Based on patch by pluknet for FreeBSD
Revision
2824 -
Directory Listing
-
[select for diffs]
Modified
Wed Apr 15 19:22:31 2009 UTC
(15 years, 1 month ago)
by
laffer1
Diff to
previous 2738
,
to
selected 10146
Correct the following defect in PF, originally reported to OpenBSD and later in our #midnightbsd chatroom:
Author : Rembrandt
Date : 2009-04-09
Affected Software: OpenBSD Kernel
Affected OS : OpenBSD 4.{3,4,5}, OpenBSD-current
Propably older versions are affected as well
Type : Denial of Service
OSVDB :
Milw0rm : 8406
CVE :
ISS X-Force: :
BID : 34482
Secunia : 34676
VUPEN ID :
Trying to fix it responsible and get in contact with the vendor:
-- OpenBSD --
Contacted 2009-04-09 15:35 GMT+1
Patch avaiable 2009-04-11 23:43 UTC
We received no response nor a notification about an upcoming patch by
the developers.
-- END --
OpenBSDs PF firewall in OpenBSD 4.3 up to OpenBSD-current is prone to a
remote Denial of Service during a null pointer dereference in relation with
special crafted IP datagrams. If the firewall handles such a packet the kernel
panics.
Steps to reproduce:
If you are behind a OpenBSD firewall this nmap scan should trigger the problem
and crash your firewall device:
nmap -sO $some_host_so_that_the_firewall_handles_the_packets
For more informations please do read the patch issued by OpenBSD.
Patches and Workaround:
Patches are provided for OpenBSD 4.3, 4.4, 4.5 (upcoming, release 1st of may)
and OpenBSD-current (via CVS only) and are avaiable at the errata website.
The developers provide hints for a workaround at their errata website too.
Kind regards,
Rembrandt
Revision
2736 -
Directory Listing
-
[select for diffs]
Modified
Sat Apr 4 15:15:07 2009 UTC
(15 years, 2 months ago)
by
laffer1
Diff to
previous 2728
,
to
selected 10146
Enable support for the Microsoft Hyper-V virtual machine system in Windows 2008 server, etc.
You may still need to set the media type for dhcp clients, but at least the system can now shutdown properly.
Revision
2698 -
Directory Listing
-
[select for diffs]
Modified
Sun Mar 29 03:00:26 2009 UTC
(15 years, 2 months ago)
by
laffer1
Diff to
previous 2656
,
to
selected 10146
Temporarily disable ahd, adaptec 79xx driver from lint testing until we get it working again. Currently it's a compile error and we need to test other parts of the system
Revision
2597 -
Directory Listing
-
[select for diffs]
Modified
Sun Mar 1 19:21:37 2009 UTC
(15 years, 3 months ago)
by
laffer1
Diff to
previous 2596
,
to
selected 10146
o Add stub support for some new futex operations,
so the annoying message is not printed.
o Don't warn about FUTEX_FD not being implemented
and return ENOSYS instead of 0 (eg. success).
o Clear FUTEX_PRIVATE_FLAG as we actually implement
only private futexes so there is no reason to
return ENOSYS when app asks for a private futex.
We don't reject shared futexes because they worked
just fine with our implementation so far.
Obtained from freebsd, rdivacky
Revision
2586 -
Directory Listing
-
[select for diffs]
Modified
Tue Jan 20 20:10:04 2009 UTC
(15 years, 4 months ago)
by
laffer1
Diff to
previous 2585
,
to
selected 10146
sc->ndis_txidx should be cycle between 0 and sc->ndis_maxpkts, not
NDIS_TXPKTS and don't allocate unused extra spaces for sc->ndis_txarray
and sc->ndis_txpool.
Revision
2585 -
Directory Listing
-
[select for diffs]
Modified
Tue Jan 20 19:53:10 2009 UTC
(15 years, 4 months ago)
by
laffer1
Diff to
previous 2584
,
to
selected 10146
This fix was found in freebsd pr 124225
Description:
Normally, when packets are queued to the ndis network interface, ndis_start()
is called to move packets from the interface send queue to the underlying
NDIS driver.
If the network link is down or the underlying driver is busy transmitting data,
ndis_start() just returns.
When the link goes up, ndis_starttask() is supposed to be called after
ndis_ticktask() in order to transmit already queued packets.
After a watchdog timeout, ndis_starttask() is likewise supposed to be called
after ndis_resettask().
Unfortunately, work items used for triggering calls to ndis_ticktask(),
ndis_starttask() and ndis_resettask() are placed on separarate task lists which
are handled by separate kernel processes, thus losing ordering information
about when the tasks should be performed in relation to each other.
If the interface send queue is full after a watchdog timeout or link up event
and the tasks were handled in the wrong order then further attempts to send
packets via the interface results in ENOBUFS ("No buffer space available").
How-To-Repeat:
Use the ndis driver for a wireless network card in an area with many APs on
nearby channels and on a machine with many active tcp connections, causing link
to temporarily go down every few hours, and the interface send queue to be
filled while the link is temporarily down.
Fix:
A proper fix is to ensure that related tasks are handled in the correct order.
The following kludge justs add extra attempts at scheduling calls to
ndis_starttask() as part of the processing of ndis_ticktask() and
ndis_resettask(). It depends on defensive coding in IoQueueWorkItem(),
i.e. that nothing is done if the work item is already queued.
Revision
2583 -
Directory Listing
-
[select for diffs]
Modified
Tue Jan 20 19:40:53 2009 UTC
(15 years, 4 months ago)
by
laffer1
Diff to
previous 2582
,
to
selected 10146
Fix a problem with broadcom and marvell wifi using ndis. Scan results are not stored properly as some do not give a desired buffer length. Make a default. This fixes problems with some macbooks too
Revision
2564 -
Directory Listing
-
[select for diffs]
Modified
Mon Jan 19 22:02:25 2009 UTC
(15 years, 4 months ago)
by
laffer1
Diff to
previous 2563
,
to
selected 10146
Add bwi to MidnightBSD. bwi is a very limited broadcom wireless nic adapter from DragonFly, NetBSD, and OpenBSD. This is not connected to the build and requires a firmware which is hard to come by.
Revision
2391 -
Directory Listing
-
[select for diffs]
Modified
Sun Dec 7 03:28:31 2008 UTC
(15 years, 6 months ago)
by
laffer1
Diff to
previous 2390
,
to
selected 10146
Remove 3c501 isa based 3com nic. This is quite old and not entirely in line with the current development. I don't even have a system with an ISA slot to test one in if i had one. Also remove pcf which is replaced with i2c
Revision
2273 -
Directory Listing
-
[select for diffs]
Modified
Mon Dec 1 23:46:38 2008 UTC
(15 years, 6 months ago)
by
laffer1
Diff to
previous 2272
,
to
selected 10146
Make additional modifications to ata-chipset to syncronize with changes elsewhere in ata. Temporarily back out the sata + cd patch we were using (for the most part) to see how stable this is without it.
Revision
1806 -
Directory Listing
-
[select for diffs]
Modified
Thu Sep 4 02:55:23 2008 UTC
(15 years, 9 months ago)
by
laffer1
Diff to
previous 1804
,
to
selected 10146
Improve reliability of nforce4 adapters:
- When setting up a packet for transmit, if we the tx ring is over half
full, kick the binary blob to force it to complete any pending tx
completions.
- In the watchdog routine, poke the binary blob to force it to flush any
pending tx completions and only reset the chip if the blob doesn't
complete any of them.
Altqify nve(4).
Obtained from FreeBSD.
Revision
1719 -
Directory Listing
-
[select for diffs]
Modified
Tue Jul 1 07:45:59 2008 UTC
(15 years, 11 months ago)
by
laffer1
Diff to
previous 1718
,
to
selected 10146
Add additional intel, nvidia, and amd parts. The intel device using 0x28508086 is an ICH8 mobile ultra ata controller, but I'm not sure what identifier to use with it. It is a santa rosa 2850 controller. Some of these ids are from FreeBSD 6.3 (Soren and other contributors).
Revision
1683 -
Directory Listing
-
[select for diffs]
Modified
Sat Jun 28 18:24:33 2008 UTC
(15 years, 11 months ago)
by
laffer1
Diff to
previous 1677
,
to
selected 10146
Increase timeout from 5 to 10 seconds. This is an arbritrary value and found to be too short on SATA disks for certain operations. (moving bad blocks for instance)
This might also help with write errors in virtual machines.
Revision
1675 -
Directory Listing
-
[select for diffs]
Modified
Fri Jun 27 16:28:38 2008 UTC
(15 years, 11 months ago)
by
laffer1
Diff to
previous 1674
,
to
selected 10146
Move AHC and AHD options so they are near the drivers.
Enable firmware(9).
Enable WEP and WPA in kernel.
Fix whitespace problem. For options entries use space and tab not double tab.
Revision
1662 -
Directory Listing
-
[select for diffs]
Modified
Wed Jun 25 20:17:31 2008 UTC
(15 years, 11 months ago)
by
laffer1
Diff to
previous 1657
,
to
selected 10146
Add cpufreq(4) and GEOM_LABEL aka GLABEL to GENERIC on i386 and amd64.
cpufreq works with powerd which is already enabled on systems without ACPI support for CPU frequency using several chipsets (intel). This may cause problems for some people which might require an install option for powerd. This needs testing.
glabel allows one to name disks and reference them in dev by that name instead of their normal designation like acd0 or ad0s2d. By adding this to generic, we can easily make a live cd that works on more types of CDROMs. FreeBSD is also moving in this direction for other reasons.
Until the latter can be tested on sparc64, I'll keep it out of generic. We don't support sun style labels right now anyway.
Revision
1614 -
Directory Listing
-
[select for diffs]
Modified
Sat May 17 18:03:08 2008 UTC
(16 years ago)
by
laffer1
Diff to
previous 1613
,
to
selected 10146
In ip_ctloutput(), check for a NULL inpcb pointer before dereferencing,
as this can occur with TCP if protocol-layer socket options are set or
queried after the connection has closed. There are still races
associated with ip_ctloutput() and connection close with TCP, corrected
in HEAD via a more comprehensive set of changes, but this fixes the
trivial panic reported on several occasions.
Obtained from: FreeBSD
Revision
1606 -
Directory Listing
-
[select for diffs]
Modified
Sat May 17 05:36:05 2008 UTC
(16 years ago)
by
laffer1
Diff to
previous 1605
,
to
selected 10146
Syncronize the cpu detection code on i386 and amd64 with FreeBSD 6.2.
Add better SMP detection including multicore cpus. Detect features on newer processors and initialize them properly. Add support for some newer via c7 cpus.
Also make a subtle adjustment to tcp_syncache.c (unrelated)
Revision
1604 -
Directory Listing
-
[select for diffs]
Modified
Sat May 17 04:45:52 2008 UTC
(16 years ago)
by
laffer1
Diff to
previous 1603
,
to
selected 10146
$MidnightBSD$
Add some k8 errata hacks to powernow.
smist:
Use bus_dma to get a page in the first 4 GB. Since the physical address
of the magic string is passed in a 32-bit register, we can't use high
memory in the PAE case. This also eliminates a use of vtophys().
Obtained from: FreeBSD.
Revision
1599 -
Directory Listing
-
[select for diffs]
Modified
Fri May 16 23:38:38 2008 UTC
(16 years ago)
by
laffer1
Diff to
previous 1597
,
to
selected 10146
Pick the smallest possible TCP window scaling factor that will still allow us ot scale up to sb_max aka
kern.ipc.maxsockbuf.
Anything larger will cause window scaling corruption on some firewalls. (other end will think unscaled)
Obtained from: FreeBSD revision 1.131
Revision
1419 -
Directory Listing
-
[select for diffs]
Modified
Mon Mar 17 00:02:17 2008 UTC
(16 years, 2 months ago)
by
laffer1
Diff to
previous 1413
,
to
selected 10146
Fix spurious warnings from neighbor discovery when working with IPv6 over
point to point tunnels (gif).
This crops up when using one of the many IPV6 tunnel brokers, etc. with MidnightBSD.
Obtained from FreeBSD.
Revision
1372 -
Directory Listing
-
[select for diffs]
Modified
Mon Jan 21 20:21:07 2008 UTC
(16 years, 4 months ago)
by
laffer1
Diff to
previous 1362
,
to
selected 10146
Add virtual machine detection in the loader. For QEMU, VBOX, VMware, or Parallels, set the hz setting to 100. This will fix "time" issues automatically in these environments.
Revision
1347 -
Directory Listing
-
[select for diffs]
Modified
Sun Nov 25 18:05:17 2007 UTC
(16 years, 6 months ago)
by
laffer1
Diff to
previous 1346
,
to
selected 10146
Fix from FreeBSD:
The kernel uses two ways to write data on a pipe:
o buffered write, for chunks smaller than PIPE_MINDIRECT bytes
o direct write, for everything else
A call to writev(2) may receive struct iov of various size and the
kernel may have to switch from one solution to the other. Before doing
this, it must wake reader processes and any select/poll/kqueue up.
This commit fixes a bug where select/poll/kqueue are not triggered
when switching from buffered write to direct write. It adds calls to
pipeselwakeup().
Revision
1133 -
Directory Listing
-
[select for diffs]
Modified
Thu Aug 2 08:33:00 2007 UTC
(16 years, 10 months ago)
by
laffer1
Diff to
previous 1123
,
to
selected 10146
Fix interaction with Windows 2000/XP servers. If a newly created directory has exactly 50 entries, an error is generated as smbfs grabs 52 items at a time. With . and .. this is 52. It then returns on the second trip and causes some apps like rsync to generate errors.
Revision
1101 -
Directory Listing
-
[select for diffs]
Modified
Thu Jul 26 17:08:59 2007 UTC
(16 years, 10 months ago)
by
laffer1
Diff to
previous 1100
,
to
selected 10146
Intel/IBM Blades do not have keyboard devices and will hang. Avoid the hang with a timeout.
Apple intel-based Macs do not have a keyboard controller. Provide a timeout for these devices.
Revision
1065 -
Directory Listing
-
[select for diffs]
Modified
Sun Jul 22 07:57:59 2007 UTC
(16 years, 10 months ago)
by
laffer1
Diff to
previous 1032
,
to
selected 10146
MidnightBSD has had a behavior where incoming packets were dropped if the MRU > MTU. If you had a device misconfigured on your network, for instance with jumbo frames, the network stack would drop packets. This is not a desired behavior in most cases.
However, some people like to experiment with the existing behavior or have other reasons such as detecting misconfigured devices. We now have a new sysctl net.link.ether.MTUisMRU which allows you to tune this behavior. 0 is the default and implies the stack will take all incoming packets that it can handle whereas 1 reverts to the old behavior.
This patch was inspired by work from Julian Elischer @ freebsd-net
Revision
992 -
Directory Listing
-
[select for diffs]
Modified
Thu May 3 05:41:47 2007 UTC
(17 years, 1 month ago)
by
laffer1
Diff to
previous 987
,
to
selected 10146
UDP checksums are checked in place, overwriting whatever is there. This has the side effect of the ICMP code sending back the first eight bytes of the UDP payload with 2 bytes different.
Patch by Matthew Luckie.
Revision
983 -
Directory Listing
-
[select for diffs]
Modified
Fri Apr 27 20:29:07 2007 UTC
(17 years, 1 month ago)
by
laffer1
Diff to
previous 981
,
to
selected 10146
This is equivalent to the recent OpenBSD discover of type 0 routing headers as insecure. There is now a sysctl to enable the behavior. Currently, this is not needed unless the host is acting as a router. In which case, ideally there should be firewall rules in place to protect the host. ipfw and pf do not offer solutions to protect systems entirely yet.
This patch is derived from the FreeBSD SA-07:03.ipv6 patch.
Revision
886 -
Directory Listing
-
[select for diffs]
Modified
Mon Apr 2 00:48:03 2007 UTC
(17 years, 2 months ago)
by
archite
Diff to
previous 882
,
to
selected 10146
Importing propolice into MidnightBSD. Propolice is going to
provide us with much greater security and stability in the
long run. If upgrading from a pre-propolice system, please
follow the these instructions:
cd /usr/src/lib/libc && make obj && make && make install
cd /usr/src/gnu/usr.bin/cc && make obj && make && make install
buildworld and kernel
It is adviced that any mports which were installed and/or built
prior to the propolice update also be updated. If any errors
or issue are encounted, please contact security@midnightbsd.org
and we will be sure to investigate and come up with an expeditious
fix.
Revision
882 -
Directory Listing
-
[select for diffs]
Modified
Thu Mar 29 23:02:48 2007 UTC
(17 years, 2 months ago)
by
laffer1
Diff to
previous 881
,
to
selected 10146
Increase LOMTU to 32768. The previous value was set in 1995. NetBSD has been using around 32k since the BSD 4.4 lite import.
My testing has shown 32768 is faster on some workloads. There is a very slight drop transfer large, cached data but uncached data showed a noticable improvement.
Revision
881 -
Directory Listing
-
[select for diffs]
Modified
Thu Mar 29 22:44:53 2007 UTC
(17 years, 2 months ago)
by
laffer1
Diff to
previous 863
,
to
selected 10146
Remove WARNS from cpufreq Makefile. kernel source Makefiles should not use WANRS as it conflicts with kernel build options.
Add additional Pentium M cpus.
Revision
800 -
Directory Listing
-
[select for diffs]
Modified
Mon Mar 12 21:17:04 2007 UTC
(17 years, 3 months ago)
by
laffer1
Diff to
previous 799
,
to
selected 10146
Fill in the correct rtm_index for RTM_ADD and RTM_CHANGE messages.
Allow RTM_CHANGE to change a number of route flags as specified by RTF_FMASK.
The unusued rtm_use filed in struct rt_Msghdr is redesignated as rtm_fmask field to communicate route flag changes in RTM_CHANGE messages from userland. The use count of a route was moved to rtm_rmx some time ago.
Revision
796 -
Directory Listing
-
[select for diffs]
Modified
Mon Mar 12 20:59:27 2007 UTC
(17 years, 3 months ago)
by
laffer1
Diff to
previous 795
,
to
selected 10146
Sound overhaul.
Fix 8bit int overflows during channel creation and destruction on vchans.
Enforce channel/chardev numbering within 8bit boundary.
Traverse d-channels SLIT and try to reclaim free counter during channel creation.
Determine open direction using 'flags', not mode.
Don't allow opening the same device twice. (WTF?)
O_RDWR is allowed, provided that it is done by a single open and the hardware supports full duplex.
Fix pcm_unregister memory leak.
Optimize channel allocation and numbering.
Mega vchan create/destroy cleanup.
Obtained from FreeBSD
Revision
789 -
Directory Listing
-
[select for diffs]
Modified
Mon Mar 12 20:28:30 2007 UTC
(17 years, 3 months ago)
by
laffer1
Diff to
previous 788
,
to
selected 10146
If the buffer lock has waiters after the bufer has changed identity then getnewbuf() needs to drop the buffer in order to wake waiters that might sleep on the buffer in the context of the old identity.
Obtained from FreeBSD (tegge) 1.491.2.8
Revision
764 -
Directory Listing
-
[select for diffs]
Modified
Thu Mar 8 17:11:18 2007 UTC
(17 years, 3 months ago)
by
laffer1
Diff to
previous 761
,
to
selected 10146
If an NFS server returns more than a few EJUKEBOX errors for a given RPC request, the NFS client will back off for a very long wait (days, weeks) before retrying.
Change behavior to match solaris. There is a new sysctl nfs3_jukebox_delay which is in seconds to adjust the retry default.
Revision
743 -
Directory Listing
-
[select for diffs]
Modified
Mon Feb 19 21:30:39 2007 UTC
(17 years, 3 months ago)
by
laffer1
Diff to
previous 742
,
to
selected 10146
This is a patch from Andrew Turner to allow partial booting on EFIKA. It includes ofwread.S from NetBSD. It uses the real-mode ofw interface from NetBSD and TLB exception handlers from FreeBSD's perforce //depot/user/jaras.
The ofwr_init call is not enabled by default as it breaks Macs. If the ifdef FIRMWORKSBUGS is commented out, EFIKA will work until it hits the scheduler.
Revision
729 -
Directory Listing
-
[select for diffs]
Modified
Wed Feb 7 15:50:03 2007 UTC
(17 years, 4 months ago)
by
laffer1
Diff to
previous 712
,
to
selected 10146
TCP Auto sizing of socket buffers improves throughput on high latency links. Several new sysctls were added to control the buffers max size, etc.
Additional work is needed, but under initial testing this is working great. You must rebulid world in order for netstat to work correctly.
A few changes were made to netstat, but do not change functionality in any significant way.
Revision
712 -
Directory Listing
-
[select for diffs]
Modified
Sun Jan 28 18:22:15 2007 UTC
(17 years, 4 months ago)
by
laffer1
Diff to
previous 706
,
to
selected 10146
Add additonal PATA controllers found on newer motherboards.
This specifically fixes the INTEL DP965LT which I happen to be using. Many Intel motherboards use one of these chips.
Revision
696 -
Directory Listing
-
[select for diffs]
Modified
Fri Jan 19 03:23:17 2007 UTC
(17 years, 4 months ago)
by
laffer1
Diff to
previous 693
,
to
selected 10146
Fix up IPXIP so that the network stack is run with Giant. There is unsafety in the code that requires this change for SMP systems to function properly.
Revision
689 -
Directory Listing
-
[select for diffs]
Modified
Fri Jan 19 02:33:24 2007 UTC
(17 years, 4 months ago)
by
laffer1
Diff to
previous 681
,
to
selected 10146
Clear the interupt source flags before processing the interupt events and turn off NIC interrupts while in the interrupt handler.
Relax the watchdog timer somewhat; don't enable it until the last packet is enqueued and if there is a TX interrupt but there are still outstanding ones reload the timer.
Revision
668 -
Directory Listing
-
[select for diffs]
Modified
Thu Jan 18 03:39:19 2007 UTC
(17 years, 4 months ago)
by
laffer1
Diff to
previous 667
,
to
selected 10146
When a process is de-configuring a log file, also stop all of its PMCs that require a log file to operate.
Only stop PMCs that are in the running state.
Revision
618 -
Directory Listing
-
[select for diffs]
Modified
Sat Jan 13 15:00:24 2007 UTC
(17 years, 5 months ago)
by
laffer1
Diff to
previous 617
,
to
selected 10146
Further refine the bridge hack in teh arp code. Only do the special arp handling for interfaces which are actually in the bridge group, ignore all others.
Revision
556 -
Directory Listing
-
[select for diffs]
Modified
Sun Jan 7 22:14:28 2007 UTC
(17 years, 5 months ago)
by
laffer1
Diff to
previous 555
,
to
selected 10146
Fix random popping while playing in 32bit by increasing the buffer size.
Fix severe crackling under repetative module load/unload.
Make sure DMA pointer is properly aligned to avoid trunication by caller.
Add ac97 inverted external amplifier quirk for Maxselect x710s. (russian)
Trim unnecessary pointer alignment.
Revision
550 -
Directory Listing
-
[select for diffs]
Modified
Sun Jan 7 04:40:58 2007 UTC
(17 years, 5 months ago)
by
laffer1
Diff to
previous 549
,
to
selected 10146
Have TCP Inflight disable itself if RTT is too low.
sysctl net.inet.tcp.inflight.rttthresh specifies the threshold in milliseconds below which it will disengage inflight. It defaults to 10ms.
Revision
534 -
Directory Listing
-
[select for diffs]
Modified
Sun Jan 7 03:50:23 2007 UTC
(17 years, 5 months ago)
by
laffer1
Diff to
previous 533
,
to
selected 10146
Apply some patches from FreeBSD 6.1 Release for cpu detection, ioctl fixes, etc.
Change i386 GENERIC kernel to include VESA and raster support so that end users can easily switch to 800x600 and other video modes in the console. While the kernel size is larger, it makes more sense on a desktop.
Revision
519 -
Directory Listing
-
[select for diffs]
Modified
Sat Jan 6 06:02:29 2007 UTC
(17 years, 5 months ago)
by
laffer1
Diff to
previous 516
,
to
selected 10146
Add a spinlock to handles cases where printf, etc are called simultaneously. This should fix console freezes in some circumstances.
This patch was based on a similar patch to FreeBSD stable, however, we do not use the new "enhanced" syscons code so it will require further testing. It works fine on a UNI box.
Revision
515 -
Directory Listing
-
[select for diffs]
Modified
Sat Jan 6 01:16:44 2007 UTC
(17 years, 5 months ago)
by
laffer1
Diff to
previous 514
,
to
selected 10146
Check the return code of sc_clean_up() in the only place missing. There is only one case where it can fail in wait_scrn_saver_stop(), but might as well check.
Revision
514 -
Directory Listing
-
[select for diffs]
Modified
Sat Jan 6 01:11:46 2007 UTC
(17 years, 5 months ago)
by
laffer1
Diff to
previous 465
,
to
selected 10146
Sometimes the vty switching has to be delayed; the vty to be switched is saved in sc->delayed_next_scr and toe actual switch happens later. It is possible to get into an endless loop when trying to switch to a closed vty.
To repeat:
boot single user
run kbdcontrol -b visual
quickly press alt + f2 twice.
Revision
454 -
Directory Listing
-
[select for diffs]
Modified
Sun Dec 31 21:10:52 2006 UTC
(17 years, 5 months ago)
by
laffer1
Diff to
previous 448
,
to
selected 10146
Just to clarify compatiblity, we've merged all changes between the import date of Feb 24 and the tcsh Feb 26 commit in FreeBSD. Bump the version number.
Revision
437 -
Directory Listing
-
[select for diffs]
Modified
Sun Dec 31 08:58:59 2006 UTC
(17 years, 5 months ago)
by
laffer1
Diff to
previous 436
,
to
selected 10146
Replace 4k mbuf clusters with PAGE_SIZE clusters. This should improve TCP/IP performance.
Also add new MidnightBSD_version which will someday replace osreldate etc.
Revision
374 -
Directory Listing
-
[select for diffs]
Modified
Wed Dec 27 04:51:23 2006 UTC
(17 years, 5 months ago)
by
laffer1
Diff to
previous 373
,
to
selected 10146
Look for BSD label at 512-byte offset, if not found on the very beginning of the second sector. This makes it compatible with labels created by disklabel(8) on non-512-byte-per-sector devices.
Import from FreeBSD.
Revision
373 -
Directory Listing
-
[select for diffs]
Modified
Wed Dec 27 04:48:57 2006 UTC
(17 years, 5 months ago)
by
laffer1
Diff to
previous 372
,
to
selected 10146
Delay an orphan event if provider has still in-flight I/O requests. GEOM classes can then detach safely from the provider when an orphan event is received. Fixes a 'detach with active requests' panic for gstripe/gconcat under load.
Imported/Obtained from FreeBSD.
Revision
371 -
Directory Listing
-
[select for diffs]
Modified
Wed Dec 27 04:45:12 2006 UTC
(17 years, 5 months ago)
by
laffer1
Diff to
previous 370
,
to
selected 10146
Add g_duplicate_bio() function which does the same thing as g_clone_bio() except it allocates new bio with a M_WAITOK flag.
sys/geom/geom.h
sys/geom/geom_io.c
Import from FreeBSD.
Revision
342 -
Directory Listing
-
[select for diffs]
Modified
Thu Dec 21 16:47:20 2006 UTC
(17 years, 5 months ago)
by
laffer1
Diff to
previous 341
,
to
selected 10146
Fix some race conditions in TTY code. tty and sessrele(), doenterpgrp(), leavepgrp(), pgdelete() and enterpgrp(). The tty code is still under giant lock, but the session/pgrp release code just used proctree_locks. P_CONTROLT isn't really fully locked too in enterpgrp().
Obtained from FreeBSD, mbr.
Revision
341 -
Directory Listing
-
[select for diffs]
Modified
Thu Dec 21 16:31:26 2006 UTC
(17 years, 5 months ago)
by
laffer1
Diff to
previous 340
,
to
selected 10146
Retest tp->t_session because Giant might have been temporarily dropped while waiting for proctree_lock, allowing for an intervening tty_close() that cleared tp_>t_session.
Obtained from FreeBSD,tegge.
Revision
340 -
Directory Listing
-
[select for diffs]
Modified
Thu Dec 21 16:22:39 2006 UTC
(17 years, 5 months ago)
by
laffer1
Diff to
previous 339
,
to
selected 10146
Consistently use if_printf() only in interface methods: if_start, if_ioctl, if_watchdog, etc or in functions that are used by these methods only. In all other cases, device_printf should be used.
This also fixes several panics when if_printf() is called before softc->ifp was initialized.
Revision
339 -
Directory Listing
-
[select for diffs]
Modified
Thu Dec 21 16:18:09 2006 UTC
(17 years, 5 months ago)
by
laffer1
Diff to
previous 337
,
to
selected 10146
IF_LLADDR does not necessarily return aligned memory addresses. Since accessing ID registers in rt181x9 needs 32bit register access and RL_IDR6/RL_IDR7 registers are reserved registers bzero() is needed before copying the ethernet address.
This fixes a bug in Sparc64
Obtained from FreeBSD, yongari.
Revision
321 -
Directory Listing
-
[select for diffs]
Modified
Mon Oct 30 18:51:07 2006 UTC
(17 years, 7 months ago)
by
laffer1
Diff to
previous 302
,
to
selected 10146
i915 attachment and running fixed.
i915 vblank support.
Radeon's new memory map support.
ATI PCI/PCIE GART fix.
r300 fixes
Hack to radeon module to shut up errors.
Obtained from FreeBSD stable
Revision
298 -
Directory Listing
-
[select for diffs]
Modified
Sat Oct 28 04:16:57 2006 UTC
(17 years, 7 months ago)
by
laffer1
Diff to
previous 297
,
to
selected 10146
Don't set CR0_NE and CR0_MP in npx_probe() as they are already set earlier in cpu_setregs().
If we know this CPU has a FPU via cpuid, just assume INT16 and make the dmesg quiet. This is true for all Pentium class processors and even some 486DX systems.
Revision
281 -
Directory Listing
-
[select for diffs]
Modified
Thu Oct 26 21:17:32 2006 UTC
(17 years, 7 months ago)
by
laffer1
Diff to
previous 280
,
to
selected 10146
Part 2 of our large ata update. Most of these changes come from FreeBSD 6-stable or 6.1 Release. We should be at least at 6.1 release levels with our support for devices with this commit.
Add support for the JMicron JMB361, 365 and 366 chips.
Make the ATAPI sense data accessible when using the ioctl interface.
Revision
267 -
Directory Listing
-
[select for diffs]
Modified
Fri Oct 13 23:15:50 2006 UTC
(17 years, 8 months ago)
by
laffer1
Diff to
previous 266
,
to
selected 10146
Only use the channel in the request given to ata_completed if
its still present.
Only look for ICRC and CORR errors on ATA devices not ATAPI.
Get rid of all the long long and mixint casting in printfs'.
On all our platforms intmax == int64_t so simply using %j to
print int64_ts' is safe all over, and doesn't pollute the code.
Update atapi-fd to support direct devices such as disks.
ATAUSB will need to hook inot the delayed boot identity to
have interrupts running, so externalize it.
Add USB modes.
Revision
266 -
Directory Listing
-
[select for diffs]
Modified
Fri Oct 13 20:43:48 2006 UTC
(17 years, 8 months ago)
by
laffer1
Diff to
previous 265
,
to
selected 10146
Keep the parent device (channel) around in ata_request so that we don't
panic on device removal or failure.
Clean up ata_fail_requests to prevent the queue mnging to fail.
Ensure ata_reinit does things in the right order to prevent panics.
Revision
244 -
Directory Listing
-
[select for diffs]
Modified
Tue Oct 10 15:23:51 2006 UTC
(17 years, 8 months ago)
by
laffer1
Diff to
previous 243
,
to
selected 10146
Fix bug in malloc_uninit():
Releasing items from the mt_zone can not be done by a simple uma_zfree() call since mt_zone is allocated with the UMA_ZONE_MALLOC flag. Use uma_zfree_arg instead and supply the slam.
This bug can cause panics in low memory conditions while unloading kernel modules containing MALLOC_DEFINE(...) statements.
This commit brings kern_malloc.c up to FreeBSD 6.1 release equivalency.
Revision
221 -
Directory Listing
-
[select for diffs]
Modified
Sun Oct 8 06:07:29 2006 UTC
(17 years, 8 months ago)
by
laffer1
Diff to
previous 220
,
to
selected 10146
When enabling A20 put upper limit on amount of time we wait for the keyboard controller to get ready (65K x ISA access time, visually around 1 second). If we have wait more than that amount it's likely that the hardware is a legacy-free system and doesn't have a keyboard controller and doesn't require enabling A20 at all.
This makes cdboot/pxeldr work on MacBook Pro systems with Boot Camp and some IBM Netvista systems such as the S40.
Revision
173 -
Directory Listing
-
[select for diffs]
Modified
Sun Sep 17 02:37:31 2006 UTC
(17 years, 8 months ago)
by
laffer1
Diff to
previous 162
,
to
selected 10146
Update from 6.0.5 to 6.1.4 Intel driver. This update adds support for one additional NIC and hopefully will fix some problems with the em found on some Dell gx260's negotiating below gigabit speeds!
Revision
162 -
Directory Listing
-
[select for diffs]
Modified
Wed Sep 6 14:57:43 2006 UTC
(17 years, 9 months ago)
by
laffer1
Diff to
previous 159
,
to
selected 10146
Work around a deadlock when ATA waits for the taskqueue to call back for completion and something else is holding the taskqueue waiting for ATA to return.
Fixes the "semaphore timeout !! DANGER Will Robinson !!" messages. This patch was obtained from FreeBSD ata-queue.c 1.50.2.3 (march 1 2006) and ata-all.h from the same time.
Revision
133 -
Directory Listing
-
[select for diffs]
Modified
Fri Aug 25 06:24:52 2006 UTC
(17 years, 9 months ago)
by
laffer1
Diff to
previous 132
,
to
selected 10146
ACPI patches for laptops and other changes related to the new sleep_queue / em driver commit.
if_media was updated to allow import of bce and some baudrate changes in vge.
Revision
131 -
Directory Listing
-
[select for diffs]
Modified
Fri Aug 25 06:20:58 2006 UTC
(17 years, 9 months ago)
by
laffer1
Diff to
previous 130
,
to
selected 10146
Patched ACPI problem in hwpcm which needs further testing. randomdev was updated along with it.
mii had a bug with recently driver patches as a function was missing to set the ifmedia_baudrate(). The function was added elsewhere.
Revision
120 -
Directory Listing
-
[select for diffs]
Modified
Thu Aug 24 05:35:39 2006 UTC
(17 years, 9 months ago)
by
laffer1
Diff to
previous 119
,
to
selected 10146
Intel gigabit network driver (em) updated to 6.05 with FreeBSD 6-stable enhancements. Commit required a sync to a new version of the sleep queue routines which also fixed a deadlock problem. An ACPI issue with some laptops has been noted and a fix will be forthcoming.
Revision
46 -
Directory Listing
-
[select for diffs]
Modified
Fri Aug 4 17:10:41 2006 UTC
(17 years, 10 months ago)
by
laffer1
Diff to
previous 45
,
to
selected 10146
FreeBSD-SA6:13 and 14 were patched. The nis software and amd athlon fpu handling fixed. Changes to echo and pfctl are needed to fix compile bugs with changes related to cvs tags and macros.