[GitHub] [mynewt-site] utzig opened a new pull request #533: Update python requirements with upto date versions

2021-04-14 Thread GitBox


utzig opened a new pull request #533:
URL: https://github.com/apache/mynewt-site/pull/533


   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[mynewt-core] branch master updated: crypto: mbedtls: optional montgomery curve support

2021-04-14 Thread utzig
This is an automated email from the ASF dual-hosted git repository.

utzig pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/mynewt-core.git


The following commit(s) were added to refs/heads/master by this push:
 new 352e598  crypto: mbedtls: optional montgomery curve support
 new 4f394bd  Merge pull request #2567 from utzig/optional-montgomery-curves
352e598 is described below

commit 352e598191331fcdd5efbd4871b205c62d864a3c
Author: Fabio Utzig 
AuthorDate: Wed Apr 14 10:30:46 2021 -0300

crypto: mbedtls: optional montgomery curve support

Add a new syscfg to enable/disable Curve448 support. Both Curve25519 and
Curve448 are montgomery form elliptic curves, and bring in a lot of
supporting code. Curve25519 was already disabled by default, but there
was no option to disable Curve448, so the montgomery support code was
built whenever MbedTLS based EC code was being used. Leaving this option
disabled reduces MbedTLS' size by about 2KB (for EC users).

Signed-off-by: Fabio Utzig 
---
 crypto/mbedtls/include/mbedtls/config_mynewt.h | 3 +++
 crypto/mbedtls/selftest/syscfg.yml | 1 +
 crypto/mbedtls/syscfg.yml  | 2 ++
 3 files changed, 6 insertions(+)

diff --git a/crypto/mbedtls/include/mbedtls/config_mynewt.h 
b/crypto/mbedtls/include/mbedtls/config_mynewt.h
index b61c314..82858d2 100644
--- a/crypto/mbedtls/include/mbedtls/config_mynewt.h
+++ b/crypto/mbedtls/include/mbedtls/config_mynewt.h
@@ -214,6 +214,9 @@ extern "C" {
 #if MYNEWT_VAL(MBEDTLS_ECP_DP_CURVE25519) == 0
 #undef MBEDTLS_ECP_DP_CURVE25519_ENABLED
 #endif
+#if MYNEWT_VAL(MBEDTLS_ECP_DP_CURVE448) == 0
+#undef MBEDTLS_ECP_DP_CURVE448_ENABLED
+#endif
 
 #if MYNEWT_VAL(MBEDTLS_ECJPAKE_C) == 0
 #undef MBEDTLS_ECJPAKE_C
diff --git a/crypto/mbedtls/selftest/syscfg.yml 
b/crypto/mbedtls/selftest/syscfg.yml
index bf78d87..748e17e 100644
--- a/crypto/mbedtls/selftest/syscfg.yml
+++ b/crypto/mbedtls/selftest/syscfg.yml
@@ -29,6 +29,7 @@ syscfg.vals:
   MBEDTLS_ECP_DP_BP384R1: 1
   MBEDTLS_ECP_DP_BP512R1: 1
   MBEDTLS_ECP_DP_CURVE25519: 1
+  MBEDTLS_ECP_DP_CURVE448: 1
   MBEDTLS_ECJPAKE_C: 1
 
   # Ciphers
diff --git a/crypto/mbedtls/syscfg.yml b/crypto/mbedtls/syscfg.yml
index 31d5917..485144f 100644
--- a/crypto/mbedtls/syscfg.yml
+++ b/crypto/mbedtls/syscfg.yml
@@ -48,6 +48,8 @@ syscfg.defs:
 value: 0
   MBEDTLS_ECP_DP_CURVE25519:
 value: 0
+  MBEDTLS_ECP_DP_CURVE448:
+value: 0
   MBEDTLS_ECJPAKE_C:
 value: 0
 


[GitHub] [mynewt-core] utzig merged pull request #2567: crypto: mbedtls: optional montgomery curve support

2021-04-14 Thread GitBox


utzig merged pull request #2567:
URL: https://github.com/apache/mynewt-core/pull/2567


   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[GitHub] [mynewt-nimble] apache-mynewt-bot commented on pull request #970: ll/rand: restructure rand initialization

2021-04-14 Thread GitBox


apache-mynewt-bot commented on pull request #970:
URL: https://github.com/apache/mynewt-nimble/pull/970#issuecomment-819802376


   
   
   
   ## Style check summary
   
    No suggestions at this time!
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[GitHub] [mynewt-core] vrahane commented on pull request #2562: hw/ipc_nrf5340: Allow sending data in fragments

2021-04-14 Thread GitBox


vrahane commented on pull request #2562:
URL: https://github.com/apache/mynewt-core/pull/2562#issuecomment-819702333


   cc: @hardik-proxy


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[GitHub] [mynewt-core] vrahane commented on issue #2535: Compiler packages for appcore and netcore of nRF5340

2021-04-14 Thread GitBox


vrahane commented on issue #2535:
URL: https://github.com/apache/mynewt-core/issues/2535#issuecomment-819687246


   So, I think we can resolve this issue.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[GitHub] [mynewt-core] vrahane commented on issue #2535: Compiler packages for appcore and netcore of nRF5340

2021-04-14 Thread GitBox


vrahane commented on issue #2535:
URL: https://github.com/apache/mynewt-core/issues/2535#issuecomment-819686938


   So, this can be solved by specifying `pkg.cflags:` for the respective BSP. 
apps, BSPs, targets and compiler packages when provided with `pkg.cflags` get 
applied to the entire build. cc: @ccollins476ad @vikrant-proxy 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[GitHub] [mynewt-nimble] haukepetersen commented on pull request #967: npl/riot: rework to use RIOTs ztimer

2021-04-14 Thread GitBox


haukepetersen commented on pull request #967:
URL: https://github.com/apache/mynewt-nimble/pull/967#issuecomment-819657196


   I found a way to make Travis happy before I merge this: I will temporarily 
base the NimBLE package in RIOT on my feature branch and merge that PR into 
RIOT first. This way Travis should be able to built this PR and be happy, so we 
can merge it without bad feelings :-)


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[GitHub] [mynewt-nimble] haukepetersen commented on pull request #970: ll/rand: restructure rand initialization

2021-04-14 Thread GitBox


haukepetersen commented on pull request #970:
URL: https://github.com/apache/mynewt-nimble/pull/970#issuecomment-819651896


   Forgot to reference - here is the path towards the bug in RIOT: 
https://github.com/RIOT-OS/RIOT/pull/16317


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[GitHub] [mynewt-nimble] haukepetersen opened a new pull request #970: ll/rand: restructure rand initialization

2021-04-14 Thread GitBox


haukepetersen opened a new pull request #970:
URL: https://github.com/apache/mynewt-nimble/pull/970


   This one took me some time to track down :-) Under certain situations, 
NimBLE on RIOT hard-faulted on nRF boards. This happend maybe every 5th or so 
time a board was rebootet, mainly showing for RIOTs `nimble_scanner` example 
application. It turned out, that the late initialization of the pseudo random 
number generator as introduced in #883 has caused this:
   - the first ever call to `jrand48()` causes a memory allocation (`malloc`) 
inside the libc code
   - as `ble_ll_rand()` is partly called from interrupt context, this could 
trigger the late initialization in the interrupt context, leading to a `malloc` 
to be executed in interrupt context
   - end of last year, a thread-safe malloc wrapper was introduced to RIOT, 
which does not allow for `malloc` calls from interrupt context, triggering a 
failed assertion (see https://github.com/RIOT-OS/RIOT/pull/15606)
   - this leads to kind of a race condition for the `nimble_scanner` example: 
if the first call to `ble_ll_rand()` is coming from thread context, everything 
is fine, if its by chance coming from interrupt context, the node hard-faults 
due to a failed assertion.
   
   In this PR I propose a pretty simple fix: why don't we simplify the 
`ble_ll_rand()` initialization per se and merge all three initialization steps 
into the `ble_ll_rand_init()` function?! This saves a little RAM (no static 
`init` var), makes the code more concise and prevents the error described 
above. I don't really see a drawback, as the split between `ble_ll_rand_init()` 
and `ble_ll_rand_start()` seems rather arbitrary to me, both are called exactly 
once and right after each other from the controllers init code anyway...


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[GitHub] [mynewt-core] apache-mynewt-bot commented on pull request #2567: crypto: mbedtls: optional montgomery curve support

2021-04-14 Thread GitBox


apache-mynewt-bot commented on pull request #2567:
URL: https://github.com/apache/mynewt-core/pull/2567#issuecomment-819606832


   
   
   
   ## Style check summary
   
    No suggestions at this time!
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[mynewt-site] branch asf-site updated: asf-site update Wed Apr 14 13:53:47 UTC 2021

2021-04-14 Thread git-site-role
This is an automated email from the ASF dual-hosted git repository.

git-site-role pushed a commit to branch asf-site
in repository https://gitbox.apache.org/repos/asf/mynewt-site.git


The following commit(s) were added to refs/heads/asf-site by this push:
 new d2f7aff  asf-site update Wed Apr 14 13:53:47 UTC 2021
d2f7aff is described below

commit d2f7affb12011f048efb20964fe859cf384c6ba8
Author: jenkins 
AuthorDate: Wed Apr 14 13:53:47 2021 +

asf-site update Wed Apr 14 13:53:47 UTC 2021
---
 sitemap.xml.gz| Bin 284 -> 284 bytes
 v0_9_0/sitemap.xml.gz | Bin 2216 -> 2216 bytes
 v1_0_0/sitemap.xml.gz | Bin 3239 -> 3239 bytes
 v1_1_0/sitemap.xml.gz | Bin 3464 -> 3464 bytes
 v1_2_0/sitemap.xml.gz | Bin 3487 -> 3487 bytes
 v1_3_0/sitemap.xml.gz | Bin 3483 -> 3483 bytes
 6 files changed, 0 insertions(+), 0 deletions(-)

diff --git a/sitemap.xml.gz b/sitemap.xml.gz
index 07ac300..adb0efc 100644
Binary files a/sitemap.xml.gz and b/sitemap.xml.gz differ
diff --git a/v0_9_0/sitemap.xml.gz b/v0_9_0/sitemap.xml.gz
index ea758a5..6109b36 100644
Binary files a/v0_9_0/sitemap.xml.gz and b/v0_9_0/sitemap.xml.gz differ
diff --git a/v1_0_0/sitemap.xml.gz b/v1_0_0/sitemap.xml.gz
index dea6ff5..f8e1529 100644
Binary files a/v1_0_0/sitemap.xml.gz and b/v1_0_0/sitemap.xml.gz differ
diff --git a/v1_1_0/sitemap.xml.gz b/v1_1_0/sitemap.xml.gz
index 1c8d296..bf19791 100644
Binary files a/v1_1_0/sitemap.xml.gz and b/v1_1_0/sitemap.xml.gz differ
diff --git a/v1_2_0/sitemap.xml.gz b/v1_2_0/sitemap.xml.gz
index d07eab5..4e83284 100644
Binary files a/v1_2_0/sitemap.xml.gz and b/v1_2_0/sitemap.xml.gz differ
diff --git a/v1_3_0/sitemap.xml.gz b/v1_3_0/sitemap.xml.gz
index ea98500..dc79f75 100644
Binary files a/v1_3_0/sitemap.xml.gz and b/v1_3_0/sitemap.xml.gz differ


[GitHub] [mynewt-core] utzig opened a new pull request #2567: crypto: mbedtls: optional montgomery curve support

2021-04-14 Thread GitBox


utzig opened a new pull request #2567:
URL: https://github.com/apache/mynewt-core/pull/2567


   Add a new syscfg to enable/disable Curve448 support. Both Curve25519 and 
Curve448 are montgomery form elliptic curves, and bring in a lot of supporting 
code. Curve25519 was already disabled by default, but there was no option to 
disable Curve448, so the montgomery support code was built whenever MbedTLS 
based EC code was being used. Leaving this option disabled reduces MbedTLS' 
size by about 2KB (for EC users).


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[GitHub] [mynewt-core] vrahane commented on pull request #2564: nrf5340/nrf52xxx: Add support for enabling instruction/data cache in hal_system_init() and add dependencies for BUS DRIVER

2021-04-14 Thread GitBox


vrahane commented on pull request #2564:
URL: https://github.com/apache/mynewt-core/pull/2564#issuecomment-819464465


   @andrzej-kaczmarek added a separate commit for the BUS driver changes.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[GitHub] [mynewt-core] apache-mynewt-bot commented on pull request #2566: flash_map: make mfg support optional

2021-04-14 Thread GitBox


apache-mynewt-bot commented on pull request #2566:
URL: https://github.com/apache/mynewt-core/pull/2566#issuecomment-819445607


   
   
   
   ## Style check summary
   
    No suggestions at this time!
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[GitHub] [mynewt-core] utzig opened a new pull request #2566: flash_map: make mfg support optional

2021-04-14 Thread GitBox


utzig opened a new pull request #2566:
URL: https://github.com/apache/mynewt-core/pull/2566


   A flash map configuration may be stored in the manufacturing meta region, 
and be used instead of the one build time generated from bsp.yml. This is 
currently hard-coded in the flash map code. For users who don't use a mmr, this 
adds somewhere between 500 and 1000 bytes of code who serves no purpose. This 
PR adds a syscfg to allow enabling/disabling the use of the MMR in the flash 
map thus making the mfg dependency optional.
   
   PS: I am adding `FLASH_MAP_SUPPORT_MFG` unset, which breaks backwards 
compatibility, but on the assumption that most users **don't use** an MMR.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[GitHub] [mynewt-nimble] andrzej-kaczmarek merged pull request #969: transport/cmac: Fix race on LL event write

2021-04-14 Thread GitBox


andrzej-kaczmarek merged pull request #969:
URL: https://github.com/apache/mynewt-nimble/pull/969


   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[mynewt-nimble] branch master updated: transport/cmac: Fix race on LL event write

2021-04-14 Thread andk
This is an automated email from the ASF dual-hosted git repository.

andk pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/mynewt-nimble.git


The following commit(s) were added to refs/heads/master by this push:
 new 1d073cc  transport/cmac: Fix race on LL event write
1d073cc is described below

commit 1d073cc84d5e387dcca250ff75d77c20f735ced0
Author: Andrzej Kaczmarek 
AuthorDate: Tue Apr 13 14:36:29 2021 +0200

transport/cmac: Fix race on LL event write

HCI commands are processed in LL task context and thus CS/CC events are
written to mbox in the same context. This can lead to following race:
- CS/CC is written to mbox
- interrupt in handled on CMAC *before* command buffer is freed
- M33 reads CS/CC and writes next command to mbox
- CMAC reads new command

This triggers an assert in code because we do not have free buffer for
new command because we were busy handling interrupts and did not free
it yet.

To fix this we should write and free in critical section.
---
 nimble/transport/dialog_cmac/src/ble_hci_cmac_ll.c | 5 +
 1 file changed, 5 insertions(+)

diff --git a/nimble/transport/dialog_cmac/src/ble_hci_cmac_ll.c 
b/nimble/transport/dialog_cmac/src/ble_hci_cmac_ll.c
index 3531529..6b49158 100644
--- a/nimble/transport/dialog_cmac/src/ble_hci_cmac_ll.c
+++ b/nimble/transport/dialog_cmac/src/ble_hci_cmac_ll.c
@@ -92,12 +92,17 @@ int
 ble_hci_trans_ll_evt_tx(uint8_t *evt)
 {
 uint8_t pkt_type = BLE_HCI_TRANS_H4_PKT_TYPE_EVT;
+os_sr_t sr;
+
+OS_ENTER_CRITICAL(sr);
 
 cmac_mbox_write(_type, sizeof(pkt_type));
 cmac_mbox_write(evt, evt[1] + 2);
 
 ble_hci_trans_buf_free(evt);
 
+OS_EXIT_CRITICAL(sr);
+
 return 0;
 }