Lines Matching refs:id

14  * <obj, id> pair and a pointer value.  It is the responsibility of the
51 * @id: data identifier
58 unsigned long id;
63 * klp_shadow_match() - verify a shadow variable matches given <obj, id>
66 * @id: data identifier
71 unsigned long id)
73 return shadow->obj == obj && shadow->id == id;
79 * @id: data identifier
83 void *klp_shadow_get(void *obj, unsigned long id)
92 if (klp_shadow_match(shadow, obj, id)) {
104 static void *__klp_shadow_get_or_alloc(void *obj, unsigned long id,
114 shadow_data = klp_shadow_get(obj, id);
127 /* Look for <obj, id> again under the lock */
129 shadow_data = klp_shadow_get(obj, id);
141 new_shadow->id = id;
151 obj, id, err);
156 /* No <obj, id> found, so attach the newly allocated one */
165 WARN(1, "Duplicate shadow variable <%p, %lx>\n", obj, id);
175 * @id: data identifier
186 * If an existing <obj, id> shadow variable can be found, this routine will
196 void *klp_shadow_alloc(void *obj, unsigned long id,
200 return __klp_shadow_get_or_alloc(obj, id, size, gfp_flags,
208 * @id: data identifier
214 * Returns a pointer to existing shadow data if an <obj, id> shadow
219 * @id for the given @obj. It also guarantees that the constructor function
225 void *klp_shadow_get_or_alloc(void *obj, unsigned long id,
229 return __klp_shadow_get_or_alloc(obj, id, size, gfp_flags,
244 * klp_shadow_free() - detach and free a <obj, id> shadow variable
246 * @id: data identifier
250 * This function releases the memory for this <obj, id> shadow variable
253 void klp_shadow_free(void *obj, unsigned long id, klp_shadow_dtor_t dtor)
260 /* Delete <obj, id> from hash */
264 if (klp_shadow_match(shadow, obj, id)) {
275 * klp_shadow_free_all() - detach and free all <_, id> shadow variables
276 * @id: data identifier
280 * This function releases the memory for all <_, id> shadow variable
283 void klp_shadow_free_all(unsigned long id, klp_shadow_dtor_t dtor)
291 /* Delete all <_, id> from hash */
293 if (klp_shadow_match(shadow, shadow->obj, id))