summaryrefslogtreecommitdiffstats
path: root/sys/dev/usb/controller/dwc_otg.c
diff options
context:
space:
mode:
authortrociny <trociny@FreeBSD.org>2012-09-27 14:55:15 +0000
committertrociny <trociny@FreeBSD.org>2012-09-27 14:55:15 +0000
commitd677fb07e182e385be1459f5c49b3c4a8676b360 (patch)
tree8c2723ade02d11c2edb9a60af5fd2692165d754a /sys/dev/usb/controller/dwc_otg.c
parentcec93f2f0fd32287db02b1dd801bf4b271535e5c (diff)
downloadFreeBSD-src-d677fb07e182e385be1459f5c49b3c4a8676b360.zip
FreeBSD-src-d677fb07e182e385be1459f5c49b3c4a8676b360.tar.gz
Kernel and modules have "set_vnet" linker set, where virtualized
global variables are placed. When a module is loaded by link_elf linker its variables from "set_vnet" linker set are copied to the kernel "set_vnet" ("modspace") and all references to these variables inside the module are relocated accordingly. The issue is when a module is loaded that has references to global variables from another, previously loaded module: these references are not relocated so an invalid address is used when the module tries to access the variable. The example is V_layer3_chain, defined in ipfw module and accessed from ipfw_nat. The same issue is with DPCPU variables, which use "set_pcpu" linker set. Fix this making the link_elf linker on a module load recognize "external" DPCPU/VNET variables defined in the previously loaded modules and relocate them accordingly. For this set_pcpu_list and set_vnet_list are used, where the addresses of modules' "set_pcpu" and "set_vnet" linker sets are stored. Note, archs that use link_elf_obj (amd64) were not affected by this issue. Reviewed by: jhb, julian, zec (initial version) MFC after: 1 month
Diffstat (limited to 'sys/dev/usb/controller/dwc_otg.c')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud