iPXE
Macros | Typedefs | Functions | Variables
uaccess.h File Reference

Access to external ("user") memory. More...

#include <stdint.h>
#include <string.h>
#include <ipxe/api.h>
#include <config/ioapi.h>
#include <ipxe/linux/linux_uaccess.h>
#include <bits/uaccess.h>

Go to the source code of this file.

Macros

#define UACCESS_PREFIX_flat   __flat_
 
#define UNULL   ( ( userptr_t ) 0 )
 Equivalent of NULL for user pointers. More...
 
#define UACCESS_INLINE(_subsys, _api_func)   SINGLE_API_INLINE ( UACCESS_PREFIX_ ## _subsys, _api_func )
 Calculate static inline user access API function name. More...
 
#define PROVIDE_UACCESS(_subsys, _api_func, _func)   PROVIDE_SINGLE_API ( UACCESS_PREFIX_ ## _subsys, _api_func, _func )
 Provide an user access API implementation. More...
 
#define PROVIDE_UACCESS_INLINE(_subsys, _api_func)   PROVIDE_SINGLE_API_INLINE ( UACCESS_PREFIX_ ## _subsys, _api_func )
 Provide a static inline user access API implementation. More...
 

Typedefs

typedef unsigned long userptr_t
 A pointer to a user buffer. More...
 

Functions

 FILE_LICENCE (GPL2_OR_LATER_OR_UBDL)
 
static __always_inline userptr_t trivial_virt_to_user (volatile const void *addr)
 Convert virtual address to user pointer. More...
 
static __always_inline void * trivial_user_to_virt (userptr_t userptr, off_t offset)
 Convert user pointer to virtual address. More...
 
static __always_inline userptr_t trivial_userptr_add (userptr_t userptr, off_t offset)
 Add offset to user pointer. More...
 
static __always_inline off_t trivial_userptr_sub (userptr_t userptr, userptr_t subtrahend)
 Subtract user pointers. More...
 
static __always_inline void trivial_memcpy_user (userptr_t dest, off_t dest_off, userptr_t src, off_t src_off, size_t len)
 Copy data between user buffers. More...
 
static __always_inline void trivial_memmove_user (userptr_t dest, off_t dest_off, userptr_t src, off_t src_off, size_t len)
 Copy data between user buffers, allowing for overlap. More...
 
static __always_inline int trivial_memcmp_user (userptr_t first, off_t first_off, userptr_t second, off_t second_off, size_t len)
 Compare data between user buffers. More...
 
static __always_inline void trivial_memset_user (userptr_t buffer, off_t offset, int c, size_t len)
 Fill user buffer with a constant byte. More...
 
static __always_inline size_t trivial_strlen_user (userptr_t buffer, off_t offset)
 Find length of NUL-terminated string in user buffer. More...
 
static __always_inline off_t trivial_memchr_user (userptr_t buffer, off_t offset, int c, size_t len)
 Find character in user buffer. More...
 
static __always_inline userptr_t UACCESS_INLINE (flat, phys_to_user)(unsigned long phys_addr)
 
static __always_inline unsigned long UACCESS_INLINE (flat, user_to_phys)(userptr_t userptr
 
static __always_inline userptr_t UACCESS_INLINE (flat, virt_to_user)(volatile const void *addr)
 
static __always_inline void * UACCESS_INLINE (flat, user_to_virt)(userptr_t userptr
 
static __always_inline userptr_t UACCESS_INLINE (flat, userptr_add)(userptr_t userptr
 
static __always_inline off_t UACCESS_INLINE (flat, userptr_sub)(userptr_t userptr
 
static __always_inline void UACCESS_INLINE (flat, memcpy_user)(userptr_t dest
 
static __always_inline void UACCESS_INLINE (flat, memmove_user)(userptr_t dest
 
static __always_inline int UACCESS_INLINE (flat, memcmp_user)(userptr_t first
 
static __always_inline void UACCESS_INLINE (flat, memset_user)(userptr_t buffer
 
static __always_inline size_t UACCESS_INLINE (flat, strlen_user)(userptr_t buffer
 
static __always_inline off_t UACCESS_INLINE (flat, memchr_user)(userptr_t buffer
 
userptr_t phys_to_user (unsigned long phys_addr)
 Convert physical address to user pointer. More...
 
unsigned long user_to_phys (userptr_t userptr, off_t offset)
 Convert user pointer to physical address. More...
 
userptr_t virt_to_user (volatile const void *addr)
 Convert virtual address to user pointer. More...
 
void * user_to_virt (userptr_t userptr, off_t offset)
 Convert user pointer to virtual address. More...
 
userptr_t userptr_add (userptr_t userptr, off_t offset)
 Add offset to user pointer. More...
 
off_t userptr_sub (userptr_t userptr, userptr_t subtrahend)
 Subtract user pointers. More...
 
static __always_inline unsigned long virt_to_phys (volatile const void *addr)
 Convert virtual address to a physical address. More...
 
static __always_inline void * phys_to_virt (unsigned long phys_addr)
 Convert physical address to a virtual address. More...
 
void memcpy_user (userptr_t dest, off_t dest_off, userptr_t src, off_t src_off, size_t len)
 Copy data between user buffers. More...
 
static __always_inline void copy_to_user (userptr_t dest, off_t dest_off, const void *src, size_t len)
 Copy data to user buffer. More...
 
static __always_inline void copy_from_user (void *dest, userptr_t src, off_t src_off, size_t len)
 Copy data from user buffer. More...
 
void memmove_user (userptr_t dest, off_t dest_off, userptr_t src, off_t src_off, size_t len)
 Copy data between user buffers, allowing for overlap. More...
 
int memcmp_user (userptr_t first, off_t first_off, userptr_t second, off_t second_off, size_t len)
 Compare data between user buffers. More...
 
void memset_user (userptr_t userptr, off_t offset, int c, size_t len)
 Fill user buffer with a constant byte. More...
 
size_t strlen_user (userptr_t userptr, off_t offset)
 Find length of NUL-terminated string in user buffer. More...
 
off_t memchr_user (userptr_t userptr, off_t offset, int c, size_t len)
 Find character in user buffer. More...
 

Variables

static __always_inline unsigned long off_t offset
 
static __always_inline off_t userptr_t subtrahend
 
static __always_inline void off_t dest_off
 
static __always_inline void off_t userptr_t src
 
static __always_inline void off_t userptr_t off_t src_off
 
static __always_inline void off_t userptr_t off_t size_t len
 
static __always_inline int off_t first_off
 
static __always_inline int off_t userptr_t second
 
static __always_inline int off_t userptr_t off_t second_off
 
static __always_inline void off_t int c
 

Detailed Description

Access to external ("user") memory.

iPXE often needs to transfer data between internal and external buffers. On i386, the external buffers may require access via a different segment, and the buffer address cannot be encoded into a simple void * pointer. The userptr_t type encapsulates the information needed to identify an external buffer, and the copy_to_user() and copy_from_user() functions provide methods for transferring data between internal and external buffers.

Note that userptr_t is an opaque type; in particular, performing arithmetic upon a userptr_t is not allowed.

Definition in file uaccess.h.

Macro Definition Documentation

◆ UACCESS_PREFIX_flat

#define UACCESS_PREFIX_flat   __flat_

Definition at line 32 of file uaccess.h.

◆ UNULL

#define UNULL   ( ( userptr_t ) 0 )

Equivalent of NULL for user pointers.

Definition at line 42 of file uaccess.h.

◆ UACCESS_INLINE

#define UACCESS_INLINE (   _subsys,
  _api_func 
)    SINGLE_API_INLINE ( UACCESS_PREFIX_ ## _subsys, _api_func )

Calculate static inline user access API function name.

Parameters
_prefixSubsystem prefix
_api_funcAPI function
Return values
_subsys_funcSubsystem API function

Definition at line 203 of file uaccess.h.

◆ PROVIDE_UACCESS

#define PROVIDE_UACCESS (   _subsys,
  _api_func,
  _func 
)    PROVIDE_SINGLE_API ( UACCESS_PREFIX_ ## _subsys, _api_func, _func )

Provide an user access API implementation.

Parameters
_prefixSubsystem prefix
_api_funcAPI function
_funcImplementing function

Definition at line 213 of file uaccess.h.

◆ PROVIDE_UACCESS_INLINE

#define PROVIDE_UACCESS_INLINE (   _subsys,
  _api_func 
)    PROVIDE_SINGLE_API_INLINE ( UACCESS_PREFIX_ ## _subsys, _api_func )

Provide a static inline user access API implementation.

Parameters
_prefixSubsystem prefix
_api_funcAPI function

Definition at line 222 of file uaccess.h.

Typedef Documentation

◆ userptr_t

typedef unsigned long userptr_t

A pointer to a user buffer.

Definition at line 39 of file uaccess.h.

Function Documentation

◆ FILE_LICENCE()

FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL  )

◆ UACCESS_INLINE() [1/12]

static __always_inline userptr_t UACCESS_INLINE ( flat  ,
phys_to_user   
)
inlinestatic

Definition at line 226 of file uaccess.h.

226  {
227  return phys_addr;
228 }

◆ UACCESS_INLINE() [2/12]

static __always_inline unsigned long UACCESS_INLINE ( flat  ,
user_to_phys   
)
inlinestatic

◆ UACCESS_INLINE() [3/12]

static __always_inline userptr_t UACCESS_INLINE ( flat  ,
virt_to_user   
) const volatile
inlinestatic

Definition at line 236 of file uaccess.h.

236  {
237  return trivial_virt_to_user ( addr );
238 }
u32 addr
Definition: sky2.h:8
static __always_inline userptr_t trivial_virt_to_user(volatile const void *addr)
Convert virtual address to user pointer.
Definition: uaccess.h:61

References addr, and trivial_virt_to_user().

◆ UACCESS_INLINE() [4/12]

static __always_inline void* UACCESS_INLINE ( flat  ,
user_to_virt   
)
inlinestatic

◆ UACCESS_INLINE() [5/12]

static __always_inline userptr_t UACCESS_INLINE ( flat  ,
userptr_add   
)
inlinestatic

◆ UACCESS_INLINE() [6/12]

static __always_inline off_t UACCESS_INLINE ( flat  ,
userptr_sub   
)
inlinestatic

◆ UACCESS_INLINE() [7/12]

static __always_inline void UACCESS_INLINE ( flat  ,
memcpy_user   
)
inlinestatic

◆ UACCESS_INLINE() [8/12]

static __always_inline void UACCESS_INLINE ( flat  ,
memmove_user   
)
inlinestatic

◆ UACCESS_INLINE() [9/12]

static __always_inline int UACCESS_INLINE ( flat  ,
memcmp_user   
)
inlinestatic

◆ UACCESS_INLINE() [10/12]

static __always_inline void UACCESS_INLINE ( flat  ,
memset_user   
)
inlinestatic

◆ UACCESS_INLINE() [11/12]

static __always_inline size_t UACCESS_INLINE ( flat  ,
strlen_user   
)
inlinestatic

◆ UACCESS_INLINE() [12/12]

static __always_inline off_t UACCESS_INLINE ( flat  ,
memchr_user   
)
inlinestatic

◆ phys_to_user()

userptr_t phys_to_user ( unsigned long  phys_addr)

◆ user_to_phys()

unsigned long user_to_phys ( userptr_t  userptr,
off_t  offset 
)

◆ virt_to_user()

userptr_t virt_to_user ( volatile const void *  addr)

◆ user_to_virt()

void* user_to_virt ( userptr_t  userptr,
off_t  offset 
)

Convert user pointer to virtual address.

Parameters
userptrUser pointer
offsetOffset from user pointer
Return values
addrVirtual address

This operation is not available under all memory models.

Referenced by bzimage_check_initrds(), bzimage_load_initrd(), efi_image_exec(), efi_image_probe(), efipci_dma_ufree(), initrd_dump(), and phys_to_virt().

◆ userptr_add()

userptr_t userptr_add ( userptr_t  userptr,
off_t  offset 
)

Add offset to user pointer.

Parameters
userptrUser pointer
offsetOffset
Return values
userptrNew pointer value

Referenced by bzimage_check_initrds(), bzimage_load_initrds(), ecollect_free(), gve_buffer(), gzip_extract(), init_eheap(), initrd_startup(), initrd_swap(), initrd_swap_any(), memtop_urealloc(), nbi_process_segments(), and sandev_rw().

◆ userptr_sub()

off_t userptr_sub ( userptr_t  userptr,
userptr_t  subtrahend 
)

Subtract user pointers.

Parameters
userptrUser pointer
subtrahendUser pointer to be subtracted
Return values
offsetOffset

Referenced by bzimage_load_initrds(), initrd_reshuffle(), initrd_reshuffle_check(), and initrd_squash_high().

◆ virt_to_phys()

static __always_inline unsigned long virt_to_phys ( volatile const void *  addr)
inlinestatic

Convert virtual address to a physical address.

Parameters
addrVirtual address
Return values
phys_addrPhysical address

Definition at line 361 of file uaccess.h.

361  {
362  return user_to_phys ( virt_to_user ( addr ), 0 );
363 }
unsigned long user_to_phys(userptr_t userptr, off_t offset)
Convert user pointer to physical address.
u32 addr
Definition: sky2.h:8
userptr_t virt_to_user(volatile const void *addr)
Convert virtual address to user pointer.

References addr, user_to_phys(), and virt_to_user().

Referenced by alloc_iob_okx(), alloc_memblock(), arbel_alloc_icm(), arbel_cmd(), arbel_complete(), arbel_create_cq(), arbel_create_eq(), arbel_create_qp(), arbel_poll_eq(), arbel_post_send(), arbel_ring_doorbell(), bios_mp_start_all(), com32_exec_loop(), dma(), efipci_dma_alloc(), ehci_bus_open(), ehci_ctrl_reachable(), ehci_endpoint_reset(), ehci_enqueue(), ehci_init(), ehci_link_qh(), ehci_ring_alloc(), ena_admin(), ena_create_admin(), ena_create_async(), ena_create_cq(), ena_create_sq(), ena_probe(), flexboot_nodnic_poll_cq(), fnrec_dump(), gdbmach_set_breakpoint(), gve_admin_alloc(), gve_alloc_shared(), hermon_alloc_mtt(), hermon_cmd(), hermon_complete(), hermon_create_cq(), hermon_create_eq(), hermon_create_qp(), hermon_poll_cq(), hermon_poll_eq(), hermon_post_send(), hide_etherboot(), hide_textdata(), hide_umalloc(), hv_map_hypercall(), hv_map_synic(), hvm_ioremap(), hvm_iounmap(), hvm_map_grant(), hvm_map_hypercall(), hvm_map_shared_info(), icplus_transmit(), init_idt(), intel_create_ring(), intel_refill_rx(), intel_transmit(), intelxl_admin_command(), intelxl_alloc_admin(), intelxl_alloc_ring(), intelxl_msix_enable(), intelxl_poll_admin(), intelxl_refill_rx(), intelxl_transmit(), intelxlvf_admin_event(), iob_map(), IOMAP_INLINE(), mp_address(), multiboot_add_cmdline(), multiboot_exec(), nbi_boot32(), netfront_create_ring(), netfront_poll_rx(), netfront_refill_rx(), netfront_transmit(), pxe_start_nbp(), rdc_create_ring(), rdc_refill_rx(), realtek_create_buffer(), realtek_create_ring(), realtek_refill_rx(), realtek_transmit(), relocate(), ucode_update_all(), uhci_bus_open(), uhci_describe(), uhci_endpoint_poll(), uhci_enqueue(), uhci_link_qh(), uhci_reachable(), uhci_restart(), virt_to_bus(), vmbus_initiate_contact(), vmbus_open(), vmbus_send_data(), vring_init(), xen_hvm_get_param(), xhci_command_alloc(), xhci_dcbaa_alloc(), xhci_device_open(), xhci_endpoint_open(), xhci_event_alloc(), xhci_event_poll(), xhci_init(), xhci_ring_consumed(), and xhci_scratchpad_alloc().

◆ phys_to_virt()

static __always_inline void* phys_to_virt ( unsigned long  phys_addr)
inlinestatic

Convert physical address to a virtual address.

Parameters
addrVirtual address
Return values
phys_addrPhysical address

This operation is not available under all memory models.

Definition at line 373 of file uaccess.h.

373  {
374  return user_to_virt ( phys_to_user ( phys_addr ), 0 );
375 }
userptr_t phys_to_user(unsigned long phys_addr)
Convert physical address to user pointer.
void * user_to_virt(userptr_t userptr, off_t offset)
Convert user pointer to virtual address.

References phys_to_user(), and user_to_virt().

Referenced by bus_to_virt(), efipci_dma_map(), fnrec_init(), interrupt_dump(), myri10ge_net_open(), video_init(), and vring_init().

◆ memcpy_user()

void memcpy_user ( userptr_t  dest,
off_t  dest_off,
userptr_t  src,
off_t  src_off,
size_t  len 
)

◆ copy_to_user()

static __always_inline void copy_to_user ( userptr_t  dest,
off_t  dest_off,
const void *  src,
size_t  len 
)
inlinestatic

Copy data to user buffer.

Parameters
destDestination
dest_offDestination offset
srcSource
lenLength

Definition at line 398 of file uaccess.h.

398  {
400 }
static __always_inline void off_t userptr_t off_t size_t len
Definition: uaccess.h:259
static __always_inline void off_t userptr_t src
Definition: uaccess.h:257
static __always_inline void off_t dest_off
Definition: uaccess.h:257
userptr_t virt_to_user(volatile const void *addr)
Convert virtual address to user pointer.
if(len >=6 *4) __asm__ __volatile__("movsl" if(len >=5 *4) __asm__ __volatile__("movsl" if(len >=4 *4) __asm__ __volatile__("movsl" if(len >=3 *4) __asm__ __volatile__("movsl" if(len >=2 *4) __asm__ __volatile__("movsl" if(len >=1 *4) __asm__ __volatile__("movsl" if((len % 4) >=2) __asm__ __volatile__("movsw" if((len % 2) >=1) __asm__ __volatile__("movsb" return dest
Definition: string.h:150
void memcpy_user(userptr_t dest, off_t dest_off, userptr_t src, off_t src_off, size_t len)
Copy data between user buffers.

References dest, dest_off, len, memcpy_user(), src, and virt_to_user().

Referenced by aoecmd_ata_rsp(), blktrans_xferbuf_write(), bofm(), bzimage_load_initrd(), bzimage_set_cmdline(), bzimage_update_header(), cms_decrypt(), comboot_copy_cmdline(), comboot_init_psp(), copy_to_real(), efi_urealloc(), efifb_draw(), fbcon_clear(), fbcon_draw(), fbcon_picture_init(), fbcon_store(), fcpcmd_recv_rddata(), gve_alloc_queue(), gve_transmit(), iscsi_rx_data_in(), memtop_urealloc(), png_pixels_pass(), png_unfilter_pass(), pnm_data(), pxe_api_call(), pxe_loader_call(), pxe_tftp_xfer_deliver(), pxenv_file_cmdline(), pxenv_get_cached_info(), pxenv_udp_read(), read_user(), txnic_refill_rq(), txnic_send(), usbblk_in_data(), and xferbuf_umalloc_write().

◆ copy_from_user()

static __always_inline void copy_from_user ( void *  dest,
userptr_t  src,
off_t  src_off,
size_t  len 
)
inlinestatic

Copy data from user buffer.

Parameters
destDestination
srcSource
src_offSource offset
lenLength

Definition at line 411 of file uaccess.h.

411  {
412  memcpy_user ( virt_to_user ( dest ), 0, src, src_off, len );
413 }
static __always_inline void off_t userptr_t off_t size_t len
Definition: uaccess.h:259
static __always_inline void off_t userptr_t src
Definition: uaccess.h:257
static __always_inline void off_t userptr_t off_t src_off
Definition: uaccess.h:257
userptr_t virt_to_user(volatile const void *addr)
Convert virtual address to user pointer.
if(len >=6 *4) __asm__ __volatile__("movsl" if(len >=5 *4) __asm__ __volatile__("movsl" if(len >=4 *4) __asm__ __volatile__("movsl" if(len >=3 *4) __asm__ __volatile__("movsl" if(len >=2 *4) __asm__ __volatile__("movsl" if(len >=1 *4) __asm__ __volatile__("movsl" if((len % 4) >=2) __asm__ __volatile__("movsw" if((len % 2) >=1) __asm__ __volatile__("movsb" return dest
Definition: string.h:150
void memcpy_user(userptr_t dest, off_t dest_off, userptr_t src, off_t src_off, size_t len)
Copy data between user buffers.

References dest, len, memcpy_user(), src, src_off, and virt_to_user().

Referenced by acpi_extract(), acpi_extract_sx(), acpi_find_via_rsdt(), acpi_poweroff(), acpi_settings_fetch(), acpi_timer_probe(), acpi_zsdt(), acpimac_extract(), aoecmd_ata_cmd(), blktrans_xferbuf_read(), bofm(), bofm_locate_section(), bzimage_parse_header(), cachedhcp_record(), cmdline_init(), cms_decrypt(), cms_digest(), com32_identify(), copy_from_real(), deflate_accumulate(), der_asn1(), der_probe(), digest_exec(), ecam_find(), ecollect_free(), efi_file_read_chunk(), efi_pe_image_probe(), efi_urealloc(), efifb_glyph(), elf_load(), elf_segments(), elfboot_probe(), exanic_poll_rx(), fbcon_draw_cursor(), fbcon_picture_init(), fbcon_redraw(), fcpcmd_send_wrdata(), find_smbios3_entry(), find_smbios_entry(), find_smbios_structure(), find_strings_terminator(), gve_poll_rx(), gzip_extract(), gzip_probe(), int13_load_eltorito(), int22(), iscsi_tx_data_out(), memtop_urealloc(), multiboot_find_header(), nbi_exec(), nbi_probe(), nbi_process_segments(), netvsc_buffer_copy(), peerdist_info_get(), pem_asn1(), pem_marker(), png_image_header(), png_palette(), png_pixbuf(), png_pixels_pass(), png_probe(), png_unfilter_pass(), pnm_ascii(), pnm_binary(), pnm_probe(), pnm_type(), print_user_string(), process_script(), pxe_api_call(), pxe_loader_call(), pxe_probe_no_mz(), pxenv_file_exec(), pxenv_file_open(), pxenv_udp_write(), read_smbios_string(), read_smbios_structure(), rsdp_find_rsdt_range(), script_probe(), sdi_parse_header(), shuffle(), smbios_checksum(), txnic_poll_cq(), typeof(), ucode_parse_amd(), ucode_parse_intel(), ucode_probe(), ucode_status(), ucode_verify(), usbblk_out_data(), vesafb_mode_list(), vram_fetch(), xferbuf_umalloc_read(), and zlib_probe().

◆ memmove_user()

void memmove_user ( userptr_t  dest,
off_t  dest_off,
userptr_t  src,
off_t  src_off,
size_t  len 
)

Copy data between user buffers, allowing for overlap.

Parameters
destDestination
dest_offDestination offset
srcSource
src_offSource offset
lenLength

Referenced by bzimage_load_initrd(), fbcon_scroll(), initrd_squash_high(), initrd_swap(), memtop_urealloc(), and shuffle().

◆ memcmp_user()

int memcmp_user ( userptr_t  first,
off_t  first_off,
userptr_t  second,
off_t  second_off,
size_t  len 
)

Compare data between user buffers.

Parameters
firstFirst buffer
first_offFirst buffer offset
secondSecond buffer
second_offSecond buffer offset
lenLength
Return values
diffDifference

Referenced by cms_decrypt_okx(), gzip_okx(), pixbuf_okx(), and zlib_okx().

◆ memset_user()

void memset_user ( userptr_t  userptr,
off_t  offset,
int  c,
size_t  len 
)

Fill user buffer with a constant byte.

Parameters
userptrUser buffer
offsetOffset within buffer
cConstant byte with which to fill
lenLength

Referenced by bzimage_load_initrd(), comboot_prepare_segment(), efifb_draw(), efifb_glyphs(), exanic_open(), fbcon_draw(), fbcon_init(), fbcon_picture_init(), gve_start(), prep_segment(), shuffle(), ucode_update_all(), and xhci_scratchpad_alloc().

◆ strlen_user()

size_t strlen_user ( userptr_t  userptr,
off_t  offset 
)

Find length of NUL-terminated string in user buffer.

Parameters
userptrUser buffer
offsetOffset within buffer
Return values
lenLength of string (excluding NUL)

Referenced by cmdline_init(), int22(), pxenv_file_exec(), pxenv_file_open(), and read_smbios_string().

◆ memchr_user()

off_t memchr_user ( userptr_t  userptr,
off_t  offset,
int  c,
size_t  len 
)

Find character in user buffer.

Parameters
userptrUser buffer
offsetStarting offset within buffer
cCharacter to search for
lenLength of user buffer
Return values
offsetOffset of character, or <0 if not found

Referenced by gzip_extract(), pem_next(), and process_script().

Variable Documentation

◆ offset

Initial value:
{
return ( userptr + offset )
static __always_inline unsigned long off_t offset
Definition: uaccess.h:231

Definition at line 231 of file uaccess.h.

Referenced by trivial_memchr_user(), trivial_memset_user(), trivial_strlen_user(), trivial_user_to_virt(), and trivial_userptr_add().

◆ subtrahend

Initial value:
{
return trivial_userptr_sub ( userptr, subtrahend )
static __always_inline off_t trivial_userptr_sub(userptr_t userptr, userptr_t subtrahend)
Subtract user pointers.
Definition: uaccess.h:99
static __always_inline off_t userptr_t subtrahend
Definition: uaccess.h:252

Definition at line 252 of file uaccess.h.

Referenced by trivial_userptr_sub().

◆ dest_off

__always_inline void off_t dest_off

Definition at line 257 of file uaccess.h.

Referenced by copy_to_user(), trivial_memcpy_user(), and trivial_memmove_user().

◆ src

Definition at line 257 of file uaccess.h.

Referenced by copy_from_user(), copy_to_user(), trivial_memcpy_user(), and trivial_memmove_user().

◆ src_off

Definition at line 257 of file uaccess.h.

Referenced by copy_from_user(), trivial_memcpy_user(), and trivial_memmove_user().

◆ len

Initial value:
{
static __always_inline void off_t userptr_t off_t size_t len
Definition: uaccess.h:259
static __always_inline void off_t userptr_t src
Definition: uaccess.h:257
static __always_inline void off_t dest_off
Definition: uaccess.h:257
static __always_inline void off_t userptr_t off_t src_off
Definition: uaccess.h:257
static __always_inline void trivial_memcpy_user(userptr_t dest, off_t dest_off, userptr_t src, off_t src_off, size_t len)
Copy data between user buffers.
Definition: uaccess.h:113
if(len >=6 *4) __asm__ __volatile__("movsl" if(len >=5 *4) __asm__ __volatile__("movsl" if(len >=4 *4) __asm__ __volatile__("movsl" if(len >=3 *4) __asm__ __volatile__("movsl" if(len >=2 *4) __asm__ __volatile__("movsl" if(len >=1 *4) __asm__ __volatile__("movsl" if((len % 4) >=2) __asm__ __volatile__("movsw" if((len % 2) >=1) __asm__ __volatile__("movsb" return dest
Definition: string.h:150

Definition at line 259 of file uaccess.h.

Referenced by copy_from_user(), copy_to_user(), trivial_memchr_user(), trivial_memcmp_user(), trivial_memcpy_user(), trivial_memmove_user(), and trivial_memset_user().

◆ first_off

__always_inline int off_t first_off

Definition at line 271 of file uaccess.h.

Referenced by trivial_memcmp_user().

◆ second

Definition at line 271 of file uaccess.h.

Referenced by trivial_memcmp_user().

◆ second_off

Definition at line 271 of file uaccess.h.

Referenced by trivial_memcmp_user().

◆ c

Definition at line 278 of file uaccess.h.

Referenced by trivial_memchr_user(), and trivial_memset_user().