Search found 5 matches

by Jason
2023年 Dec 5日 13:49
Forum: TuyaOS-Gateway&Central Control Device Development
Topic: IO and Cache in Linux
Replies: 0
Views: 3311

IO and Cache in Linux

In actual business development, we often encounter the problem of writing files not taking effect due to power failure issues, so it is necessary for us to study the root cause. Cache cache.png As shown in the figure, when the program calls various file operation functions, the flow of user data to ...
by Jason
2023年 Dec 5日 11:25
Forum: TuyaOS-网关中控开发
Topic: 【分享】Linux 下的 IO 以及缓存
Replies: 0
Views: 3273

【分享】Linux 下的 IO 以及缓存

在实际的业务开发中,经常遇到由于掉电问题引起的写文件没有生效的问题,所以我们有必要研究一下根本原因。 缓存 cache.png 如图,当程序调用各类文件操作函数后,用户数据(User Data)到达磁盘(Disk)的流程如图所示。图中描述了Linux下文件操作函数的层级关系和内存缓存层的存在位置。中间的黑色实线是用户态和内核态的分界线。 从上往下分析这张图,首先是C语言stdio库定义的相关文件操作函数,这些都是用户态实现的跨平台封装函数。stdio中实现的文件操作函数有自己的stdio buffer,这是在用户态实现的缓存。此处使用缓存的原因很简单——系统调用总是昂贵的。如果用户代码以较小的...
by Jason
2023年 Nov 14日 15:44
Forum: TuyaOS-Gateway&Central Control Device Development
Topic: Secure boot for Linux solution.
Replies: 0
Views: 1607

Secure boot for Linux solution.

An important aspect of ensuring device security in IoT is to ensure the integrity of the code, preventing malicious code from affecting the normal logic of the business. Generally speaking, it is to timely repair the vulnerabilities faced by the existing attack surface, such as browsers, Bluetooth, ...
by Jason
2023年 Nov 14日 13:59
Forum: TuyaOS-网关中控开发
Topic: 【分享】Linux方案的安全启动
Replies: 0
Views: 1311

【分享】Linux方案的安全启动

前言 在 IoT 中保证设备安全性的重要一环就是保证代码的完整性,不让恶意代码影响业务的正常逻辑。一般而言是及时修复现有攻击面所面临的漏洞,比如浏览器、蓝牙、调试接口;另一方面需要确保的是即便恶意代码获取了执行权限,也无法修改系统镜像进行持久化。针对这点所构造的安全方案通常称为 Secure Boot。 Secure Boot Secure Boot 顾名思义就是安全启动,确保设备启动之后所加载执行的代码都是可信的。其中涉及的主要概念有两个:信任链和信任根。前者保障执行流程的可靠交接,后者则保障初始信任代码的可信。 信任链 可信启动的一个核心思路就是在当前启动代码加载下一级代码之前,对所加载的...
by Jason
2022年 Sep 23日 15:20
Forum: TuyaOS-联网单品开发
Topic: 【技术干货】设备上下线那些事
Replies: 8
Views: 9761

Re: 【技术干货】设备上下线那些事

满满的干活,顶起来