Commit Graph

71666 Commits

Author SHA1 Message Date
Flavio Ceolin a61ca79041 doc: vulnerabilities: Add information about CVE-2022-2741
Add information for published CVE.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2022-11-01 12:01:00 +01:00
Flavio Ceolin ea8c6dbc03 doc: vulnerabilities: Add information about CVE-2022-1041
Add information for published CVE.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2022-11-01 12:01:00 +01:00
Flavio Ceolin d170982947 doc: vulnerabilities: Add information about CVE-2022-1042
Add information for published CVE.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2022-11-01 12:01:00 +01:00
Flavio Ceolin 01a02e6a29 doc: vulnerabilities: Add information about CVE-2022-1841
Add information for published CVE.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2022-11-01 12:01:00 +01:00
Peeyush Kumar 6ad1d7d814 boards: arm: nrf52840_papyr: Update documentation link
Updates an old broken link with a replacement for the
nrf52840_papyr board.

Signed-off-by: Peeyush Kumar <peeyush.ei@gmail.com>
2022-11-01 12:00:40 +01:00
Guillaume Gautier 5b4ad9127f drivers: gpio: STM32U5 independant IO supply
Fix the enabling of the independant IO supply.
Function LL_PWR_EnableVddIO2 is called LL_PWR_EnableVDDIO2 on U5.

Signed-off-by: Guillaume Gautier <guillaume.gautier-ext@st.com>
2022-11-01 12:00:25 +01:00
Torsten Rasmussen 1ee86a883d cmake: lookup strip tool and set CMAKE_STRIP for host-gnu target
Fixes: #51821

Set CMAKE_STRIP using `find_program(CMAKE_STRIP strip)` to support
strip when building on native posix.

Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
2022-11-01 11:59:19 +01:00
Kumar Gala 0a7c25e649 drivers: timer: intel_adsp: Update driver to use dts Kconfig symbol
Update Intel ADSP timer driver to use DT_HAS_<compat>_ENABLED Kconfig
symbol to expose the driver and enable it by default based on
devicetree.

We remove setting 'default y' for the timer driver in
Kconfig.defconfig.series as that is now handled in the driver Kconfig.

Signed-off-by: Kumar Gala <kumar.gala@intel.com>
2022-11-01 09:03:17 +00:00
Henrik Brix Andersen 05d02e2dac samples: drivers: can: counter: use printf() instead of printk()
Use printf() instead of printk() for printing sample output. According to
the documentation Zephyr printk() and friends are for printing kernel debug
messages.

With printf() instead of printk() the CAN counter sample passes twister
test execution on native_posix and native_posix_64.

Fixes: #50570

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2022-11-01 09:02:41 +00:00
Jeppe Odgaard 625efd8447 drivers: modem: gsm: Fix set gsm->state in gsm_ppp_stop
The driver should set the `gsm->state` to GSM_PPP_STOP when
`gsm_ppp_stop()` is run. This commit fixes that.

Fixes https://github.com/zephyrproject-rtos/zephyr/issues/51505

Signed-off-by: Jeppe Odgaard <jeppe.odgaard@prevas.dk>
2022-11-01 08:59:59 +00:00
Peter Johanson 4baf2eb751 boards: arm: Correct LED flags for XIAO board.
LEDs on the XIAO are active low, so set the flags appropriately.

Signed-off-by: Peter Johanson <peter@peterjohanson.com>
2022-11-01 08:56:15 +00:00
Sam Hurst 2d449b82a2 usb-c: Add missing errno.h include
Add missing errno.h include to usbc_tcpc.h which is
needed for the return of -ENOSYS.

Signed-off-by: Sam Hurst <sbh1187@gmail.com>
2022-11-01 08:55:43 +00:00
Ingar Kulbrandstad 7367980bea Bluetooth: Mesh: Extended advertiser as default
Setting the extended advertiser as default advertiser
to improve both preformence and reliability.

Signed-off-by: Ingar Kulbrandstad <ingar.kulbrandstad@nordicsemi.no>
2022-11-01 08:52:56 +00:00
Tom Burdick 2001d43f96 timer: HPET is also a lock free readable timer
Mark the timer as having a lock free read of the cycle count
so that spin lock debugging can include lock time asserts.

Signed-off-by: Tom Burdick <thomas.burdick@intel.com>
2022-10-31 21:28:29 -04:00
Chris Friedt 4f57b42571 tests: kernel: mutex: move race timeout test to mutex_api
Previously, this change was added to `mutex_error_case`.

That worked fine in `main`, but once the change was backported to
`v2.7-branch`, the test would fail because it *did not* cause a
failure. The reason for that, was that the `mutex_error_case`
suite has `CONFIG_ZTEST_FATAL_HOOK=y`.

With the newer ztest API, it allowed a separate suite to be used,
allowing the test to pass (although it did not really fit in with
the rest of the testsuite).

The solution is to simply merge it with the `mutex_api` suite
which uses non-inverted success logic.

This change will also have to be cherry-picked for the backport
in #49031.

Fixes #48056.

tests: kernel: mutex: move race timeout test to mutex_api

Previously, this change was added to `mutex_error_case`.

That worked fine in `main`, but once the change was backported to
`v2.7-branch`, the test would fail because it *did not* cause a
failure. The reason for that, was that the `mutex_error_case`
suite has `CONFIG_ZTEST_FATAL_HOOK=y`.

With the newer ztest API, it allowed a separate suite to be used,
allowing the test to pass (although it did not really fit in with
the rest of the testsuite).

The solution is to simply merge it with the `mutex_api` suite
which uses non-inverted success logic.

This change will also have to be cherry-picked for the backport
in #49031.

Fixes #48056.

Signed-off-by: Chris Friedt <cfriedt@meta.com>
2022-10-31 21:23:29 -04:00
Chris Friedt 024e9496d0 Revert "tests: kernel: mutex: test for lock timeout race"
This reverts commit 019a6ecae3.

Signed-off-by: Chris Friedt <cfriedt@meta.com>
2022-10-31 21:23:29 -04:00
Kumar Gala 117039ca2b IPM: remove defconfig/proj setting of IPM drivers
Now that IPM drivers are enabled based on devicetree we can
remove any cases of them getting enabled by Kconfig, *defconfig*,
and *.conf files.

We need to remove any cases of them getting enabled by
Kconfig.defconfig* files as this can lead to errors.

Signed-off-by: Kumar Gala <kumar.gala@intel.com>
2022-10-31 16:45:56 -05:00
Kumar Gala f389f702cb drivers: ipm: Update drivers to use devicetree Kconfig symbol
Update IPM drivers to use DT_HAS_<compat>_ENABLED Kconfig symbol
to expose the driver and enable it by default based on devicetree.

We remove 'depend on' Kconfig for symbols that would be implied by
the devicetree node existing.

Signed-off-by: Kumar Gala <kumar.gala@intel.com>
2022-10-31 16:45:56 -05:00
Martin Jäger d218fd9843 doc: develop: test: twister: remove outdated comment
The options --testcase-report and --detailed-report are not existing
anymore.

Signed-off-by: Martin Jäger <martin@libre.solar>
2022-10-31 16:14:14 -04:00
Flavio Ceolin 13bedbe1c9 intel: ace15: Enabling sha driver by default
Enable intel-adsp-sha driver y default when it is enabled in DT.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2022-10-31 12:45:33 -07:00
Flavio Ceolin d486bd1033 intel: ace15: Add adsp-sha entry in DT
Add a DT entry for intel-adsp-sha device in ace15 dts.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2022-10-31 12:45:33 -07:00
Flavio Ceolin 77a2aaa93e crypto: intel-sha: Rename to intel,adsp-sha
Rename DT binding to intel,adsp-sha.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2022-10-31 12:45:33 -07:00
Flavio Ceolin da520fe6fb crypto: intel-sha: Fix assorted warnings
There were multiple warnings due implicit type conversions.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2022-10-31 12:45:33 -07:00
Flavio Ceolin 6ad8b4626f crypto: intel-sha: Support multiple instances
Support multiple DTS instances in the C code, also
just initialize devices that are not disabled.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2022-10-31 12:45:33 -07:00
Flavio Ceolin ed3928b9c8 dts: bindings: Add intel-sha binding
Add a binding to Intel ADSP crypto SHA accelerator

Fixes #48953

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2022-10-31 12:45:33 -07:00
Anas Nashif b89a3d955a twister: count retries after failures or errors
When twister is set to retry any failures, count the number of retries
and record the number in the json file. This will help us identify
unstable tests or tests requiring attention.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2022-10-31 12:33:28 -04:00
Kumar Gala 4f458ba8de kernel: Convert away from CONFIG_MP_NUM_CPUS
Move runtime code to use arch_num_cpus() instead of CONFIG_MP_NUM_CPUS
and use CONFIG_MP_MAX_NUM_CPUS for ifdef and BUILD_ASSERT macros.

Signed-off-by: Kumar Gala <kumar.gala@intel.com>
2022-10-31 17:09:14 +01:00
Kumar Gala 1a5495adea tests: kernel: smp_boot_delay: Convert CONFIG_MP_NUM_CPUS handling
Move build and build system checks to use CONFIG_MP_MAX_NUM_CPUS
as we phase out CONFIG_MP_NUM_CPUS.

Signed-off-by: Kumar Gala <kumar.gala@intel.com>
2022-10-31 17:09:06 +01:00
Kumar Gala f7522cb71e tests: kernel: spinlock: Convert CONFIG_MP_NUM_CPUS handling
Move build and build system checks to use CONFIG_MP_MAX_NUM_CPUS
as we phase out CONFIG_MP_NUM_CPUS.

Signed-off-by: Kumar Gala <kumar.gala@intel.com>
2022-10-31 17:09:06 +01:00
Kumar Gala b0e916ba67 tests: kernel: smp: Convert CONFIG_MP_NUM_CPUS handling
Move runtime checks to use arch_num_cpus() and build checks
to use CONFIG_MP_MAX_NUM_CPUS.  This is to allow runtime
determination of the number of CPUs in the future.

Signed-off-by: Kumar Gala <kumar.gala@intel.com>
2022-10-31 17:09:06 +01:00
Kumar Gala 0a8cef84ae tests: kernel: mp: Convert CONFIG_MP_NUM_CPUS handling
Move build and build system checks to use CONFIG_MP_MAX_NUM_CPUS
as we phase out CONFIG_MP_NUM_CPUS.

Signed-off-by: Kumar Gala <kumar.gala@intel.com>
2022-10-31 17:09:06 +01:00
Kumar Gala 311a46e948 tests: mem_slab: mslab_api: Convert CONFIG_MP_NUM_CPUS handling
Move runtime checks to use arch_num_cpus() to use
CONFIG_MP_MAX_NUM_CPUS.  This is to allow runtime
determination of the number of CPUs in the future.

Signed-off-by: Kumar Gala <kumar.gala@intel.com>
2022-10-31 17:09:06 +01:00
Kumar Gala b5ec4109d3 tests: mem_protect: syscalls: Convert CONFIG_MP_NUM_CPUS handling
Move runtime checks to use arch_num_cpus() and build checks
to use CONFIG_MP_MAX_NUM_CPUS.  This is to allow runtime
determination of the number of CPUs in the future.

Signed-off-by: Kumar Gala <kumar.gala@intel.com>
2022-10-31 17:09:06 +01:00
Kumar Gala ab02bbc965 tests: lib: p4workq: Convert CONFIG_MP_NUM_CPUS handling
Move runtime checks to use arch_num_cpus() and build checks
to use CONFIG_MP_MAX_NUM_CPUS.  This is to allow runtime
determination of the number of CPUs in the future.

Signed-off-by: Kumar Gala <kumar.gala@intel.com>
2022-10-31 17:08:34 +01:00
Kumar Gala 9be0914885 lib: os: p4wq: Convert CONFIG_MP_NUM_CPUS handling
Move runtime checks to use arch_num_cpus().  This is to allow
runtime determination of the number of CPUs in the future.

Signed-off-by: Kumar Gala <kumar.gala@intel.com>
2022-10-31 17:08:34 +01:00
Nikolay Agishev 2fb1384da6 boards: qemu_arc_hs: Add separate xip & non-xip configs
Two separate configs for qemu_arc_hs and qemu_arc_hs_xip
were added.

Signed-off-by: Nikolay Agishev <agishev@synopsys.com>
2022-10-31 17:03:44 +01:00
Paul Jans e35ce37443 drivers: ethernet: enc28j60: Added carrier status update functionality
Expanded the enc28j60 driver to update its carrier status
whenever the Ethernet cable is plugged in or out. I used the
enc424j600 driver as reference, as this driver already
included this functionality. The driver will now take
the interface offline whenever the cable is not plugged in
and stop sending packets. The respective events are also
generated for use in the application. I tested it locally
on my nRF52840 based gateway board using the enc28j60 network
chip. Everything worked as expected.

Signed-off-by: Paul Jans <paul.jans.1999@hotmail.com>

Fixes #51214
2022-10-31 17:03:18 +01:00
Yuval Peress f460c21578 test: update how unit tests set sources
Replaces cases of setting SOURCES before calling find_package with
proper target_sources.

Signed-off-by: Yuval Peress <peress@google.com>
2022-10-31 17:01:59 +01:00
Yuval Peress ffb861d1a3 unittest: warn users of deprecated SOURCES
If users set SOURCES before find_package for unit tests, we'll warn them
that this code path will no longer be supported and provide the correct
way of doing things moving forward.

Signed-off-by: Yuval Peress <peress@google.com>
2022-10-31 17:01:59 +01:00
Yuval Peress 9cebf732ee unittest: Only add main.c if it exists
Downstream it's easier to write tests that use target_sources after
including the unittest package instead of specifying a list of sources
before. But if we do that, currently, main.c is added and the build
breaks because it doesn't exist.

Signed-off-by: Yuval Peress <peress@google.com>
2022-10-31 17:01:59 +01:00
Chris Friedt bea16cae3a posix: correct struct label for pthread_attr_t
Normally, for typedef'ed structures, the struct label should not
end in `_t`.

Signed-off-by: Chris Friedt <cfriedt@meta.com>
2022-10-31 16:59:16 +01:00
Chris Friedt f5cfeae152 posix: pthread: remove duplicate assignment in pthread_exit
The `self->retval` field was assigned twice.

Signed-off-by: Chris Friedt <cfriedt@meta.com>
2022-10-31 16:58:47 +01:00
Gerson Fernando Budke e9dde82565 MAINTAINERS: update gd32 maintainers
Promote HaiLong Yang @cameled as gd32 maintainer.

Signed-off-by: Gerson Fernando Budke <nandojve@gmail.com>
2022-10-31 10:29:14 -04:00
Parthiban Nallathambi 12eb38c5a5 sensor: dht: fix code stlying
fix indent, change space to tab

Signed-off-by: Parthiban Nallathambi <parthiban@linumiz.com>
2022-10-31 09:28:05 -05:00
Filip Zajdel 4508681020 kconfig: wrap description in guiconfig
Modify description frame to wrap the text so the window
doesn't have to be scrolled horizontally.

Signed-off-by: Filip Zajdel <filip.zajdel@nordicsemi.no>
2022-10-31 23:23:46 +09:00
Keith Packard 62bc9bf3e5 cmake: Allow selection of libc API overflow detection mode
This adds a choice of three different libc API buffer overflow detection
modes:

 * None
 * Compile-time
 * Compile-time and Run-time

These correspond with the clang/gcc _FORTIFY_SOURCE modes (0/1/2).
_FORTIFY_SOURCE depends on compiler optimizations and require libc support
which the minimal C library doesn't include, so _FORTIFY_SOURCE is disabled
by default in those cases. Native tooling might also enable
_FORTIFY_SOURCE, so don't enable it by default in that case either.

Signed-off-by: Keith Packard <keithp@keithp.com>
2022-10-31 23:23:27 +09:00
Gaël PORTAY 1578a991bd samples: blinky_pwm: fix missing project renaming
The commit bfb1040612 has renamed the
sample blink_led to blinky_pwm, however, the project still have the
former name: blink_led.

This renames the project to its new name: blinky_pwm.

Signed-off-by: Gaël PORTAY <gael.portay@gmail.com>
2022-10-31 09:22:59 -05:00
Kumar Gala ec8a689fcc tests: kernel: smp: pick a platform that makes sense for the tests
Pick a platform that actual supports SMP - qemu_x86_64.  Remove setting
CONFIG_TIMESLICING as that is already set.

Signed-off-by: Kumar Gala <kumar.gala@intel.com>
2022-10-31 09:08:35 -05:00
Kumar Gala c03ef06fff tests: kernel: mp: pick a platform that makes sense for the tests
Pick a platform that actual supports MP - qemu_x86_64.

Signed-off-by: Kumar Gala <kumar.gala@intel.com>
2022-10-31 09:08:35 -05:00
Piotr Pryga f24b5b4b43 Bluetooth: host: df: fix wrong connectionless CTE enable cmd length
There were a bug in a prepare_cl_cte_rx_enable_cmd_params function.
The size of command buffer was wrong when CTE enabled in AoD mode.
The command buffer was extended by param->num_ant_ids, that was
zero in case of AoD. Then a dummy antenna switch pattern was copied
into the command buffer.

That lead to: memory overwrite, and wrong command buffer length.
The command was rejected by Controller.

To fix, use cp->switch_pattern_len that was already assigned with
correct antenna pattern length.

Signed-off-by: Piotr Pryga <piotr.pryga@nordicsemi.no>
2022-10-31 11:23:44 +01:00