Commit graph

99553 commits

Author SHA1 Message Date
Maureen Helm
51ae306b59 doc: release notes: Finalize 1.12 release notes and docs
Removes the "draft" tag from the 1.12 release notes and adds a 1.12 link
on the release notes page. Adds a link to the 1.12 docs on the home
page.

Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
2018-06-11 10:36:43 -05:00
Maureen Helm
d3afa353a8 doc: release notes: Update 1.12 release notes with more GitHub issues
Adds a few more issues that were closed just prior to the 1.12 release.

Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
2018-06-11 10:35:32 -05:00
Wayne Ren
a91f1e5e14 tests: modify the test conditions for emsk_em7d_v22
Because the address and size alignment of MPUv2,
limite the thread numbers for emsk_em7d_v22.

If not, build will faill because of DCCM overflow

Signed-off-by: Wayne Ren <wei.ren@synopsys.com>
2018-06-11 09:05:15 -05:00
Wayne Ren
d5bc9d7bee arch: arc: adjust privileged stack size of arc to 384 bytes
Considering the case of call of printk, interrupt and
other cases, adjust the privileged stack size of arc to
384 bytes to avoid the the overflow of privileged stack.

Signed-off-by: Wayne Ren <wei.ren@synopsys.com>
2018-06-11 09:05:15 -05:00
Wayne Ren
97d0436486 arch: arc: use top of isr stack as exception stack and bug fixes
* re-use top of isr stack as exception stack
* bug fixes in irq offload's implementation
* improve kernel oops implementation

Signed-off-by: Wayne Ren <wei.ren@synopsys.com>
2018-06-11 09:05:15 -05:00
Anas Nashif
1c4fe3edc0 arch/arc: Set the right priority for ADC/AON on quark_se
ARC has only 2 priorities, 0 or 1. So let's set the right priority for
ADC and AON.

Fixes #8302

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2018-06-11 08:52:24 -05:00
Maureen Helm
8e89206815 doc: release notes: Update 1.12 release notes with GitHub issues
Lists all the GitHub issues closed since the 1.11.0 release (Fri Mar 9
2017).

Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
2018-06-09 13:33:46 -05:00
Paras Jain
bf1e0198a7 lib: posix: fix out-of-bound write
Ensure that write is in buffer limits

Coverity-CID: 186491

Signed-off-by: Paras Jain <parasjain2000@gmail.com>
2018-06-09 08:26:18 -05:00
Maureen Helm
eb9df85f84 release: Move version to 1.12.0-rc3
Updates the VERSION file to 1.12.0-rc3

Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
2018-06-09 09:20:02 -04:00
Andy Gross
d6f2858a14 doc: relnotes: Add security vulnerability information
This patch adds notes for the security related changes going into
release 1.12.

Signed-off-by: Andy Gross <andy.gross@linaro.org>
2018-06-08 16:45:47 -05:00
Wayne Ren
c63298ea65 arch: arc: improve the reset code
This commit improves the reset of arc:
* make the processor in the correct status
* clear interrupt related regs

this may improve or fix #6515

Signed-off-by: Wayne Ren <wei.ren@synopsys.com>
2018-06-08 16:37:22 -05:00
Wayne Ren
fb3d2d3785 arch: arc: remove unused codes
base.user_options is already set in k_thread_
user_mode_enter

Signed-off-by: Wayne Ren <wei.ren@synopsys.com>
2018-06-08 16:37:22 -05:00
Wayne Ren
5dd552e66b arch: arc: STACK_CHECK_FAIL of STACK_CHECK not hang the system
Whether it should hang the system it not decided finally.
But remove it here to let some tests pass.

Fixes #8032

Signed-off-by: Wayne Ren <wei.ren@synopsys.com>
2018-06-08 16:37:22 -05:00
Wayne Ren
144a4390b5 tests: fix the bug of sentinel.conf
Even CONFIG_HW_STACK_PROTECTION is no here,
it is still yes as it will be re-selected by
CONFIG_TEST_HW_STACK_PROTECTION in tests/Kconfig.

So the correct setting here is:

CONFIG_TEST_HW_STACK_PROTECTION=n

This fixes #8092 (case1)

Signed-off-by: Wayne Ren <wei.ren@synopsys.com>
2018-06-08 16:37:22 -05:00
Wayne Ren
5b6f860539 arch: arc: use a separate stack for exception handling
* use a separate stack for exception handling, this
will gurantee the exception handling always work, not
affected by some speical cases, e.g., stack check exception
or mem. protection exception at the exception entry.

* this commit can fix the second case of #8092

* note: the thread switch is still possible in exception
handling, e.g, caused by thread_abort. But the switched out
thread cannot be recovered, as the thread context is not
setup.

Signed-off-by: Wayne Ren <wei.ren@synopsys.com>
2018-06-08 16:37:22 -05:00
Marti Bolivar
c6c856bc60 scripts: west: cherry-pick upstream 321ab2e17
Bring in the changes from upstream 321ab2e17 ("runner: core: fix
docstrings for ReST integration"). This is a minimal change necessary
to avoid documentation build issues. The rest of West has gained other
features that are too late to pull in to the RC period, so just bring
in what's needed to get to v1.12.

Signed-off-by: Marti Bolivar <marti@opensourcefoundries.com>
2018-06-08 16:06:16 -05:00
Marti Bolivar
f8251693bb conf.py: clean up exit if ZEPHYR_BASE is unset
Suggested by Ulf Magnusson.

Signed-off-by: Marti Bolivar <marti@opensourcefoundries.com>
2018-06-08 16:06:16 -05:00
Marti Bolivar
869e9cce01 doc: add initial west documentation
This covers its design and scope, and provides usage and some
implementation documentation on the existing flashing and debugging
commands.

Signed-off-by: Marti Bolivar <marti@opensourcefoundries.com>
2018-06-08 16:06:16 -05:00
Marti Bolivar
3a766aedf0 doc: conf.py: add sphinx.ext.autodoc extension
This will allow us to pull in Python API documentation from source
files.

Signed-off-by: Marti Bolivar <marti@opensourcefoundries.com>
2018-06-08 16:06:16 -05:00
Marti Bolivar
1c852ddf5c doc: conf.py: make sure west is importable from Python
We need this to be able to pull in its API documentation.

This will need modifications when multi-repo support is available, in
order to get the imports from the independent West repo, but for now
just use the copy in Zephyr.

Signed-off-by: Marti Bolivar <marti@opensourcefoundries.com>
2018-06-08 16:06:16 -05:00
Marti Bolivar
e802d8de35 doc: conf.py: remove unused import
Make a pep8 linter happier.

Signed-off-by: Marti Bolivar <marti@opensourcefoundries.com>
2018-06-08 16:06:16 -05:00
Leandro Pereira
7cfd5a4184 samples: net: hrpl_border_router: Fix NULL pointer dereference
Null-checking `pkt` before making a call to net_pkt_unref() suggests
that it might be NULL, but the pointer is dereferenced before it's
checked.  Perform the check at the beginning of the function and
dereference and drop its reference unconditionally afterwards.

Coverity-ID: 178789
Signed-off-by: Leandro Pereira <leandro.pereira@intel.com>
2018-06-08 13:07:19 -05:00
Leandro Pereira
b7ad50b473 samples: net: rpl_border_router: Fix out-of-bounds write
While printing debugging information, an out of bounds write could
happen while trying to write out the NUL byte in the url array.

Coverity-ID: 178790
Signed-off-by: Leandro Pereira <leandro.pereira@intel.com>
2018-06-08 13:07:19 -05:00
Leandro Pereira
e7a3d01dc5 samples: net: dumb_http_server: Handle recv() errors
The recv() call can return errors, so handle them before reading the
received byte.  Unrecoverable errors will just trigger the client
socket to be closed as usual.

Coverity-ID: 182778
Signed-off-by: Leandro Pereira <leandro.pereira@intel.com>
2018-06-08 13:07:19 -05:00
Leandro Pereira
33aa90539a tests: kernel: fifo_timeout: Do not potentially dereference NULL ptrs
The return value from k_fifo_get() might be NULL in some situations,
so protect against that.

Coverity-ID: 186190
Coverity-ID: 186058
Signed-off-by: Leandro Pereira <leandro.pereira@intel.com>
2018-06-08 13:07:19 -05:00
Paul Sokolovsky
a37e037264 toolchain: gcc: Add compiler barrier at the end of UNALIGNED_PUT()
compiler_barrier() is itself defined down in this file. Without
adding it, newer versions of GCC (7+) for ARM Cortex-M may mistakenly
coalesce multiple strb/strh/str (store byte/half-word/word)
instructions, which support unaligned access on some
sub-architectures (Cortex-M3 and higher, but not on Cortex-M0),
into strd (store double), which doesn't support unaligned access.

Fixes: #6307

Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
2018-06-08 13:01:07 -05:00
Marti Bolivar
e8d0e72adf doc: extensions: fix :app: behavior for zephyr-app-commands
The directive is not generating the right "mkdir" steps when used with
the :app: option. Fix it.

Signed-off-by: Marti Bolivar <marti@opensourcefoundries.com>
2018-06-08 08:03:05 -04:00
Marti Bolivar
c6c1501355 getting_started: building: fix inaccuracies
The building and running section is out of date, as Windows and macOS
commands are available now.

It also has some accuracies:

- the following section describes how to build hello_world, not how to
  make a new application based on it

- zephyr-env scripts do more than just set project-specific
  environment variables (they modify PATH on Unix, and may run
  arbitrary RC scripts on all platforms)

Fix these issues.

Signed-off-by: Marti Bolivar <marti@opensourcefoundries.com>
2018-06-08 08:03:05 -04:00
Marti Bolivar
64ab13264a getting_started: fixes and cleanups for installation_linux
Miscellaneous fixes and concision improvements.

Signed-off-by: Marti Bolivar <marti@opensourcefoundries.com>
2018-06-08 08:03:05 -04:00
Marti Bolivar
9ca4d84079 getting_started: fixes for intro section
Commas are needed before coordinating conjunctions joining independent
clauses. Two backticks are needed for teletype fonts.

Signed-off-by: Marti Bolivar <marti@opensourcefoundries.com>
2018-06-08 08:03:05 -04:00
Marti Bolivar
3fc206fa53 getting_started: fix UNIX-ism
Now that the instructions work on Windows, delete a reference to
~ (the user's home on a Unix system) in the text.

Signed-off-by: Marti Bolivar <marti@opensourcefoundries.com>
2018-06-08 08:03:05 -04:00
Andy Gross
8b9042c419 doc: security: Remove revision history
This patch removes the revision history from the security overview
document.  With this file being maintained in git, there is no need
for an additional in-document revision history table.

Signed-off-by: Andy Gross <andy.gross@linaro.org>
2018-06-07 18:05:01 -05:00
Andy Gross
2825f79a2c doc: security: Update security overview for recent features
This patch revises the security overview document to bring the
information pertaining to stack protection, thread separation,
and memory protection up to date with the current state of the
software releases.

Signed-off-by: Andy Gross <andy.gross@linaro.org>
2018-06-07 18:05:01 -05:00
Anas Nashif
fb2e142b0e tests: fix test identifiers
Fix test identifiers and use subsystem correctly.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2018-06-07 18:01:49 -05:00
Anas Nashif
b20c4846dd sanitycheck: fail on faults/panics/oopses
Fail in tests where we have an OOPS or a panic. Right now and in many
cases we continue and test case might be reported as PASS.

Cases that have the tag ignore_faults will ignore those faults (cases
that are testing faults for example).

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2018-06-07 18:01:49 -05:00
Anas Nashif
f0bafc307b boards: make em_starterkit_em7d default test platform
This is a core platform that needs to be tested by default. Fix the
default tag in the board YAML (it was duplicated in the wrong section).

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2018-06-07 18:01:49 -05:00
Anas Nashif
5d6e7eb7c6 sanitycheck: export list of tests as CSV
Export tests to a file with Section, subsection and identifier as
columns making it easy to import testcases into test management system.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2018-06-07 18:01:49 -05:00
Michael Scott
ed3ea06f88 net: lwm2m: fix observer attribute update logic
A typo in update_attrs() was setting every observer to a PMIN of 0.
This meant we could send observer data as often as the process was
called.  This is out of spec as the default minimum is 10 seconds.

Signed-off-by: Michael Scott <michael@opensourcefoundries.com>
2018-06-07 12:27:46 -05:00
Jukka Rissanen
e72dcf0290 net: ipv4: Set TTL in net_pkt according to IPv4 header
The time-to-live value in net_pkt was not updated according to
received IPv4 header.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2018-06-07 12:00:17 -05:00
Jukka Rissanen
d9a14f5a27 net: ipv6: Set hop limit in net_pkt according to IPv6 header
The hop limit value in net_pkt was not updated according to
received IPv6 header.

Fixes #8182

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2018-06-07 11:59:17 -05:00
Michael Scott
a957107d50 net: lwm2m: lower priority of engine thread
The LwM2M engine thread is used for various periodic triggers.
None of these are in a critical path that requires super sensitive
timing and the current K_PRIO_COOP(7) setting was causing the
Bluetooth RX thread to have to wait too long for certain actions
to complete.

Let's lower the priority to -1 (effectively) to eliminate these
conflicts.

Signed-off-by: Michael Scott <michael@opensourcefoundries.com>
2018-06-07 11:51:51 -05:00
Satya Bhattacharya
fd561dd596 samples: net: Check the return value of nats_publish
Check and handle the return value of nats_publish() in main.c

Fixes #6258.

Signed-off-by: Satya Bhattacharya <satyacube@gmail.com>
2018-06-06 16:06:39 -05:00
Carles Cufi
b0abf365af doc: relnotes: 1.12 Bluetooth release notes
List the notable changes in the Bluetooth subsystem for the 1.12 release
notes.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2018-06-06 15:54:08 -05:00
Carles Cufi
59027fb689 doc: relnotes: Correct a couple of headline items
Minor changes to the persistent storage support and settings subsystem
headlines.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2018-06-06 15:54:08 -05:00
Carles Cufi
bb631076f6 tests: arm: irq_vector_table: Fix Kconfig override
Since on ARM CONFIG_NUM_IRQS option has no prompt, it cannot be properly
overridden by a prj.conf fragment. Instead make it have a prompt for
this particular test to be able to override it properly.

Fixes #8200

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2018-06-06 15:23:07 -04:00
Andrew Boie
2dd91eca0e kernel: move thread monitor init to common code
The original implementation of CONFIG_THREAD_MONITOR would
try to leverage a thread's initial stack layout to provide
the entry function with arguments for any given thread.

This is problematic:

- Some arches do not have a initial stack layout suitable for
this
- Some arches never enabled this at all (riscv32, nios2)
- Some arches did not enable this properly
- Dropping to user mode would erase or provide incorrect
information.

Just spend a few extra bytes to store this stuff directly
in the k_thread struct and get rid of all the arch-specific
code for this.

Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2018-06-06 14:26:45 -04:00
David B. Kinder
d04a7efd8d releasenotes: updated documentation changes
Included additional documentation changes for this release

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2018-06-06 09:45:36 -04:00
Maureen Helm
72d4d8bce1 doc: release notes: Fill in summary, arch, and kernel sections for 1.12
Fills in the summary section with roadmap features added in the 1.12
release. Fills in the architectures and kernel sections with notable
additions and changes.

Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
2018-06-06 09:44:41 -04:00
Daniele Biagetti
bfdb6acaf6 subsys: settings: Fix file exist error.
Fix file exist error within settings_subsys_init in order to correctly
reload existing settings when CONFIG_SETTINGS_FS is enabled.

Signed-off-by: Daniele Biagetti <daniele.biagetti@cblelectronics.com>
2018-06-06 09:43:19 -04:00
Luiz Augusto von Dentz
1218648ed1 Bluetooth: ATT: Fix clearing context at disconnect
When att_disconnected is called a thread may be waiting for the tx_sem
but that is memset to 0, furthermore there exists a flag
ATT_DISCONNECTED to indicate the context is no longer valid so instead
move memset to bt_att_accept so it is cleared when it is about to be
reused.

Fixes #8083

Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
2018-06-06 09:38:37 -04:00