a-lunev commented on pull request #3958:
URL: https://github.com/apache/incubator-nuttx/pull/3958#issuecomment-865413409


   > @a-lunev stm32_dmapreflight is used by the high level SDMMC driver 
https://github.com/apache/incubator-nuttx/blob/master/drivers/mmcsd/mmcsd_sdio.c#L1392
 . The debug assert is in addition to that just for debugging.
   
   @davids5 concerning drivers/mmcsd/mmcsd_sdio.c there is e.g. 
mmcsd_read_csd() function that has a local buffer (`uint8_t buffer[512] 
aligned_data(16);`) that is placed on the stack. The stack is allocated within 
the heap. If SRAM123 or SRAM4 is included into the total heap, and the local 
buffer is allocated somewhere in SRAM123 or SRAM4 areas, then the buffer 
address will be passed to SDIO_DMAPREFLIGHT(), the validation will trigger 
error and the target sdio operation will fail.
   There are multiple similar places in NuttX where a not allowed buffer 
address may be passed to dmapreflight() or directly to stm32h7 sdmmc driver 
that will result in a failure.
   It's still not clear what is the strategy to fix those situations?


-- 
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


Reply via email to