-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
301 lines (264 loc) · 41.9 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
<!DOCTYPE html><html lang="zh-CN" data-theme="light"><head><meta charset="UTF-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1.0,viewport-fit=cover"><title>R0gerThat</title><meta name="author" content="RT"><meta name="copyright" content="RT"><meta name="format-detection" content="telephone=no"><meta name="theme-color" content="#ffffff"><meta name="description" content="@Vidar-Team @CTFer @Game Lover">
<meta property="og:type" content="website">
<meta property="og:title" content="R0gerThat">
<meta property="og:url" content="https://wr-web.github.io/index.html">
<meta property="og:site_name" content="R0gerThat">
<meta property="og:description" content="@Vidar-Team @CTFer @Game Lover">
<meta property="og:locale" content="zh_CN">
<meta property="og:image" content="https://cdn.jsdelivr.net/gh/wr-web/picture/avatar.jpg">
<meta property="article:author" content="RT">
<meta name="twitter:card" content="summary">
<meta name="twitter:image" content="https://cdn.jsdelivr.net/gh/wr-web/picture/avatar.jpg"><link rel="shortcut icon" href="https://cdn.jsdelivr.net/gh/wr-web/picture/archive02.jpg"><link rel="canonical" href="https://wr-web.github.io/index.html"><link rel="preconnect" href="//cdn.jsdelivr.net"/><link rel="preconnect" href="//busuanzi.ibruce.info"/><link rel="stylesheet" href="/css/index.css"><link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fortawesome/fontawesome-free/css/all.min.css" media="print" onload="this.media='all'"><link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fancyapps/ui/dist/fancybox/fancybox.min.css" media="print" onload="this.media='all'"><script>const GLOBAL_CONFIG = {
root: '/',
algolia: undefined,
localSearch: {"path":"/search.xml","preload":true,"top_n_per_article":1,"unescape":false,"languages":{"hits_empty":"找不到您查询的内容:${query}","hits_stats":"共找到 ${hits} 篇文章"}},
translate: {"defaultEncoding":2,"translateDelay":0,"msgToTraditionalChinese":"繁","msgToSimplifiedChinese":"簡"},
noticeOutdate: undefined,
highlight: {"plugin":"prismjs","highlightCopy":true,"highlightLang":true,"highlightHeightLimit":300},
copy: {
success: '复制成功',
error: '复制错误',
noSupport: '浏览器不支持'
},
relativeDate: {
homepage: false,
post: false
},
runtime: '',
dateSuffix: {
just: '刚刚',
min: '分钟前',
hour: '小时前',
day: '天前',
month: '个月前'
},
copyright: undefined,
lightbox: 'fancybox',
Snackbar: undefined,
infinitegrid: {
js: 'https://cdn.jsdelivr.net/npm/@egjs/infinitegrid/dist/infinitegrid.min.js',
buttonText: '加载更多'
},
isPhotoFigcaption: false,
islazyload: false,
isAnchor: false,
percent: {
toc: true,
rightside: false,
},
autoDarkmode: false
}</script><script id="config-diff">var GLOBAL_CONFIG_SITE = {
title: 'R0gerThat',
isPost: false,
isHome: true,
isHighlightShrink: false,
isToc: false,
postUpdate: '2024-06-24 12:56:59'
}</script><script>(win=>{
win.saveToLocal = {
set: (key, value, ttl) => {
if (ttl === 0) return
const now = Date.now()
const expiry = now + ttl * 86400000
const item = {
value,
expiry
}
localStorage.setItem(key, JSON.stringify(item))
},
get: key => {
const itemStr = localStorage.getItem(key)
if (!itemStr) {
return undefined
}
const item = JSON.parse(itemStr)
const now = Date.now()
if (now > item.expiry) {
localStorage.removeItem(key)
return undefined
}
return item.value
}
}
win.getScript = (url, attr = {}) => new Promise((resolve, reject) => {
const script = document.createElement('script')
script.src = url
script.async = true
script.onerror = reject
script.onload = script.onreadystatechange = function() {
const loadState = this.readyState
if (loadState && loadState !== 'loaded' && loadState !== 'complete') return
script.onload = script.onreadystatechange = null
resolve()
}
Object.keys(attr).forEach(key => {
script.setAttribute(key, attr[key])
})
document.head.appendChild(script)
})
win.getCSS = (url, id = false) => new Promise((resolve, reject) => {
const link = document.createElement('link')
link.rel = 'stylesheet'
link.href = url
if (id) link.id = id
link.onerror = reject
link.onload = link.onreadystatechange = function() {
const loadState = this.readyState
if (loadState && loadState !== 'loaded' && loadState !== 'complete') return
link.onload = link.onreadystatechange = null
resolve()
}
document.head.appendChild(link)
})
win.activateDarkMode = () => {
document.documentElement.setAttribute('data-theme', 'dark')
if (document.querySelector('meta[name="theme-color"]') !== null) {
document.querySelector('meta[name="theme-color"]').setAttribute('content', '#0d0d0d')
}
}
win.activateLightMode = () => {
document.documentElement.setAttribute('data-theme', 'light')
if (document.querySelector('meta[name="theme-color"]') !== null) {
document.querySelector('meta[name="theme-color"]').setAttribute('content', '#ffffff')
}
}
const t = saveToLocal.get('theme')
if (t === 'dark') activateDarkMode()
else if (t === 'light') activateLightMode()
const asideStatus = saveToLocal.get('aside-status')
if (asideStatus !== undefined) {
if (asideStatus === 'hide') {
document.documentElement.classList.add('hide-aside')
} else {
document.documentElement.classList.remove('hide-aside')
}
}
const detectApple = () => {
if(/iPad|iPhone|iPod|Macintosh/.test(navigator.userAgent)){
document.documentElement.classList.add('apple')
}
}
detectApple()
})(window)</script><!-- hexo injector head_end start -->
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/dist/katex.min.css">
<!-- hexo injector head_end end --><meta name="generator" content="Hexo 6.0.0"><link rel="alternate" href="/atom.xml" title="R0gerThat" type="application/atom+xml">
</head><body><div id="web_bg"></div><div id="sidebar"><div id="menu-mask"></div><div id="sidebar-menus"><div class="avatar-img is-center"><img src="https://cdn.jsdelivr.net/gh/wr-web/picture/avatar.jpg" onerror="onerror=null;src='/img/friend_404.gif'" alt="avatar"/></div><div class="sidebar-site-data site-data is-center"><a href="/archives/"><div class="headline">文章</div><div class="length-num">42</div></a><a href="/tags/"><div class="headline">标签</div><div class="length-num">35</div></a><a href="/categories/"><div class="headline">分类</div><div class="length-num">17</div></a></div><hr class="custom-hr"/><div class="menus_items"><div class="menus_item"><a class="site-page" href="/"><i class="fa-fw fas fa-home"></i><span> Home</span></a></div><div class="menus_item"><a class="site-page" href="/archives/"><i class="fa-fw fas fa-archive"></i><span> Archives</span></a></div><div class="menus_item"><a class="site-page" href="/tags/"><i class="fa-fw fas fa-tags"></i><span> Tags</span></a></div><div class="menus_item"><a class="site-page" href="/categories/"><i class="fa-fw fas fa-folder-open"></i><span> Categories</span></a></div><div class="menus_item"><a class="site-page" href="/link/"><i class="fa-fw fas fa-link"></i><span> Link</span></a></div><div class="menus_item"><a class="site-page" href="/about/"><i class="fa-fw fas fa-heart"></i><span> About</span></a></div></div></div></div><div class="page" id="body-wrap"><header class="full_page" id="page-header" style="background-image: url('https://cdn.jsdelivr.net/gh/wr-web/picture/archive47.jpg')"><nav id="nav"><span id="blog-info"><a href="/" title="R0gerThat"><span class="site-name">R0gerThat</span></a></span><div id="menus"><div id="search-button"><a class="site-page social-icon search" href="javascript:void(0);"><i class="fas fa-search fa-fw"></i><span> 搜索</span></a></div><div class="menus_items"><div class="menus_item"><a class="site-page" href="/"><i class="fa-fw fas fa-home"></i><span> Home</span></a></div><div class="menus_item"><a class="site-page" href="/archives/"><i class="fa-fw fas fa-archive"></i><span> Archives</span></a></div><div class="menus_item"><a class="site-page" href="/tags/"><i class="fa-fw fas fa-tags"></i><span> Tags</span></a></div><div class="menus_item"><a class="site-page" href="/categories/"><i class="fa-fw fas fa-folder-open"></i><span> Categories</span></a></div><div class="menus_item"><a class="site-page" href="/link/"><i class="fa-fw fas fa-link"></i><span> Link</span></a></div><div class="menus_item"><a class="site-page" href="/about/"><i class="fa-fw fas fa-heart"></i><span> About</span></a></div></div><div id="toggle-menu"><a class="site-page" href="javascript:void(0);"><i class="fas fa-bars fa-fw"></i></a></div></div></nav><div id="site-info"><h1 id="site-title">R0gerThat</h1><div id="site_social_icons"><a class="social-icon" href="https://github.com/wr-web" target="_blank" title="Github"><i class="fab fa-github" style="color: #24292e;"></i></a><a class="social-icon" href="mailto:[email protected]" target="_blank" title="Email"><i class="fas fa-envelope" style="color: #4a7dbe;"></i></a><a class="social-icon" href="https://wr-web.github.io/atom.xml" target="_blank" title="Rss"><i class="fas fa-rss" style="color: #2d69d7;"></i></a><a class="social-icon" href="https://space.bilibili.com/13582048" target="_blank" title="BiliBili"><i class="fab fa-bilibili" style="color: #00a1d6;"></i></a></div></div><div id="scroll-down"><i class="fas fa-angle-down scroll-down-effects"></i></div></header><main class="layout" id="content-inner"><div class="recent-posts" id="recent-posts"><div class="recent-post-item"><div class="post_cover left"><a href="/2024/05/07/%E4%BB%A3%E7%A0%81%E8%A1%A5%E5%85%85/" title="LDD3 学习笔记"><img class="post-bg" src="https://cdn.jsdelivr.net/gh/wr-web/picture/archive51.jpg" onerror="this.onerror=null;this.src='/img/404.jpg'" alt="LDD3 学习笔记"></a></div><div class="recent-post-info"><a class="article-title" href="/2024/05/07/%E4%BB%A3%E7%A0%81%E8%A1%A5%E5%85%85/" title="LDD3 学习笔记">LDD3 学习笔记</a><div class="article-meta-wrap"><span class="post-meta-date"><i class="far fa-calendar-alt"></i><span class="article-meta-label">发表于</span><time datetime="2024-05-07T04:00:00.000Z" title="发表于 2024-05-07 12:00:00">2024-05-07</time></span><span class="article-meta"><span class="article-meta-separator">|</span><i class="fas fa-inbox"></i><a class="article-meta__categories" href="/categories/Linux/">Linux</a></span></div><div class="content">LDD3 WEEK4代码补充环境
Linux rogerthat 5.19.0-46-generic #47-Ubuntu SMP PREEMPT_DYNAMIC Fri Jun 16 13:30:11 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux
第五章complete轻量级的一种同步机制
#include <linux/module.h>
#include <linux/init.h>
#include <linux/sched.h> /* current and everything */
#include <linux/kernel.h> /* printk() */
#include <linux/fs.h> /* everything... */
#include <linux/types.h> /* size_t */
#include <linux/completion.h>
MODULE_LICENSE("Dual BSD/GPL");
static int complet ...</div></div></div><div class="recent-post-item"><div class="post_cover right"><a href="/2024/05/01/LDD3-week2/" title="LDD3 学习笔记"><img class="post-bg" src="https://cdn.jsdelivr.net/gh/wr-web/picture/archive50.jpg" onerror="this.onerror=null;this.src='/img/404.jpg'" alt="LDD3 学习笔记"></a></div><div class="recent-post-info"><a class="article-title" href="/2024/05/01/LDD3-week2/" title="LDD3 学习笔记">LDD3 学习笔记</a><div class="article-meta-wrap"><span class="post-meta-date"><i class="far fa-calendar-alt"></i><span class="article-meta-label">发表于</span><time datetime="2024-05-01T04:00:00.000Z" title="发表于 2024-05-01 12:00:00">2024-05-01</time></span><span class="article-meta"><span class="article-meta-separator">|</span><i class="fas fa-inbox"></i><a class="article-meta__categories" href="/categories/Linux/">Linux</a></span></div><div class="content">LDD3 WEEK2第七章 时间、延时,和延后工作jiffies 回绕
定时器也是一种潜在的竞争条件的源
tasklet 大部分用于中断管理,也就是后文第十章的前和后半部。把一个中断处理分成两部分,也可以使用工作队列。
tasklet workqueue 区别:
tasklet 代码必须是原子的
tasklet 在同一 cpu 上运行
内核可以请求工作队列延后一个明确的间隔。
第八章 分配内存kmalloc
kmem_cache_create,Slab 缓存(内存排列密集,速度稍微提升)scullc
mempool_create 内存池
get_free_page(get_free_pages) 请求页 scullp
vmalloc,vmalloc 在分配几个页时比其他函数更快, 但是 当获取单个页时有些慢, 因为页表建立的开销 scullv
DEFINE_PER_CPU,per-cpu 每个都使用自己的拷贝
alloc_bootmem,启动时获得大量缓冲,绕开了所有内存管理
第九章 与硬件通信I/O 端口 request_region
端口分配(部分)
rt@roge ...</div></div></div><div class="recent-post-item"><div class="post_cover left"><a href="/2024/04/23/LDD3-week1/" title="LDD3 学习笔记"><img class="post-bg" src="https://cdn.jsdelivr.net/gh/wr-web/picture/archive49.jpg" onerror="this.onerror=null;this.src='/img/404.jpg'" alt="LDD3 学习笔记"></a></div><div class="recent-post-info"><a class="article-title" href="/2024/04/23/LDD3-week1/" title="LDD3 学习笔记">LDD3 学习笔记</a><div class="article-meta-wrap"><span class="post-meta-date"><i class="far fa-calendar-alt"></i><span class="article-meta-label">发表于</span><time datetime="2024-04-23T04:00:00.000Z" title="发表于 2024-04-23 12:00:00">2024-04-23</time></span><span class="article-meta"><span class="article-meta-separator">|</span><i class="fas fa-inbox"></i><a class="article-meta__categories" href="/categories/Linux/">Linux</a></span></div><div class="content">LDD3 WEEK1关于几种
一些 log level,感觉 ERR 还挺好用的
8 #define KERN_EMERG KERN_SOH "" /* system is unusable */
9 #define KERN_ALERT KERN_SOH "" /* action must be taken immediately */
10 #define KERN_CRIT KERN_SOH "" /* critical conditions */
11 #define KERN_ERR KERN_SOH "" /* error conditions */
12 #define KERN_WARNING KERN_SOH "" /* warning conditions */
13 #define KERN_NOTICE KERN_SOH "" /* normal but significant condition */
14 #define KERN_INFO KERN_SOH "" /* informational */
15 #define KERN_DE ...</div></div></div><div class="recent-post-item"><div class="post_cover right"><a href="/2024/04/17/LLD3-week0/" title="LDD3 学习笔记"><img class="post-bg" src="https://cdn.jsdelivr.net/gh/wr-web/picture/archive52.jpg" onerror="this.onerror=null;this.src='/img/404.jpg'" alt="LDD3 学习笔记"></a></div><div class="recent-post-info"><a class="article-title" href="/2024/04/17/LLD3-week0/" title="LDD3 学习笔记">LDD3 学习笔记</a><div class="article-meta-wrap"><span class="post-meta-date"><i class="far fa-calendar-alt"></i><span class="article-meta-label">发表于</span><time datetime="2024-04-17T04:00:00.000Z" title="发表于 2024-04-17 12:00:00">2024-04-17</time></span><span class="article-meta"><span class="article-meta-separator">|</span><i class="fas fa-inbox"></i><a class="article-meta__categories" href="/categories/Linux/">Linux</a></span></div><div class="content">LDD3 WEEK0这周忙于人工智能课程的作业,书本看的不多,下周多看一些多实践一些。
1.简介主要介绍了驱动程序的角色,内核划分,以及 Linux 版本号、社区的一些基本信息。
2.建立和运行模块hello worldobj-m += hello_world.o
all:
make -C /lib/modules/$(shell uname -r)/build M=$(PWD) modules
clean:
make -C /lib/modules/$(shell uname -r)/build M=$(PWD) clean
#include<linux/module.h>
#include<linux/kernel.h>
MODULE_LICENSE("GPL");
MODULE_AUTHOR("RogerThat");
MODULE_DESCRIPTION("A simple hello world module");
MODULE_VERSION("0.01");
static int __init hello_mod_init(void)
{ ...</div></div></div><div class="recent-post-item"><div class="post_cover left"><a href="/2024/01/12/windows-terminal-customization/" title="Windows Terminal Customization"><img class="post-bg" src="https://cdn.jsdelivr.net/gh/wr-web/picture/archive40.jpg" onerror="this.onerror=null;this.src='/img/404.jpg'" alt="Windows Terminal Customization"></a></div><div class="recent-post-info"><a class="article-title" href="/2024/01/12/windows-terminal-customization/" title="Windows Terminal Customization">Windows Terminal Customization</a><div class="article-meta-wrap"><span class="post-meta-date"><i class="far fa-calendar-alt"></i><span class="article-meta-label">发表于</span><time datetime="2024-01-12T04:00:00.000Z" title="发表于 2024-01-12 12:00:00">2024-01-12</time></span><span class="article-meta"><span class="article-meta-separator">|</span><i class="fas fa-inbox"></i><a class="article-meta__categories" href="/categories/Windows/">Windows</a></span></div><div class="content">Windows Terminal CustomizationThis article mainly solved the problem of “open windows terminal here”.
Firstly u need to download windows terminal in Microsoft Store,then u need to edit settings of windows terminal, add a customized shell like conda.
Run this registry file.
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\Directory\Background\shell\wt]
@="open terminal here"
[HKEY_CLASSES_ROOT\Directory\Background\shell\wt\command]
@="wt -d %V -p conda"
-d ...</div></div></div><div class="recent-post-item"><div class="post_cover right"><a href="/2023/11/26/MIT6.191/" title="MIT6.191"><img class="post-bg" src="https://cdn.jsdelivr.net/gh/wr-web/picture/archive33.jpg" onerror="this.onerror=null;this.src='/img/404.jpg'" alt="MIT6.191"></a></div><div class="recent-post-info"><a class="article-title" href="/2023/11/26/MIT6.191/" title="MIT6.191">MIT6.191</a><div class="article-meta-wrap"><span class="post-meta-date"><i class="far fa-calendar-alt"></i><span class="article-meta-label">发表于</span><time datetime="2023-11-26T04:00:00.000Z" title="发表于 2023-11-26 12:00:00">2023-11-26</time></span><span class="article-meta"><span class="article-meta-separator">|</span><i class="fas fa-inbox"></i><a class="article-meta__categories" href="/categories/Notes/">Notes</a><i class="fas fa-angle-right article-meta-link"></i><a class="article-meta__categories" href="/categories/Notes/AI/">AI</a></span></div><div class="content">SOME OF NOTES FROM THE LECTUREDeep Generative ModelingGenerative Modeling Goal: Take as input training samples from some distribution and learn a model that represents that distribution
latent variable: They are not directly observable, but they are the true underlying features or explanatory factors
Autoencoder: An autoencoder is a type of artificial neural network used to learn efficient codings of unlabeled data (unsupervised learning)
variational autoencoders(VAEs):
Generative Adversarial ...</div></div></div><div class="recent-post-item"><div class="post_cover left"><a href="/2023/11/20/%E8%8B%B1%E8%AF%AD%E5%AD%A6%E4%B9%A0%E7%AC%94%E8%AE%B0/" title="英语学习笔记"><img class="post-bg" src="https://cdn.jsdelivr.net/gh/wr-web/picture/archive17.jpg" onerror="this.onerror=null;this.src='/img/404.jpg'" alt="英语学习笔记"></a></div><div class="recent-post-info"><a class="article-title" href="/2023/11/20/%E8%8B%B1%E8%AF%AD%E5%AD%A6%E4%B9%A0%E7%AC%94%E8%AE%B0/" title="英语学习笔记">英语学习笔记</a><div class="article-meta-wrap"><span class="post-meta-date"><i class="far fa-calendar-alt"></i><span class="article-meta-label">发表于</span><time datetime="2023-11-20T04:00:00.000Z" title="发表于 2023-11-20 12:00:00">2023-11-20</time></span><span class="article-meta"><span class="article-meta-separator">|</span><i class="fas fa-inbox"></i><a class="article-meta__categories" href="/categories/Notes/">Notes</a></span></div><div class="content">
关于不记录点什么就什么也记不住这件事。
学习英语的困境阅读的速度比较慢,时常会在心里默读,但是主动看快点,又会导致囫囵吞枣。
口语发音不标准,听力容易理解出错。
目前的方法单词/句的积累(单纯的记忆,墨墨背单词,结合句子,部分结合词根)目前的进度是 100 w/m, 已经连续背了 25 天,但还是有一点慢。
关于口语/听力这回事音节(Syllable)每个音节都包含一个元音英标,辅音则是音节的分界线。
音节的划分可以用(-)或(·)来表示。
闭音节:以辅音结尾的音节。
开音节:以元音结尾的音节。
这俩后文也(自然拼读)中涉及到。
重音(Word Stress)重音符号(ˈ),次重音符号(ˌ)
自然拼读(Phonics)很多非常规的拼读,仍需积累。
单个辅音字母在单词中通常的读法(以英音为例)
辅音字母(组合)在单词中通常的读法(以英音为例)
单个元音字母在单词中的通常读法(以英音为例)
元音字母(组合)在单词中的通常读法(以英音为例)
节奏(Rhythm)英语不像中文的发音,中文每个字基本都是一个音节,每个音节等时,而英文一个单词可以有 ...</div></div></div><div class="recent-post-item"><div class="post_cover right"><a href="/2023/10/24/%E6%95%A3%E8%A8%98-10-24-23/" title="如何给 LLVM RISCV 添加一条“指令”(改进)"><img class="post-bg" src="https://cdn.jsdelivr.net/gh/wr-web/picture/archive16.png" onerror="this.onerror=null;this.src='/img/404.jpg'" alt="如何给 LLVM RISCV 添加一条“指令”(改进)"></a></div><div class="recent-post-info"><a class="article-title" href="/2023/10/24/%E6%95%A3%E8%A8%98-10-24-23/" title="如何给 LLVM RISCV 添加一条“指令”(改进)">如何给 LLVM RISCV 添加一条“指令”(改进)</a><div class="article-meta-wrap"><span class="post-meta-date"><i class="far fa-calendar-alt"></i><span class="article-meta-label">发表于</span><time datetime="2023-10-24T04:00:00.000Z" title="发表于 2023-10-24 12:00:00">2023-10-24</time></span><span class="article-meta"><span class="article-meta-separator">|</span><i class="fas fa-inbox"></i><a class="article-meta__categories" href="/categories/Notes/">Notes</a></span></div><div class="content">实验报告(改进)实验要求
完成指令编码设计(4分)
能够通过自己编写的至少2个正确汇编测试程序,生成正确的madd指令编码(4分)
能够通过自己编写的至少2个错误汇编测试程序,进行适当的错误处理(4分)
能够通过自己编写的至少1个C语言测试程序,生成正确的madd汇编指令(4分)
编码规范,风格良好,注释适当,架构合理(4分)
额外完成的
使用比较合适的测试方法
可以给 llvm 前端也添加相应的支持,支持高级语言的内联汇编或者内置函数生成对应的汇编
代码 Patch主模块rt@rogerthat ~/m/llvm-project-llvmorg-13.0.0 (master)> git format-patch 3c115231b000ed300a6f0551b5b30bd549d566f3
0001-Add-builtin-__builtin_riscv_madd.patch
0002-Edit-Emit-function-type-error-and-grammer-error.patch
0003-Repair-fix-int_ri ...</div></div></div><div class="recent-post-item"><div class="post_cover left"><a href="/2023/10/18/Dynamic%20Programming/" title="算法學習笔记"><img class="post-bg" src="https://cdn.jsdelivr.net/gh/wr-web/picture/archive24.jpg" onerror="this.onerror=null;this.src='/img/404.jpg'" alt="算法學習笔记"></a></div><div class="recent-post-info"><a class="article-title" href="/2023/10/18/Dynamic%20Programming/" title="算法學習笔记">算法學習笔记</a><div class="article-meta-wrap"><span class="post-meta-date"><i class="far fa-calendar-alt"></i><span class="article-meta-label">发表于</span><time datetime="2023-10-18T04:00:00.000Z" title="发表于 2023-10-18 12:00:00">2023-10-18</time></span><span class="article-meta"><span class="article-meta-separator">|</span><i class="fas fa-inbox"></i><a class="article-meta__categories" href="/categories/Notes/">Notes</a></span></div><div class="content">动态规划最长递增子序列问题(Longest Increasing Subsequence)
子序列 是由数组派生而来的序列,删除(或不删除)数组中的元素而不改变其余元素的顺序。例如,[3,6,2,7] 是数组 [0,3,1,6,2,2,7] 的子序列。
这是我写的代码(有点差劲的代码
class Solution {
public:
vector<int> dp;
int tryThrough(vector<int>& nums) {
int res = 0x80000000;
for (int i = 0; i < nums.size(); i++) {
if(dp[i] > res){
res = dp[i];
}
}
return res;
}
int lengthOfLIS(vector<int>&am ...</div></div></div><div class="recent-post-item"><div class="post_cover right"><a href="/2023/10/15/%E6%95%A3%E8%A8%98-10-14-23/" title="论文笔记:Tracer:Signature-based Static Analysis for Detecting Recurring Vulnerabilities"><img class="post-bg" src="https://cdn.jsdelivr.net/gh/wr-web/picture/archive15.jpg" onerror="this.onerror=null;this.src='/img/404.jpg'" alt="论文笔记:Tracer:Signature-based Static Analysis for Detecting Recurring Vulnerabilities"></a></div><div class="recent-post-info"><a class="article-title" href="/2023/10/15/%E6%95%A3%E8%A8%98-10-14-23/" title="论文笔记:Tracer:Signature-based Static Analysis for Detecting Recurring Vulnerabilities">论文笔记:Tracer:Signature-based Static Analysis for Detecting Recurring Vulnerabilities</a><div class="article-meta-wrap"><span class="post-meta-date"><i class="far fa-calendar-alt"></i><span class="article-meta-label">发表于</span><time datetime="2023-10-15T04:00:00.000Z" title="发表于 2023-10-15 12:00:00">2023-10-15</time></span><span class="article-meta"><span class="article-meta-separator">|</span><i class="fas fa-inbox"></i><a class="article-meta__categories" href="/categories/Notes/">Notes</a><i class="fas fa-angle-right article-meta-link"></i><a class="article-meta__categories" href="/categories/Notes/Paper/">Paper</a></span></div><div class="content">阅读论文:Tracer: Signature-based Static Analysis for Detecting Recurring Vulnerabilities
Intro由于开发者很容易在同样的地方踩坑(数学运算,协议等),或者人们对复杂的低级语意的误解(C 语言中的未定义行为等),加之代码重用,致使相似的漏洞重复出现。
代码相似性有一些相关论文,这里记录一下
Yaniv David et al. Firmup: Precise static detection of common vulnerabilities in firmware.
Steven H. et al. Asm2vec: Boosting static representation robustness for binary clone search against code obfuscation and compiler optimization
Jiyong Jang et al. Redebug: Finding unpatched code clones in entire os distrib ...</div></div></div><nav id="pagination"><div class="pagination"><span class="page-number current">1</span><a class="page-number" href="/page/2/#content-inner">2</a><span class="space">…</span><a class="page-number" href="/page/5/#content-inner">5</a><a class="extend next" rel="next" href="/page/2/#content-inner"><i class="fas fa-chevron-right fa-fw"></i></a></div></nav></div><div class="aside-content" id="aside-content"><div class="card-widget card-info"><div class="is-center"><div class="avatar-img"><img src="https://cdn.jsdelivr.net/gh/wr-web/picture/avatar.jpg" onerror="this.onerror=null;this.src='/img/friend_404.gif'" alt="avatar"/></div><div class="author-info__name">RT</div><div class="author-info__description">@Vidar-Team @CTFer @Game Lover </div></div><div class="card-info-data site-data is-center"><a href="/archives/"><div class="headline">文章</div><div class="length-num">42</div></a><a href="/tags/"><div class="headline">标签</div><div class="length-num">35</div></a><a href="/categories/"><div class="headline">分类</div><div class="length-num">17</div></a></div><a id="card-info-btn" target="_blank" rel="noopener" href="https://github.com/wr-web"><i class="fab fa-github"></i><span>Follow Me</span></a><div class="card-info-social-icons is-center"><a class="social-icon" href="https://github.com/wr-web" target="_blank" title="Github"><i class="fab fa-github" style="color: #24292e;"></i></a><a class="social-icon" href="mailto:[email protected]" target="_blank" title="Email"><i class="fas fa-envelope" style="color: #4a7dbe;"></i></a><a class="social-icon" href="https://wr-web.github.io/atom.xml" target="_blank" title="Rss"><i class="fas fa-rss" style="color: #2d69d7;"></i></a><a class="social-icon" href="https://space.bilibili.com/13582048" target="_blank" title="BiliBili"><i class="fab fa-bilibili" style="color: #00a1d6;"></i></a></div></div><div class="card-widget card-announcement"><div class="item-headline"><i class="fas fa-bullhorn fa-shake"></i><span>公告</span></div><div class="announcement_content">家人们加个友链</div></div><div class="sticky_layout"><div class="card-widget card-recent-post"><div class="item-headline"><i class="fas fa-history"></i><span>最新文章</span></div><div class="aside-list"><div class="aside-list-item"><a class="thumbnail" href="/2024/05/07/%E4%BB%A3%E7%A0%81%E8%A1%A5%E5%85%85/" title="LDD3 学习笔记"><img src="https://cdn.jsdelivr.net/gh/wr-web/picture/archive51.jpg" onerror="this.onerror=null;this.src='/img/404.jpg'" alt="LDD3 学习笔记"/></a><div class="content"><a class="title" href="/2024/05/07/%E4%BB%A3%E7%A0%81%E8%A1%A5%E5%85%85/" title="LDD3 学习笔记">LDD3 学习笔记</a><time datetime="2024-05-07T04:00:00.000Z" title="发表于 2024-05-07 12:00:00">2024-05-07</time></div></div><div class="aside-list-item"><a class="thumbnail" href="/2024/05/01/LDD3-week2/" title="LDD3 学习笔记"><img src="https://cdn.jsdelivr.net/gh/wr-web/picture/archive50.jpg" onerror="this.onerror=null;this.src='/img/404.jpg'" alt="LDD3 学习笔记"/></a><div class="content"><a class="title" href="/2024/05/01/LDD3-week2/" title="LDD3 学习笔记">LDD3 学习笔记</a><time datetime="2024-05-01T04:00:00.000Z" title="发表于 2024-05-01 12:00:00">2024-05-01</time></div></div><div class="aside-list-item"><a class="thumbnail" href="/2024/04/23/LDD3-week1/" title="LDD3 学习笔记"><img src="https://cdn.jsdelivr.net/gh/wr-web/picture/archive49.jpg" onerror="this.onerror=null;this.src='/img/404.jpg'" alt="LDD3 学习笔记"/></a><div class="content"><a class="title" href="/2024/04/23/LDD3-week1/" title="LDD3 学习笔记">LDD3 学习笔记</a><time datetime="2024-04-23T04:00:00.000Z" title="发表于 2024-04-23 12:00:00">2024-04-23</time></div></div><div class="aside-list-item"><a class="thumbnail" href="/2024/04/17/LLD3-week0/" title="LDD3 学习笔记"><img src="https://cdn.jsdelivr.net/gh/wr-web/picture/archive52.jpg" onerror="this.onerror=null;this.src='/img/404.jpg'" alt="LDD3 学习笔记"/></a><div class="content"><a class="title" href="/2024/04/17/LLD3-week0/" title="LDD3 学习笔记">LDD3 学习笔记</a><time datetime="2024-04-17T04:00:00.000Z" title="发表于 2024-04-17 12:00:00">2024-04-17</time></div></div><div class="aside-list-item"><a class="thumbnail" href="/2024/01/12/windows-terminal-customization/" title="Windows Terminal Customization"><img src="https://cdn.jsdelivr.net/gh/wr-web/picture/archive40.jpg" onerror="this.onerror=null;this.src='/img/404.jpg'" alt="Windows Terminal Customization"/></a><div class="content"><a class="title" href="/2024/01/12/windows-terminal-customization/" title="Windows Terminal Customization">Windows Terminal Customization</a><time datetime="2024-01-12T04:00:00.000Z" title="发表于 2024-01-12 12:00:00">2024-01-12</time></div></div></div></div><div class="card-widget card-categories"><div class="item-headline">
<i class="fas fa-folder-open"></i>
<span>分类</span>
<a class="card-more-btn" href="/categories/" title="查看更多">
<i class="fas fa-angle-right"></i></a>
</div>
<ul class="card-category-list" id="aside-cat-list">
<li class="card-category-list-item "><a class="card-category-list-link" href="/categories/DX12/"><span class="card-category-list-name">DX12</span><span class="card-category-list-count">3</span></a></li><li class="card-category-list-item "><a class="card-category-list-link" href="/categories/HGAME/"><span class="card-category-list-name">HGAME</span><span class="card-category-list-count">6</span></a><ul class="card-category-list child"><li class="card-category-list-item "><a class="card-category-list-link" href="/categories/HGAME/%E7%95%99%E5%9D%91/"><span class="card-category-list-name">留坑</span><span class="card-category-list-count">1</span></a></li></ul></li><li class="card-category-list-item "><a class="card-category-list-link" href="/categories/Linux/"><span class="card-category-list-name">Linux</span><span class="card-category-list-count">4</span></a></li><li class="card-category-list-item "><a class="card-category-list-link" href="/categories/Notes/"><span class="card-category-list-name">Notes</span><span class="card-category-list-count">18</span></a><ul class="card-category-list child"><li class="card-category-list-item "><a class="card-category-list-link" href="/categories/Notes/AI/"><span class="card-category-list-name">AI</span><span class="card-category-list-count">1</span></a></li><li class="card-category-list-item "><a class="card-category-list-link" href="/categories/Notes/Paper/"><span class="card-category-list-name">Paper</span><span class="card-category-list-count">4</span></a></li></ul></li><li class="card-category-list-item "><a class="card-category-list-link" href="/categories/Windbg/"><span class="card-category-list-name">Windbg</span><span class="card-category-list-count">1</span></a></li>
</ul></div><div class="card-widget card-tags"><div class="item-headline"><i class="fas fa-tags"></i><span>标签</span></div><div class="card-tag-cloud"><a href="/tags/windbg/" style="font-size: 1.1em; color: #999">windbg</a> <a href="/tags/RCTF/" style="font-size: 1.1em; color: #999">RCTF</a> <a href="/tags/Linux/" style="font-size: 1.21em; color: #999ea4">Linux</a> <a href="/tags/Notes/" style="font-size: 1.5em; color: #99a9bf">Notes</a> <a href="/tags/LLVM/" style="font-size: 1.44em; color: #99a7ba">LLVM</a> <a href="/tags/English/" style="font-size: 1.1em; color: #999">English</a> <a href="/tags/Algorithm/" style="font-size: 1.1em; color: #999">Algorithm</a> <a href="/tags/Dynamic-Programming/" style="font-size: 1.1em; color: #999">Dynamic Programming</a> <a href="/tags/Grammar/" style="font-size: 1.1em; color: #999">Grammar</a> <a href="/tags/WP/" style="font-size: 1.39em; color: #99a4b4">WP</a> <a href="/tags/vulnerability-mining/" style="font-size: 1.21em; color: #999ea4">vulnerability mining</a> <a href="/tags/%E5%9B%BE%E5%BD%A2%E5%AD%A6/" style="font-size: 1.16em; color: #999b9e">图形学</a> <a href="/tags/%E7%95%99%E5%9D%91/" style="font-size: 1.16em; color: #999b9e">留坑</a> <a href="/tags/angr/" style="font-size: 1.16em; color: #999b9e">angr</a> <a href="/tags/mark/" style="font-size: 1.1em; color: #999">mark</a> <a href="/tags/call-convention/" style="font-size: 1.1em; color: #999">call convention</a> <a href="/tags/Static-Analysis/" style="font-size: 1.27em; color: #99a0a9">Static Analysis</a> <a href="/tags/paper/" style="font-size: 1.33em; color: #99a2af">paper</a> <a href="/tags/%E7%AC%A6%E5%8F%B7%E6%89%A7%E8%A1%8C/" style="font-size: 1.16em; color: #999b9e">符号执行</a> <a href="/tags/env/" style="font-size: 1.1em; color: #999">env</a> <a href="/tags/Hacking/" style="font-size: 1.1em; color: #999">Hacking</a> <a href="/tags/book/" style="font-size: 1.1em; color: #999">book</a> <a href="/tags/anti-debug/" style="font-size: 1.1em; color: #999">anti-debug</a> <a href="/tags/Handle/" style="font-size: 1.1em; color: #999">Handle</a> <a href="/tags/ISA/" style="font-size: 1.1em; color: #999">ISA</a> <a href="/tags/directX-12/" style="font-size: 1.16em; color: #999b9e">directX 12</a> <a href="/tags/%E6%8A%BD%E8%B1%A1%E5%9F%9F/" style="font-size: 1.1em; color: #999">抽象域</a> <a href="/tags/DLL-hook/" style="font-size: 1.1em; color: #999">DLL hook</a> <a href="/tags/Windows/" style="font-size: 1.16em; color: #999b9e">Windows</a> <a href="/tags/%E6%8A%BD%E8%B1%A1%E8%A7%A3%E9%87%8A/" style="font-size: 1.1em; color: #999">抽象解释</a> <a href="/tags/%E6%95%B0%E5%80%BC%E7%A8%8B%E5%BA%8F%E5%88%86%E6%9E%90/" style="font-size: 1.1em; color: #999">数值程序分析</a> <a href="/tags/Deep-Learning/" style="font-size: 1.1em; color: #999">Deep Learning</a> <a href="/tags/HGAME/" style="font-size: 1.33em; color: #99a2af">HGAME</a> <a href="/tags/project/" style="font-size: 1.1em; color: #999">project</a> <a href="/tags/MSVC/" style="font-size: 1.1em; color: #999">MSVC</a></div></div><div class="card-widget card-archives"><div class="item-headline"><i class="fas fa-archive"></i><span>归档</span><a class="card-more-btn" href="/archives/" title="查看更多">
<i class="fas fa-angle-right"></i></a></div><ul class="card-archive-list"><li class="card-archive-list-item"><a class="card-archive-list-link" href="/archives/2024/05/"><span class="card-archive-list-date">五月 2024</span><span class="card-archive-list-count">2</span></a></li><li class="card-archive-list-item"><a class="card-archive-list-link" href="/archives/2024/04/"><span class="card-archive-list-date">四月 2024</span><span class="card-archive-list-count">2</span></a></li><li class="card-archive-list-item"><a class="card-archive-list-link" href="/archives/2024/01/"><span class="card-archive-list-date">一月 2024</span><span class="card-archive-list-count">1</span></a></li><li class="card-archive-list-item"><a class="card-archive-list-link" href="/archives/2023/11/"><span class="card-archive-list-date">十一月 2023</span><span class="card-archive-list-count">2</span></a></li><li class="card-archive-list-item"><a class="card-archive-list-link" href="/archives/2023/10/"><span class="card-archive-list-date">十月 2023</span><span class="card-archive-list-count">7</span></a></li><li class="card-archive-list-item"><a class="card-archive-list-link" href="/archives/2023/09/"><span class="card-archive-list-date">九月 2023</span><span class="card-archive-list-count">9</span></a></li><li class="card-archive-list-item"><a class="card-archive-list-link" href="/archives/2022/04/"><span class="card-archive-list-date">四月 2022</span><span class="card-archive-list-count">1</span></a></li><li class="card-archive-list-item"><a class="card-archive-list-link" href="/archives/2022/03/"><span class="card-archive-list-date">三月 2022</span><span class="card-archive-list-count">3</span></a></li></ul></div><div class="card-widget card-webinfo"><div class="item-headline"><i class="fas fa-chart-line"></i><span>网站资讯</span></div><div class="webinfo"><div class="webinfo-item"><div class="item-name">文章数目 :</div><div class="item-count">42</div></div><div class="webinfo-item"><div class="item-name">本站总字数 :</div><div class="item-count">88.8k</div></div><div class="webinfo-item"><div class="item-name">本站访客数 :</div><div class="item-count" id="busuanzi_value_site_uv"><i class="fa-solid fa-spinner fa-spin"></i></div></div><div class="webinfo-item"><div class="item-name">本站总访问量 :</div><div class="item-count" id="busuanzi_value_site_pv"><i class="fa-solid fa-spinner fa-spin"></i></div></div><div class="webinfo-item"><div class="item-name">最后更新时间 :</div><div class="item-count" id="last-push-date" data-lastPushDate="2024-06-24T04:56:58.978Z"><i class="fa-solid fa-spinner fa-spin"></i></div></div></div></div></div></div></main><footer id="footer" style="background-image: url('https://cdn.jsdelivr.net/gh/wr-web/picture/archive47.jpg')"><div id="footer-wrap"><div class="copyright">©2020 - 2024 By RT</div><div class="framework-info"><span>框架 </span><a target="_blank" rel="noopener" href="https://hexo.io">Hexo</a><span class="footer-separator">|</span><span>主题 </span><a target="_blank" rel="noopener" href="https://github.com/jerryc127/hexo-theme-butterfly">Butterfly</a></div></div></footer></div><div id="rightside"><div id="rightside-config-hide"><button id="translateLink" type="button" title="简繁转换">繁</button><button id="darkmode" type="button" title="浅色和深色模式转换"><i class="fas fa-adjust"></i></button><button id="hide-aside-btn" type="button" title="单栏和双栏切换"><i class="fas fa-arrows-alt-h"></i></button></div><div id="rightside-config-show"><button id="rightside-config" type="button" title="设置"><i class="fas fa-cog fa-spin"></i></button><button id="go-up" type="button" title="回到顶部"><span class="scroll-percent"></span><i class="fas fa-arrow-up"></i></button></div></div><div><script src="/js/utils.js"></script><script src="/js/main.js"></script><script src="/js/tw_cn.js"></script><script src="https://cdn.jsdelivr.net/npm/@fancyapps/ui/dist/fancybox/fancybox.umd.min.js"></script><div class="js-pjax"></div><canvas class="fireworks" mobile="false"></canvas><script src="https://cdn.jsdelivr.net/npm/butterfly-extsrc/dist/fireworks.min.js"></script><script defer="defer" id="ribbon" src="https://cdn.jsdelivr.net/npm/butterfly-extsrc/dist/canvas-ribbon.min.js" size="150" alpha="0.6" zIndex="-1" mobile="false" data-click="false"></script><script async data-pjax src="//busuanzi.ibruce.info/busuanzi/2.3/busuanzi.pure.mini.js"></script><div id="local-search"><div class="search-dialog"><nav class="search-nav"><span class="search-dialog-title">搜索</span><span id="loading-status"></span><button class="search-close-button"><i class="fas fa-times"></i></button></nav><div class="is-center" id="loading-database"><i class="fas fa-spinner fa-pulse"></i><span> 数据库加载中</span></div><div class="search-wrap"><div id="local-search-input"><div class="local-search-box"><input class="local-search-box--input" placeholder="搜索文章" type="text"/></div></div><hr/><div id="local-search-results"></div><div id="local-search-stats-wrap"></div></div></div><div id="search-mask"></div><script src="/js/search/local-search.js"></script></div></div></body></html>