xref: /freebsd/sys/vm/redzone.h (revision 95ee2897e98f5d444f26ed2334cc7c439f9c16c6)
1847a2a17SPawel Jakub Dawidek /*-
2*4d846d26SWarner Losh  * SPDX-License-Identifier: BSD-2-Clause
3fe267a55SPedro F. Giffuni  *
4847a2a17SPawel Jakub Dawidek  * Copyright (c) 2006 Pawel Jakub Dawidek <pjd@FreeBSD.org>
5847a2a17SPawel Jakub Dawidek  * All rights reserved.
6847a2a17SPawel Jakub Dawidek  *
7847a2a17SPawel Jakub Dawidek  * Redistribution and use in source and binary forms, with or without
8847a2a17SPawel Jakub Dawidek  * modification, are permitted provided that the following conditions
9847a2a17SPawel Jakub Dawidek  * are met:
10847a2a17SPawel Jakub Dawidek  * 1. Redistributions of source code must retain the above copyright
11847a2a17SPawel Jakub Dawidek  *    notice, this list of conditions and the following disclaimer.
12847a2a17SPawel Jakub Dawidek  * 2. Redistributions in binary form must reproduce the above copyright
13847a2a17SPawel Jakub Dawidek  *    notice, this list of conditions and the following disclaimer in the
14847a2a17SPawel Jakub Dawidek  *    documentation and/or other materials provided with the distribution.
15847a2a17SPawel Jakub Dawidek  *
16847a2a17SPawel Jakub Dawidek  * THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS ``AS IS'' AND
17847a2a17SPawel Jakub Dawidek  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
18847a2a17SPawel Jakub Dawidek  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
19847a2a17SPawel Jakub Dawidek  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE
20847a2a17SPawel Jakub Dawidek  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
21847a2a17SPawel Jakub Dawidek  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
22847a2a17SPawel Jakub Dawidek  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
23847a2a17SPawel Jakub Dawidek  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
24847a2a17SPawel Jakub Dawidek  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
25847a2a17SPawel Jakub Dawidek  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
26847a2a17SPawel Jakub Dawidek  * SUCH DAMAGE.
27847a2a17SPawel Jakub Dawidek  */
28847a2a17SPawel Jakub Dawidek 
29847a2a17SPawel Jakub Dawidek #ifndef	_VM_REDZONE_H_
30847a2a17SPawel Jakub Dawidek #define	_VM_REDZONE_H_
31847a2a17SPawel Jakub Dawidek 
32847a2a17SPawel Jakub Dawidek u_long redzone_get_size(caddr_t naddr);
33847a2a17SPawel Jakub Dawidek u_long redzone_size_ntor(u_long nsize);
34847a2a17SPawel Jakub Dawidek void *redzone_addr_ntor(caddr_t naddr);
35847a2a17SPawel Jakub Dawidek void *redzone_setup(caddr_t raddr, u_long nsize);
36847a2a17SPawel Jakub Dawidek void redzone_check(caddr_t naddr);
37847a2a17SPawel Jakub Dawidek 
38847a2a17SPawel Jakub Dawidek #endif	/* _VM_REDZONE_H_ */
39