Fedora 29 (and possibly other disctributions) are nowadays coming with
very recent versions of gcc (8.x) and binutils. These will cause some
compilation error when running the 'grub_build.sh' script to create a
GRUB2 boot loader image.
Fortunately, both issues have been fixed and merged in the upstream
project. This patch modifies the build script to cherry-pick those to
the local cloned version of grub before building it.
Signed-off-by: Geoffroy Van Cutsem <geoffroy.vancutsem@intel.com>
We have several scripts used by the build system related
to generating code for system calls, privileged mode stacks,
kernel object metadata, and application shared memory
partitions. Add some overview documentation for each.
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
$ sanitycheck -h # is re-ordered like this:
< ... all other options ... >
-C, --coverage Generate coverage reports. Implies
--enable_coverage
--coverage-platform COVERAGE_PLATFORM
Plarforms to run coverage reports on. This
option may be used multiple times.
Test case selection:
-f, --only-failed Run only those tests that failed the previous
sanity check invocation.
-s TEST, --test TEST Run only the specified test cases. These are
named by <path to test project relative to
--testcase-root>/<testcase.yaml section name>
--sub-test SUB_TEST Run only the specified sub-test cases and its
parent. These are named by test case name
appended by test function, i.e.
kernel.mutex.mutex_lock_unlock.
--list-tests list all tests.
-F FILENAME, --load-tests FILENAME
Load list of tests to be run from file.
-E FILENAME, --save-tests FILENAME
Save list of tests to be run to file.
-T TESTCASE_ROOT, --testcase-root TESTCASE_ROOT
Base directory to recursively search for test
cases. All testcase.yaml files under here will
be processed. May be called multiple times.
Defaults to the 'samples' and 'tests' directories
in the Zephyr tree.
Signed-off-by: Marc Herbert <marc.herbert@intel.com>
In zephyr drivers should always use u32_t.
Using uint32_t here generates issues in the CI when NEWLIB_LIBC
is defined.
Signed-off-by: Armando Visconti <armando.visconti@st.com>
Now that IPv4 options are handled, ICMPv4 echo reply must be created
taking into account that IPv4 header length can be variable. So instead
of cloning and rewriting (that would copy the useless options), let's
allocate and copy only the payload.
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
IPv4 header length might be bigger than struct net_ipv4_hdr if there are
options appended to it.
Fixes#11618
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
IPv4 header might come with options, unlike IPv6, these are not
encapsulated in option header but are fully part of the IPv4 header.
Zephyr must handles these. Now silently ignoring their content and
setting the cursor to the payload properly.
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
This is probably the only place where net_pkt_alloc_from_slab() is going
to be used.
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
This is meant for very particular use case as only logging uses that.
Where it makes entirely sense for it to send the logs through its own
slab/pool in order to not drain the core slabs/pools.
So enabling the new API to manage that. That has to be used with
net_context for the buffer pool. So one has to first allocate the
net_pkt from external slab, set the context and then (and only then)
allocate buffer. Basically, only net_context will uses that scheme
anyway.
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
Patch (3206568e43) changed network
interface numbering starts from 1. The index 0 is reserved.
So use api to get default interface index for packet socket sample.
Signed-off-by: Ravi kumar Veeramally <ravikumar.veeramally@linux.intel.com>
If one invokes cmake with west in the PATH but not inside a west
installation (i.e. in a monorepo setup), west will try to list the
zephyr modules issuing an error message.
Test if west list succeeds before using result for module testing.
Fixes#14177
Signed-off-by: Torsten Rasmussen <torsten.rasmussen@nordicsemi.no>
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
Parse the west version output and make sure both bootstrapper and
installation wests are up to date. This will still work after the two
are combined into what gets installed via PyPI.
Fixes: #13209
Signed-off-by: Marti Bolivar <marti@foundries.io>
Speculative execution side channel attacks can read the
entire FPU/SIMD register state on affected Intel Core
processors, see CVE-2018-3665.
We now have two options for managing floating point
context between threads on x86: CONFIG_EAGER_FP_SHARING
and CONFIG_LAZY_FP_SHARING.
The mitigation is to unconditionally save/restore these
registers on context switch, instead of the lazy sharing
algorithm used by CONFIG_LAZY_FP_SHARING.
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
This commits adds an overlay file with the SOCKS5 symbol that is needed
to run MQTT with a proxy, and extends README with instructions on how to
use it with the default and custom settings.
Signed-off-by: Tomasz Gorochowik <tgorochowik@antmicro.com>
The change in commit e5349d74ab
results in only one resource being returned for a device with
pci_bus_scan(). The root cause for that issue was actually
because of wrapping around when scanning through BARs, where
BARs were scanned 0->1->2->..->6->0->1->.. in an endless loop
for a single bus:dev.function. So revert that commit and put
in a fix by moving on to the next function after going
through all the BARs.
Fixes#1550
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
Some people never use the menuconfig, but it makes a good sanity check
when making Kconfig changes, so encourage it for that. Mention a few
things that can be checked in it.
Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
Add a section on how 'if' works to the 'Kconfig - Tips and Best
Practices' page, especially when combined with 'source'.
There seems to have been some confusion here that lead to a bunch of
duplicated dependencies. It's probably simpler than most people assume.
Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
If we enable newlib we run into an issue with fcntl.h and the openamp
proxy support. We don't utilize the proxy support so just disable it by
default.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
Pull in libmetal SHA 59a10acbb0bb684c1a75488f11878cb984170c81 to get
some build fixes related to newlib.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
Now that we have SDK 0.10.0 we can enable building this board with the
Zephyr toolchain. SDK 0.10.0 introduced support for the ARM v8m based
cores which these boards utilize.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
Update reserved function names starting with one underscore, replacing
them as follows:
'_k_' with 'z_'
'_K_' with 'Z_'
'_handler_' with 'z_handl_'
'_Cstart' with 'z_cstart'
'_Swap' with 'z_swap'
This renaming is done on both global and those static function names
in kernel/include and include/. Other static function names in kernel/
are renamed by removing the leading underscore. Other function names
not starting with any prefix listed above are renamed starting with
a 'z_' or 'Z_' prefix.
Function names starting with two or three leading underscores are not
automatcally renamed since these names will collide with the variants
with two or three leading underscores.
Various generator scripts have also been updated as well as perf,
linker and usb files. These are
drivers/serial/uart_handlers.c
include/linker/kobject-text.ld
kernel/include/syscall_handler.h
scripts/gen_kobject_list.py
scripts/gen_syscall_header.py
Signed-off-by: Patrik Flykt <patrik.flykt@intel.com>
Rename scheduler spinlock sched_lock to sched_spinlock as it will
collide with the cleanup of the reserved function name _sched_lock(),
which will also be called sched_lock().
Signed-off-by: Patrik Flykt <patrik.flykt@intel.com>
Prevent speculative attacks with out-of-bounds fd
values.
Won't affect code generation for systems that don't
enable CONFIG_BOUNDS_CHECK_BYPASS_MITIGATION.
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
We add two points where we add lfences to disable
speculation:
* In the memory buffer validation code, which takes memory
addresses and sizes from userspace and determins whether
this memory is actually accessible.
* In the system call landing site, after the system call ID
has been validated but before it is used.
Kconfigs have been added to enable these checks if the CPU
is not known to be immune on X86.
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
Used to sanitize array indexes without using any branch
instructions. Should be portable to any architecture.
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
We introduce hidden Kconfigs for all speculative
side channel attacks that we plan to address in the
kernel and update the existing ones to indicate their
CVEs.
This list keeps growing, so introduce a new config
CONFIG_X86_NO_SPECULATIVE_VULNERABILITIES, for CPUs
which don't speculatively execute, or are otherwise
immune by design.
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
Following new shield introduction in #14057, it has been highlighted
there was no codeowner for boards/shields/.
Assign erwango as codeowner.
Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
Changed the print format for unsigned 32-bit variables that produced
warnings when compiled with newlib instead of the standard C library.
Chose to replace %d with PRIu32 because the latter is more portable
and adapts to the types of the standard C libraries.
Tested with and without newlib, and with sanitycheck.
Signed-off-by: Dennis Wildmark <dennis.wildmark@assaabloy.com>
Fixes the warning -Wunused-parameter that is added with -Wextra
in the GCC compiler.
Chose to void the unused parameter inside the function.
Testcompiled with -Wall -Wextra -Werror and builds cleanly.
Signed-off-by: Dennis Wildmark <dennis.wildmark@assaabloy.com>
We previously added a cmake hack to alias rt1052 A0 part numbers (A
suffix) to A1 part numbers (B suffix), but this hack did not work
correctly when a board uses A1 part numbers directly.
Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
Use proper link to Zephyr source files. Fix rendering of special
options like NET_OK, NET_DROP and NET_CONTINUE.
Add reference links to network technologies documents.
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Use LL drivers instead of HAL driver because LL driver is available
for all soc while HAL driver is not.
Signed-off-by: Alexander Wachter <alexander.wachter@student.tugraz.at>
There is no need to sort the kernel objects by name in the linker
script. This is just a simple clean-up.
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
Commit 45a7e5d076 removed scripts/sysgen
and _k_task_list/_k_event_list sections are no longer being used.
So remove them.
Signed-off-by: Daniel Leung <daniel.leung@intel.com>