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: __class_create // with type: struct class *__class_create(struct module *owner, const char *name, struct lock_class_key *key) // with return type: (struct class)* struct class *__class_create(struct module *arg0, const char *arg1, struct lock_class_key *arg2) { // Pointer type return ldv_malloc(sizeof(struct class)); } // Function: __const_udelay // with type: void __const_udelay(unsigned long xloops) // with return type: void void __const_udelay(unsigned long arg0) { // Void type return; } // 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: _dev_info // with type: int _dev_info(const struct device *dev, const char *fmt, ...) // with return type: int int __VERIFIER_nondet_int(void); int _dev_info(const struct device *arg0, const char *arg1, ...) { // Simple type return __VERIFIER_nondet_int(); } // Function: _raw_spin_lock_irq // with type: void _raw_spin_lock_irq(raw_spinlock_t *lock) // with return type: void void _raw_spin_lock_irq(raw_spinlock_t *arg0) { // Void type return; } // Function: _raw_spin_unlock_irq // with type: void _raw_spin_unlock_irq(raw_spinlock_t *lock) // with return type: void void _raw_spin_unlock_irq(raw_spinlock_t *arg0) { // Void type return; } // Function: class_destroy // with type: void class_destroy(struct class *cls) // with return type: void void class_destroy(struct class *arg0) { // Void type return; } // Function: dev_err // with type: int dev_err(const struct device *dev, const char *fmt, ...) // with return type: int int __VERIFIER_nondet_int(void); int dev_err(const struct device *arg0, const char *arg1, ...) { // Simple type return __VERIFIER_nondet_int(); } // Function: dev_get_drvdata // with type: void *dev_get_drvdata(const struct device *dev) // with return type: (void)* void *dev_get_drvdata(const struct device *arg0) { // Pointer type return ldv_malloc(0UL); } // Function: dev_set_drvdata // with type: int dev_set_drvdata(struct device *dev, void *data) // with return type: int int __VERIFIER_nondet_int(void); int dev_set_drvdata(struct device *arg0, void *arg1) { // Simple type return __VERIFIER_nondet_int(); } // Function: device_create // with type: struct device *device_create(struct class *cls, struct device *parent, dev_t devt, void *drvdata, const char *fmt, ...) // with return type: (struct device)* struct device *device_create(struct class *arg0, struct device *arg1, dev_t arg2, void *arg3, const char *arg4, ...) { // Pointer type return ldv_malloc(sizeof(struct device)); } // Function: device_create_bin_file // with type: int device_create_bin_file(struct device *dev, const struct bin_attribute *attr) // with return type: int int __VERIFIER_nondet_int(void); int device_create_bin_file(struct device *arg0, const struct bin_attribute *arg1) { // Simple type return __VERIFIER_nondet_int(); } // Function: device_destroy // with type: void device_destroy(struct class *cls, dev_t devt) // with return type: void void device_destroy(struct class *arg0, dev_t arg1) { // Void type return; } // Function: device_remove_bin_file // with type: void device_remove_bin_file(struct device *dev, const struct bin_attribute *attr) // with return type: void void device_remove_bin_file(struct device *arg0, const struct bin_attribute *arg1) { // Void type return; } // Function: idr_get_new // with type: int idr_get_new(struct idr *idp, void *ptr, int *id) // with return type: int int __VERIFIER_nondet_int(void); int idr_get_new(struct idr *arg0, void *arg1, int *arg2) { // Simple type return __VERIFIER_nondet_int(); } // Function: idr_pre_get // with type: int idr_pre_get(struct idr *idp, gfp_t gfp_mask) // with return type: int int __VERIFIER_nondet_int(void); int idr_pre_get(struct idr *arg0, gfp_t arg1) { // Simple type return __VERIFIER_nondet_int(); } // Function: idr_remove // with type: void idr_remove(struct idr *idp, int id) // with return type: void void idr_remove(struct idr *arg0, int arg1) { // 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: 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(); } // Skip function: sprintf // Skip function: sscanf // Skip function: strncpy // Function: trace_hardirqs_off // with type: void trace_hardirqs_off() // with return type: void void trace_hardirqs_off() { // Void type return; } // Function: trace_hardirqs_on // with type: void trace_hardirqs_on() // with return type: void void trace_hardirqs_on() { // Void type return; }