aboutsummaryrefslogtreecommitdiffstats
path: root/mm/memory-failure.c
Commit message (Expand)AuthorAge
* thp: split_huge_page pagingAndrea Arcangeli2011-01-13
* mm: migration: allow migration to operate asynchronously and avoid synchronou...Mel Gorman2011-01-13
* mem-hotplug: introduce {un}lock_memory_hotplug()KOSAKI Motohiro2010-12-02
* mm: compaction: fix COMPACTPAGEFAILED countingMinchan Kim2010-10-26
* Merge branch 'hwpoison-hugepages' into hwpoisonAndi Kleen2010-10-22
|\
| * HWPOISON, hugetlb: fix unpoison for hugepageNaoya Horiguchi2010-10-08
| * HWPOISON, hugetlb: soft offlining for hugepageNaoya Horiguchi2010-10-08
| * HWPOSION, hugetlb: recover from free hugepage error when !MF_COUNT_INCREASEDNaoya Horiguchi2010-10-08
| * HWPOISON, hugetlb: add free check to dequeue_hwpoison_huge_page()Naoya Horiguchi2010-10-08
* | HWPOISON: Remove retry loop for try_to_unmapAndi Kleen2010-10-08
* | HWPOISON: Turn addr_valid from bitfield into charAndi Kleen2010-10-08
* | HWPOISON: Disable DEBUG by defaultAndi Kleen2010-10-08
* | HWPOISON: Convert pr_debugs to pr_infoAndi Kleen2010-10-08
* | HWPOISON: Improve comments in memory-failure.cAndi Kleen2010-10-08
|/
* HWPOISON: Stop shrinking at right page countAndi Kleen2010-10-07
* HWPOISON: Report correct address granuality for AO huge page errorsAndi Kleen2010-10-07
* Merge branch 'hwpoison' of git://git.kernel.org/pub/scm/linux/kernel/git/ak/l...Linus Torvalds2010-08-12
|\
| * HWPOISON, hugetlb: isolate corrupted hugepageNaoya Horiguchi2010-08-11
| * HWPOISON, hugetlb: maintain mce_bad_pages in handling hugepage errorNaoya Horiguchi2010-08-11
| * HWPOISON, hugetlb: set/clear PG_hwpoison bits on hugepageNaoya Horiguchi2010-08-11
| * HWPOISON, hugetlb: enable error handling path for hugepageNaoya Horiguchi2010-08-11
* | KVM: Fix a race condition for usage of is_hwpoison_address()Huang Ying2010-08-01
* | KVM: Avoid killing userspace through guest SRAO MCE on unmapped pagesHuang Ying2010-08-01
|/
* include cleanup: Update gfp.h and slab.h includes to prepare for breaking imp...Tejun Heo2010-03-30
* mm: change anon_vma linking to fix multi-process server scalability issueRik van Riel2010-03-06
* HWPOISON: Add PROC_FS dependency to hwpoison injector v2Andi Kleen2009-12-21
* HWPOISON: Remove stray phrase in a commentAndi Kleen2009-12-16
* HWPOISON: Try to allocate migration page on the same nodeAndi Kleen2009-12-16
* HWPOISON: Add soft page offline supportAndi Kleen2009-12-16
* HWPOISON: Undefine short-hand macros after use to avoid namespace conflictAndi Kleen2009-12-16
* HWPOISON: Use new shake_page in memory_failureAndi Kleen2009-12-16
* HWPOISON: add an interface to switch off/on all the page filtersHaicheng Li2009-12-16
* HWPOISON: add memory cgroup filterAndi Kleen2009-12-16
* HWPOISON: add page flags filterWu Fengguang2009-12-16
* HWPOISON: add fs/device filtersWu Fengguang2009-12-16
* HWPOISON: return 0 to indicate success reliablyWu Fengguang2009-12-16
* HWPOISON: make semantics of IGNORED/DELAYED clearWu Fengguang2009-12-16
* HWPOISON: Add unpoisoning supportWu Fengguang2009-12-16
* HWPOISON: detect free buddy pages explicitlyWu Fengguang2009-12-16
* HWPOISON: remove the free buddy page handlerWu Fengguang2009-12-16
* HWPOISON: introduce delete_from_lru_cache()Wu Fengguang2009-12-16
* HWPOISON: comment the possible set_page_dirty() raceWu Fengguang2009-12-16
* HWPOISON: abort on failed unmapWu Fengguang2009-12-16
* HWPOISON: Turn ref argument into flags argumentAndi Kleen2009-12-16
* HWPOISON: avoid grabbing the page count multiple times during madvise injectionWu Fengguang2009-12-16
* HWPOISON: return ENXIO on invalid page numberWu Fengguang2009-12-16
* HWPOISON: remove the anonymous entryWu Fengguang2009-12-16
* HWPOISON: Be more aggressive at freeing non LRU cachesAndi Kleen2009-12-16
* mm: CONFIG_MMU for PG_mlockedHugh Dickins2009-12-15
* tree-wide: fix assorted typos all over the placeAndré Goddard Rosa2009-12-04

                     



















                                                                        
                                 




























































                                                                                  

                                           

                                 

                                 















                                                 

                          
#ifndef _LINUX_XFRM_H
#define _LINUX_XFRM_H

#include <linux/types.h>

/* All of the structures in this file may not change size as they are
 * passed into the kernel from userspace via netlink sockets.
 */

/* Structure to encapsulate addresses. I do not want to use
 * "standard" structure. My apologies.
 */
typedef union
{
	__u32		a4;
	__u32		a6[4];
} xfrm_address_t;

/* Ident of a specific xfrm_state. It is used on input to lookup
 * the state by (spi,daddr,ah/esp) or to store information about
 * spi, protocol and tunnel address on output.
 */
struct xfrm_id
{
	xfrm_address_t	daddr;
	__u32		spi;
	__u8		proto;
};

/* Selector, used as selector both on policy rules (SPD) and SAs. */

struct xfrm_selector
{
	xfrm_address_t	daddr;
	xfrm_address_t	saddr;
	__u16	dport;
	__u16	dport_mask;
	__u16	sport;
	__u16	sport_mask;
	__u16	family;
	__u8	prefixlen_d;
	__u8	prefixlen_s;
	__u8	proto;
	int	ifindex;
	uid_t	user;
};

#define XFRM_INF (~(__u64)0)

struct xfrm_lifetime_cfg
{
	__u64	soft_byte_limit;
	__u64	hard_byte_limit;
	__u64	soft_packet_limit;
	__u64	hard_packet_limit;
	__u64	soft_add_expires_seconds;
	__u64	hard_add_expires_seconds;
	__u64	soft_use_expires_seconds;
	__u64	hard_use_expires_seconds;
};

struct xfrm_lifetime_cur
{
	__u64	bytes;
	__u64	packets;
	__u64	add_time;
	__u64	use_time;
};

struct xfrm_replay_state
{
	__u32	oseq;
	__u32	seq;
	__u32	bitmap;
};

struct xfrm_algo {
	char	alg_name[64];
	int	alg_key_len;    /* in bits */
	char	alg_key[0];
};

struct xfrm_stats {
	__u32	replay_window;
	__u32	replay;
	__u32	integrity_failed;
};

enum
{
	XFRM_POLICY_IN	= 0,
	XFRM_POLICY_OUT	= 1,
	XFRM_POLICY_FWD	= 2,
	XFRM_POLICY_MAX	= 3
};

enum
{
	XFRM_SHARE_ANY,		/* No limitations */
	XFRM_SHARE_SESSION,	/* For this session only */
	XFRM_SHARE_USER,	/* For this user only */
	XFRM_SHARE_UNIQUE	/* Use once */
};

/* Netlink configuration messages.  */
enum {
	XFRM_MSG_BASE = 0x10,

	XFRM_MSG_NEWSA = 0x10,
#define XFRM_MSG_NEWSA XFRM_MSG_NEWSA
	XFRM_MSG_DELSA,
#define XFRM_MSG_DELSA XFRM_MSG_DELSA
	XFRM_MSG_GETSA,
#define XFRM_MSG_GETSA XFRM_MSG_GETSA

	XFRM_MSG_NEWPOLICY,
#define XFRM_MSG_NEWPOLICY XFRM_MSG_NEWPOLICY
	XFRM_MSG_DELPOLICY,
#define XFRM_MSG_DELPOLICY XFRM_MSG_DELPOLICY
	XFRM_MSG_GETPOLICY,
#define XFRM_MSG_GETPOLICY XFRM_MSG_GETPOLICY

	XFRM_MSG_ALLOCSPI,
#define XFRM_MSG_ALLOCSPI XFRM_MSG_ALLOCSPI
	XFRM_MSG_ACQUIRE,
#define XFRM_MSG_ACQUIRE XFRM_MSG_ACQUIRE
	XFRM_MSG_EXPIRE,
#define XFRM_MSG_EXPIRE XFRM_MSG_EXPIRE

	XFRM_MSG_UPDPOLICY,
#define XFRM_MSG_UPDPOLICY XFRM_MSG_UPDPOLICY
	XFRM_MSG_UPDSA,
#define XFRM_MSG_UPDSA XFRM_MSG_UPDSA

	XFRM_MSG_POLEXPIRE,
#define XFRM_MSG_POLEXPIRE XFRM_MSG_POLEXPIRE

	XFRM_MSG_FLUSHSA,
#define XFRM_MSG_FLUSHSA XFRM_MSG_FLUSHSA
	XFRM_MSG_FLUSHPOLICY,
#define XFRM_MSG_FLUSHPOLICY XFRM_MSG_FLUSHPOLICY

	__XFRM_MSG_MAX
};
#define XFRM_MSG_MAX (__XFRM_MSG_MAX - 1)

#define XFRM_NR_MSGTYPES (XFRM_MSG_MAX + 1 - XFRM_MSG_BASE)

struct xfrm_user_tmpl {
	struct xfrm_id		id;
	__u16			family;
	xfrm_address_t		saddr;
	__u32			reqid;
	__u8			mode;
	__u8			share;
	__u8			optional;
	__u32			aalgos;
	__u32			ealgos;
	__u32			calgos;
};

struct xfrm_encap_tmpl {
	__u16		encap_type;
	__u16		encap_sport;
	__u16		encap_dport;
	xfrm_address_t	encap_oa;
};

/* Netlink message attributes.  */
enum xfrm_attr_type_t {
	XFRMA_UNSPEC,
	XFRMA_ALG_AUTH,		/* struct xfrm_algo */
	XFRMA_ALG_CRYPT,	/* struct xfrm_algo */
	XFRMA_ALG_COMP,		/* struct xfrm_algo */
	XFRMA_ENCAP,		/* struct xfrm_algo + struct xfrm_encap_tmpl */
	XFRMA_TMPL,		/* 1 or more struct xfrm_user_tmpl */
	XFRMA_SA,
	XFRMA_POLICY,
	__XFRMA_MAX

#define XFRMA_MAX (__XFRMA_MAX - 1)
};

struct xfrm_usersa_info {
	struct xfrm_selector		sel;
	struct xfrm_id			id;
	xfrm_address_t			saddr;
	struct xfrm_lifetime_cfg	lft;
	struct xfrm_lifetime_cur	curlft;
	struct xfrm_stats		stats;
	__u32				seq;
	__u32				reqid;
	__u16				family;
	__u8				mode; /* 0=transport,1=tunnel */
	__u8				replay_window;
	__u8				flags;
#define XFRM_STATE_NOECN	1
#define XFRM_STATE_DECAP_DSCP	2
#define XFRM_STATE_NOPMTUDISC	4
};

struct xfrm_usersa_id {
	xfrm_address_t			daddr;
	__u32				spi;
	__u16				family;
	__u8				proto;
};

struct xfrm_userspi_info {
	struct xfrm_usersa_info		info;
	__u32				min;
	__u32				max;
};

struct xfrm_userpolicy_info {
	struct xfrm_selector		sel;
	struct xfrm_lifetime_cfg	lft;
	struct xfrm_lifetime_cur	curlft;
	__u32				priority;
	__u32				index;
	__u8				dir;
	__u8				action;
#define XFRM_POLICY_ALLOW	0
#define XFRM_POLICY_BLOCK	1
	__u8				flags;
#define XFRM_POLICY_LOCALOK	1	/* Allow user to override global policy */
	__u8				share;
};

struct xfrm_userpolicy_id {
	struct xfrm_selector		sel;
	__u32				index;
	__u8				dir;
};

struct xfrm_user_acquire {
	struct xfrm_id			id;
	xfrm_address_t			saddr;
	struct xfrm_selector		sel;
	struct xfrm_userpolicy_info	policy;
	__u32				aalgos;
	__u32				ealgos;
	__u32				calgos;
	__u32				seq;
};

struct xfrm_user_expire {
	struct xfrm_usersa_info		state;
	__u8				hard;
};

struct xfrm_user_polexpire {
	struct xfrm_userpolicy_info	pol;
	__u8				hard;
};

struct xfrm_usersa_flush {
	__u8				proto;
};

#ifndef __KERNEL__
/* backwards compatibility for userspace */
#define XFRMGRP_ACQUIRE		1
#define XFRMGRP_EXPIRE		2
#define XFRMGRP_SA		4
#define XFRMGRP_POLICY		8
#endif

enum xfrm_nlgroups {
	XFRMNLGRP_NONE,
#define XFRMNLGRP_NONE		XFRMNLGRP_NONE
	XFRMNLGRP_ACQUIRE,
#define XFRMNLGRP_ACQUIRE	XFRMNLGRP_ACQUIRE
	XFRMNLGRP_EXPIRE,
#define XFRMNLGRP_EXPIRE	XFRMNLGRP_EXPIRE
	XFRMNLGRP_SA,
#define XFRMNLGRP_SA		XFRMNLGRP_SA
	XFRMNLGRP_POLICY,
#define XFRMNLGRP_POLICY	XFRMNLGRP_POLICY
	__XFRMNLGRP_MAX
};
#define XFRMNLGRP_MAX	(__XFRMNLGRP_MAX - 1)

#endif /* _LINUX_XFRM_H */