Commit Graph

453 Commits

Author SHA1 Message Date
kamil aa97815be0 Include explicitly <rump/rump_syscallshotgun.h> for previous indirect users
via <rump/rump.h>.
2020-06-17 00:16:21 +00:00
mrg de11d87641 introduce some common variables for use in GCC warning disables:
GCC_NO_FORMAT_TRUNCATION    -Wno-format-truncation (GCC 7/8)
GCC_NO_STRINGOP_TRUNCATION  -Wno-stringop-truncation (GCC 8)
GCC_NO_STRINGOP_OVERFLOW    -Wno-stringop-overflow (GCC 8)
GCC_NO_CAST_FUNCTION_TYPE   -Wno-cast-function-type (GCC 8)

use these to turn off warnings for most GCC-8 complaints.  many
of these are false positives, most of the real bugs are already
commited, or are yet to come.


we plan to introduce versions of (some?) of these that use the
"-Wno-error=" form, which still displays the warnings but does
not make it an error, and all of the above will be re-considered
as either being "fix me" (warning still displayed) or "warning
is wrong."
2019-10-13 07:28:04 +00:00
kre 6b0ab5c5ab More cases to disable gcc-8 warnings only when we're using gcc>=8 2019-10-10 08:37:16 +00:00
christos c60bf2342e Add -Wno-error for gcc-8 warnings 2019-10-09 23:39:20 +00:00
hannken 6f60c4f99e Move the basic part of XDR to common/include/rpc and common/lib/libc/rpc.
No functional change intended.
2019-06-04 15:07:55 +00:00
hannken 25da6a6235 Implement xdrmem_control(), used as xdr_control(xdr, XDR_GET_BYTES_AVAIL ...
and bump libc minor number.

Final goal is to remove the unmaintained XDR implementation
at external/cddl/osnet/dist/uts/common/rpc.
2019-06-04 08:44:08 +00:00
kamil 1a4c49b997 Avoid undefined behavior in the definition of LAST_FRAG in xdr_rec.c
Do not change the signedness bit with a left shift operation.
Switch to unsigned integer to prevent this in the LAST_FRAG symbol.

xdr_rec.c:559:39, left shift of 1 by 31 places cannot be represented in type 'int'
xdr_rec.c:572:26, left shift of 1 by 31 places cannot be represented in type 'int'
xdr_rec.c:573:25, left shift of 1 by 31 places cannot be represented in type 'int'
xdr_rec.c:632:37, left shift of 1 by 31 places cannot be represented in type 'int'
xdr_rec.c:711:32, left shift of 1 by 31 places cannot be represented in type 'int'
xdr_rec.c:722:28, left shift of 1 by 31 places cannot be represented in type 'int'

Detected with micro-UBSan in the user mode.
2018-07-25 23:59:08 +00:00
abhinav 12893f5e2d Add __svc_getcallercreds to the NAME section
Remove Pp before It at various places
2017-10-25 16:49:24 +00:00
ginsbach 626fa0a1b6 PR lib/15802: Shuuichirou Murata: Add missing xdr_rpcbs_rmtcalllist_ptr
There was a missing call to xdr_rpcbs_rmtcalllist_ptr in xdr_rpcb_stat.
This fixes issues with RPCBPROC_GETSTAT not working correctly with
systems that correctly implement the XDR encode/decode routine.

XXX: pullup-8
XXX: pullup-7
XXX: pullup-6
2017-08-13 01:08:41 +00:00
wiz 01869ca4d2 Remove workaround for ancient HTML generation code. 2017-07-03 21:28:48 +00:00
christos b48a2efd04 Revert previous since it causes a double free (p->nc_netid == tmp == tmp2).
From Xin Li @ FreeBSD.
XXX: pullup 7
2017-06-30 10:03:34 +00:00
christos 1700326566 - limit size of buffers to RPC_MAXDATASIZE
- don't leak memory
- be more picky about bad parameters
https://raw.githubusercontent.com/guidovranken/rpcbomb/master/libtirpc_patch.txt

XXX: pullup-7
2017-05-03 21:39:27 +00:00
maya 0e5a550a5b avoid calloc(1,0).
from clang static analyzer

ok christos
2017-04-18 11:35:34 +00:00
christos 14501124c4 use correct type for poll 2017-01-10 17:45:27 +00:00
wiz 42d8f555f6 Update prototypes to match current RPC code.
Bump date.
2016-12-29 22:07:12 +00:00
christos 6c345d9579 PR/51578: Henning Petersen: Fix leak on error. 2016-10-26 15:39:30 +00:00
christos 4384a68ce2 KNF, no real change (except malloc(x * y) -> calloc(x, y)) 2016-10-26 15:36:17 +00:00
dholland 94048eede3 Typo. 2016-08-08 04:16:45 +00:00
martin 4739ebdb41 Avoid strict alias violation for VAX 2016-02-15 11:07:48 +00:00
christos 50ccfe1eab Generalize the test, compare on the protocol semantics instead of the name
since it could be udp6...
2015-11-13 15:23:17 +00:00
christos 6cd5630e13 Do proper accounting for the extra -1 slot. Perhaps this is too confusing
and it would be better to just access the array with [fd + 1] instead?
2015-11-13 15:22:12 +00:00
tron 25c8e9abea Remove now unnecessary cast. 2015-11-13 11:43:26 +00:00
tron 7655e3065e Don't try to use listen(2) on a UDP socket which will always fail.
Previously this was not a problem because the return value of listen(2)
was ignored. With this fix amd(8) no longer fails to start with the
error message "cannot create rpc/udp service".

TL;DR: Make amd(8) work again
2015-11-13 11:23:08 +00:00
tron 65a6071730 Avoid broken state if realloc(3) fails. 2015-11-13 10:43:32 +00:00
christos f5dda10488 fix compilation/lint 2015-11-10 20:56:20 +00:00
christos 9a91ff6ff5 CID 1338520: Check NULL
CID 1338521: Fix error (realloc returns different pointer)
2015-11-10 18:11:05 +00:00
christos aa158b270c CID 1338517: Check negative returns 2015-11-10 18:08:05 +00:00
christos 69deaff196 CID 1338515: Make it clear that the pfd variable can't be NULL 2015-11-10 18:06:53 +00:00
christos 5d9565aab9 CID 1338513: Check listen(2) return 2015-11-10 18:01:16 +00:00
christos 2a964e6106 Add debugging for pollfd 2015-11-08 19:30:53 +00:00
christos 6821cf5fc4 Only do the compat cruft if we are compiling libc. 2015-11-08 02:46:53 +00:00
christos 245e5bc63c initialize revents too. 2015-11-07 23:17:09 +00:00
christos df8f5914dc PR/50408: Pedro Giffuni: Provide a way for rpc to use poll(2) instead of
select(2), and the linux svc_pollfd and svc_maxpollfd members. Our select(2)
implementation does not suffer from the FD_SETSIZE limitation so this is
not turned on by default.
2015-11-07 23:09:20 +00:00
christos 7c3ee3b303 spell reserved. 2015-11-07 20:24:00 +00:00
christos f0421a30ec check for errors and recover instead of core-dumping. 2015-11-07 17:34:33 +00:00
christos 670a38d899 Put back NULL tests for allocation failures. 2015-11-07 16:58:24 +00:00
christos addac9ec10 don't compile with SVC_LEGACY 2015-11-07 14:21:32 +00:00
christos 68e3906c09 simplify more. 2015-11-07 03:06:32 +00:00
christos 841c77b99c Introduce a binary compatible __fd_set_256 that is what the original fdset
size was for libc. Now we can bump it.
2015-11-07 00:42:04 +00:00
christos 01b6ad43e7 Cleanup and simplify.
undef svc_fdset and svc_maxfd to get to the real data for the compat code.
2015-11-06 23:11:09 +00:00
joerg 76218c7768 Don't use macros as types or variable names. 2015-11-06 23:05:09 +00:00
christos 2f904d5a7a - Provide multi-threaded fdset's for everyone not just rump if requested.
- Abstract fd_set access, and don't limit the fd_set size.
- Maintain binary compatibility by keeping the old global variables around.
2015-11-06 19:34:13 +00:00
christos 46615f7efe - Use -1 for the fake raw fd since we will be able to go beyond FD_SETSIZE.
- Poster boy for why it is bad to initialize in declarations :-)
2015-11-06 19:32:08 +00:00
mrg 2603e0673f remove various HAVE_GCC=45 fragments. 2015-04-15 19:13:46 +00:00
justin 7b67337b9d Fix definitions to match headers 2015-03-26 11:31:57 +00:00
christos 26ba80487b Fix non _REENTRANT build. 2015-01-20 18:31:24 +00:00
snj f0a7346d21 src is too big these days to tolerate superfluous apostrophes. It's
"its", people!
2014-10-18 08:33:23 +00:00
christos 9a513d9643 make more descriptors that we open as close-on-exec 2014-09-18 13:58:20 +00:00
matt 453980f6b8 Assume anything not vax has IEEEFP. 2014-08-24 17:07:00 +00:00
matt 547b3a3b01 Changes to existing files to enable building AARCH64 userland.
evbarm64-el
This is clang only.  While gcc4.8 supports aarch64, no netbsd support has
been written for aarch64 with gcc4.8.
2014-08-10 05:56:36 +00:00