~ubuntu-branches/ubuntu/raring/virtualbox-ose/raring

« back to all changes in this revision

Viewing changes to src/VBox/HostDrivers/VBoxNetFlt/linux/VBoxNetFlt-linux.c

  • Committer: Bazaar Package Importer
  • Author(s): Felix Geyer
  • Date: 2009-12-18 16:44:29 UTC
  • mfrom: (0.3.3 upstream) (0.4.6 squeeze)
  • Revision ID: james.westby@ubuntu.com-20091218164429-jd34ccexpv5na11a
Tags: 3.1.2-dfsg-1ubuntu1
* Merge from Debian unstable (LP: #498219), remaining changes:
  - Disable update action
    - debian/patches/u01-disable-update-action.dpatch
  - VirtualBox should go in Accessories, not in System tools (LP: #288590)
    - debian/virtualbox-ose-qt.files/virtualbox-ose.desktop
  - Add Apport hook
    - debian/virtualbox-ose.files/source_virtualbox-ose.py
    - debian/virtualbox-ose.install
  - Add Launchpad integration
    - debian/control
    - debian/lpi-bug.xpm
    - debian/patches/u02-lp-integration.dpatch
* Fixes the following bugs:
  - Kernel module fails to build with Linux >= 2.6.32 (LP: #474625)
  - X.Org drivers need to be rebuilt against X-Server 1.7 (LP: #495935)
  - The *-source packages try to build the kernel modules even though the
    kernel headers aren't available (LP: #473334)
* Replace *-source packages with transitional packages for *-dkms.
* Adapt u01-disable-update-action.dpatch and u02-lp-integration.dpatch for
  new upstream version.

Show diffs side-by-side

added added

removed removed

Lines of Context:
124
124
/**
125
125
 * The (common) global data.
126
126
 */
127
 
#ifdef RT_ARCH_AMD64
128
 
/**
129
 
 * Memory for the executable memory heap (in IPRT).
130
 
 */
131
 
extern uint8_t g_abExecMemory[4096]; /* cannot donate less than one page */
132
 
__asm__(".section execmemory, \"awx\", @progbits\n\t"
133
 
        ".align 32\n\t"
134
 
        ".globl g_abExecMemory\n"
135
 
        "g_abExecMemory:\n\t"
136
 
        ".zero 4096\n\t"
137
 
        ".type g_abExecMemory, @object\n\t"
138
 
        ".size g_abExecMemory, 4096\n\t"
139
 
        ".text\n\t");
140
 
#endif
141
 
 
142
127
static VBOXNETFLTGLOBALS g_VBoxNetFltGlobals;
143
128
 
144
129
module_init(VBoxNetFltLinuxInit);
148
133
MODULE_DESCRIPTION("VirtualBox Network Filter Driver");
149
134
MODULE_LICENSE("GPL");
150
135
#ifdef MODULE_VERSION
151
 
# define xstr(s) str(s)
152
 
# define str(s)  #s
153
 
MODULE_VERSION(VBOX_VERSION_STRING " (" xstr(INTNETTRUNKIFPORT_VERSION) ")");
 
136
MODULE_VERSION(VBOX_VERSION_STRING " (" RT_XSTR(INTNETTRUNKIFPORT_VERSION) ")");
154
137
#endif
155
138
 
156
 
/**
157
 
 * The (common) global data.
158
 
 */
159
 
static VBOXNETFLTGLOBALS g_VBoxNetFltGlobals;
160
139
 
161
140
/**
162
141
 * Initialize module.
172
151
    rc = RTR0Init(0);
173
152
    if (RT_SUCCESS(rc))
174
153
    {
175
 
#ifdef RT_ARCH_AMD64
176
 
        rc = RTR0MemExecDonate(&g_abExecMemory[0], sizeof(g_abExecMemory));
177
 
        printk("VBoxNetFlt: dbg - g_abExecMemory=%p\n", (void *)&g_abExecMemory[0]);
178
 
        if (RT_FAILURE(rc))
179
 
        {
180
 
            printk("VBoxNetFlt: failed to donate exec memory, no logging will be available.\n");
181
 
        }
182
 
#endif
183
154
        Log(("VBoxNetFltLinuxInit\n"));
184
155
 
185
156
        /*
195
166
            LogRel(("VBoxNetFlt: Successfully started.\n"));
196
167
            return 0;
197
168
        }
198
 
        else
199
 
            LogRel(("VBoxNetFlt: failed to initialize device extension (rc=%d)\n", rc));
 
169
 
 
170
        LogRel(("VBoxNetFlt: failed to initialize device extension (rc=%d)\n", rc));
200
171
        RTR0Term();
201
172
    }
202
173
    else