泰晓科技 -- 聚焦 Linux - 追本溯源,见微知著!
网站地址:https://tinylab.org

泰晓Linux知识星球:1300+知识点,520+用户
请稍侯

泰晓资讯·2月 / 第五期 / 2020

Wang Chen 创作于 2020/02/21

“泰晓资讯”,广泛报道 “Linux/开源” 业界资讯。欢迎广大读者投递相关资讯来源和素材,本站将进一步收集整理后发布给大家。

通过对 WUSB 和 UWB 代码的清理, 未来 Linux 5.7 版本的代码将有望瘦身 2.87 万行

Last year we reported on Linux deprecating Wireless USB and Ultra Wideband subsystems. That WUSB and UWB code was demoted after being orphaned without a code maintainer for years with Wireless USB really not being popular in an era of Bluetooth and WiFi advancements. With no one having expressed concern or stepping up to maintain the code since deprecating WUSB and UWB, the code is now set to be removed with Linux 5.7.

去年,Linux 淘汰了无线 USB (简称 WUSB)和 超宽带(简称 USB)子系统。WUSB 和 UWB 代码已有多年没有代码维护者,而 WUSB 在蓝牙和 WiFi 占据市场主导后就没有真正流行起来。自从不赞成使用 WUSB 和 UWB 以来,没有人表示会加紧维护其代码,所以现在决定在 Linux 5.7 版本中删除其相关代码。通过对 Staging 目录的 “春季大扫除”,导致将近两万九千行代码被删除。

无线 USB 1.0 标准已经使用了 15 年(或者在 1.1 版中已经使用了 10 年),在三米传输范围内可以支持 480 Mbit/s 或者在十米传输距离上支持 110 Mbit/s ,这样的性能在 2020 年看来已经不再令人兴奋:现代 WiFi 标准肯定会更快,并且支持更长的距离,加上业界正在开发各种 MA-USB/USB-over-IP 的解决方案,以及蓝牙已经比 WUSB 取得了更大的成功。随着认证无线 USB 设备的普及,Linux 对 WUSB 的支持以及潜在的超宽带(UWB)支持变得有些鸡肋了。

Greg Kroah-Hartman 已经从他的 stage-next 分支的 staging 目录中删除了 WUSB 和 UWB 代码。这意味着如果不出意外的话我们将从 Linux 5.7 版本的内核开始,删除这 2.87 万行代码。

关键词: Linux,Staging

Linux 5.7 将支持 Apple iOS 设备的 USB 快速充电功能

The Linux 5.7 kernel that will be out in the late spring / early summer is poised to see support for USB fast charging support for Apple iOS devices.

Currently if charging an Apple iPhone / iPad from a USB port by default it will not draw more than 500mA per specifications. However, iOS devices can draw more power when communicated to do so via Apple’s protocol. With Linux 5.7 a new “apple-mfi-fastcharge” driver will allow this capability of up to 2500mA.

即将在春季末到初夏之间发布的 Linux 5.7 版本内核有望看到对 Apple iOS 设备的 USB 快速充电的支持。

当前,如果默认情况下默认通过 USB 端口为 Apple iPhone/iPad 充电,则额定标准下消耗的电流不会超过 500mA。但是,通过 Apple 自有的协议进行充电时,iOS 设备可以获得更大的电流。在 Linux 5.7 中,新的 “apple-mfi-fastcharge” 驱动程序将允许高达 2500mA。

apple-mfi-fastcharge 驱动程序将允许通过 sysfs 将电源属性设置为 “fast(快速)”,从而使得 iOS 设备从 USB 端口获取更多电力,类似于 MFi 认证充电器的行为。

由 Bastien Nocera 编写的 200 多行代码已由 Greg Kroah-Hartman 排入 USB-next 计划,以合入 Linux 5.7 版本。如果没有猜错的话,这个针对 iOS 设备的 USB 快速充电驱动程序的编写并没有获得 Apple 的支持。由于 Linux 5.6 版本的 merge 窗口期已经关闭,这个驱动将被排入下一个内核版本中发布。

关键词: Linux,iOS

为 Git 开发新的哈希算法

The Git source-code management system is famously built on the SHA-1 hashing algorithm, which has become an increasingly weak foundation over the years. SHA-1 is now considered to be broken and, despite the fact that it does not yet seem to be so broken that it could be used to compromise Git repositories, users are increasingly worried about its security. The good news is that work on moving Git past SHA-1 has been underway for some time, and is slowly coming to fruition; there is a version of the code that can be looked at now.

Git 源码管理系统是基于 SHA-1 哈希算法,Git 库储存的不同对象类型都使用 SHA-1 哈希来进行识别。Linus Torvalds 在设计 Git 时并没有想到 SHA-1 有一天会变得不安全。但 Google 在 2017 年宣布了对 SHA-1 哈希算法的首个成功碰撞攻击。所谓碰撞攻击是指给定两个不同的信息产生了相同的哈希值。今年早些时候,研究人员将攻击成本降至 4.5 万美元,未来几年攻击成本还会继续下降。使用 SHA-1 的项目需要尽快切换到更安全的哈希算法。在考虑了多个备选方案之后,Git 社区在 2018 年宣布它的下一代哈希算法将是 SHA-256。对小的项目来说,过渡到 SHA-256 比较容易,但对 Linux 内核这样庞大的项目来说,这并非轻而易举。1 月中旬,Carlson 发布了此过渡代码的第一部分,显然仅解决了部分问题。但他所取得的成就远远超出了现在已经进行的测试。他计划在准备就绪时将其发布。 Git 开发人员(尤其是 Carlson )已经悄悄地为这个项目工作了多年,相信我们都会从中受益。

关键词: Git,SHA-1

微软开源 Scalar,有效地加速 Git 指令

Git is a distributed version control system, so by default each Git repository has a copy of all files in the entire history. Even moderately-sized teams can create thousands of commits adding hundreds of megabytes to the repository every month. As your repository grows, Git may struggle to manage all that data. Time spent waiting for git status to report modified files or git fetch to get the latest data is time wasted. As these commands get slower, developers stop waiting and start switching context. Context switches harm developer productivity.

Today we are excited to announce the result of those efforts – Scalar. Scalar accelerates your Git workflow, no matter the size or shape of your repository. And it does it in ways we believe can all make their way into Git, with Scalar doing less and Git doing much more over time.

Git 是一个分布式版本控制系统,因此默认情况下,每个 Git 存储库都具有整个历史记录中所有文件的副本。即使是中等规模的团队也可以创建数千个提交,每个月向存储库添加数百兆字节的数据。随着存储库的增长,Git 可能难以管理所有数据。等待 git status 报告修改文件或 git fetch 获取最新数据可能会需要花费大量时间,开发人员的工作效率也会大大降低。

基于近期对 Git 的其他改进,微软开发了一个项目 - Scalar,无需虚拟文件系统即可支持非常大的存储库,无论存储库的大小如何,Scalar 均可加速您的 Git 工作流程。

对于 Scalar 的未来,微软希望将其贡献给 Git。微软计划把 Scalar 中加速 Git 的方法直接合并到 Git 项目中,最终实现让开发者不需要 Scalar,仅使用 Git 客户端就能获得这些性能改进。不过要达成这个目标,仍然有很长的路要走。微软提到,目前 Scalar 用来解决仓库规模扩大的方法是采用 sparse-checkout,尽管 Git 最近更新了该功能,使得该功能更容易使用,但是要达到提供完整功能的阶段,还有一段距离。

Scalar 在 Github 地址:https://github.com/microsoft/scalar

关键词: Git,Scalar

开源组织 FSF 向微软请愿:Windows 7 已退役,就把它免费开源吧

Just when Microsoft ended the support for Windows 7, Free Software Foundation filed a petition demanding Windows 7 to be open source. Now, the open-source community went a little further by making another bold move. Reportedly, the FSF mailed a blank upcycled hard drive to Microsoft. The foundation wants Microsoft to send back the hard drive, but after copying Windows 7 source code in it, along with license notice. What’s even more interesting is that the foundation offers its help to Microsoft for the process to go smoother.

开源组织 Free Software Foundation(FSF)本周宣布,他们已经发起了一份请愿书,希望微软将其专有的 Windows 7 代码作为自由开源的软件发布。

今年 1 月 14 日,微软宣布正式停止对 Windows 7 的技术支持,这意味着 Windows 7 操作系统正式退役,由于 Windows 7 将没有持续软件和安全更新,电脑遭受病毒和恶意软件攻击的风险会更大。

而开源组织 FSF 在请愿书中呼吁:“它(Windows 7)的生命不必终结。” “我们呼吁微软对其进行升级。” 意思是希望 Windows 7 能被作为免费开源的软件发布,因为在过去十年中它在对抗病毒、抵制侵犯隐私的升级之路上有很多宝贵的经验,这些不应该随着系统的退役而消失,应该作为免费开源的软件继续延续其生命。FSF 希望这份请愿书获得 7777 个签名,然后才会将请愿书发送给微软。

当然,微软对于开源这件事是比较友好的,Windows 核心程序也有开源发布的先例,例如古老的 MS-DOS 代码就已经开源,但是想让 Windows 7 开源,对于微软来说可能还不那么容易做到。

关键词: FSF,Windows 7

美国国家安全局 NSA 的 Python 培训文档公开了

Developers already have numerous options from the likes of Microsoft and Google for learning how to code in the popular Python programming language. But now budding Python developers can read up on the National Security Agency’s own Python training materials.

Software engineer Chris Swenson filed a Freedom of Information Act (FOIA) request with the NSA for access to its Python training materials and received a lightly redacted 400-page printout of the agency’s COMP 3321 Python training course. Swenson has since scanned the documents, ran OCR on the text to make it searchable, and hosted it on Digital Oceans Spaces. The material has also been uploaded to the Internet Archive.

此前微软官方上线了 Python 教程文档,后来甚至推出了免费视频教程,这引起一阵热议,现在美国国家安全局(NSA)的 Python 培训文档也在网上公开了。这一文档的公开要归功于软件工程师 Chris Swenson。

他在推特上表示,他依据信息安全法(FOIA),想 NSA 提交了要求获得 NSA 的 Python 培训材料,之后他收到了 NSA 返回的 400 页文档。随后 Chris 将文档扫描打印,并上传到了网上。

NSA 的培训文档简要介绍了 Python 语法,着重介绍了一些实用的模块,以及该语言适用的领域,比如自动化任务、创建 Web 应用或进行高级数学研究等,并且有一些实操项目,大致上与其它 Python 教程大同小异。

完整文档可以在这里查看:https://archive.org/details/comp3321/page/n3/mode/2up/search/device

关键词: Python,NSA

联系我们

资讯内容部分来自 “LWN.net“。如果您对某些 LWN 文章感兴趣(譬如希望获得全文翻译的)请扫描二维码加微信联系我们:

tinylab wechat



Read Album:

Read Related:

Read Latest: