extern _Bool __VERIFIER_nondet_bool(void) ; extern void *malloc(size_t) ; void *ldv_malloc(size_t size ) { if(__VERIFIER_nondet_bool()) return 0; return malloc(size); } // Skip function: __VERIFIER_error // Skip function: __VERIFIER_nondet_int // Function: __alloc_workqueue_key // with type: struct workqueue_struct *__alloc_workqueue_key(const char *name, unsigned int flags, int max_active, struct lock_class_key *key, const char *lock_name) // with return type: (struct workqueue_struct)* struct workqueue_struct *__alloc_workqueue_key(const char *arg0, unsigned int arg1, int arg2, struct lock_class_key *arg3, const char *arg4) { // Pointer type return ldv_malloc(0UL); } // Function: __init_waitqueue_head // with type: void __init_waitqueue_head(wait_queue_head_t *q, struct lock_class_key *) // with return type: void void __init_waitqueue_head(wait_queue_head_t *arg0, struct lock_class_key *arg1) { // Void type return; } // Function: __init_work // with type: void __init_work(struct work_struct *work, int onstack) // with return type: void void __init_work(struct work_struct *arg0, int arg1) { // Void type return; } // Function: __kfifo_alloc // with type: int __kfifo_alloc(struct __kfifo *fifo, unsigned int size, size_t esize, gfp_t gfp_mask) // with return type: int int __VERIFIER_nondet_int(void); int __kfifo_alloc(struct __kfifo *arg0, unsigned int arg1, size_t arg2, gfp_t arg3) { // Simple type return __VERIFIER_nondet_int(); } // Function: __kfifo_free // with type: void __kfifo_free(struct __kfifo *fifo) // with return type: void void __kfifo_free(struct __kfifo *arg0) { // Void type return; } // Function: __kfifo_in // with type: unsigned int __kfifo_in(struct __kfifo *fifo, const void *buf, unsigned int len) // with return type: unsigned int unsigned int __VERIFIER_nondet_uint(void); unsigned int __kfifo_in(struct __kfifo *arg0, const void *arg1, unsigned int arg2) { // Simple type return __VERIFIER_nondet_uint(); } // Function: __kfifo_in_r // with type: unsigned int __kfifo_in_r(struct __kfifo *fifo, const void *buf, unsigned int len, size_t recsize) // with return type: unsigned int unsigned int __VERIFIER_nondet_uint(void); unsigned int __kfifo_in_r(struct __kfifo *arg0, const void *arg1, unsigned int arg2, size_t arg3) { // Simple type return __VERIFIER_nondet_uint(); } // Function: __kfifo_out // with type: unsigned int __kfifo_out(struct __kfifo *fifo, void *buf, unsigned int len) // with return type: unsigned int unsigned int __VERIFIER_nondet_uint(void); unsigned int __kfifo_out(struct __kfifo *arg0, void *arg1, unsigned int arg2) { // Simple type return __VERIFIER_nondet_uint(); } // Function: __kfifo_out_r // with type: unsigned int __kfifo_out_r(struct __kfifo *fifo, void *buf, unsigned int len, size_t recsize) // with return type: unsigned int unsigned int __VERIFIER_nondet_uint(void); unsigned int __kfifo_out_r(struct __kfifo *arg0, void *arg1, unsigned int arg2, size_t arg3) { // Simple type return __VERIFIER_nondet_uint(); } // Function: __kmalloc // with type: void *__kmalloc(size_t size, gfp_t flags) // with return type: (void)* void *__kmalloc(size_t arg0, gfp_t arg1) { // Pointer type return ldv_malloc(arg0); } // Function: __mutex_init // with type: void __mutex_init(struct mutex *lock, const char *name, struct lock_class_key *key) // with return type: void void __mutex_init(struct mutex *arg0, const char *arg1, struct lock_class_key *arg2) { // Void type return; } // Function: __nand_calculate_ecc // with type: void __nand_calculate_ecc(const u_char *dat, unsigned int eccsize, u_char *ecc_code) // with return type: void void __nand_calculate_ecc(const u_char *arg0, unsigned int arg1, u_char *arg2) { // Void type return; } // Function: __nand_correct_data // with type: int __nand_correct_data(u_char *dat, u_char *read_ecc, u_char *calc_ecc, unsigned int eccsize) // with return type: int int __VERIFIER_nondet_int(void); int __nand_correct_data(u_char *arg0, u_char *arg1, u_char *arg2, unsigned int arg3) { // Simple type return __VERIFIER_nondet_int(); } // Function: add_mtd_blktrans_dev // with type: int add_mtd_blktrans_dev(struct mtd_blktrans_dev *dev) // with return type: int int __VERIFIER_nondet_int(void); int add_mtd_blktrans_dev(struct mtd_blktrans_dev *arg0) { // Simple type return __VERIFIER_nondet_int(); } // Function: cancel_work_sync // with type: bool cancel_work_sync(struct work_struct *work) // with return type: bool bool __VERIFIER_nondet_bool(void); bool cancel_work_sync(struct work_struct *arg0) { // Typedef type // Real type: _Bool // Simple type return __VERIFIER_nondet_bool(); } // Function: complete // with type: void complete(struct completion *) // with return type: void void complete(struct completion *arg0) { // Void type return; } // Function: del_mtd_blktrans_dev // with type: int del_mtd_blktrans_dev(struct mtd_blktrans_dev *dev) // with return type: int int __VERIFIER_nondet_int(void); int del_mtd_blktrans_dev(struct mtd_blktrans_dev *arg0) { // Simple type return __VERIFIER_nondet_int(); } // Function: del_timer // with type: int del_timer(struct timer_list *timer) // with return type: int int __VERIFIER_nondet_int(void); int del_timer(struct timer_list *arg0) { // Simple type return __VERIFIER_nondet_int(); } // Function: del_timer_sync // with type: int del_timer_sync(struct timer_list *timer) // with return type: int int __VERIFIER_nondet_int(void); int del_timer_sync(struct timer_list *arg0) { // Simple type return __VERIFIER_nondet_int(); } // Function: deregister_mtd_blktrans // with type: int deregister_mtd_blktrans(struct mtd_blktrans_ops *tr) // with return type: int int __VERIFIER_nondet_int(void); int deregister_mtd_blktrans(struct mtd_blktrans_ops *arg0) { // Simple type return __VERIFIER_nondet_int(); } // Function: destroy_workqueue // with type: void destroy_workqueue(struct workqueue_struct *wq) // with return type: void void destroy_workqueue(struct workqueue_struct *arg0) { // Void type return; } // Function: find_first_bit // with type: unsigned long int find_first_bit(const unsigned long *addr, unsigned long size) // with return type: unsigned long int unsigned long __VERIFIER_nondet_ulong(void); unsigned long int find_first_bit(const unsigned long *arg0, unsigned long arg1) { // Simple type return __VERIFIER_nondet_ulong(); } // Function: find_next_bit // with type: unsigned long int find_next_bit(const unsigned long *addr, unsigned long size, unsigned long offset) // with return type: unsigned long int unsigned long __VERIFIER_nondet_ulong(void); unsigned long int find_next_bit(const unsigned long *arg0, unsigned long arg1, unsigned long arg2) { // Simple type return __VERIFIER_nondet_ulong(); } // Function: get_random_bytes // with type: void get_random_bytes(void *buf, int nbytes) // with return type: void void get_random_bytes(void *arg0, int arg1) { // Void type return; } // Function: init_timer_key // with type: void init_timer_key(struct timer_list *timer, const char *name, struct lock_class_key *key) // with return type: void void init_timer_key(struct timer_list *arg0, const char *arg1, struct lock_class_key *arg2) { // Void type return; } // Skip function: kfree // Function: ldv_initialize // with type: void ldv_initialize() // with return type: void void ldv_initialize() { // Void type return; } // Function: ldv_undefined_pointer // with type: void *ldv_undefined_pointer() // with return type: (void)* void *ldv_undefined_pointer() { // Pointer type return ldv_malloc(0UL); } // Function: lockdep_init_map // with type: void lockdep_init_map(struct lockdep_map *lock, const char *name, struct lock_class_key *key, int subclass) // with return type: void void lockdep_init_map(struct lockdep_map *arg0, const char *arg1, struct lock_class_key *arg2, int arg3) { // Void type return; } // Skip function: memcmp // Skip function: memcpy // Skip function: memset // Function: mod_timer // with type: int mod_timer(struct timer_list *timer, unsigned long expires) // with return type: int int __VERIFIER_nondet_int(void); int mod_timer(struct timer_list *arg0, unsigned long arg1) { // Simple type return __VERIFIER_nondet_int(); } // Function: msecs_to_jiffies // with type: unsigned long int msecs_to_jiffies(const unsigned int m) // with return type: unsigned long int unsigned long __VERIFIER_nondet_ulong(void); unsigned long int msecs_to_jiffies(const unsigned int arg0) { // Simple type return __VERIFIER_nondet_ulong(); } // Function: mutex_lock_nested // with type: void mutex_lock_nested(struct mutex *lock, unsigned int subclass) // with return type: void void mutex_lock_nested(struct mutex *arg0, unsigned int arg1) { // Void type return; } // Function: mutex_unlock // with type: void mutex_unlock(struct mutex *lock) // with return type: void void mutex_unlock(struct mutex *arg0) { // Void type return; } // Function: printk // with type: int printk(const char *fmt, ...) // with return type: int int __VERIFIER_nondet_int(void); int printk(const char *arg0, ...) { // Simple type return __VERIFIER_nondet_int(); } // Function: queue_work // with type: int queue_work(struct workqueue_struct *wq, struct work_struct *work) // with return type: int int __VERIFIER_nondet_int(void); int queue_work(struct workqueue_struct *arg0, struct work_struct *arg1) { // Simple type return __VERIFIER_nondet_int(); } // Function: register_mtd_blktrans // with type: int register_mtd_blktrans(struct mtd_blktrans_ops *tr) // with return type: int int __VERIFIER_nondet_int(void); int register_mtd_blktrans(struct mtd_blktrans_ops *arg0) { // Simple type return __VERIFIER_nondet_int(); } // Skip function: strncpy // Function: strnlen // with type: __kernel_size_t strnlen(const char *, __kernel_size_t ) // with return type: __kernel_size_t unsigned long __VERIFIER_nondet_ulong(void); __kernel_size_t strnlen(const char *arg0, __kernel_size_t arg1) { // Typedef type // Real type: unsigned long // Simple type return __VERIFIER_nondet_ulong(); } // Function: wait_for_completion // with type: void wait_for_completion(struct completion *) // with return type: void void wait_for_completion(struct completion *arg0) { // Void type return; } // Function: warn_slowpath_null // with type: void warn_slowpath_null(const char *file, const int line) // with return type: void void warn_slowpath_null(const char *arg0, const int arg1) { // Void type return; }