RLBox
Public Member Functions | Public Attributes | List of all members
rlbox::tainted_volatile< T, T_Sbx > Class Template Reference

Tainted volatile values are like tainted values but still point to sandbox memory. Dereferencing a tainted pointer produces a tainted_volatile. More...

#include <rlbox.hpp>

Inheritance diagram for rlbox::tainted_volatile< T, T_Sbx >:
Inheritance graph
[legend]
Collaboration diagram for rlbox::tainted_volatile< T, T_Sbx >:
Collaboration graph
[legend]

Public Member Functions

tainted< const T *, T_Sbx > operator& () const noexcept
 
tainted< T *, T_Sbx > operator& () noexcept
 
template<typename T_RhsRef >
tainted_volatile< T, T_Sbx > & operator= (T_RhsRef &&val)
 
template<typename T_Rhs >
void assign_raw_pointer (rlbox_sandbox< T_Sbx > &sandbox, T_Rhs val)
 
template<typename T_Dummy = void>
 operator bool () const
 
- Public Member Functions inherited from rlbox::tainted_base_impl< tainted_volatile, T, T_Sbx >
auto & impl ()
 
auto & impl () const
 
auto UNSAFE_unverified ()
 Unwrap a tainted value without verification. This is an unsafe operation and should be used with care.
 
auto UNSAFE_unverified () const
 
auto UNSAFE_sandboxed (rlbox_sandbox< T_Sbx > &sandbox)
 Like UNSAFE_unverified, but get the underlying sandbox representation. More...
 
auto UNSAFE_sandboxed (rlbox_sandbox< T_Sbx > &sandbox) const
 
 rlbox_detail_member_and_const (template< size_t N > inline auto unverified_safe_because(const char(&reason)[N]), { RLBOX_UNUSED(reason);static_assert(!std::is_pointer_v< T >, "unverified_safe_because does not support pointers. Use " "unverified_safe_pointer_because.");return UNSAFE_unverified();})
 Unwrap a tainted value without verification. This function should be used when unwrapping is safe. More...
 
 rlbox_detail_member_and_const (template< size_t N > inline auto unverified_safe_pointer_because(size_t count, const char(&reason)[N]), { RLBOX_UNUSED(reason);static_assert(std::is_pointer_v< T >, "Expected pointer type");using T_Pointed=std::remove_pointer_t< T >;if_constexpr_named(cond1, std::is_pointer_v< T_Pointed >) { rlbox_detail_static_fail_because(cond1, "There is no way to use unverified_safe_pointer_because for " "'pointers to pointers' safely. Use copy_and_verify instead.");return nullptr;} auto ret=UNSAFE_unverified();if(ret !=nullptr) { size_t bytes=sizeof(T) *count;detail::check_range_doesnt_cross_app_sbx_boundary< T_Sbx >(ret, bytes);} return ret;})
 
auto INTERNAL_unverified_safe ()
 
auto INTERNAL_unverified_safe () const
 
 BinaryOpValAndPtr (+)
 
 BinaryOpValAndPtr (-)
 
BinaryOp * BinaryOp (/);BinaryOp(%
 
BinaryOp^ BinaryOp (&);BinaryOp(|
 
 BinaryOp (<<)
 
 BinaryOp (>>)
 
 CompoundAssignmentOp (+)
 
 CompoundAssignmentOp (-)
 
CompoundAssignmentOp * CompoundAssignmentOp (/);CompoundAssignmentOp(%
 
CompoundAssignmentOp^ CompoundAssignmentOp (&);CompoundAssignmentOp(|
 
 CompoundAssignmentOp (<<)
 
 CompoundAssignmentOp (>>)
 
 PreIncDecOps (+)
 
 PreIncDecOps (-)
 
 PostIncDecOps (+)
 
 PostIncDecOps (-)
 
BooleanBinaryOp && BooleanBinaryOp (||);#define UnaryOp(opSymbol) UnaryOp(-
 
 UnaryOp (~)
 
 CompareOp (==, true)
 
 CompareOp (!=, true)
 
 CompareOp (<, false)
 
 CompareOp (<=, false)
 
 CompareOp (>, false)
 
 CompareOp (>=, false)
 
const T_OpSubscriptArrRet & operator[] (T_Rhs &&rhs) const
 
T_OpSubscriptArrRet & operator[] (T_Rhs &&rhs)
 
T_OpDerefRetoperator* () const
 
T_OpDerefRetoperator* ()
 
auto operator-> () const
 
auto operator-> ()
 
auto operator! ()
 
auto copy_and_verify (T_Func verifier) const
 Copy tainted value from sandbox and verify it. More...
 
auto copy_and_verify_range (T_Func verifier, std::size_t count) const
 Copy a range of tainted values from sandbox and verify them. More...
 
auto copy_and_verify_string (T_Func verifier) const
 Copy a tainted string from sandbox and verify it. More...
 
auto copy_and_verify_address (T_Func verifier)
 Copy a tainted pointer from sandbox and verify the address. More...
 
auto copy_and_verify_buffer_address (T_Func verifier, std::size_t size)
 Copy a tainted pointer to a buffer from sandbox and verify the address. More...
 

Public Attributes

rlbox_detail_forward_binop_to_base & T_ClassBase
 

Detailed Description

template<typename T, typename T_Sbx>
class rlbox::tainted_volatile< T, T_Sbx >

Tainted volatile values are like tainted values but still point to sandbox memory. Dereferencing a tainted pointer produces a tainted_volatile.


The documentation for this class was generated from the following file: