Home
last modified time | relevance | path

Searched refs:fd_count (Results 1 – 5 of 5) sorted by relevance

/bionic/libc/include/bits/fortify/
Dpoll.h38 #define __bos_fd_count_trivially_safe(bos_val, fds, fd_count) \ argument
39 __bos_dynamic_check_impl_and((bos_val), >=, (sizeof(*fds) * (fd_count)), \
40 (fd_count) <= __BIONIC_CAST(static_cast, nfds_t, -1) / sizeof(*fds))
43 int poll(struct pollfd* const fds __pass_object_size, nfds_t fd_count, int timeout) in poll() argument
45 __clang_error_if(__bos_unevaluated_lt(__bos(fds), sizeof(*fds) * fd_count), in poll()
50 if (!__bos_fd_count_trivially_safe(bos_fds, fds, fd_count)) { in poll()
51 return __poll_chk(fds, fd_count, timeout, bos_fds); in poll()
54 return __call_bypassing_fortify(poll)(fds, fd_count, timeout); in poll()
59 int ppoll(struct pollfd* const fds __pass_object_size, nfds_t fd_count, const struct timespec* time… in ppoll() argument
61 __clang_error_if(__bos_unevaluated_lt(__bos(fds), sizeof(*fds) * fd_count), in ppoll()
[all …]
/bionic/libc/bionic/
Dpoll.cpp41 int poll(pollfd* fds, nfds_t fd_count, int ms) { in poll() argument
48 return __ppoll(fds, fd_count, ts_ptr, nullptr, 0); in poll()
51 int ppoll(pollfd* fds, nfds_t fd_count, const timespec* ts, const sigset_t* ss) { in ppoll() argument
60 return ppoll64(fds, fd_count, ts, ss_ptr); in ppoll()
63 int ppoll64(pollfd* fds, nfds_t fd_count, const timespec* ts, const sigset64_t* ss) { in ppoll64() argument
79 return __ppoll(fds, fd_count, mutable_ts_ptr, mutable_ss_ptr, sizeof(*mutable_ss_ptr)); in ppoll64()
82 int select(int fd_count, fd_set* read_fds, fd_set* write_fds, fd_set* error_fds, timeval* tv) { in select() argument
92 int result = __pselect6(fd_count, read_fds, write_fds, error_fds, ts_ptr, nullptr); in select()
99 int pselect(int fd_count, fd_set* read_fds, fd_set* write_fds, fd_set* error_fds, in pselect() argument
109 return pselect64(fd_count, read_fds, write_fds, error_fds, ts, ss_ptr); in pselect()
[all …]
Dfortify.cpp158 int __poll_chk(pollfd* fds, nfds_t fd_count, int timeout, size_t fds_size) { in __poll_chk() argument
159 __check_pollfd_array("poll", fds_size, fd_count); in __poll_chk()
160 return poll(fds, fd_count, timeout); in __poll_chk()
163 int __ppoll_chk(pollfd* fds, nfds_t fd_count, const timespec* timeout, in __ppoll_chk() argument
165 __check_pollfd_array("ppoll", fds_size, fd_count); in __ppoll_chk()
166 return ppoll(fds, fd_count, timeout, mask); in __ppoll_chk()
169 int __ppoll64_chk(pollfd* fds, nfds_t fd_count, const timespec* timeout, in __ppoll64_chk() argument
171 __check_pollfd_array("ppoll64", fds_size, fd_count); in __ppoll64_chk()
172 return ppoll64(fds, fd_count, timeout, mask); in __ppoll64_chk()
/bionic/libc/private/
Dbionic_fortify.h66 static inline void __check_pollfd_array(const char* fn, size_t fds_size, nfds_t fd_count) { in __check_pollfd_array() argument
68 if (__predict_false(pollfd_array_length < fd_count)) { in __check_pollfd_array()
70 fn, pollfd_array_length, fd_count); in __check_pollfd_array()
/bionic/tests/
Dfortify_test.cpp997 nfds_t fd_count = atoi("2"); // suppress compiler optimizations in TEST_F() local
1000 ASSERT_FORTIFY(poll(buf, fd_count, 0)); in TEST_F()
1004 nfds_t fd_count = atoi("2"); // suppress compiler optimizations in TEST_F() local
1009 ASSERT_FORTIFY(ppoll(buf, fd_count, &timeout, nullptr)); in TEST_F()
1014 nfds_t fd_count = atoi("2"); // suppress compiler optimizations in TEST_F() local
1019 ASSERT_FORTIFY(ppoll64(buf, fd_count, &timeout, nullptr)); in TEST_F()