We were referring to old function names and still using the task
terminology which can be confusing.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
I was not requested reviews for PR impacting subdirectories
of arch/arm/soc/st_stm32/.
Remove '*' to fix this.
Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
Updated doc for release 1.12 for :-
Kernel:
Added k_thread_foreach API
Libraries / Subsystems:
subsys/disk: Added support for multiple disk interfaces
subsys/fs: Added support for multiple instances of filesystem
subsys/fs: Added Virtual File system Switch (VFS) support
Signed-off-by: Ramakrishna Pallala <ramakrishna.pallala@intel.com>
This patch corrects the way the INTENSET and INTENCLR registers are
accessed. When these registers are written with a bitmask, specified
bits are set or cleared in the INTEN (interrupt enabling) register,
so there is no need to read the previous state of these registers
(when they are read, the current state of INTEN is returned).
For INTENSET this patch eliminates only one unnecessary read, but for
INTENCLR the change is crucial because in the previous version any
write to the register disabled all the enabled interrupts.
Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
soc.h had defines for CONFIG_ARCV2_TIMER1_INT_{LVL,PRI}. These defines
are both not used and no Kconfig symbols so lets remove them.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
The sys_mem_pool implementation has a subtle error case where it
detected a simultaneous allocation after having released the lock, in
which case exactly one of the racing allocators will return with
-EAGAIN (the other one suceeds of course).
I documented this condition at the lower level, but forgot to actually
handle it at the k_mem_pool level where we want to retry once before
going to sleep, as it doesn't generally represent an empty heap. It
got caught by code auditing in:
https://github.com/zephyrproject-rtos/zephyr/issues/6757
(Full disclosure: I tested this by whiteboxing the first failure. I
wasn't able to put together a rig to reliably exercise the actual
race.)
This patch also fixes a noop thinko in the return logic in the same
function, which contained:
(ret == -EAGAIN) || (ret && ret != -ENOMEM)
The first term is needless and implied by the second.
Signed-off-by: Andy Ross <andrew.j.ross@intel.com>
Unquoted string defaults work through a quirk of Kconfig (undefined
symbols get their name as their string value), but look confusing. It's
done inconsistently now too.
Suggested by Kumar Gala.
Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
In preparation for introducing a warning.
Unquoted string defaults work through a quirk of Kconfig (undefined
symbols get their name as their string value), but look confusing. It's
done inconsistently now too.
Suggested by Kumar Gala.
Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
In preparation for introducing a warning.
Unquoted string defaults work through a quirk of Kconfig (undefined
symbols get their name as their string value), but look confusing. It's
done inconsistently now too.
Suggested by Kumar Gala.
Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
In preparation for introducing a warning.
Unquoted string defaults work through a quirk of Kconfig (undefined
symbols get their name as their string value), but look confusing. It's
done inconsistently now too.
Suggested by Kumar Gala.
Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
In preparation for introducing a warning.
Unquoted string defaults work through a quirk of Kconfig (undefined
symbols get their name as their string value), but look confusing. It's
done inconsistently now too.
Suggested by Kumar Gala.
Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
Setting bit CR0.WP (bit 16) will inhibit supervisor threads from
writing to RO pages. It's a necessary flag to be set, and the constant
name CR0_PAGING_ENABLE didn't reflect the fact that the 16th bit was
being set.
Signed-off-by: Leandro Pereira <leandro.pereira@intel.com>
This commit fixes a compilation bug for an undefined variable
(mmfar), which is only conditionally defined. Instead of mmfar
we use the ARM register value directly.
Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
Remove conflicting option CONFIG_NET_IPV6 since it got selected due to
CONFIG_NET_APP_NEED_IPV6 in netusb configuration file.
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
_nvs_sector_is_used() never uses the offset argument. As a consequence,
it only check the first sector of the flash. Fix that.
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
The two functions that compute the crc16 when writing (nvs_append_close)
and when reading (nvs_check_crc) currently assume that the flash is
also mapped in read mode at address 0. This is not true on all SoCs, and
even less on an SPI flash.
Fix this by adding a new nvs_compute_crc() function which compute the
CRC16 of an entry using the flash using nvs_flash_read, in blocks of
write_block_size. This might not be the optimal size, but it keeps the
stack usage small.
Use this function in both nvs_append_close() and nvs_check_crc() instead
of accessing the flash from address 0.
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
GCC complains that last_entry.len and last_entry.data_addr might be
uninitialized in _nvs_gc. Fix that.
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Now that the flash writes are padded up to the write block size, there
is no need to have explicit padding fields in the _nvs_sector_hdr and
_nvs_data_slt structure. This allow to save space when the write block
size equals to 1 or 2
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Writing more than the source buffer means that some random data,
possibly coming from the stack, ends-up in the flash. This could be
a security issue.
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Reading more than the destination buffer means that data is overwritten
possibly on the stack. This causes unpredictable behaviours like
crashes.
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Some SoCs do not allow shorter writes than the write block size, usually
when they have ECC memory. This patch first write all data in multiple
of the write block size and then do a last write with the data padded.
It uses 0xff as the padding byte to avoid wearing-out the flash.
nvs_append_close() is slightly modified to compute the crc16 that will
be put in the slot over the size defined in the header, to match the way
it is checked on read.
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Add a doc to the security section enumerating a threat model for a
sensor-type device. This will help the direction of work to meet these
security requirements for this particular application.
Signed-off-by: David Brown <david.brown@linaro.org>
Was written as "CONFIG_NET_SLIP", which doesn't exist.
Jukka Rissanen indicated in
https://github.com/zephyrproject-rtos/zephyr/pull/7810 that
CONFIG_NET_SLIP_TAP doesn't need to be enabled here ("I prefer we remove
the line completely as the TAP is enabled automatically for qemu_x86"),
so remove the assignment rather than fixing it.
Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
During normal use, a CoAP packet can be resent due to network congestion
and other causes. During block transfer the LwM2M client checks to make
sure the block received is the one we expect and if not generates a
"duplicate" warning. When this happened, we were releasing the reply
handler and when the correct block was received the client would
generate a "No handler" error.
To avoid releasing the reply handler too early, let's set the coap_reply
"user_data" field to an error condition (1). Then, once the reply
processing is complete we can check the user_data field to be sure that
it's ok to release the reply handler.
Signed-off-by: Michael Scott <michael@opensourcefoundries.com>
Userspace doesn't necessarily imply stack overflow protection
for supervisor threads. Enable this as well if the hardware
supports it.
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
mbedTLS 2.9.0 removed several macros from the config-ccm-psk-tls1_2.h
configuration that we need defined to build mbedTLS in zephyr. This
fixes the CI build failure in samples/net/mbedtls_sslclient
Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
Mbed TLS 2.9.0 introduces some minor functional improvements including
code size reductions with smaller AES tables, and initial support for
Curve448 along with some security fixes and bug fixes.
Signed-off-by: Maureen Helm <maureen.helm@nxp.com>