Changes in 4.9.258 mm: memcontrol: fix NULL pointer crash in test_clear_page_writeback() fgraph: Initialize tracing_graph_pause at task creation remoteproc: qcom_q6v5_mss: Validate MBA firmware size before load af_key: relax availability checks for skb size calculation iwlwifi: mvm: take mutex for calling iwl_mvm_get_sync_time() iwlwifi: pcie: add a NULL check in iwl_pcie_txq_unmap iwlwifi: mvm: guard against device removal in reprobe SUNRPC: Move simple_get_bytes and simple_get_netobj into private header SUNRPC: Handle 0 length opaque XDR object data properly lib/string: Add strscpy_pad() function include/trace/events/writeback.h: fix -Wstringop-truncation warnings memcg: fix a crash in wb_workfn when a device disappears futex: Ensure the correct return value from futex_lock_pi() futex: Change locking rules futex: Cure exit race squashfs: add more sanity checks in id lookup squashfs: add more sanity checks in inode lookup squashfs: add more sanity checks in xattr id lookup tracing: Do not count ftrace events in top level enable output tracing: Check length before giving out the filter buffer ovl: skip getxattr of security labels ARM: dts: lpc32xx: Revert set default clock rate of HCLK PLL memblock: do not start bottom-up allocations with kernel_end bpf: Check for integer overflow when using roundup_pow_of_two() netfilter: xt_recent: Fix attempt to update deleted entry xen/netback: avoid race in xenvif_rx_ring_slots_available() netfilter: conntrack: skip identical origin tuple in same zone only h8300: fix PREEMPTION build, TI_PRE_COUNT undefined usb: dwc3: ulpi: fix checkpatch warning usb: dwc3: ulpi: Replace CPU-based busyloop with Protocol-based one net/vmw_vsock: improve locking in vsock_connect_timeout() net: watchdog: hold device global xmit lock during tx disable vsock/virtio: update credit only if socket is not closed vsock: fix locking in vsock_shutdown() x86/build: Disable CET instrumentation in the kernel for 32-bit too trace: Use -mcount-record for dynamic ftrace tracing: Fix SKIP_STACK_VALIDATION=1 build due to bad merge with -mrecord-mcount tracing: Avoid calling cc-option -mrecord-mcount for every Makefile Xen/x86: don't bail early from clear_foreign_p2m_mapping() Xen/x86: also check kernel mapping in set_foreign_p2m_mapping() Xen/gntdev: correct dev_bus_addr handling in gntdev_map_grant_pages() Xen/gntdev: correct error checking in gntdev_map_grant_pages() xen/arm: don't ignore return errors from set_phys_to_machine xen-blkback: don't "handle" error by BUG() xen-netback: don't "handle" error by BUG() xen-scsiback: don't "handle" error by BUG() xen-blkback: fix error handling in xen_blkbk_map() scsi: qla2xxx: Fix crash during driver load on big endian machines kvm: check tlbs_dirty directly Linux 4.9.258 Signed-off-by: Greg Kroah-Hartman <gregkh@google.com> Change-Id: I5302387bd8a7d3610002bf86bc9612261f687217
71 lines
2.4 KiB
C
71 lines
2.4 KiB
C
/*
|
|
* This program is used to generate definitions needed by
|
|
* assembly language modules.
|
|
*
|
|
* We use the technique used in the OSF Mach kernel code:
|
|
* generate asm statements containing #defines,
|
|
* compile this file to assembler, and then extract the
|
|
* #defines from the assembly-language output.
|
|
*/
|
|
|
|
#include <linux/stddef.h>
|
|
#include <linux/sched.h>
|
|
#include <linux/kernel_stat.h>
|
|
#include <linux/ptrace.h>
|
|
#include <linux/hardirq.h>
|
|
#include <linux/kbuild.h>
|
|
#include <asm/irq.h>
|
|
#include <asm/ptrace.h>
|
|
|
|
int main(void)
|
|
{
|
|
/* offsets into the task struct */
|
|
OFFSET(TASK_STATE, task_struct, state);
|
|
OFFSET(TASK_FLAGS, task_struct, flags);
|
|
OFFSET(TASK_PTRACE, task_struct, ptrace);
|
|
OFFSET(TASK_BLOCKED, task_struct, blocked);
|
|
OFFSET(TASK_THREAD, task_struct, thread);
|
|
OFFSET(TASK_THREAD_INFO, task_struct, stack);
|
|
OFFSET(TASK_MM, task_struct, mm);
|
|
OFFSET(TASK_ACTIVE_MM, task_struct, active_mm);
|
|
|
|
/* offsets into the irq_cpustat_t struct */
|
|
DEFINE(CPUSTAT_SOFTIRQ_PENDING, offsetof(irq_cpustat_t,
|
|
__softirq_pending));
|
|
|
|
/* offsets into the thread struct */
|
|
OFFSET(THREAD_KSP, thread_struct, ksp);
|
|
OFFSET(THREAD_USP, thread_struct, usp);
|
|
OFFSET(THREAD_CCR, thread_struct, ccr);
|
|
|
|
/* offsets into the pt_regs struct */
|
|
DEFINE(LER0, offsetof(struct pt_regs, er0) - sizeof(long));
|
|
DEFINE(LER1, offsetof(struct pt_regs, er1) - sizeof(long));
|
|
DEFINE(LER2, offsetof(struct pt_regs, er2) - sizeof(long));
|
|
DEFINE(LER3, offsetof(struct pt_regs, er3) - sizeof(long));
|
|
DEFINE(LER4, offsetof(struct pt_regs, er4) - sizeof(long));
|
|
DEFINE(LER5, offsetof(struct pt_regs, er5) - sizeof(long));
|
|
DEFINE(LER6, offsetof(struct pt_regs, er6) - sizeof(long));
|
|
DEFINE(LORIG, offsetof(struct pt_regs, orig_er0) - sizeof(long));
|
|
DEFINE(LSP, offsetof(struct pt_regs, sp) - sizeof(long));
|
|
DEFINE(LCCR, offsetof(struct pt_regs, ccr) - sizeof(long));
|
|
DEFINE(LVEC, offsetof(struct pt_regs, vector) - sizeof(long));
|
|
#if defined(CONFIG_CPU_H8S)
|
|
DEFINE(LEXR, offsetof(struct pt_regs, exr) - sizeof(long));
|
|
#endif
|
|
DEFINE(LRET, offsetof(struct pt_regs, pc) - sizeof(long));
|
|
|
|
DEFINE(PT_PTRACED, PT_PTRACED);
|
|
|
|
/* offsets in thread_info structure */
|
|
OFFSET(TI_TASK, thread_info, task);
|
|
OFFSET(TI_FLAGS, thread_info, flags);
|
|
OFFSET(TI_CPU, thread_info, cpu);
|
|
OFFSET(TI_PRE, thread_info, preempt_count);
|
|
#ifdef CONFIG_PREEMPTION
|
|
DEFINE(TI_PRE_COUNT, offsetof(struct thread_info, preempt_count));
|
|
#endif
|
|
|
|
return 0;
|
|
}
|