V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
V2EX  ›  QHKZ  ›  全部回复第 6 页 / 共 6 页
回复总数  119
1  2  3  4  5  6  
2021-08-09 18:48:27 +08:00
回复了 weimo383 创建的主题 程序员 为何前端构建工具这么麻烦
npm install 给我的感觉就是这样的
https://imgur.com/r/wtf/nqfWVeV
2021-08-06 16:42:16 +08:00
回复了 polyang 创建的主题 程序员 提交代码时 git commit message 是不是写的详细点比较好?
我写这段代码的时候,只有上帝和我知道。现在,只有上帝知道了。
commit 的作用是不用去看代码,也能知道代码发生了什么变动。
贴一段 linux 内核的最新 commit:
https://github.com/torvalds/linux/commit/e04480920d1eec9c061841399aa6f35b6f987d8b
-----
Bluetooth: defer cleanup of resources in hci_unregister_dev()
syzbot is hitting might_sleep() warning at hci_sock_dev_event() due to
calling lock_sock() with rw spinlock held [1].

It seems that history of this locking problem is a trial and error.

Commit b40df57 ("[PATCH] bluetooth: fix socket locking in
hci_sock_dev_event()") in 2.6.21-rc4 changed bh_lock_sock() to
lock_sock() as an attempt to fix lockdep warning.

Then, commit 4ce61d1 ("[BLUETOOTH]: Fix locking in
hci_sock_dev_event().") in 2.6.22-rc2 changed lock_sock() to
local_bh_disable() + bh_lock_sock_nested() as an attempt to fix the
sleep in atomic context warning.

Then, commit 4b5dd69 ("Bluetooth: Remove local_bh_disable() from
hci_sock.c") in 3.3-rc1 removed local_bh_disable().

Then, commit e305509 ("Bluetooth: use correct lock to prevent UAF
of hdev object") in 5.13-rc5 again changed bh_lock_sock_nested() to
lock_sock() as an attempt to fix CVE-2021-3573.

This difficulty comes from current implementation that
hci_sock_dev_event(HCI_DEV_UNREG) is responsible for dropping all
references from sockets because hci_unregister_dev() immediately
reclaims resources as soon as returning from
hci_sock_dev_event(HCI_DEV_UNREG).

But the history suggests that hci_sock_dev_event(HCI_DEV_UNREG) was not
doing what it should do.

Therefore, instead of trying to detach sockets from device, let's accept
not detaching sockets from device at hci_sock_dev_event(HCI_DEV_UNREG),
by moving actual cleanup of resources from hci_unregister_dev() to
hci_cleanup_dev() which is called by bt_host_release() when all
references to this unregistered device (which is a kobject) are gone.

Since hci_sock_dev_event(HCI_DEV_UNREG) no longer resets
hci_pi(sk)->hdev, we need to check whether this device was unregistered
and return an error based on HCI_UNREGISTER flag. There might be subtle
behavioral difference in "monitor the hdev" functionality; please report
if you found something went wrong due to this patch.

Link: https://syzkaller.appspot.com/bug?extid=a5df189917e79d5e59c9 [1]
Reported-by: syzbot <[email protected]>
Suggested-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
Fixes: e305509 ("Bluetooth: use correct lock to prevent UAF of hdev object")
Acked-by: Luiz Augusto von Dentz <[email protected]>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
master
@torvalds
Tetsuo Handa authored and torvalds committed 13 hours ago
1 parent 0b53abf commit e04480920d1eec9c061841399aa6f35b6f987d8b
2021-08-06 13:19:06 +08:00
回复了 chigeyaowaner 创建的主题 程序员 decops 太大,我们先做 CI/CD,请大家给点意见方向吧
参考 Microsoft Learn: Azure DevOps,逐步把 DevOps 加入现有流程。
https://docs.microsoft.com/zh-cn/learn/browse/?expanded=azure&products=azure-devops
2021-08-06 13:09:18 +08:00
回复了 chigeyaowaner 创建的主题 程序员 decops 太大,我们先做 CI/CD,请大家给点意见方向吧
推荐上一整套大而全的,免得后面发现不能满足需求还要转。
工作流程慢慢加,慢慢熟悉,慢慢建立规范的流程。
2021-08-04 17:33:03 +08:00
回复了 icebarley 创建的主题 数据库 想做一个国内用的 APP,数据库选用什么比较好?
sqlite 比较弱,少了一些 database 的功能特点。
https://www.cnblogs.com/caiyongliang/p/13719347.html
这里有个关于数据库的跑分比较,最后是 postgresql 胜出了。
https://itnext.io/benchmark-databases-in-docker-mysql-postgresql-sql-server-7b129368eed7
2021-08-03 11:27:35 +08:00
回复了 PolarBears 创建的主题 问与答 如何防止服务器备份被恶意删除?
可以备份到外部吗?比如这种服务: https://simplebackups.io/
从外部服务器发起连接,安全性的话可以开个端口,限制流量种类(协议)和源什么的,这样也省了备份文件的空间。
感觉不应该从本机主动发起任务,因为已经不安全了,从外部发起任务,本机被动应答,这种方式应该可以规避
2021-08-02 21:20:05 +08:00
回复了 linhongye 创建的主题 macOS 键盘上有个启动计算器的按钮, 在 Mac 上能有啥用?
要么用厂商适配的驱动
要么可以自定义键盘映射
2021-07-31 17:55:17 +08:00
回复了 guanhui07 创建的主题 问与答 买房了,首套资格没了,说说买房折扣事
同为人口净流出城市,LZ 那里的房价真便宜
2021-07-29 16:17:32 +08:00
回复了 whywaoxaks 创建的主题 macOS 位于奇怪位置的应用,无法删除,但 spotlight 还能搜出来
cd 不到的话也许是有原因的:
1. 路径有特殊字符,解决方法是把全路径加上引号。
2. 试试在输入路径的时候按 tab 键让它自动补全,或者按两下 tab 列出可以补全的字符串。
3. 也许是需要特殊权限才能看到,比如 windows store 的应用,全路径也差不多有一串很长的 hash,不用特殊账户进不去。
4. 可以用 du 命令。
2021-07-28 16:06:24 +08:00
回复了 serco 创建的主题 投资 写个系列文章给 A 股小白看有人有兴趣吗?多年资深亏损经验😂
铜球
2021-07-28 14:49:30 +08:00
回复了 v2tudnew 创建的主题 问与答 这种文件该如何删除?
求助:如何删除 win10 系统,“找不到该项目”的文件?文件名最后是一个点的文件,没有扩展名? - 知乎
https://www.zhihu.com/question/350091243
命令行那个方法可行。
2021-07-28 08:15:05 +08:00
回复了 Co1a 创建的主题 问与答 有哪些渠道来获取计算机各领域的热门论文的信息流推送
researcher-app
2021-07-25 16:09:09 +08:00
回复了 ispinfx 创建的主题 iPhone iPhone 到了 80%死活充不上电有救吗?
用 imazing 查看一下充电功率
2021-07-25 07:51:24 +08:00
回复了 exceldream 创建的主题 macOS 普通办公用电脑, mac air 够吗?
可以,再装 win 就是了。
我见过几个拿苹果电脑办公的,无一例外都是用的 win 系统。
2021-06-30 21:57:58 +08:00
回复了 Mrkon 创建的主题 Visual Studio Code 求助: vscode remote-ssh 问题
试试用 Dism 或者 sfc 修复一下系统
巨硬的 Office 部署工具 (office deployment tool)

Office 部署工具 (ODT) 是一款命令行工具,可以使用它下载并将 Microsoft 365 应用版部署到客户端计算机。ODT 使你可以更好地控制 Office 安装:可以定义要安装哪些产品和语言、应该如何更新这些产品以及是否向用户显示安装体验。

https://docs.microsoft.com/zh-cn/deployoffice/overview-office-deployment-tool
2021-05-25 15:53:12 +08:00
回复了 aizya 创建的主题 Linux 帮忙看看为什么这段脚本放到 crontab 中就运行不了?
cron 有 log,看看 log 怎么说
1  2  3  4  5  6  
关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   实用小工具   ·   2511 人在线   最高记录 6679   ·     Select Language
创意工作者们的社区
World is powered by solitude
VERSION: 3.9.8.5 · 35ms · UTC 01:22 · PVG 09:22 · LAX 18:22 · JFK 21:22
Developed with CodeLauncher
♥ Do have faith in what you're doing.