summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* MFC r310982:kib2017-01-071-36/+22
| | | | Ansify vm/vm_pager.c. Style.
* MFC r310925:kib2017-01-071-1/+0
| | | | Remove unused declaration.
* MFC r311245:ngie2017-01-071-0/+3
| | | | | | tty: don't leak s after opening it with openpty CID: 978321
* MFC r311247:ngie2017-01-071-0/+3
| | | | | | mkfifoat_fd: close dfd after use to avoid leaking it CID: 978286
* MFC r311248:ngie2017-01-071-0/+3
| | | | | | mknodat_fd: close dfd after use to avoid leaking it CID: 978287
* MFC r311235:ngie2017-01-071-0/+3
| | | | | | ttyname_err: close fd if it was opened successfully CID: 978292
* MFC r311240:ngie2017-01-071-0/+3
| | | | | | | | kqueue_desc_passing: initialize m.msg_flags to 0 This mutes an uninitialized scalar warning from Coverity CID: 979620
* MFC r311273:ngie2017-01-071-0/+3
| | | | | | setrlimit_basic: don't leak buf; free it on completion CID: 978311
* MFC r311228:ngie2017-01-071-0/+3
| | | | | | ftok_link: don't leak fd CID: 978291
* MFC r311250:ngie2017-01-071-0/+3
| | | | | | mincore_resid: free buf after use CID: 978304
* MFC r311271:ngie2017-01-071-0/+3
| | | | | | stat_symlink: don't leak fd; close the file descriptor when done CID: 978314
* MFC r311269:ngie2017-01-071-0/+12
| | | | | | | | swapcontext1: test for getcontext(3) and swapcontext(3) success properly The beforementioned libcalls both succeed if the return codes aren't -1 CID: 976790, 976791
* MFC r311249:ngie2017-01-072-1/+22
| | | | | | {strchr,strlen}_basic: don't leak the dlopen'ed handle; close after use CID: 978299, 978300
* MFC r311272:ngie2017-01-071-0/+3
| | | | | | | | | revoke_perm: don't leak fd at the end of the test; close it This code is unused on FreeBSD, but it mutes a valid Coverity warning which would be true on NetBSD CID: 978311
* MFC r311246:ngie2017-01-071-0/+3
| | | | | | fexecve: don't leak fd on fexecve(2) failure; close before calling err CID: 978285
* MFC r311270:ngie2017-01-071-0/+3
| | | | | | pipe_restart: free f on function exit to quell complaint from Coverity CID: 978307
* MFC r311291:ngie2017-01-071-2/+2
| | | | bridge_get_pfval: use nitems instead of spelling it out longhand
* MFC r310501:ngie2017-01-071-18/+7
| | | | | | | | | | | | Be more strict about IpAddress type in snmp_value_parse(..) - Use inet_pton with AF_INET instead of doing longhand with sscanf. - Use gethostbyname2 with AF_INET to ensure that the hostname isn't accidentally parsed with another address family, e.g. AF_INET6. NB: IpAddress per RFC-2578 is IPv4 only. Work is in progress to add the InetAddress type and friends documented in RFC-4001 and elsewhere (which supports IPv4, IPv6, and more).
* MFC r310952:ngie2017-01-071-3/+3
| | | | | | | | | | | 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
* MFC r310957,r310958,r310960:ngie2017-01-073-8/+12
| | | | | | | | | | | | | | | | | | | | | | | | | 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
* MFC r310497:ngie2017-01-073-42/+36
| | | | | | | | 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
* MFC r310931,r310942,r310988:ngie2017-01-071-5/+8
| | | | | | | | | | | | | | | | | | | | | | | | | 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
* MFC r310954,r310987,r311222:ngie2017-01-072-11/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* MFC r311242:ngie2017-01-071-0/+3
| | | | | | listen_low_port: check for errors from socket(2) before continuing CID: 976778
* MFC r311239:ngie2017-01-071-0/+3
| | | | | | umask_open: don't leak fd on success CID: 978315
* Regenerate src.conf(5)ngie2017-01-061-14/+6
|
* MFstable/11 r311551:ngie2017-01-061-0/+2
| | | | | | MFC r311136: Add WITH_SSP to silence complaints from mkman about there not being a file
* MFC 306562: Handle 64-bit system call arguments (off_t, id_t).jhb2017-01-061-7/+37
| | | | | | | | | | | | 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.
* MFC r310821:kib2017-01-061-16/+22
| | | | Style.
* MFC r310834:kib2017-01-061-6/+10
| | | | | Assert that the pages found on the object queue by vm_page_next() and vm_page_prev() have correct ownership.
* MFC r310151 and r311173.np2017-01-0614-29747/+29484
| | | | | | | | | | | | | | 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
* MFC r310817arybchik2017-01-068-507/+3
| | | | | | | | | | | 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.
* MFC r310815arybchik2017-01-062-23/+173
| | | | | | | | | | 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.
* MFC r310814arybchik2017-01-062-8/+11
| | | | | | | | | | 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.
* MFC r310818arybchik2017-01-061-4/+7
| | | | | | | sfxge(4): support per-command MCDI timeout Submitted by: Andy Moreton <amoreton at solarflare.com> Sponsored by: Solarflare Communications, Inc.
* MFC r310813arybchik2017-01-067-1/+90
| | | | | | | | | | | | 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.
* MFC r310765arybchik2017-01-069-33/+140
| | | | | | | 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.
* MFC r310816arybchik2017-01-065-43/+132
| | | | | | | | | | | | | | | | | | | | | 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.
* MFC r310753arybchik2017-01-063-54/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* MFC r310750arybchik2017-01-061-0/+2
| | | | | | | | | | | 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.
* MFC r310744arybchik2017-01-061-150/+128
| | | | | | | | | | | | | | | | 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.
* MFstable/11 r311467:ngie2017-01-061-5/+6
| | | | | | | | | | 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)
* MFstable/11 r311465:ngie2017-01-061-4/+3
| | | | | | | | | MFC r311175: Swap parameters around with parse_syntax_strval(..) for consistency with other parse_* APIs in bsnmp* Noted by: bz
* MFC r305591: Decode ATA Status Return descriptor.mav2017-01-052-0/+75
|
* MFC r297756: Add couple new constants from SPC5r08.mav2017-01-051-0/+2
|
* MFC r310534: Improve third-party copy error reporting.mav2017-01-051-39/+155
| | | | | | | | | | 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.
* MFC r310524: Improve length handling when writing sense data.mav2017-01-056-328/+313
| | | | | | | - 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.
* MFC r310489: Implement printing forwarded sense data.mav2017-01-052-1/+28
|
* MFC r310478: Add place-holders for TAPE STREAM MIRRORING subcommands of XCOPY.mav2017-01-051-1/+50
| | | | We do not support tapes, so this is only a comments.
* MFC r310390: Add support for REPD bit in RSTMF command.mav2017-01-053-6/+47
| | | | We have no real timeout values to report there, but its better then error.
OpenPOWER on IntegriCloud