Path: blob/master/drivers/android/binder/page_range_helper.c
29519 views
// SPDX-License-Identifier: GPL-2.012/* C helper for page_range.rs to work around a CFI violation.3*4* Bindgen currently pretends that `enum lru_status` is the same as an integer.5* This assumption is fine ABI-wise, but once you add CFI to the mix, it6* triggers a CFI violation because `enum lru_status` gets a different CFI tag.7*8* This file contains a workaround until bindgen can be fixed.9*10* Copyright (C) 2025 Google LLC.11*/12#include "page_range_helper.h"1314unsigned int rust_shrink_free_page(struct list_head *item,15struct list_lru_one *list,16void *cb_arg);1718enum lru_status19rust_shrink_free_page_wrap(struct list_head *item, struct list_lru_one *list,20void *cb_arg)21{22return rust_shrink_free_page(item, list, cb_arg);23}242526