net-wayfarer
ff4a27367b
Fix Makefile to work with DKMS
...
drivers/linux/Makefile:
* Replaced KERNEL_SRC_DIR variable with KSRC.
* Added KSRC variable which should enable successful DKMS compilation,
as opposed to bailing out with "Unable to find the Linux source tree."
This patch has been tested on Black Arch.
2021-02-24 14:47:36 -08:00
Shawn C
9a2536c611
Fix two memory leak bugs
...
These are caught by PaX AUTOSLAB plugin.
Signed-off-by: Shawn C <citypw@hardenedlinux.org >
2021-02-17 15:44:19 -08:00
Shawn C
84f33831ea
Workaround for function pointer complaints
...
* Some function pointers misuse caught by PaX RAP. These workaround fix would be useful
to the vanilla kernel since the recent TigerLake support Intel CET which might have
the same complaints if the implementation can achieve the current level as PaX RAP.
* Static call is a hack to make the function pointer writable. Please keep in mind that
this hack is only for the firmware audit reason. Be cautions if you intend to do the similar
things in production.
Thanks to Spender and PaX team points out the way to fix.
Signed-off-by: Shawn C <citypw@hardenedlinux.org >
2021-02-17 15:32:24 -08:00
Shawn C
9a1cead82c
Fix #1086 : Linux kernel v5.10 removed the old good syscalls get_fs/set_fs
...
in name of security reasons. The current workaround is get the kallsyms_lookup_name()
via kprobe if the kernel >= v5.10.
Signed-off-by: Shawn C <citypw@hardenedlinux.org >
2021-02-17 15:32:24 -08:00
gibarrasch
2c0c4c9fd1
Using CONFIG_EFI instead of user defined HAS_EFI ( #1036 )
...
Co-authored-by: Nathaniel Mitchell <nathaniel.p.mitchell@intel.com >
2021-02-17 15:31:12 -08:00
Shawn C
f2f1ab2d4f
Expand the conditional compilation based on d02624b to support more PaX/GRsec kernel
...
Signed-off-by: Shawn C <citypw@hardenedlinux.org >
2021-01-27 08:16:28 -08:00
Nathaniel Mitchell
2210002bab
Fixed build error on latest Ubuntu
...
Signed-off-by: Nathaniel Mitchell <nathaniel.p.mitchell@intel.com >
2021-01-26 16:04:06 -08:00
Shawn C
d746954e64
Add the support for access the kernel symbols by reading /proc/kallsyms directly
...
since kallsyms_lookup_name() and kallsyms_on_each_symbol() are no longer exported:
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=0bd476e6c67190b5eb7b6e105c8db8ff61103281
Signed-off-by: Shawn C <citypw@hardenedlinux.org >
2020-12-17 11:08:20 -08:00
Aaron Frinzell
5163468220
WIP: Windows driver multi-processor update
2020-07-30 09:20:16 -07:00
gibarrasch
787e556b97
Fixed compilation in kernels >= 5.6 ( #911 )
2020-05-20 15:57:24 -07:00
brentholtsclaw
54860e3d45
Update IOCTL_LOAD_UCODE_PATCH in linux driver
...
Signed-off-by: brentholtsclaw <brent.holtsclaw@intel.com >
2020-05-01 08:23:23 -07:00
brentholtsclaw
acace8ec2c
Modify rdmsr/wrmsr for linux driver
...
Signed-off-by: brentholtsclaw <brent.holtsclaw@intel.com >
2020-05-01 08:22:28 -07:00
Cr4sh
6d491162bf
linux helper HAS_EFI bugfix
2020-04-28 16:07:53 -07:00
Nathaniel Mitchell
cca172498e
Fixed build issue when building via old method.
...
Signed-off-by: Nathaniel Mitchell <nathaniel.p.mitchell@intel.com >
2020-03-02 13:45:02 -08:00
BrentHoltsclaw
3cb40f58ca
Fix macOS asm build issue
...
Signed-off-by: BrentHoltsclaw <brent.holtsclaw@intel.com >
2020-01-16 08:59:09 -08:00
Assaf Carlsbad
d687133678
Correctly handle the case where the CPU already has microcode updates.
2020-01-13 10:27:51 -08:00
Assaf Carlsbad
777429e1b9
Set failure status when pool allocation fails.
2020-01-13 10:27:51 -08:00
Assaf Carlsbad
56e4cff5ce
Fix input buffer length check for IOCTL_LOAD_UCODE_PATCH.
...
Fix traces.
2020-01-13 10:27:51 -08:00
Assaf Carlsbad
0ba7f122af
Fix input buffer length check for IOCTL_WRMSR.
2020-01-13 10:26:52 -08:00
Assaf Carlsbad
7dcab92d0f
Consistent handling of the case new_cpu_thread_id >= _num_active_cpus.
2020-01-13 10:23:48 -08:00
Assaf Carlsbad
5f9555bb0e
Use apt format specifiers: %u for unsigned int, %ul for unsigned long and %zu for size_t.
2019-12-18 16:27:46 -08:00
Assaf Carlsbad
38fdeb0d71
Delete extra argument passed to DbgPrint not used by format string.
2019-12-18 16:27:46 -08:00
Assaf Carlsbad
0f2d02fb1d
Fix typo: Traslated -> Translated.
2019-12-18 16:27:46 -08:00
Assaf Carlsbad
080f42b20f
Print DEVICE_OBJECT and DRIVER_OBJECT addresses using %p.
2019-12-18 16:27:46 -08:00
Assaf Carlsbad
22e46651fe
Fix input buffer length check for IOCTL_RDMSR.
2019-12-12 21:44:14 -08:00
RageLtMan
d02624bbaf
valid_mmap_phys_addr_range conflicts with upstream
...
PaX implements valid_mmap_phys_addr_range in the kernel, and the
(return 1) hack in chipsec_km.c has a name collision with it.
Add another conditional for exposing the definition predicated on
whether __HAVE_ARCH_PAX_OPEN_USERLAND is defined in the kernel
headers. If it is, dont redefine the original function.
2019-11-06 20:26:22 -08:00
Barry Rountree
8ad2ffcb53
Trivial README patch for module loading/unloading.
2019-09-03 11:09:26 -07:00
Barry Rountree
bc66115d7f
Explanation of Kbuild warning.
2019-09-03 11:09:14 -07:00
BrentHoltsclaw
d310fe3b34
Added build notes based upon compilation feedback
...
Signed-off-by: BrentHoltsclaw <brent.holtsclaw@intel.com >
2019-08-19 13:06:47 -07:00
BrentHoltsclaw
2ee6b6a1e7
Fixup windriver hypercall typecasting
...
Signed-off-by: BrentHoltsclaw <brent.holtsclaw@intel.com >
2019-08-19 13:06:47 -07:00
BrentHoltsclaw
b97905b73a
Add support to use python build_ext -i command on windows
...
(assuming VS and WDK are installed)
Signed-off-by: BrentHoltsclaw <brent.holtsclaw@intel.com >
2019-07-23 14:01:50 -07:00
Gabriel Ibarra
905022257f
Added unwinding info for amd64 assembly
2019-07-17 10:29:21 -07:00
BrentHoltsclaw
e7a34b940c
Fix windows smi functionality
2019-06-10 13:42:14 -07:00
BrentHoltsclaw
97c854add5
Remove Dead Code within oshelper add build instructions
2019-05-10 11:23:47 -07:00
BrentHoltsclaw
5c943b8f38
Changes to windows helper and driver to support return values
2019-04-25 14:05:07 -07:00
BrentHoltsclaw
c29769d81a
Fix Warning #535
2019-03-01 15:19:44 -08:00
BrentHoltsclaw
509bb0ba20
Fix Linux build error #535
2019-03-01 15:19:44 -08:00
BrentHoltsclaw
e2d2442b08
Add #define to make future changes easier
2019-01-17 11:30:20 -08:00
BrentHoltsclaw
3a515e9cfb
Address issue #249
...
changed drivers/linux/include/chipsec.h to start from 'C'
added logic to compute ioctl base based upon changes to chipsec.h above
2019-01-17 11:30:20 -08:00
BrentHoltsclaw
e3c050b920
Fix 32bit linux cpuid assembly
...
Found that cpuid was causing a kernel error in 32bit linux
2019-01-14 09:57:16 -08:00
BrentHoltsclaw
0b685ff5fb
Linux driver support for legacy BIOS and UEFI-compatibility mode
...
Issue #186
2019-01-14 09:54:26 -08:00
BrentHoltsclaw
10d6d1ea81
Fix for Issue #498
...
thanks @afoodu2
2019-01-04 11:39:14 -08:00
BrentHoltsclaw
89e50d17b6
Fix windows physmem write error
...
Thanks @hardboost
2018-11-28 10:49:34 -08:00
BrentHoltsclaw
108d2aaa79
Changes requested from @marcosdiazr
...
- removed ARM configurations
- Propogated debug build settings to release build settings
- Added Win7 WDM build targets
- Updated Readme
2018-10-31 09:52:30 -07:00
BrentHoltsclaw
3b09a59ddd
WIN10 driver update
2018-10-31 09:52:30 -07:00
Erik Bjorge
02df863cdd
Reverting to previous memory access method.
...
More debug is required before switching to this updated method for memory access.
Signed-off-by: Erik Bjorge <erik.c.bjorge@intel.com >
2018-10-01 10:32:20 -07:00
BrentHoltsclaw
cf47af320c
Forgot to change void * to char * and increment copyright
2018-05-21 13:12:35 -07:00
BrentHoltsclaw
d025dba85b
linux driver physmem write fix
...
copy_from_user was only zeroing bytes in some cases when physmem write
function was called. Changed to a for loop which appears to fix the
issue.
2018-05-21 13:12:35 -07:00
BrentHoltsclaw
f61ea98ec3
Fix PREFast Issue #375
2018-04-24 11:18:19 -07:00
BrentHoltsclaw
93fa9f19b5
Fix for issue #363
...
Defined function valid_mmap_phys_addr_range within linux driver if
kernel version is greater than 4.15.4
2018-04-17 14:07:40 -07:00