| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
MIB-II: use strlcpy instead of strcpy when copying {descr,name}
This is of course to avoid buffer overruns
The remaining strcpy instance in the module needs to be audited for
correctness
CID: 1006827, 1006828
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
r310957:
Use strlcpy when copying `com` to pdu->community to avoid potential
buffer overruns
CID: 1006823, 1006824
r310958:
Initialize ret to SNMPD_INPUT_OK at the top of snmp_input_start(..) to
avoid returning an uninitialized value
There are some really complicated, snakey if-statements combined with
switch statements that could result in an invalid value being returned
as `ret`
CID: 1006551
r310960:
Similar to r310954, set .len to 0 on malloc failure and to `len` only
on success
|
| |
| |
| |
| |
| |
| |
| |
| | |
Warning message cleanup
- Use warn instead of warnx + strerror(errno)
- Remove unnecessary trailing newline from a warnx call
- Add missing spaces following "," in syslog and warn* calls
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
r310931:
Use strdup in snmp_parse_server(..) when possible instead of malloc+strcpy
This simplifies the code and mutes a Coverity warning about sc->cport being
improperly allocated
CID: 1018247
r310942:
Unbreak the build by passing the string to strdup, not its length
Pointyhat to: ngie
r310988:
snmp_discover_engine: fix up req/resp (PDU object) handling a bit
- Call snmp_pdu_free on req and resp when done with the objects
- Call snmp_pdu_free on req before calling snmp_pdu_create on it
again
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
r310954:
Set value->v.octetstring.len to a correct value on malloc success/failure
The previous code always set value->v.octetstring.len to len, regardless
of the result from the malloc call. This misleads the caller on malloc
failure. Set .len to len on success and 0 on failure.
CID: 1007590
r310987:
snmp_output_err_resp, snmp_output_resp: allocate `object` using calloc, not
on the stack
Some of the callers try to determine whether or not `object` is valid by
testing the value for NULL, which will never be true if it's a stack value,
so in order to be clear and correct down the call stack, use a heap
allocated object.
This also addresses a Coverity issue by initializing all of `object` via
calloc
CID: 1006392
r311222:
Fix logical inversion when checking result from calloc
in snmp_output_err_resp(..)
CID: 1368195
|
| |
| |
| |
| |
| |
| | |
listen_low_port: check for errors from socket(2) before continuing
CID: 976778
|
| |
| |
| |
| |
| |
| | |
umask_open: don't leak fd on success
CID: 978315
|
| | |
|
| |
| |
| |
| |
| |
| | |
MFC r311136:
Add WITH_SSP to silence complaints from mkman about there not being a file
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
In particular, 64-bit system call arguments use up two register_t
arguments for 32-bit processes. They must also be aligned on a 64-bit
boundary on 32-bit powerpc processes. This fixes the decoding of
lseek(), procctl(), and wait6() arguments for 32-bit processes (both
native and via freebsd32).
Note that the ktrace system call return record only returns a single
register, so the return value of lseek is always truncated to the low
32-bits for 32-bit processes.
|
| |
| |
| |
| | |
Style.
|
| |
| |
| |
| |
| | |
Assert that the pages found on the object queue by vm_page_next() and
vm_page_prev() have correct ownership.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
r310151:
cxgbe(4): Changes to the default T6 firmware configuration file.
- Disable features that are not supported or not used on FreeBSD.
- Increase the RSS table slice per interface.
- Increase the share of the TCAM reserved for filtering.
r311173:
cxgbe(4): Update T4, T5 and T6 firmwares to 1.16.26.0.
Sponsored by: Chelsio Communications
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
sfxge(4): remove obsolete Wake-On-LAN support
Wake-on-lan is not supported in production on any of our adapters, as
they don't have the required AUX power connector. (It's possible that
AUX power is supplied to some of our ALOM or mezz adapters, but if so
then we've never implemented or tested WoL support.)
Sponsored by: Solarflare Communications, Inc.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
sfxge(4): add functions to efx_bootcfg supporting whole partition access
Expose expcfg partition layout discovery and validating buffer copy
routines. Needed for whole-partition expcfg operations.
Submitted by: Richard Houldsworth <rhouldsworth at solarflare.com>
Sponsored by: Solarflare Communications, Inc.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
sfxge(4): make verified update result available from ef10_nvram_partn_unlock()
Manftest needs to know exactly what went wrong with the verified update
so that failing boards can be correctly diagnosed.
Submitted by: Tom Millington <tmillington at solarflare.com>
Sponsored by: Solarflare Communications, Inc.
|
| |
| |
| |
| |
| |
| |
| | |
sfxge(4): support per-command MCDI timeout
Submitted by: Andy Moreton <amoreton at solarflare.com>
Sponsored by: Solarflare Communications, Inc.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
sfxge(4): add per-command timeout reporting to the common code
In newer firmware that supports multithreaded MCDI processing,
longer running commands may be run ina background thread. Add
support for drivers to query the appropriate timeout for each
MCDI request.
Submitted by: Andy Moreton <amoreton at solarflare.com>
Sponsored by: Solarflare Communications, Inc.
|
| |
| |
| |
| |
| |
| |
| | |
sfxge(4): add support for firmware-verified NVRAM updates to the common code
Submitted by: Andy Moreton <amoreton at solarflare.com>
Sponsored by: Solarflare Communications, Inc.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
sfxge(4): fix efx_filter_supported_filters API
The previous API had various problems, including the length of the
caller provided buffer not being specified, no means being available
to discover how big the buffer needs to be, and a lack of clarity of
what the resulting list contains.
To fix it:
- add the buffer length as a parameter
- if the provided buffer is too short, fail with ENOSPC and return the
required length
- ensure that the list contents are valid and add comments
describing it
It is safe to change this API as, unsuprisingly, it has no users.
Submitted by: Mark Spender <mspender at solarflare.com>
Sponsored by: Solarflare Communications, Inc.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
sfxge(4): split EFX_FILTER_MATCH_LOC_MAC_IG back into separate flags
The flag EFX_FILTER_MATCH_LOC_MAC_IG to represent filtering on the
individual/group bit of the MAC address (with the two cases being
distingusished by the MAC address in the filter specification) was
introduced to mirror the Linux driver filtering code, but the
implementations are different enough anyway that it isn't of much value.
Having separate flags for unknown unicast and multicast simplifies
the code and allows the set of flags to match those used by MCDI.
It will also makes it easier to report whether these filters are
supported.
In the MCDI definitions, the unknown multicast and unicast flags have
the values 0x40000000 and 0x80000000 respectively, and so using the
same values for simplicity requires 32 bits in the filter specification
to store the flags. This means the structure is now a little bigger
than 64 bytes, but filters are not often used on critical paths so this
shouldn't have much impact - on Linux they are also bigger than they
used to be.
Submitted by: Mark Spender <mspender at solarflare.com>
Sponsored by: Solarflare Communications, Inc.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
sfxge(4): add missing barrier in common code MCDI response handling
The semantics of the MCDI interfacve require reading the first
dword of the header before any other data in the buffer. Add
a barrier to the common code MCDI handler to enforce this.
Submitted by: Andy Moreton <amoreton at solarflare.com>
Sponsored by: Solarflare Communications, Inc.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
sfxge(4): fix efx_ev_qpoll for non-Siena builds
Both Siena and EF10 use the siena_ev_qpoll() implementation, but this
function is not defined in builds without EFSYS_OPT_SIENA.
Remove siena_ev_qpoll and inline it into efx_ev_qpoll to allow it
to be used in non-Siena builds.
Also remove outdated FIXME comment, as EF10 event batching/merging has
been implemented long ago without needing to modify this code.
Submitted by: Andy Moreton <amoreton at solarflare.com>
Sponsored by: Solarflare Communications, Inc.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
MFC r310873:
Guard against use-after-free after calling mibif_free(..)
Set variables to NULL after calling free.
Also, remove unnecessary if (x != NULL) checks before calling free(x)
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
MFC r311175:
Swap parameters around with parse_syntax_strval(..) for consistency with
other parse_* APIs in bsnmp*
Noted by: bz
|
| | |
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
For EXTENDED COPY:
- improve parameters checking to report some errors before copy start;
- forward sense data from copy target as descriptor in case of error;
- report which CSCD reported error in sense key specific information.
For WRITE USING TOKEN:
- pass through real sense data from copy target instead of reporting
our copy error, since for initiator its a "simple" write, not a copy.
|
| |
| |
| |
| |
| |
| |
| | |
- Allow maximal sense size limitation via Control Extension mode page.
- When sense size limited, include descriptors atomically: whole or none.
- Set new SDAT_OVFL bit if some descriptors don't fit the limit.
- Report real written sense length instead of static maximal 252 bytes.
|
| | |
|
| |
| |
| |
| | |
We do not support tapes, so this is only a comments.
|
| |
| |
| |
| | |
We have no real timeout values to report there, but its better then error.
|
| |
| |
| |
| |
| |
| |
| | |
Fix REPORT SUPPORTED OPERATION CODES for READ/WRITE BUFFER commands.
Specifications require MODE parameter of those commands to be treated
the same as SERVICE ACTION parameter of other commands.
|
| |
| |
| |
| | |
Add support for REPORTING OPTIONS == 3 in REPORT SUPPORTED OPERATION CODES.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
VMware tries to enable this bit to avoid multiple threshold notifications
in case of multiple initiators connected to the same LUN. Unfortunately
their code sends MODE SELECT(6) request with parameter length hardcoded
for the page without any thresholds. Since we have four threshold and our
page is bigger, this attempt fails, that is correct in my understanding.
So all we can do about this now is to report proper error code and hope
VMware fix their code one day.
|
| | |
|
| | |
|
| | |
|
| |
| |
| |
| | |
If we get several error codes, handle one with lowest offset.
|
| |
| |
| |
| |
| | |
When reporting "Logical block address out of range" error, report the LBA
in sense data INFORMATION field.
|
| |
| |
| |
| |
| |
| | |
When writing fixed format sense data, set VALID bit only if provided value
for INFORMATION field fit into available 4 bytes (has no non-zero bytes
except last 4), as explicitly required by SPC-5 specification.
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
| |
| |
| |
| | |
Following SPC-5, make REQUEST SENSE report "Logical unit not supported"
in returned parameter data for not accessible LUNs.
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
While CTL still has no real events to report in this way (like SMART),
it is possible to trigger false event by manually setting TEST bit in
Informational Exceptions Control mode page, that can be useful for
initiator testing. This code supports all flavours of IE reporting:
UNIT ATTENTION, RECOVERED ERROR and NO SENSE sense keys, REQUEST SENSE
command and Informational Exceptions log page.
|
| |
| |
| |
| | |
No functional change.
|
| | |
|
| |
| |
| |
| | |
They can be too noisy.
|