/usr/share/ksplice/kmodsrc/offsets.c is in ksplice 0.9.9-4.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 | /* Copyright (C) 2008-2009 Ksplice, Inc.
* Authors: Anders Kaseorg, Tim Abbott, Jeff Arnold
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License, version 2.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
* 02110-1301, USA.
*/
#include <linux/compile.h>
#include <linux/kernel.h>
#include <linux/version.h>
#include <linux/module.h>
#include <linux/uts.h>
#include <linux/utsname.h>
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,18)
/* 63104eec234bdecb55fd9c15467ae00d0a3f42ac was after 2.6.17 */
#include <linux/utsrelease.h>
#endif /* LINUX_VERSION_CODE */
#ifdef CONFIG_PARAVIRT
#include <asm/paravirt.h>
#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,22)
/* 98de032b681d8a7532d44dfc66aa5c0c1c755a9d was after 2.6.21 */
#define paravirt_patch_site paravirt_patch
#endif /* LINUX_VERSION_CODE */
#endif /* CONFIG_PARAVIRT */
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,24)) && (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,32))
/* 8256e47cdc8923e9959eb1d7f95d80da538add80 was after 2.6.23 */
/* fc5377668c3d808e1d53c4aee152c836f55c3490 was before 2.6.32 */
#include <linux/marker.h>
#endif /* LINUX_VERSION_CODE */
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,28)
/* 97e1c18e8d17bd87e1e383b2e9d9fc740332c8e2 was after 2.6.27 */
#include <linux/tracepoint.h>
#endif /* LINUX_VERSION_CODE */
#include <asm/uaccess.h>
#include "offsets.h"
const struct ksplice_config config
__attribute__((section(".ksplice_config"))) = {
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,25)
/* eb8f689046b857874e964463619f09df06d59fad was after 2.6.24 */
/* Introduction of .cpuinit, .devinit, .meminit sections */
#ifndef CONFIG_HOTPLUG
.ignore_devinit = 1,
#endif /* !CONFIG_HOTPLUG */
#ifndef CONFIG_HOTPLUG_CPU
.ignore_cpuinit = 1,
#endif /* !CONFIG_HOTPLUG_CPU */
#ifndef CONFIG_MEMORY_HOTPLUG
.ignore_meminit = 1,
#endif /* !CONFIG_MEMORY_HOTPLUG */
#endif /* LINUX_VERSION_CODE */
};
#define FIELD_ENDOF(t, f) (offsetof(t, f) + FIELD_SIZEOF(t, f))
const struct table_section table_sections[]
__attribute__((section(".ksplice_table_sections"))) = {
#ifdef CONFIG_X86
{
.sect = ".altinstructions",
.entry_size = sizeof(struct alt_instr),
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,25)
.entry_contents_size = offsetof(struct alt_instr, pad1),
#else
/* 1d8a1f6b51f6b195dfdcf05821be97edede5664a was after 2.6.24 */
.entry_contents_size = offsetof(struct alt_instr, pad),
#endif
.entry_align = __alignof__(struct alt_instr),
.has_addr = 1,
.addr_offset = offsetof(struct alt_instr, instr),
.other_sect = ".altinstr_replacement",
.other_offset = offsetof(struct alt_instr, replacement),
},
#endif /* CONFIG_X86 */
#if defined CONFIG_GENERIC_BUG && LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,20)
{
.sect = "__bug_table",
.entry_size = sizeof(struct bug_entry),
.entry_contents_size = FIELD_ENDOF(struct bug_entry, flags),
.entry_align = __alignof__(struct bug_entry),
.has_addr = 1,
#ifdef CONFIG_GENERIC_BUG_RELATIVE_POINTERS
.relative_addr = 1,
.addr_offset = offsetof(struct bug_entry, bug_addr_disp),
.relative_other = 1,
.other_offset = offsetof(struct bug_entry, file_disp),
#else
.addr_offset = offsetof(struct bug_entry, bug_addr),
#endif
},
#else /* !CONFIG_GENERIC_BUG || LINUX_VERSION_CODE < */
/* 91768d6c2bad0d2766a166f13f2f57e197de3458 was after 2.6.19 */
#endif /* CONFIG_GENERIC_BUG && LINUX_VERSION_CODE */
{
.sect = "__ex_table",
.entry_size = sizeof(struct exception_table_entry),
.entry_align = __alignof__(struct exception_table_entry),
.has_addr = 1,
.addr_offset = offsetof(struct exception_table_entry, insn),
.other_sect = ".fixup",
.other_offset = offsetof(struct exception_table_entry, fixup),
},
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,24)) && (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,32))
/* 8256e47cdc8923e9959eb1d7f95d80da538add80 was after 2.6.23 */
/* fc5377668c3d808e1d53c4aee152c836f55c3490 was before 2.6.32 */
{
.sect = "__markers",
.entry_size = sizeof(struct marker),
.entry_align = __alignof__(struct marker),
.other_sect = "__markers_strings",
.other_offset = offsetof(struct marker, name),
},
#endif /* LINUX_VERSION_CODE */
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,28)
/* 97e1c18e8d17bd87e1e383b2e9d9fc740332c8e2 was after 2.6.27 */
{
.sect = "__tracepoints",
.entry_size = sizeof(struct tracepoint),
.entry_align = __alignof__(struct tracepoint),
.other_sect = "__tracepoints_strings",
.other_offset = offsetof(struct tracepoint, name),
},
#endif /* LINUX_VERSION_CODE */
#ifdef CONFIG_PARAVIRT
{
.sect = ".parainstructions",
.entry_size = sizeof(struct paravirt_patch_site),
.entry_contents_size = FIELD_ENDOF(struct paravirt_patch_site,
clobbers),
.entry_align = __alignof__(struct paravirt_patch_site),
.has_addr = 1,
.addr_offset = offsetof(struct paravirt_patch_site, instr),
},
#endif /* CONFIG_PARAVIRT */
{
.sect = ".smp_locks",
.entry_size = sizeof(u8 *),
.entry_align = __alignof__(u8 *),
.has_addr = 1,
.addr_offset = 0,
},
{
.sect = "__ksymtab",
.entry_size = sizeof(struct kernel_symbol),
.entry_align = __alignof__(struct kernel_symbol),
.other_offset = offsetof(struct kernel_symbol, name),
#ifdef CONFIG_MODVERSIONS
.crc_size = sizeof(unsigned long),
.crc_sect = "__kcrctab",
#endif /* CONFIG_MODVERSIONS */
},
{
.sect = "__ksymtab_gpl",
.entry_size = sizeof(struct kernel_symbol),
.entry_align = __alignof__(struct kernel_symbol),
.other_offset = offsetof(struct kernel_symbol, name),
#ifdef CONFIG_MODVERSIONS
.crc_size = sizeof(unsigned long),
.crc_sect = "__kcrctab_gpl",
#endif /* CONFIG_MODVERSIONS */
},
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,18) && defined(CONFIG_UNUSED_SYMBOLS)
/* f71d20e961474dde77e6558396efb93d6ac80a4b was after 2.6.17 */
{
.sect = "__ksymtab_unused_gpl",
.entry_size = sizeof(struct kernel_symbol),
.entry_align = __alignof__(struct kernel_symbol),
.other_offset = offsetof(struct kernel_symbol, name),
#ifdef CONFIG_MODVERSIONS
.crc_size = sizeof(unsigned long),
.crc_sect = "__kcrctab_unused_gpl",
#endif /* CONFIG_MODVERSIONS */
},
{
.sect = "__ksymtab_unused",
.entry_size = sizeof(struct kernel_symbol),
.entry_align = __alignof__(struct kernel_symbol),
.other_offset = offsetof(struct kernel_symbol, name),
#ifdef CONFIG_MODVERSIONS
.crc_size = sizeof(unsigned long),
.crc_sect = "__kcrctab_unused",
#endif /* CONFIG_MODVERSIONS */
},
#endif /* LINUX_VERSION_CODE */
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,17)
/* 9f28bb7e1d0188a993403ab39b774785892805e1 was after 2.6.16 */
{
.sect = "__ksymtab_gpl_future",
.entry_size = sizeof(struct kernel_symbol),
.entry_align = __alignof__(struct kernel_symbol),
.other_offset = offsetof(struct kernel_symbol, name),
#ifdef CONFIG_MODVERSIONS
.crc_size = sizeof(unsigned long),
.crc_sect = "__kcrctab_gpl_future",
#endif /* CONFIG_MODVERSIONS */
},
#endif /* LINUX_VERSION_CODE */
};
const char *__attribute__((section(".uts_sysname"))) sysname = UTS_SYSNAME;
const char *__attribute__((section(".uts_release"))) release = UTS_RELEASE;
const char *__attribute__((section(".uts_version"))) version = UTS_VERSION;
const char *__attribute__((section(".uts_machine"))) machine = UTS_MACHINE;
|