mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-24 13:44:26 -04:00
Merge branch 'akpm' (Andrew's patch-bomb)
Merge second batch of patches from Andrew Morton: - various misc things - core kernel changes to prctl, exit, exec, init, etc. - kernel/watchdog.c updates - get_maintainer - MAINTAINERS - the backlight driver queue - core bitops code cleanups - the led driver queue - some core prio_tree work - checkpatch udpates - largeish crc32 update - a new poll() feature for the v4l guys - the rtc driver queue - fatfs - ptrace - signals - kmod/usermodehelper updates - coredump - procfs updates * emailed from Andrew Morton <akpm@linux-foundation.org>: (141 commits) seq_file: add seq_set_overflow(), seq_overflow() proc-ns: use d_set_d_op() API to set dentry ops in proc_ns_instantiate(). procfs: speed up /proc/pid/stat, statm procfs: add num_to_str() to speed up /proc/stat proc: speed up /proc/stat handling fs/proc/kcore.c: make get_sparsemem_vmemmap_info() static coredump: add VM_NODUMP, MADV_NODUMP, MADV_CLEAR_NODUMP coredump: remove VM_ALWAYSDUMP flag kmod: make __request_module() killable kmod: introduce call_modprobe() helper usermodehelper: ____call_usermodehelper() doesn't need do_exit() usermodehelper: kill umh_wait, renumber UMH_* constants usermodehelper: implement UMH_KILLABLE usermodehelper: introduce umh_complete(sub_info) usermodehelper: use UMH_WAIT_PROC consistently signal: zap_pid_ns_processes: s/SEND_SIG_NOINFO/SEND_SIG_FORCED/ signal: oom_kill_task: use SEND_SIG_FORCED instead of force_sig() signal: cosmetic, s/from_ancestor_ns/force/ in prepare_signal() paths signal: give SEND_SIG_FORCED more power to beat SIGNAL_UNKILLABLE Hexagon: use set_current_blocked() and block_sigmask() ...
This commit is contained in:
commit
8e3ade251b
213 changed files with 4686 additions and 2022 deletions
|
|
@ -27,11 +27,22 @@ extern unsigned long __sw_hweight64(__u64 w);
|
|||
(bit) = find_next_bit((addr), (size), (bit) + 1))
|
||||
|
||||
/* same as for_each_set_bit() but use bit as value to start with */
|
||||
#define for_each_set_bit_cont(bit, addr, size) \
|
||||
#define for_each_set_bit_from(bit, addr, size) \
|
||||
for ((bit) = find_next_bit((addr), (size), (bit)); \
|
||||
(bit) < (size); \
|
||||
(bit) = find_next_bit((addr), (size), (bit) + 1))
|
||||
|
||||
#define for_each_clear_bit(bit, addr, size) \
|
||||
for ((bit) = find_first_zero_bit((addr), (size)); \
|
||||
(bit) < (size); \
|
||||
(bit) = find_next_zero_bit((addr), (size), (bit) + 1))
|
||||
|
||||
/* same as for_each_clear_bit() but use bit as value to start with */
|
||||
#define for_each_clear_bit_from(bit, addr, size) \
|
||||
for ((bit) = find_next_zero_bit((addr), (size), (bit)); \
|
||||
(bit) < (size); \
|
||||
(bit) = find_next_zero_bit((addr), (size), (bit) + 1))
|
||||
|
||||
static __inline__ int get_bitmask_order(unsigned int count)
|
||||
{
|
||||
int order;
|
||||
|
|
|
|||
|
|
@ -87,7 +87,8 @@
|
|||
*/
|
||||
#define __pure __attribute__((pure))
|
||||
#define __aligned(x) __attribute__((aligned(x)))
|
||||
#define __printf(a,b) __attribute__((format(printf,a,b)))
|
||||
#define __printf(a, b) __attribute__((format(printf, a, b)))
|
||||
#define __scanf(a, b) __attribute__((format(scanf, a, b)))
|
||||
#define noinline __attribute__((noinline))
|
||||
#define __attribute_const__ __attribute__((__const__))
|
||||
#define __maybe_unused __attribute__((unused))
|
||||
|
|
|
|||
|
|
@ -11,6 +11,8 @@
|
|||
extern u32 crc32_le(u32 crc, unsigned char const *p, size_t len);
|
||||
extern u32 crc32_be(u32 crc, unsigned char const *p, size_t len);
|
||||
|
||||
extern u32 __crc32c_le(u32 crc, unsigned char const *p, size_t len);
|
||||
|
||||
#define crc32(seed, data, length) crc32_le(seed, (unsigned char const *)(data), length)
|
||||
|
||||
/*
|
||||
|
|
|
|||
|
|
@ -312,6 +312,8 @@ extern long long simple_strtoll(const char *,char **,unsigned int);
|
|||
#define strict_strtoull kstrtoull
|
||||
#define strict_strtoll kstrtoll
|
||||
|
||||
extern int num_to_str(char *buf, int size, unsigned long long num);
|
||||
|
||||
/* lib/printf utilities */
|
||||
|
||||
extern __printf(2, 3) int sprintf(char *buf, const char * fmt, ...);
|
||||
|
|
@ -328,10 +330,10 @@ extern __printf(2, 3)
|
|||
char *kasprintf(gfp_t gfp, const char *fmt, ...);
|
||||
extern char *kvasprintf(gfp_t gfp, const char *fmt, va_list args);
|
||||
|
||||
extern int sscanf(const char *, const char *, ...)
|
||||
__attribute__ ((format (scanf, 2, 3)));
|
||||
extern int vsscanf(const char *, const char *, va_list)
|
||||
__attribute__ ((format (scanf, 2, 0)));
|
||||
extern __scanf(2, 3)
|
||||
int sscanf(const char *, const char *, ...);
|
||||
extern __scanf(2, 0)
|
||||
int vsscanf(const char *, const char *, va_list);
|
||||
|
||||
extern int get_option(char **str, int *pint);
|
||||
extern char *get_options(const char *str, int nints, int *ints);
|
||||
|
|
|
|||
|
|
@ -48,11 +48,10 @@ static inline int request_module_nowait(const char *name, ...) { return -ENOSYS;
|
|||
struct cred;
|
||||
struct file;
|
||||
|
||||
enum umh_wait {
|
||||
UMH_NO_WAIT = -1, /* don't wait at all */
|
||||
UMH_WAIT_EXEC = 0, /* wait for the exec, but not the process */
|
||||
UMH_WAIT_PROC = 1, /* wait for the process to complete */
|
||||
};
|
||||
#define UMH_NO_WAIT 0 /* don't wait at all */
|
||||
#define UMH_WAIT_EXEC 1 /* wait for the exec, but not the process */
|
||||
#define UMH_WAIT_PROC 2 /* wait for the process to complete */
|
||||
#define UMH_KILLABLE 4 /* wait for EXEC/PROC killable */
|
||||
|
||||
struct subprocess_info {
|
||||
struct work_struct work;
|
||||
|
|
@ -60,7 +59,7 @@ struct subprocess_info {
|
|||
char *path;
|
||||
char **argv;
|
||||
char **envp;
|
||||
enum umh_wait wait;
|
||||
int wait;
|
||||
int retval;
|
||||
int (*init)(struct subprocess_info *info, struct cred *new);
|
||||
void (*cleanup)(struct subprocess_info *info);
|
||||
|
|
@ -78,15 +77,14 @@ void call_usermodehelper_setfns(struct subprocess_info *info,
|
|||
void *data);
|
||||
|
||||
/* Actually execute the sub-process */
|
||||
int call_usermodehelper_exec(struct subprocess_info *info, enum umh_wait wait);
|
||||
int call_usermodehelper_exec(struct subprocess_info *info, int wait);
|
||||
|
||||
/* Free the subprocess_info. This is only needed if you're not going
|
||||
to call call_usermodehelper_exec */
|
||||
void call_usermodehelper_freeinfo(struct subprocess_info *info);
|
||||
|
||||
static inline int
|
||||
call_usermodehelper_fns(char *path, char **argv, char **envp,
|
||||
enum umh_wait wait,
|
||||
call_usermodehelper_fns(char *path, char **argv, char **envp, int wait,
|
||||
int (*init)(struct subprocess_info *info, struct cred *new),
|
||||
void (*cleanup)(struct subprocess_info *), void *data)
|
||||
{
|
||||
|
|
@ -104,7 +102,7 @@ call_usermodehelper_fns(char *path, char **argv, char **envp,
|
|||
}
|
||||
|
||||
static inline int
|
||||
call_usermodehelper(char *path, char **argv, char **envp, enum umh_wait wait)
|
||||
call_usermodehelper(char *path, char **argv, char **envp, int wait)
|
||||
{
|
||||
return call_usermodehelper_fns(path, argv, envp, wait,
|
||||
NULL, NULL, NULL);
|
||||
|
|
|
|||
|
|
@ -72,6 +72,12 @@ enum lm3530_als_mode {
|
|||
LM3530_INPUT_CEIL, /* Max of ALS1 and ALS2 */
|
||||
};
|
||||
|
||||
/* PWM Platform Specific Data */
|
||||
struct lm3530_pwm_data {
|
||||
void (*pwm_set_intensity) (int brightness, int max_brightness);
|
||||
int (*pwm_get_intensity) (int max_brightness);
|
||||
};
|
||||
|
||||
/**
|
||||
* struct lm3530_platform_data
|
||||
* @mode: mode of operation i.e. Manual, ALS or PWM
|
||||
|
|
@ -87,6 +93,7 @@ enum lm3530_als_mode {
|
|||
* @als_vmin: als input voltage calibrated for max brightness in mV
|
||||
* @als_vmax: als input voltage calibrated for min brightness in mV
|
||||
* @brt_val: brightness value (0-255)
|
||||
* @pwm_data: PWM control functions (only valid when the mode is PWM)
|
||||
*/
|
||||
struct lm3530_platform_data {
|
||||
enum lm3530_mode mode;
|
||||
|
|
@ -107,6 +114,8 @@ struct lm3530_platform_data {
|
|||
u32 als_vmax;
|
||||
|
||||
u8 brt_val;
|
||||
|
||||
struct lm3530_pwm_data pwm_data;
|
||||
};
|
||||
|
||||
#endif /* _LINUX_LED_LM3530_H__ */
|
||||
|
|
|
|||
|
|
@ -26,15 +26,37 @@
|
|||
/* See Documentation/leds/leds-lp5521.txt */
|
||||
|
||||
struct lp5521_led_config {
|
||||
char *name;
|
||||
u8 chan_nr;
|
||||
u8 led_current; /* mA x10, 0 if led is not connected */
|
||||
u8 max_current;
|
||||
};
|
||||
|
||||
struct lp5521_led_pattern {
|
||||
u8 *r;
|
||||
u8 *g;
|
||||
u8 *b;
|
||||
u8 size_r;
|
||||
u8 size_g;
|
||||
u8 size_b;
|
||||
};
|
||||
|
||||
#define LP5521_CLOCK_AUTO 0
|
||||
#define LP5521_CLOCK_INT 1
|
||||
#define LP5521_CLOCK_EXT 2
|
||||
|
||||
/* Bits in CONFIG register */
|
||||
#define LP5521_PWM_HF 0x40 /* PWM: 0 = 256Hz, 1 = 558Hz */
|
||||
#define LP5521_PWRSAVE_EN 0x20 /* 1 = Power save mode */
|
||||
#define LP5521_CP_MODE_OFF 0 /* Charge pump (CP) off */
|
||||
#define LP5521_CP_MODE_BYPASS 8 /* CP forced to bypass mode */
|
||||
#define LP5521_CP_MODE_1X5 0x10 /* CP forced to 1.5x mode */
|
||||
#define LP5521_CP_MODE_AUTO 0x18 /* Automatic mode selection */
|
||||
#define LP5521_R_TO_BATT 4 /* R out: 0 = CP, 1 = Vbat */
|
||||
#define LP5521_CLK_SRC_EXT 0 /* Ext-clk source (CLK_32K) */
|
||||
#define LP5521_CLK_INT 1 /* Internal clock */
|
||||
#define LP5521_CLK_AUTO 2 /* Automatic clock selection */
|
||||
|
||||
struct lp5521_platform_data {
|
||||
struct lp5521_led_config *led_config;
|
||||
u8 num_channels;
|
||||
|
|
@ -43,6 +65,9 @@ struct lp5521_platform_data {
|
|||
void (*release_resources)(void);
|
||||
void (*enable)(bool state);
|
||||
const char *label;
|
||||
u8 update_config;
|
||||
struct lp5521_led_pattern *patterns;
|
||||
int num_patterns;
|
||||
};
|
||||
|
||||
#endif /* __LINUX_LP5521_H */
|
||||
|
|
|
|||
131
include/linux/lp855x.h
Normal file
131
include/linux/lp855x.h
Normal file
|
|
@ -0,0 +1,131 @@
|
|||
/*
|
||||
* LP855x Backlight Driver
|
||||
*
|
||||
* Copyright (C) 2011 Texas Instruments
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License version 2 as
|
||||
* published by the Free Software Foundation.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef _LP855X_H
|
||||
#define _LP855X_H
|
||||
|
||||
#define BL_CTL_SHFT (0)
|
||||
#define BRT_MODE_SHFT (1)
|
||||
#define BRT_MODE_MASK (0x06)
|
||||
|
||||
/* Enable backlight. Only valid when BRT_MODE=10(I2C only) */
|
||||
#define ENABLE_BL (1)
|
||||
#define DISABLE_BL (0)
|
||||
|
||||
#define I2C_CONFIG(id) id ## _I2C_CONFIG
|
||||
#define PWM_CONFIG(id) id ## _PWM_CONFIG
|
||||
|
||||
/* DEVICE CONTROL register - LP8550 */
|
||||
#define LP8550_PWM_CONFIG (LP8550_PWM_ONLY << BRT_MODE_SHFT)
|
||||
#define LP8550_I2C_CONFIG ((ENABLE_BL << BL_CTL_SHFT) | \
|
||||
(LP8550_I2C_ONLY << BRT_MODE_SHFT))
|
||||
|
||||
/* DEVICE CONTROL register - LP8551 */
|
||||
#define LP8551_PWM_CONFIG LP8550_PWM_CONFIG
|
||||
#define LP8551_I2C_CONFIG LP8550_I2C_CONFIG
|
||||
|
||||
/* DEVICE CONTROL register - LP8552 */
|
||||
#define LP8552_PWM_CONFIG LP8550_PWM_CONFIG
|
||||
#define LP8552_I2C_CONFIG LP8550_I2C_CONFIG
|
||||
|
||||
/* DEVICE CONTROL register - LP8553 */
|
||||
#define LP8553_PWM_CONFIG LP8550_PWM_CONFIG
|
||||
#define LP8553_I2C_CONFIG LP8550_I2C_CONFIG
|
||||
|
||||
/* DEVICE CONTROL register - LP8556 */
|
||||
#define LP8556_PWM_CONFIG (LP8556_PWM_ONLY << BRT_MODE_SHFT)
|
||||
#define LP8556_COMB1_CONFIG (LP8556_COMBINED1 << BRT_MODE_SHFT)
|
||||
#define LP8556_I2C_CONFIG ((ENABLE_BL << BL_CTL_SHFT) | \
|
||||
(LP8556_I2C_ONLY << BRT_MODE_SHFT))
|
||||
#define LP8556_COMB2_CONFIG (LP8556_COMBINED2 << BRT_MODE_SHFT)
|
||||
|
||||
/* ROM area boundary */
|
||||
#define EEPROM_START (0xA0)
|
||||
#define EEPROM_END (0xA7)
|
||||
#define EPROM_START (0xA0)
|
||||
#define EPROM_END (0xAF)
|
||||
|
||||
enum lp855x_chip_id {
|
||||
LP8550,
|
||||
LP8551,
|
||||
LP8552,
|
||||
LP8553,
|
||||
LP8556,
|
||||
};
|
||||
|
||||
enum lp855x_brightness_ctrl_mode {
|
||||
PWM_BASED = 1,
|
||||
REGISTER_BASED,
|
||||
};
|
||||
|
||||
enum lp8550_brighntess_source {
|
||||
LP8550_PWM_ONLY,
|
||||
LP8550_I2C_ONLY = 2,
|
||||
};
|
||||
|
||||
enum lp8551_brighntess_source {
|
||||
LP8551_PWM_ONLY = LP8550_PWM_ONLY,
|
||||
LP8551_I2C_ONLY = LP8550_I2C_ONLY,
|
||||
};
|
||||
|
||||
enum lp8552_brighntess_source {
|
||||
LP8552_PWM_ONLY = LP8550_PWM_ONLY,
|
||||
LP8552_I2C_ONLY = LP8550_I2C_ONLY,
|
||||
};
|
||||
|
||||
enum lp8553_brighntess_source {
|
||||
LP8553_PWM_ONLY = LP8550_PWM_ONLY,
|
||||
LP8553_I2C_ONLY = LP8550_I2C_ONLY,
|
||||
};
|
||||
|
||||
enum lp8556_brightness_source {
|
||||
LP8556_PWM_ONLY,
|
||||
LP8556_COMBINED1, /* pwm + i2c before the shaper block */
|
||||
LP8556_I2C_ONLY,
|
||||
LP8556_COMBINED2, /* pwm + i2c after the shaper block */
|
||||
};
|
||||
|
||||
struct lp855x_pwm_data {
|
||||
void (*pwm_set_intensity) (int brightness, int max_brightness);
|
||||
int (*pwm_get_intensity) (int max_brightness);
|
||||
};
|
||||
|
||||
struct lp855x_rom_data {
|
||||
u8 addr;
|
||||
u8 val;
|
||||
};
|
||||
|
||||
/**
|
||||
* struct lp855x_platform_data
|
||||
* @name : Backlight driver name. If it is not defined, default name is set.
|
||||
* @mode : brightness control by pwm or lp855x register
|
||||
* @device_control : value of DEVICE CONTROL register
|
||||
* @initial_brightness : initial value of backlight brightness
|
||||
* @pwm_data : platform specific pwm generation functions.
|
||||
Only valid when mode is PWM_BASED.
|
||||
* @load_new_rom_data :
|
||||
0 : use default configuration data
|
||||
1 : update values of eeprom or eprom registers on loading driver
|
||||
* @size_program : total size of lp855x_rom_data
|
||||
* @rom_data : list of new eeprom/eprom registers
|
||||
*/
|
||||
struct lp855x_platform_data {
|
||||
char *name;
|
||||
enum lp855x_brightness_ctrl_mode mode;
|
||||
u8 device_control;
|
||||
int initial_brightness;
|
||||
struct lp855x_pwm_data pwm_data;
|
||||
u8 load_new_rom_data;
|
||||
int size_program;
|
||||
struct lp855x_rom_data *rom_data;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
|
@ -9,7 +9,6 @@
|
|||
#define CRAMFS_MAGIC 0x28cd3d45 /* some random number */
|
||||
#define CRAMFS_MAGIC_WEND 0x453dcd28 /* magic number with the wrong endianess */
|
||||
#define DEBUGFS_MAGIC 0x64626720
|
||||
#define SYSFS_MAGIC 0x62656572
|
||||
#define SECURITYFS_MAGIC 0x73636673
|
||||
#define SELINUX_MAGIC 0xf97cff8c
|
||||
#define RAMFS_MAGIC 0x858458f6 /* some random number */
|
||||
|
|
@ -27,7 +26,6 @@
|
|||
#define HPFS_SUPER_MAGIC 0xf995e849
|
||||
#define ISOFS_SUPER_MAGIC 0x9660
|
||||
#define JFFS2_SUPER_MAGIC 0x72b6
|
||||
#define ANON_INODE_FS_MAGIC 0x09041934
|
||||
#define PSTOREFS_MAGIC 0x6165676C
|
||||
|
||||
#define MINIX_SUPER_MAGIC 0x137F /* minix v1 fs, 14 char names */
|
||||
|
|
@ -40,7 +38,6 @@
|
|||
#define NCP_SUPER_MAGIC 0x564c /* Guess, what 0x564c is :-) */
|
||||
#define NFS_SUPER_MAGIC 0x6969
|
||||
#define OPENPROM_SUPER_MAGIC 0x9fa1
|
||||
#define PROC_SUPER_MAGIC 0x9fa0
|
||||
#define QNX4_SUPER_MAGIC 0x002f /* qnx4 fs detection */
|
||||
#define QNX6_SUPER_MAGIC 0x68191122 /* qnx6 fs detection */
|
||||
|
||||
|
|
@ -52,15 +49,24 @@
|
|||
#define REISER2FS_JR_SUPER_MAGIC_STRING "ReIsEr3Fs"
|
||||
|
||||
#define SMB_SUPER_MAGIC 0x517B
|
||||
#define USBDEVICE_SUPER_MAGIC 0x9fa2
|
||||
#define CGROUP_SUPER_MAGIC 0x27e0eb
|
||||
|
||||
#define FUTEXFS_SUPER_MAGIC 0xBAD1DEA
|
||||
|
||||
#define STACK_END_MAGIC 0x57AC6E9D
|
||||
|
||||
#define DEVPTS_SUPER_MAGIC 0x1cd1
|
||||
#define SOCKFS_MAGIC 0x534F434B
|
||||
#define V9FS_MAGIC 0x01021997
|
||||
|
||||
#define BDEVFS_MAGIC 0x62646576
|
||||
#define BINFMTFS_MAGIC 0x42494e4d
|
||||
#define DEVPTS_SUPER_MAGIC 0x1cd1
|
||||
#define FUTEXFS_SUPER_MAGIC 0xBAD1DEA
|
||||
#define PIPEFS_MAGIC 0x50495045
|
||||
#define PROC_SUPER_MAGIC 0x9fa0
|
||||
#define SOCKFS_MAGIC 0x534F434B
|
||||
#define SYSFS_MAGIC 0x62656572
|
||||
#define USBDEVICE_SUPER_MAGIC 0x9fa2
|
||||
#define MTD_INODE_FS_MAGIC 0x11307854
|
||||
#define ANON_INODE_FS_MAGIC 0x09041934
|
||||
|
||||
|
||||
#endif /* __LINUX_MAGIC_H__ */
|
||||
|
|
|
|||
|
|
@ -111,7 +111,7 @@ extern unsigned int kobjsize(const void *objp);
|
|||
#define VM_HUGEPAGE 0x01000000 /* MADV_HUGEPAGE marked this vma */
|
||||
#endif
|
||||
#define VM_INSERTPAGE 0x02000000 /* The vma has had "vm_insert_page()" done on it */
|
||||
#define VM_ALWAYSDUMP 0x04000000 /* Always include in core dumps */
|
||||
#define VM_NODUMP 0x04000000 /* Do not include in the core dump */
|
||||
|
||||
#define VM_CAN_NONLINEAR 0x08000000 /* Has ->fault & does nonlinear pages */
|
||||
#define VM_MIXEDMAP 0x10000000 /* Can contain "struct page" and pure PFN pages */
|
||||
|
|
|
|||
|
|
@ -1,5 +1,8 @@
|
|||
#ifndef LINUX_MMC_IOCTL_H
|
||||
#define LINUX_MMC_IOCTL_H
|
||||
|
||||
#include <linux/types.h>
|
||||
|
||||
struct mmc_ioc_cmd {
|
||||
/* Implies direction of data. true = write, false = read */
|
||||
int write_flag;
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@
|
|||
* may be used to reset the timeout - for code which intentionally
|
||||
* disables interrupts for a long time. This call is stateless.
|
||||
*/
|
||||
#if defined(ARCH_HAS_NMI_WATCHDOG) || defined(CONFIG_HARDLOCKUP_DETECTOR)
|
||||
#if defined(CONFIG_HAVE_NMI_WATCHDOG) || defined(CONFIG_HARDLOCKUP_DETECTOR)
|
||||
#include <asm/nmi.h>
|
||||
extern void touch_nmi_watchdog(void);
|
||||
#else
|
||||
|
|
|
|||
|
|
@ -1,8 +1,6 @@
|
|||
#ifndef _LINUX_PIPE_FS_I_H
|
||||
#define _LINUX_PIPE_FS_I_H
|
||||
|
||||
#define PIPEFS_MAGIC 0x50495045
|
||||
|
||||
#define PIPE_DEF_BUFFERS 16
|
||||
|
||||
#define PIPE_BUF_FLAG_LRU 0x01 /* page is on the LRU */
|
||||
|
|
|
|||
|
|
@ -32,21 +32,46 @@ struct poll_table_struct;
|
|||
*/
|
||||
typedef void (*poll_queue_proc)(struct file *, wait_queue_head_t *, struct poll_table_struct *);
|
||||
|
||||
/*
|
||||
* Do not touch the structure directly, use the access functions
|
||||
* poll_does_not_wait() and poll_requested_events() instead.
|
||||
*/
|
||||
typedef struct poll_table_struct {
|
||||
poll_queue_proc qproc;
|
||||
unsigned long key;
|
||||
poll_queue_proc _qproc;
|
||||
unsigned long _key;
|
||||
} poll_table;
|
||||
|
||||
static inline void poll_wait(struct file * filp, wait_queue_head_t * wait_address, poll_table *p)
|
||||
{
|
||||
if (p && wait_address)
|
||||
p->qproc(filp, wait_address, p);
|
||||
if (p && p->_qproc && wait_address)
|
||||
p->_qproc(filp, wait_address, p);
|
||||
}
|
||||
|
||||
/*
|
||||
* Return true if it is guaranteed that poll will not wait. This is the case
|
||||
* if the poll() of another file descriptor in the set got an event, so there
|
||||
* is no need for waiting.
|
||||
*/
|
||||
static inline bool poll_does_not_wait(const poll_table *p)
|
||||
{
|
||||
return p == NULL || p->_qproc == NULL;
|
||||
}
|
||||
|
||||
/*
|
||||
* Return the set of events that the application wants to poll for.
|
||||
* This is useful for drivers that need to know whether a DMA transfer has
|
||||
* to be started implicitly on poll(). You typically only want to do that
|
||||
* if the application is actually polling for POLLIN and/or POLLOUT.
|
||||
*/
|
||||
static inline unsigned long poll_requested_events(const poll_table *p)
|
||||
{
|
||||
return p ? p->_key : ~0UL;
|
||||
}
|
||||
|
||||
static inline void init_poll_funcptr(poll_table *pt, poll_queue_proc qproc)
|
||||
{
|
||||
pt->qproc = qproc;
|
||||
pt->key = ~0UL; /* all events enabled */
|
||||
pt->_qproc = qproc;
|
||||
pt->_key = ~0UL; /* all events enabled */
|
||||
}
|
||||
|
||||
struct poll_table_entry {
|
||||
|
|
|
|||
|
|
@ -121,4 +121,7 @@
|
|||
#define PR_SET_PTRACER 0x59616d61
|
||||
# define PR_SET_PTRACER_ANY ((unsigned long)-1)
|
||||
|
||||
#define PR_SET_CHILD_SUBREAPER 36
|
||||
#define PR_GET_CHILD_SUBREAPER 37
|
||||
|
||||
#endif /* _LINUX_PRCTL_H */
|
||||
|
|
|
|||
|
|
@ -51,20 +51,6 @@
|
|||
#define PTRACE_INTERRUPT 0x4207
|
||||
#define PTRACE_LISTEN 0x4208
|
||||
|
||||
/* flags in @data for PTRACE_SEIZE */
|
||||
#define PTRACE_SEIZE_DEVEL 0x80000000 /* temp flag for development */
|
||||
|
||||
/* options set using PTRACE_SETOPTIONS */
|
||||
#define PTRACE_O_TRACESYSGOOD 0x00000001
|
||||
#define PTRACE_O_TRACEFORK 0x00000002
|
||||
#define PTRACE_O_TRACEVFORK 0x00000004
|
||||
#define PTRACE_O_TRACECLONE 0x00000008
|
||||
#define PTRACE_O_TRACEEXEC 0x00000010
|
||||
#define PTRACE_O_TRACEVFORKDONE 0x00000020
|
||||
#define PTRACE_O_TRACEEXIT 0x00000040
|
||||
|
||||
#define PTRACE_O_MASK 0x0000007f
|
||||
|
||||
/* Wait extended result codes for the above trace options. */
|
||||
#define PTRACE_EVENT_FORK 1
|
||||
#define PTRACE_EVENT_VFORK 2
|
||||
|
|
@ -72,7 +58,19 @@
|
|||
#define PTRACE_EVENT_EXEC 4
|
||||
#define PTRACE_EVENT_VFORK_DONE 5
|
||||
#define PTRACE_EVENT_EXIT 6
|
||||
#define PTRACE_EVENT_STOP 7
|
||||
/* Extended result codes which enabled by means other than options. */
|
||||
#define PTRACE_EVENT_STOP 128
|
||||
|
||||
/* Options set using PTRACE_SETOPTIONS or using PTRACE_SEIZE @data param */
|
||||
#define PTRACE_O_TRACESYSGOOD 1
|
||||
#define PTRACE_O_TRACEFORK (1 << PTRACE_EVENT_FORK)
|
||||
#define PTRACE_O_TRACEVFORK (1 << PTRACE_EVENT_VFORK)
|
||||
#define PTRACE_O_TRACECLONE (1 << PTRACE_EVENT_CLONE)
|
||||
#define PTRACE_O_TRACEEXEC (1 << PTRACE_EVENT_EXEC)
|
||||
#define PTRACE_O_TRACEVFORKDONE (1 << PTRACE_EVENT_VFORK_DONE)
|
||||
#define PTRACE_O_TRACEEXIT (1 << PTRACE_EVENT_EXIT)
|
||||
|
||||
#define PTRACE_O_MASK 0x0000007f
|
||||
|
||||
#include <asm/ptrace.h>
|
||||
|
||||
|
|
@ -88,13 +86,12 @@
|
|||
#define PT_SEIZED 0x00010000 /* SEIZE used, enable new behavior */
|
||||
#define PT_PTRACED 0x00000001
|
||||
#define PT_DTRACE 0x00000002 /* delayed trace (used on m68k, i386) */
|
||||
#define PT_TRACESYSGOOD 0x00000004
|
||||
#define PT_PTRACE_CAP 0x00000008 /* ptracer can follow suid-exec */
|
||||
#define PT_PTRACE_CAP 0x00000004 /* ptracer can follow suid-exec */
|
||||
|
||||
#define PT_OPT_FLAG_SHIFT 3
|
||||
/* PT_TRACE_* event enable flags */
|
||||
#define PT_EVENT_FLAG_SHIFT 4
|
||||
#define PT_EVENT_FLAG(event) (1 << (PT_EVENT_FLAG_SHIFT + (event) - 1))
|
||||
|
||||
#define PT_EVENT_FLAG(event) (1 << (PT_OPT_FLAG_SHIFT + (event)))
|
||||
#define PT_TRACESYSGOOD PT_EVENT_FLAG(0)
|
||||
#define PT_TRACE_FORK PT_EVENT_FLAG(PTRACE_EVENT_FORK)
|
||||
#define PT_TRACE_VFORK PT_EVENT_FLAG(PTRACE_EVENT_VFORK)
|
||||
#define PT_TRACE_CLONE PT_EVENT_FLAG(PTRACE_EVENT_CLONE)
|
||||
|
|
@ -102,8 +99,6 @@
|
|||
#define PT_TRACE_VFORK_DONE PT_EVENT_FLAG(PTRACE_EVENT_VFORK_DONE)
|
||||
#define PT_TRACE_EXIT PT_EVENT_FLAG(PTRACE_EVENT_EXIT)
|
||||
|
||||
#define PT_TRACE_MASK 0x000003f4
|
||||
|
||||
/* single stepping state bits (used on ARM and PA-RISC) */
|
||||
#define PT_SINGLESTEP_BIT 31
|
||||
#define PT_SINGLESTEP (1<<PT_SINGLESTEP_BIT)
|
||||
|
|
@ -199,9 +194,10 @@ static inline void ptrace_event(int event, unsigned long message)
|
|||
if (unlikely(ptrace_event_enabled(current, event))) {
|
||||
current->ptrace_message = message;
|
||||
ptrace_notify((event << 8) | SIGTRAP);
|
||||
} else if (event == PTRACE_EVENT_EXEC && unlikely(current->ptrace)) {
|
||||
} else if (event == PTRACE_EVENT_EXEC) {
|
||||
/* legacy EXEC report via SIGTRAP */
|
||||
send_sig(SIGTRAP, current, 0);
|
||||
if ((current->ptrace & (PT_PTRACED|PT_SEIZED)) == PT_PTRACED)
|
||||
send_sig(SIGTRAP, current, 0);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -418,7 +418,7 @@ extern int rcu_my_thread_group_empty(void);
|
|||
*/
|
||||
#define rcu_lockdep_assert(c, s) \
|
||||
do { \
|
||||
static bool __warned; \
|
||||
static bool __section(.data.unlikely) __warned; \
|
||||
if (debug_lockdep_rcu_enabled() && !__warned && !(c)) { \
|
||||
__warned = true; \
|
||||
lockdep_rcu_suspicious(__FILE__, __LINE__, s); \
|
||||
|
|
|
|||
|
|
@ -553,6 +553,18 @@ struct signal_struct {
|
|||
int group_stop_count;
|
||||
unsigned int flags; /* see SIGNAL_* flags below */
|
||||
|
||||
/*
|
||||
* PR_SET_CHILD_SUBREAPER marks a process, like a service
|
||||
* manager, to re-parent orphan (double-forking) child processes
|
||||
* to this process instead of 'init'. The service manager is
|
||||
* able to receive SIGCHLD signals and is able to investigate
|
||||
* the process until it calls wait(). All children of this
|
||||
* process will inherit a flag if they should look for a
|
||||
* child_subreaper process at exit.
|
||||
*/
|
||||
unsigned int is_child_subreaper:1;
|
||||
unsigned int has_child_subreaper:1;
|
||||
|
||||
/* POSIX.1b Interval Timers */
|
||||
struct list_head posix_timers;
|
||||
|
||||
|
|
|
|||
|
|
@ -121,9 +121,12 @@ int single_release(struct inode *, struct file *);
|
|||
void *__seq_open_private(struct file *, const struct seq_operations *, int);
|
||||
int seq_open_private(struct file *, const struct seq_operations *, int);
|
||||
int seq_release_private(struct inode *, struct file *);
|
||||
int seq_put_decimal_ull(struct seq_file *m, char delimiter,
|
||||
unsigned long long num);
|
||||
int seq_put_decimal_ll(struct seq_file *m, char delimiter,
|
||||
long long num);
|
||||
|
||||
#define SEQ_START_TOKEN ((void *)1)
|
||||
|
||||
/*
|
||||
* Helpers for iteration over list_head-s in seq_files
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -54,12 +54,12 @@ struct linux_binprm;
|
|||
/*
|
||||
* ptrace report for syscall entry and exit looks identical.
|
||||
*/
|
||||
static inline void ptrace_report_syscall(struct pt_regs *regs)
|
||||
static inline int ptrace_report_syscall(struct pt_regs *regs)
|
||||
{
|
||||
int ptrace = current->ptrace;
|
||||
|
||||
if (!(ptrace & PT_PTRACED))
|
||||
return;
|
||||
return 0;
|
||||
|
||||
ptrace_notify(SIGTRAP | ((ptrace & PT_TRACESYSGOOD) ? 0x80 : 0));
|
||||
|
||||
|
|
@ -72,6 +72,8 @@ static inline void ptrace_report_syscall(struct pt_regs *regs)
|
|||
send_sig(current->exit_code, current, 1);
|
||||
current->exit_code = 0;
|
||||
}
|
||||
|
||||
return fatal_signal_pending(current);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -96,8 +98,7 @@ static inline void ptrace_report_syscall(struct pt_regs *regs)
|
|||
static inline __must_check int tracehook_report_syscall_entry(
|
||||
struct pt_regs *regs)
|
||||
{
|
||||
ptrace_report_syscall(regs);
|
||||
return 0;
|
||||
return ptrace_report_syscall(regs);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Reference in a new issue