]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
12 years ago- The -h option was removed shortly after it was added
eadler [Sun, 25 Dec 2011 18:15:24 +0000 (18:15 +0000)]
- The -h option was removed shortly after it was added
- ZFS is now up to version 28
- sysinstall(8) is not supported in -CURRENT

Reviewed by: pgj
Approved by: jilles

12 years agoRestore __is_threaded in C++ mode. Some Google stuff needs it apparently.
theraven [Sun, 25 Dec 2011 16:03:54 +0000 (16:03 +0000)]
Restore __is_threaded in C++ mode.  Some Google stuff needs it apparently.

Reported by: swills
Approved by: dim (mentor)

12 years agoQuite the tinderbox for the holidays. Remove the assert[1].
bz [Sun, 25 Dec 2011 14:29:36 +0000 (14:29 +0000)]
Quite the tinderbox for the holidays.  Remove the assert[1].

Suggested by: jhibbits [1]
MFC after: 3 days

12 years agosh: Add some testcases for pasting $*/$@ directly to a literal.
jilles [Sun, 25 Dec 2011 13:24:48 +0000 (13:24 +0000)]
sh: Add some testcases for pasting $*/$@ directly to a literal.

This also passes on stable/8.

12 years ago- Initialize compact_flash_attribute_base_addr from bootinfo structure
gonzo [Sat, 24 Dec 2011 23:15:25 +0000 (23:15 +0000)]
- Initialize compact_flash_attribute_base_addr from bootinfo structure

12 years ago- Add fallthrough comment
eadler [Sat, 24 Dec 2011 22:37:27 +0000 (22:37 +0000)]
- Add fallthrough comment

Approved by: pluknet
Found with: Coverity Prevent(tm)
CID: 10125

12 years agoImplement hwpmc counting PMC support for PowerPC G4+ (MPC745x/MPC744x).
jhibbits [Sat, 24 Dec 2011 19:34:52 +0000 (19:34 +0000)]
Implement hwpmc counting PMC support for PowerPC G4+ (MPC745x/MPC744x).
Sampling is in progress.

Approved by: nwhitehorn (mentor)
MFC after: 9.0-RELEASE

12 years agoWhen building the kernel for amd64 with clang, don't attempt to use the
dim [Sat, 24 Dec 2011 19:01:31 +0000 (19:01 +0000)]
When building the kernel for amd64 with clang, don't attempt to use the
-frename-registers option, as it is not supported.  No change for builds
with gcc.

MFC after: 1 week

12 years agoMake another clang warning, -Wparentheses-equality, non-fatal during
dim [Sat, 24 Dec 2011 18:57:42 +0000 (18:57 +0000)]
Make another clang warning, -Wparentheses-equality, non-fatal during
kernel builds.  All the instances of this warning in our tree are
completely harmless, and many people seem to like adding extra
parentheses to make precedence clearer.

MFC after: 1 week

12 years agoFix a bug where TAILQ_FIRST(&V_ifnet) was accessed without holding the
jhb [Sat, 24 Dec 2011 18:11:54 +0000 (18:11 +0000)]
Fix a bug where TAILQ_FIRST(&V_ifnet) was accessed without holding the
proper lock.

Reviewed by: bz
MFC after: 1 week

12 years agoAmend r228781 by also disabling -Warray-bounds warnings for the asr
dim [Sat, 24 Dec 2011 17:54:58 +0000 (17:54 +0000)]
Amend r228781 by also disabling -Warray-bounds warnings for the asr
module.

MFC after: 1 week

12 years agoDiscard local array based on return values.
kevlo [Sat, 24 Dec 2011 15:49:52 +0000 (15:49 +0000)]
Discard local array based on return values.

Pointed out by: uqs
Found with: Coverity Prevent(tm)
CID: 10089

12 years ago...and actually install it.
theraven [Sat, 24 Dec 2011 15:31:06 +0000 (15:31 +0000)]
...and actually install it.

Approved by: dim (mentor)

12 years agoInitial implementation of stdatomic.h. Works (at least in the parts that were
theraven [Sat, 24 Dec 2011 15:17:01 +0000 (15:17 +0000)]
Initial implementation of stdatomic.h.  Works (at least in the parts that were
tested) with clang and gcc, and more efficiently with clang+a big out-of-tree
diff that I need to commit soon (once it's been tidied and reviewed a bit).

Large portions by: ed
Reviewed by: ed
Approved by: dim (mentor)

12 years agoSet WERROR= for the nve(4) module. This driver gives several warnings
dim [Sat, 24 Dec 2011 13:36:28 +0000 (13:36 +0000)]
Set WERROR= for the nve(4) module.  This driver gives several warnings
with clang, which will probably never be fixed, as it is unmaintained,
and superseded by nfe(4).

MFC after: 1 week

12 years agoMake another clang warning, -Wempty-body, non-fatal during kernel
dim [Sat, 24 Dec 2011 13:30:15 +0000 (13:30 +0000)]
Make another clang warning, -Wempty-body, non-fatal during kernel
builds.  All the instances of this warning in our tree are completely
harmless.  (Most of the empty bodies look to be used simply as reminder
for the developer to add something later.)

While here, assign to CWARNEXTRA with ?=, so it can be overridden
easily, if needed.

MFC after: 1 week

12 years agoSome GCC-compatibility definitions. Define clang's feature test pseudomacros
theraven [Sat, 24 Dec 2011 13:28:49 +0000 (13:28 +0000)]
Some GCC-compatibility definitions.  Define clang's feature test pseudomacros
to always evaluate to 0 if we are using a compiler that doesn't implement them.
This lets us use the macros easily in standard headers (e.g. stdatomic.h, which
should be the subject of my next commit).

Approved by: dim (mentor)

12 years agoUpdate a comment to reflect reality and explain why we're using the
marius [Sat, 24 Dec 2011 12:28:23 +0000 (12:28 +0000)]
Update a comment to reflect reality and explain why we're using the
medany code model.

12 years agoOn FreeBSD just use the MD5 implementation of libmd rather than that of
marius [Sat, 24 Dec 2011 12:16:38 +0000 (12:16 +0000)]
On FreeBSD just use the MD5 implementation of libmd rather than that of
libcrypto so we don't need to relinquish csup when world is built without
OpenSSL.

12 years agoIntroduce the sysclock_getsnapshot() and sysclock_snap2bintime() KPIs. The
lstewart [Sat, 24 Dec 2011 01:32:01 +0000 (01:32 +0000)]
Introduce the sysclock_getsnapshot() and sysclock_snap2bintime() KPIs. The
sysclock_getsnapshot() function allows the caller to obtain a snapshot of all
the system clock and timecounter state required to create time stamps at a later
point. The sysclock_snap2bintime() function converts a previously obtained
snapshot into a bintime time stamp according to the specified flags e.g. which
system clock, uptime vs absolute time, etc.

These KPIs enable useful functionality, including direct comparison of the
feedback and feed-forward system clocks and generation of multiple time stamps
with different formats from a single timecounter read.

Committed on behalf of Julien Ridoux and Darryl Veitch from the University of
Melbourne, Australia, as part of the FreeBSD Foundation funded "Feed-Forward
Clock Synchronization Algorithms" project.

For more information, see http://www.synclab.org/radclock/

In collaboration with: Julien Ridoux (jridoux at unimelb edu au)

12 years agoFix LINT-VIMAGE build after r228814: use virtualized pf_pool_limits.
pluknet [Sat, 24 Dec 2011 00:23:27 +0000 (00:23 +0000)]
Fix LINT-VIMAGE build after r228814: use virtualized pf_pool_limits.

12 years ago- Enable usbus on octusb
gonzo [Sat, 24 Dec 2011 00:22:21 +0000 (00:22 +0000)]
- Enable usbus on octusb

12 years ago- Set CF physical address base in sysinfo structure
gonzo [Fri, 23 Dec 2011 22:10:55 +0000 (22:10 +0000)]
- Set CF physical address base in sysinfo structure

12 years agoReport stripeoffset as zero not stripesize if physical block is zero
mav [Fri, 23 Dec 2011 20:59:13 +0000 (20:59 +0000)]
Report stripeoffset as zero not stripesize if physical block is zero
aligned, same as it is done for ATA.

12 years agoAdd post-VOP hooks for VOP_DELETEEXTATTR() and VOP_SETEXTATTR() and use
jhb [Fri, 23 Dec 2011 20:11:37 +0000 (20:11 +0000)]
Add post-VOP hooks for VOP_DELETEEXTATTR() and VOP_SETEXTATTR() and use
these to trigger a NOTE_ATTRIB EVFILT_VNODE kevent when the extended
attributes of a vnode are changed.

Note that OS X already implements this behavior.

Reviewed by: rwatson
MFC after: 2 weeks

12 years agoAddition to r228808:
mav [Fri, 23 Dec 2011 19:53:28 +0000 (19:53 +0000)]
Addition to r228808:
READ CD is a 12 byte command. So fill additional bytes and update CDB length
when patching READ(10).

MFC after: 1 month

12 years agoUse READ CAPACITY(16) to get information about device physical sectors.
mav [Fri, 23 Dec 2011 19:12:02 +0000 (19:12 +0000)]
Use READ CAPACITY(16) to get information about device physical sectors.
As soon as not all devices support READ CAPACITY(16), automatically fall
back to READ CAPACITY(10) if CAM_REQ_INVALID or SSD_KEY_ILLEGAL_REQUEST
status returned.

It also provides first bits of information about Logical Block Provisioning
(aka UNMAP/TRIM) support by the device.

12 years ago1. don't use if_pspare directly, but through a macro WMA()
luigi [Fri, 23 Dec 2011 16:03:57 +0000 (16:03 +0000)]
1. don't use if_pspare directly, but through a macro WMA()

2. move a variable declaration at the beginning of a block

12 years agowhitespace fixes (one missing newline, one extra tab)
luigi [Fri, 23 Dec 2011 16:02:14 +0000 (16:02 +0000)]
whitespace fixes (one missing newline, one extra tab)

12 years agoFix a problem whereby a corrupt DNS record can cause named to crash. [11:06]
cperciva [Fri, 23 Dec 2011 15:00:37 +0000 (15:00 +0000)]
Fix a problem whereby a corrupt DNS record can cause named to crash. [11:06]

Add an API for alerting internal libc routines to the presence of
"unsafe" paths post-chroot, and use it in ftpd. [11:07]

Fix a buffer overflow in telnetd. [11:08]

Make pam_ssh ignore unpassphrased keys unless the "nullok" option is
specified. [11:09]

Add sanity checking of service names in pam_start. [11:10]

Approved by:    so (cperciva)
Approved by:    re (bz)
Security:       FreeBSD-SA-11:06.bind
Security:       FreeBSD-SA-11:07.chroot
Security:       FreeBSD-SA-11:08.telnetd
Security:       FreeBSD-SA-11:09.pam_ssh
Security:       FreeBSD-SA-11:10.pam

12 years agoAmend r228822 by not directly adding to CWARNFLAGS, but to an optional
dim [Fri, 23 Dec 2011 13:50:33 +0000 (13:50 +0000)]
Amend r228822 by not directly adding to CWARNFLAGS, but to an optional
CWARNEXTRA variable, which gets included into the initial CWARNFLAGS
setting.  This makes it easier to override CWARNFLAGS with completely
custom settings (including enabling any disabled warnings).

Reminded by: arundel
MFC after: 1 week

12 years agoOptimize the common case of msyncing the whole file mapping with
kib [Fri, 23 Dec 2011 09:09:42 +0000 (09:09 +0000)]
Optimize the common case of msyncing the whole file mapping with
MS_SYNC flag. The system must guarantee that all writes are finished
before syscalls returned. Schedule the writes in async mode, which is
much faster and allows the clustering to occur. Wait for writes using
VOP_FSYNC(), since we are syncing the whole file mapping.

Potentially, the restriction to only apply the optimization can be
relaxed by not requiring that the mapping cover whole file, as it is
done by other OSes.

Reported and tested by:  az
Reviewed by: alc
MFC after:   2 weeks

12 years agoDisable the code which hard-sets the LEDs on. This prevents the LED
adrian [Fri, 23 Dec 2011 09:09:10 +0000 (09:09 +0000)]
Disable the code which hard-sets the LEDs on.  This prevents the LED
state from correctly updating things.

The reference driver directly enables/disables the LED state as required,
rather than nailing it up like it currently is.  That'll have to come
later by adding some further HAL methods.

Obtained from: Atheros

12 years agoPort over some more GPIO fixes from the atheros reference HAL.
adrian [Fri, 23 Dec 2011 08:53:22 +0000 (08:53 +0000)]
Port over some more GPIO fixes from the atheros reference HAL.

* Bring the AR5416 GPIO mux mask code in line with the code from the
  HAL.

* Add HAL_DEBUG_GPIO debugging statements, to track what's going on.

* Add Kiwi GPIO specific changes for reading values back.

Obtained from: Atheros

12 years agoFix typo s/xz/libarchive/
mm [Fri, 23 Dec 2011 08:50:26 +0000 (08:50 +0000)]
Fix typo s/xz/libarchive/

Reported by: Emil Mikulic (private e-mail)
MFC after: 12 days

12 years agoPort over some GPIO and LED fixes.
adrian [Fri, 23 Dec 2011 08:32:53 +0000 (08:32 +0000)]
Port over some GPIO and LED fixes.

* As a preparation for AR9287 GPIO support, add in the AR9287 GPIO mask.
* Fix the association mask values; these are post-shift values but were
  being shifted in twice. This resulted in some garbage being written
  in the wrong place and the link LED (at least on my d-link AR5416
  NIC) giving totally incorrect blink patterns.

12 years agoRemove unused #define's.
adrian [Fri, 23 Dec 2011 04:05:39 +0000 (04:05 +0000)]
Remove unused #define's.

Pointy hat to: adrian, for not properly reading things when he copied
  ar9285.h to ar9287.h.

12 years agoRework this ugly mess that tries to handle reset serialisation.
adrian [Fri, 23 Dec 2011 03:59:49 +0000 (03:59 +0000)]
Rework this ugly mess that tries to handle reset serialisation.

Some users were reporting concurrent resets _were_ occuring - ie,
either two ath_reset()s ran at the same time (likely one on each CPU)
or ath_reset() versus ath_chan_change().

Instead, this now tries to grab the serialisation semaphore and will
pause() for a while if it fails. It will always eventually succeed though
and will log an error if it hits the recursion situation.

All of this stuff needs to die a horrible death at some point and be
replaced with a properly serialising method of programming this stuff
(eg using the net80211 taskqueue for all of this stuff.) The trouble
is figuring out how to handle the concurrent ioctl() based things without
introducing more LORs (which is another reason why I haven't just wrapped
all of this stuff in large, long-lived locks, a-la what Linux can get
away with.)

MFC after: Absolutely, positively never.

12 years agoAdd in ath_ee_9287_print.
adrian [Fri, 23 Dec 2011 02:57:18 +0000 (02:57 +0000)]
Add in ath_ee_9287_print.

12 years agoMake some more of the 11n specific code conditional.
adrian [Fri, 23 Dec 2011 02:40:35 +0000 (02:40 +0000)]
Make some more of the 11n specific code conditional.

This doesn't fix compilation w/out AH_SUPPORT_AR5416 as all of the software
aggregation support in if_ath_tx.c and 11n code in if_ath_tx_ht.c touches
the 11n specific fields. I'll work on that later.

12 years agoAdd a temporary debugging statement in order to try and identify what's
adrian [Fri, 23 Dec 2011 02:21:22 +0000 (02:21 +0000)]
Add a temporary debugging statement in order to try and identify what's
going on with the occasional garbage rs_antenna field reported by AR9285
users.

I've discovered that the 11n NICs only fill out the entire RX status
descriptor on the final descriptor in an aggregate. Some of the fields
(notably RSSI) are complete nonsense for A-MPDU subframes. This may
be another example of this.

The driver doesn't currently toss out statistics for non-final aggregate
frames. It's likely that this should be done.

If any users hit this particular debugging message they should report it
immediately to freebsd-wireless@freebsd.org - please ensure you have
ATH_DEBUG enabled so it prints out the full receive descriptor.

PR: kern/163312

12 years agoHandle malloc failures in yplib.c.
ghelmer [Fri, 23 Dec 2011 02:13:42 +0000 (02:13 +0000)]
Handle malloc failures in yplib.c.

PR: bin/83349

12 years agoDuring investigation of an NFSv4 client crash reported by glebius@,
rmacklem [Fri, 23 Dec 2011 02:04:35 +0000 (02:04 +0000)]
During investigation of an NFSv4 client crash reported by glebius@,
jhb@ spotted that nfscl_getstateid() might modify credentials when
called from nfsrpc_read() for the case where p != NULL, whereas
nfsrpc_read() only did a crdup() to get new credentials for p == NULL.
This bug was introduced by r195510, since pre-r195510 nfscl_getstateid()
only modified credentials for the p == NULL case. This patch modifies
nfsrpc_read()/nfsrpc_write() so that they do crdup() for the p != NULL case.
It is conceivable that this bug caused the crash reported by glebius@, but
that will not be determined for some time, since the crash occurred after
about 1month of operation.

Tested by: glebius
Reviewed by: jhb
MFC after: 2 weeks

12 years agoHandle failures to malloc memory to hold key or val copies.
ghelmer [Fri, 23 Dec 2011 01:56:25 +0000 (01:56 +0000)]
Handle failures to malloc memory to hold key or val copies.

PR: bin/83348

12 years agoFix return value of function.
np [Fri, 23 Dec 2011 01:39:10 +0000 (01:39 +0000)]
Fix return value of function.

Submitted by: Dan McGregor <dan dot mcgregor at usask dot ca>

12 years agoWhitespace cleanup:
gjb [Fri, 23 Dec 2011 00:31:26 +0000 (00:31 +0000)]
Whitespace cleanup:

ar/ar.1:
 - Remove trailing whitespace

Reported by: igor
MFC after: 1 week
X-MFC-With: r228823

12 years agoFormatting fixes:
gjb [Fri, 23 Dec 2011 00:29:01 +0000 (00:29 +0000)]
Formatting fixes:

hexdump/od.1:
 - Enclose tabbed content in quotes [1]

ar/ar.1:
 - Enclose tabbed content in quotes [1]

rctl/rctl.8:
 - Enclose tabbed content in quotes [1]
 - Start a sentence on a newline [2]

Reported by: manlint [1], igor [2]
MFC after: 1 week
X-MFC-after: 9.0-RELEASE

12 years agoWhen building the kernel with clang, it produces several warnings which
dim [Fri, 23 Dec 2011 00:23:37 +0000 (00:23 +0000)]
When building the kernel with clang, it produces several warnings which
might be useful in some cases, but which are not severe enough to error
out the whole kernel build.  Display them anyway, so there is at least
some incentive to fix them eventually.

Start with -Wtautological-compare warnings.  These usually occur when
people check if unsigned quantities are negative, or similar cases.  To
clean these up would be painful, and might give problems if the base
type which is compared against changes to signed later on.

MFC after: 1 week

12 years agoMerge to da driver quirks hinting 4K physical sector sizes for SATA disks
mav [Fri, 23 Dec 2011 00:10:17 +0000 (00:10 +0000)]
Merge to da driver quirks hinting 4K physical sector sizes for SATA disks
connected via SAS or USB. Unluckily I've found that SAS (mps) and USB-SATA
I have translate models in different ways, requiring twice more quirks.
Unluckily for Hitachi, their model names are trimmed on SAS, making
impossible to identify 4K sector drives that way.

12 years agoUpdate list of 4K physical sector hard drives.
mav [Thu, 22 Dec 2011 23:50:31 +0000 (23:50 +0000)]
Update list of 4K physical sector hard drives.

12 years agoDisable various warnings for the ath module in a more fine-grained way:
dim [Thu, 22 Dec 2011 23:40:52 +0000 (23:40 +0000)]
Disable various warnings for the ath module in a more fine-grained way:
only add the option for the specific .c files that need them, like via
sys/conf/files.

MFC after: 1 week

12 years agoUse the correct types when calling the decompression mask function.
adrian [Thu, 22 Dec 2011 21:54:53 +0000 (21:54 +0000)]
Use the correct types when calling the decompression mask function.

There's currently no public code which uses this feature and the
current reference driver doesn't enable this feature at all.
It's possible it was used by a previous version of the driver and
that indeed it should return HAL_STATUS; but at this point I'm
happy to require that they complain and submit a patch.

This was found by LLVM compile-time type checking.

Submitted by: dim

12 years agoMerge from OpenBSD:
glebius [Thu, 22 Dec 2011 19:09:55 +0000 (19:09 +0000)]
Merge from OpenBSD:
  revision 1.122
  date: 2009/05/13 01:01:34;  author: dlg;  state: Exp;  lines: +6 -4
  only keep track of the number of updates on tcp connections. state sync on
  all the other protocols is simply pushing the timeouts along which has a
  resolution of 1 second, so it isnt going to be hurt by pfsync taking up
  to a second to send it over.

  keep track of updates on tcp still though, their windows need constant
  attention.

12 years agoMerge from OpenBSD:
glebius [Thu, 22 Dec 2011 19:05:58 +0000 (19:05 +0000)]
Merge from OpenBSD:
  revision 1.120
  date: 2009/04/04 13:09:29;  author: dlg;  state: Exp;  lines: +5 -5
  use time_uptime instead of time_second internally. time_uptime isnt
  affected by adjusting the clock.

  revision 1.175
  date: 2011/11/25 12:52:10;  author: dlg;  state: Exp;  lines: +3 -3
  use time_uptime to set state creation values as time_second can be
  skewed at runtime by things like date(1) and ntpd. time_uptime is
  monotonic and therefore more useful to compare against.

12 years agoMerge couple more fixes from OpenBSD to bulk processing:
glebius [Thu, 22 Dec 2011 18:56:27 +0000 (18:56 +0000)]
Merge couple more fixes from OpenBSD to bulk processing:

  revision 1.118
  date: 2009/03/23 06:19:59;  author: dlg;  state: Exp;  lines: +8 -6
  wait an appropriate amount of time before giving up on a bulk update,
  rather than giving up after a hardcoded 5 seconds (which is generally much
  too short an interval for a bulk update).
  pointed out by david@, eyeballed by mcbride@

  revision 1.171
  date: 2011/10/31 22:02:52;  author: mikeb;  state: Exp;  lines: +2 -1
  Don't forget to cancel bulk update failure timeout when destroying an
  interface.  Problem report and fix from Erik Lax, thanks!

Start a brief note of revisions merged from OpenBSD.

12 years agoWe really mean MTU of the real interface here, not of our pseudo.
glebius [Thu, 22 Dec 2011 18:51:35 +0000 (18:51 +0000)]
We really mean MTU of the real interface here, not of our pseudo.

12 years agoUse a better log message for master down event.
glebius [Thu, 22 Dec 2011 18:48:21 +0000 (18:48 +0000)]
Use a better log message for master down event.

12 years agoIn FreeBSD we always have bpf(4) API, either real or stub. No need
glebius [Thu, 22 Dec 2011 18:31:47 +0000 (18:31 +0000)]
In FreeBSD we always have bpf(4) API, either real or stub. No need
in detecting presense of 'device bpf'.

12 years agoMerge upstream r509: don't log an error in the common case (ENOENT).
des [Thu, 22 Dec 2011 18:12:51 +0000 (18:12 +0000)]
Merge upstream r509: don't log an error in the common case (ENOENT).

12 years agoMake cd driver to handle Audio CDs, reporting their 2352 bytes sectors to
mav [Thu, 22 Dec 2011 16:40:35 +0000 (16:40 +0000)]
Make cd driver to handle Audio CDs, reporting their 2352 bytes sectors to
GEOM and using READ CD command for reading data, same as acd driver does.
Audio CDs identified by checking respective bit of the control field of
the first track in TOC.

This fixes bunch of error messages during boot (GEOM taste) with Audio CD
inserted and allows to grab Audio CD image using just dd.

MFC after: 1 month

12 years agoDisable -Wconstant-conversion warnings for the aic7xxx module in a more
dim [Thu, 22 Dec 2011 16:16:12 +0000 (16:16 +0000)]
Disable -Wconstant-conversion warnings for the aic7xxx module in a more
fine-grained way: only add the option for the specific .c files that
need them, like via sys/conf/files.

MFC after: 1 week

12 years agoUse TASK_INITIALIZER() for dev_dtr_task rather than a dedicated SYSINIT().
jhb [Thu, 22 Dec 2011 16:01:10 +0000 (16:01 +0000)]
Use TASK_INITIALIZER() for dev_dtr_task rather than a dedicated SYSINIT().

12 years agoput back netmap support, deleted by mistake in a previous commit
luigi [Thu, 22 Dec 2011 15:33:41 +0000 (15:33 +0000)]
put back netmap support, deleted by mistake in a previous commit

12 years agoCorrectly spell my email address.
fabient [Thu, 22 Dec 2011 15:13:32 +0000 (15:13 +0000)]
Correctly spell my email address.

12 years agoRemove -mfancy-math from LIB32CPUFLAGS for amd64. It has been default
dim [Thu, 22 Dec 2011 15:03:48 +0000 (15:03 +0000)]
Remove -mfancy-math from LIB32CPUFLAGS for amd64.  It has been default
for our gcc since more than three years (see r181534, which is also in
stable/9 and stable/8).  This flag used to be for the benefit of the old
in-kernel math emulator, which was removed more than eight years ago.

Pointed out by: arundel
MFC after: 1 week

12 years agoRevert r228786. We'll need to work around the warnings in another way.
dim [Thu, 22 Dec 2011 14:09:08 +0000 (14:09 +0000)]
Revert r228786.  We'll need to work around the warnings in another way.

Requested by: adrian
MFC after: 1 week

12 years agoRevert r228785. We'll need to work around the warnings in another way.
dim [Thu, 22 Dec 2011 13:47:36 +0000 (13:47 +0000)]
Revert r228785.  We'll need to work around the warnings in another way.

Requested by: adrian
MFC after: 1 week

12 years agoAdd placeholder code for prepending pathnames to tftp.
ed [Thu, 22 Dec 2011 09:36:37 +0000 (09:36 +0000)]
Add placeholder code for prepending pathnames to tftp.

At work we have a single tftp server that provides installation data for
a variety of operating systems. I'd rather place our FreeBSD-related
files in a subdirectory, instead of the root.

It would be nice if this setting could be run-time configurable, but at
least in our specific case, this is not possible, as pxeboot is
chainloaded through pxelinux.

Sponsored by: Kumina bv

12 years agoUse contrib sources for building libarchive, tar and cpio.
mm [Thu, 22 Dec 2011 08:42:07 +0000 (08:42 +0000)]
Use contrib sources for building libarchive, tar and cpio.
Make "make test" fully operational.

MFC after: 2 weeks

12 years agoDiscarding local array based on return values
kevlo [Thu, 22 Dec 2011 06:31:29 +0000 (06:31 +0000)]
Discarding local array based on return values

12 years ago- document the -l option to usermod
eadler [Thu, 22 Dec 2011 03:36:54 +0000 (03:36 +0000)]
- document the -l option to usermod

PR: docs/161588
Submitted by: "Luchesar V. ILIEV" <luchesar.iliev@gmail.com>
Approved by: gjb
MFC after: 1 week

12 years agoReduce NFPI by half to keep the default number of inodes the same with
mckusick [Wed, 21 Dec 2011 22:49:16 +0000 (22:49 +0000)]
Reduce NFPI by half to keep the default number of inodes the same with
the now default 32K/4K filesystem the same as the number of inodes in
the previously default 16K/2K filesystem.

PR:          bin/16265
Reported by: Olivier Cochard-Labbe <olivier@cochard.me>
MFC:         4 weeks (9 is the only affected branch)

12 years agoAmend r228783 by also disabling -Wshift-count-negative
dim [Wed, 21 Dec 2011 22:13:50 +0000 (22:13 +0000)]
Amend r228783 by also disabling -Wshift-count-negative
-Wshift-count-overflow warnings for the ath module.

MFC after: 1 week

12 years ago- Fix style(9) bug I introduced in the last commit
eadler [Wed, 21 Dec 2011 20:47:24 +0000 (20:47 +0000)]
- Fix style(9) bug I introduced in the last commit

Approved by: jhb

12 years ago- Remove extraneous null ptr deref checks
eadler [Wed, 21 Dec 2011 20:27:41 +0000 (20:27 +0000)]
- Remove extraneous null ptr deref checks
- Fix memory leak

Submitted by: Slono Slono <slonoman2011@yandex.ru>
Approved by: jhb
MFC after: 1 week

12 years agoAmend r228779 by also disabling -Wconstant-conversion warnings for the
dim [Wed, 21 Dec 2011 20:23:03 +0000 (20:23 +0000)]
Amend r228779 by also disabling -Wconstant-conversion warnings for the
aic7xxx module.

MFC after: 1 week

12 years agoRestore the sysctl changes from 223676 and 227309 lost in the previous
jhb [Wed, 21 Dec 2011 20:10:11 +0000 (20:10 +0000)]
Restore the sysctl changes from 223676 and 227309 lost in the previous
import:
- Add read-only sysctls for all of the tunables supported by the igb and
  em drivers.
- Make the per-instance 'enable_aim' sysctl truly per-instance by having it
  change a per-instance variable (which is used to control AIM) rather
  than having all of the per-instance sysctls operate on a single global
  variable.

While here, restore the previously existing hw.igb.rx_processing_limit
tunable as it is very useful to be able to set a default tunable that
applies to all adapters in the system.

12 years ago- Remove extra space
eadler [Wed, 21 Dec 2011 17:51:49 +0000 (17:51 +0000)]
- Remove extra space

Submitted by: Davide Italiano <davide.italiano@gmail.com>
Approved by: brucec

12 years agoFix enum conversion problems in sys/dev/ath/ath_hal/ar5212/ar5212_misc.c
dim [Wed, 21 Dec 2011 17:36:45 +0000 (17:36 +0000)]
Fix enum conversion problems in sys/dev/ath/ath_hal/ar5212/ar5212_misc.c
and sys/dev/ath/ath_hal/ar5416/ar5416_misc.c:

sys/dev/ath/ath_hal/ar5212/ar5212_misc.c:577:24: warning: implicit conversion from enumeration type 'HAL_STATUS' to different enumeration type 'HAL_BOOL' [-Wconversion]
                return HAL_EINVAL;
                ~~~~~~ ^~~~~~~~~~

and:

sys/dev/ath/ath_hal/ar5416/ar5416_misc.c:164:9: warning: implicit conversion from enumeration type 'HAL_STATUS' to different enumeration type 'HAL_BOOL' [-Wconversion]
        return HAL_OK;
        ~~~~~~ ^~~~~~

In both cases, enums HAL_BOOL and HAL_STATUS are mixed up.

MFC after: 1 week

12 years agoFix shift overflow problem in sys/dev/ath/ath_hal/ar5210/ar5210_power.c
dim [Wed, 21 Dec 2011 17:16:43 +0000 (17:16 +0000)]
Fix shift overflow problem in sys/dev/ath/ath_hal/ar5210/ar5210_power.c
and sys/dev/ath/ath_hal/ar5211/ar5211_power.c:

sys/dev/ath/ath_hal/ar5210/ar5210_power.c:36:3: warning: signed shift result (0x200000000) requires 35 bits to represent, but 'int' only has 32 bits [-Wshift-overflow]
                OS_REG_RMW_FIELD(ah, AR_SCR, AR_SCR_SLE, AR_SCR_SLE_ALLOW);
                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
sys/dev/ath/ath_hal/ah_internal.h:472:42: note: expanded from:
                (OS_REG_READ(_a, _r) &~ (_f)) | (((_v) << _f##_S) & (_f)))
                                                       ^
sys/dev/ath/ah_osdep.h:127:49: note: expanded from:
            (bus_space_handle_t)(_ah)->ah_sh, (_reg), (_val))
                                                       ^~~~

The AR_SCR_SLE_{WAKE,SLP,NORM} values are pre-shifted in ar5210reg.h and
ar5211reg.h, while they should be unshifted, like in ar5212reg.h.  Then,
when the OS_REG_RMW_FIELD() macro shifts them again, the values will
overflow, becoming effectively zero.

MFC after: 1 week

12 years agoFollow style(9) more closely in the example.
jh [Wed, 21 Dec 2011 17:03:30 +0000 (17:03 +0000)]
Follow style(9) more closely in the example.

12 years agoWhen building with clang, disable -Wshift-count-negative and
dim [Wed, 21 Dec 2011 17:01:13 +0000 (17:01 +0000)]
When building with clang, disable -Wshift-count-negative and
-Wshift-count-overflow for sys/dev/ath/ath_hal/ah_regdomain.c, as it
gets multiple instances of the following warnings:

In file included from sys/dev/ath/ath_hal/ah_regdomain.c:99:
sys/dev/ath/ath_hal/ah_regdomain/ah_rd_domains.h:69:15: warning: shift count is negative [-Wshift-count-negative]
         .chan11a               = BM4(F1_4950_4980,
                                  ^~~~~~~~~~~~~~~~~
sys/dev/ath/ath_hal/ah_regdomain/ah_rd_domains.h:41:4: note: expanded from:
          W1(_fa) | W1(_fb) | W1(_fc) | W1(_fd) }
          ^
sys/dev/ath/ath_hal/ah_regdomain/ah_rd_domains.h:34:45: note: expanded from:
        (((_a) > 63 && (_a) < 128 ? (((uint64_t) 1)<<((_a)-64)) : (uint64_t) 0))
                                                   ^ ~~~~~~~~~

and:

In file included from sys/dev/ath/ath_hal/ah_regdomain.c:99:
sys/dev/ath/ath_hal/ah_regdomain/ah_rd_domains.h:629:15: error: shift count >= width of type [-Werror,-Wshift-count-overflow]
         .chan11a               = BM4(W2_5260_5320,
                                  ^~~~~~~~~~~~~~~~~
sys/dev/ath/ath_hal/ah_regdomain/ah_rd_domains.h:40:34: note: expanded from:
        { W0(_fa) | W0(_fb) | W0(_fc) | W0(_fd),                        \
                                        ^
sys/dev/ath/ath_hal/ah_regdomain/ah_rd_domains.h:32:44: note: expanded from:
        (((_a) >= 0 && (_a) < 64 ? (((uint64_t) 1)<<(_a)) : (uint64_t) 0))
                                                  ^ ~~~~

Both warnings are false positives, caused by LLVM PR 10030.  For global
initializations, clang fails to detect that the branch of the ternary
operator causing the warning is dead.

MFC after: 1 week

12 years agoMake the RTC checking for QEMU even more aggressive.
ed [Wed, 21 Dec 2011 16:47:01 +0000 (16:47 +0000)]
Make the RTC checking for QEMU even more aggressive.

At work, where we use use KVM+QEMU, we notice that pxeboot is pratically
impossible because of network timeouts. This is due to the fact that the
RTC code makes aggressive jumps.

Two RTC reads does not seem to be sufficient. Change the code to check
for 8 identical RTC values.

Sponsored by: Kumina bv

12 years agoWhen building with clang, disable -Warray-bounds for sys/dev/asr/asr.c,
dim [Wed, 21 Dec 2011 16:38:37 +0000 (16:38 +0000)]
When building with clang, disable -Warray-bounds for sys/dev/asr/asr.c,
as it gets the following warning:

sys/dev/asr/asr.c:1836:29: warning: array index of '58' indexes past the end of an array (that contains 1 element) [-Warray-bounds]
        while ((len > 0) && (sg < &((PPRIVATE_SCSI_SCB_EXECUTE_MESSAGE)
                                   ^
sys/dev/asr/i2omsg.h:934:8: note: array 'Simple' declared here
       I2O_SGE_SIMPLE_ELEMENT              Simple[1];
       ^

This is a false positive, since I2O_SG_ELEMENT::Simple is not declared
as a C99 flexible array member, but in the old (but more portable) way.
At run-time, the proper number of array elements will hopefully have
been allocated.

MFC after: 1 week

12 years agoUpdate libstdc++ with small updates from the latest rev. (135556)
pfg [Wed, 21 Dec 2011 16:36:07 +0000 (16:36 +0000)]
Update libstdc++ with small updates from the latest rev. (135556)
from the gcc 4.2 branch.
The libraries in the gcc-4_2-branch remained under the LGPLv2.

The changes can be reproduced with the following command:

svn diff svn://gcc.gnu.org/svn/gcc/branches/gcc-4_2-branch/libstdc++-v3
 -r 127959:135556

Reviewed by: mm
Approved by: jhb (mentor)
MFC after: 2 weeks

12 years agoStart selectively disabling a few kernel build warnings for clang, since
dim [Wed, 21 Dec 2011 15:59:18 +0000 (15:59 +0000)]
Start selectively disabling a few kernel build warnings for clang, since
there are some places in the kernel where fixing them is too disruptive,
or where there is a false positive.

In this case, disable -Wconstant-conversion for two aic7xxx-related
files, as they get the following warning on i386 (and possibly on other
32-bit arches):

sys/dev/aic7xxx/ahc_pci.c:112:10: warning: implicit conversion from 'long long' to 'bus_addr_t' (aka 'unsigned int') changes value from 549755813887 to 4294967295 [-Wconstant-conversion]
                                   ? 0x7FFFFFFFFFLL
                                   ~~^~~~~~~~~~~~~~

This is a false positive, since the code only passes the 0x7FFFFFFFFFLL
argument, if sizeof(bus_addr_t) is larger than 4 (e.g. on 64 bit arches,
or when PAE is enabled on i386).  The code could be refactored to do
compile-time checks, but that is more disruptive.

MFC after: 1 week

12 years agoMerge FreeBSD changes from usr.bin/cpio to contrib/libarchive/cpio:
mm [Wed, 21 Dec 2011 15:33:13 +0000 (15:33 +0000)]
Merge FreeBSD changes from usr.bin/cpio to contrib/libarchive/cpio:

r204111 (uqs):
Fix common misspelling of hierarchy

r211054 (kientzle);
Fix -R when used with -p.  Previously, the
uname and gname weren't overwritten, so the
disk restore would use those to lookup the
original uid/gid again.  Clearing the uname
and gname prevents this.

r212263 (gjb):
Fix typo in bsdcpio manual:
s/libarchive_formats/libarchive-formats

MFC after: 2 weeks

12 years agoMerge FreeBSD changes from usr.bin/tar to contrib/libarchive/tar:
mm [Wed, 21 Dec 2011 15:30:49 +0000 (15:30 +0000)]
Merge FreeBSD changes from usr.bin/tar to contrib/libarchive/tar:

r204111 (uqs):
Fix common misspelling of hierarchy

r207786 (kientzle):
Various manpage updates, including many long-option synonyms that were
previously undocumented.

r208028 (uqs):
mdoc: move remaining sections into consistent order

This pertains mostly to FILES, HISTORY, EXIT STATUS and AUTHORS sections.

r209152 (kientzle):
If the compressed data is larger than the uncompressed,
report the compression ratio as 0% instead of displaying
nonsense triggered by numeric overflow.  This is common
when dealing with uncompressed files when the I/O blocking
causes there to be small transient differences in the
accounting.

r210720 (joel):
Fix typos.

r223541 (kientzle):
If there is a read error reading Y/N confirmation from the keyboard,
exit immediately with an error.

If there is an error opening or reading a file to put into the archive,
set the return value for a deferred error exit.

r223573 (kientzle):
The --newer-than test should descend into old
directories to look for new files.

r226636 (kientzle):
Typo from previous commit. Urgh.

r224153 (mm, partial):
Update bsdtar.1 manpage

MFC after: 2 weeks

12 years agoMerge FreeBSD changes from usr.bin/tar to contrib/libarchive/libarchive_fe:
mm [Wed, 21 Dec 2011 15:22:05 +0000 (15:22 +0000)]
Merge FreeBSD changes from usr.bin/tar to contrib/libarchive/libarchive_fe:

r213469:
Recognize both ! and ^ as markers for negated character classes.

MFC after: 2 weeks

12 years agoAdd $FreeBSD$ to libarchive_fe headers where missing.
mm [Wed, 21 Dec 2011 15:20:17 +0000 (15:20 +0000)]
Add $FreeBSD$ to libarchive_fe headers where missing.

MFC after: 2 weeks

12 years agoMerge FreeBSD changes from lib/libarchive to contrib/libarchive:
mm [Wed, 21 Dec 2011 15:18:52 +0000 (15:18 +0000)]
Merge FreeBSD changes from lib/libarchive to contrib/libarchive:

r204111 (uqs):
Fix common misspelling of hierarchy

r208027 (uqs):
mdoc: move CAVEATS, BUGS and SECURITY CONSIDERATIONS sections to the
bottom of the manpages and order them consistently.

GNU groff doesn't care about the ordering, and doesn't even mention
CAVEATS and SECURITY CONSIDERATIONS as common sections and where to put
them.

r208291 (uqs):
mdoc: consistently spell our email addresses <foo@FreeBSD.org>

r209031 (uqs):
mdoc nitpicking: the title argument shall be uppercase

r214822 (kientzle):
Clarify the naming:  Methods that free an object should
be called "free".  Retain the old "finish" names to preserve
source compatibility for now.

r214905 (kientzle):
If the Zip reader doesn't see a PK signature block
because there's inter-entry garbage, just scan forward
to find the next one.  This allows us to handle a lot
of Zip archives that have been modified in-place.

Thanks to: Gleb Kurtsou for sending me a sample archive

r216258 (kientzle):
Don't write data into an empty "file."

In particular, this check avoids a warning when
extracting directory entries from certain GNU tar
archives that store directory contents.

r225525 (kientzle):
Fix cpio on ARM.

MFC after: 2 weeks

12 years agoAdd missing integer casts to comparsions in libarchive read.
mm [Wed, 21 Dec 2011 15:06:01 +0000 (15:06 +0000)]
Add missing integer casts to comparsions in libarchive read.

MFC after: 2 weeks

12 years agoPartial merge of r224691 from lib/libarchive:
mm [Wed, 21 Dec 2011 15:02:37 +0000 (15:02 +0000)]
Partial merge of r224691 from lib/libarchive:

Add compatibility for ISO images created with unfixed makefs that
violated ECMA-119 (ISO9660): allow reserved4 to be 0x20 in PVD.
This allows tar to read FreeBSD distribution ISO images created
with makefs prior to NetBSD bin/45217 bugfix (up to 9.0-BETA1).

MFC after: 2 weeks

12 years agoRemove libarchive/archive_entry_copy_bhfi.c and libarchive/mtree.5
mm [Wed, 21 Dec 2011 14:58:44 +0000 (14:58 +0000)]
Remove libarchive/archive_entry_copy_bhfi.c and libarchive/mtree.5
Add these files to FREEBSD-Xlist

MFC after: 2 weeks

12 years agoRemove config_freebsd.h and add to FREEBSD-Xlist
mm [Wed, 21 Dec 2011 12:59:09 +0000 (12:59 +0000)]
Remove config_freebsd.h and add to FREEBSD-Xlist
This file is common for libarchive, cpio and tar and is going to be located
outside of contrib (lib/libarchive)

12 years agoProvide ABI compatibility shim to enable configuring of addresses
glebius [Wed, 21 Dec 2011 12:39:08 +0000 (12:39 +0000)]
Provide ABI compatibility shim to enable configuring of addresses
with ifconfig(8) prior to r228571.

Requested by: brooks

12 years agosc_cngrab: switch to console vty when possible
avg [Wed, 21 Dec 2011 12:21:22 +0000 (12:21 +0000)]
sc_cngrab: switch to console vty when possible

In the future we may want to perform the switch even if the console is
currently in the graphics mode by trying to reset the video adapter first
(e.g. by executing vesa/vga bios post).  That would probably require
some sort of a one-way flag as returning the control of the console back
to the interrupted application most likely would result in a mess.

Reviewed by: emaste
MFC after: 2 months

12 years ago- Remove a GCC-specific compiler flag that was added before to eliminate
gabor [Wed, 21 Dec 2011 12:07:14 +0000 (12:07 +0000)]
- Remove a GCC-specific compiler flag that was added before to eliminate
  some warnings but at the moment does not seem to be necessary.

Submitted by: arundel (via private mail)
Tested by: arundel
MFC after: 1 week

12 years agoukbd: adjust for SCHEDULER_STOPPED() and overhaul locking code
avg [Wed, 21 Dec 2011 11:49:33 +0000 (11:49 +0000)]
ukbd: adjust for SCHEDULER_STOPPED() and overhaul locking code

This change is designed to let USB keyboard work in the panic context
with stop_scheduler_on_panic=1.  Most of change consists of removing
mtx_owned() checks where they can be easily avoided.  Some additional
lock cleanup is performed along the way.

A list of the smaller changes:
- newbus methods should be executed with Giant already held, just assert
  this
- kbd methods called in the non-polling context should be executed with
  Giant already held, just assert this
- Giant is recursive, so we should just take it where we must have it,
  without redundant checks if we already have it
- thanks to recent syscons changes we don't need to go through the hoops
  to detect if kernel is going to poll us; polling mode is now clearly
  separated from non-polling mode
- at present the polling mode can be entered by only one thread
- document special cases in greater detail

Please note that the ukbd code and underlying USB code still lve
dangerously in the kdb context by trying to obtain various locks
including the Giant.  If any of those locks are already held by the
stopped threads, then the things would blow up.
Another limitation of the ukbd driver is that it is detached before a
system enters the halt state.

With this commit we can enable kern.stop_scheduler_on_panic by default,
that should not introduce any regressions.

Reviewed by: hselasky
MFC after: 3 months
X-MFC after: r228424, r228760

12 years agoStrip unnecessary files and directories from contrib/libarchive
mm [Wed, 21 Dec 2011 11:18:49 +0000 (11:18 +0000)]
Strip unnecessary files and directories from contrib/libarchive
according to FREEBSD-Xlist

MFC after: 2 weeks