ãã®è¨äºã¯Linux Advent Calendar 2019ã®1æ¥ç®ã®è¨äºã§ãã
- ã¯ããã«
- ç°å¢
- ããã¨ãã
- uname(1)
- strace(1)
- gdb(1)
- bpftrace
- systemtap
- Kernel Hack
- Livepatch
- ãã¾ã
- ã¾ã¨ã
ã¯ããã«
æ¬è¨äºã§ã¯Linuxãµã¼ãã®ãã¹ãåãLinuxã«ã¼ãã«ã®ãã¼ã¸ã§ã³ãcpuã¢ã¼ããã¯ãã£ãªã©ã®ã·ã¹ãã æ å ±ã表示ããuname(1)ãå©ç¨ãã¦Linuxç°å¢ã§ã®ãããã°ã¨ã«ã¼ãã«ããã¯ã«ã¤ãã¦èª¬æãã¦ããã¾ããæ¬è¨äºã§ã¯ã³ãã³ãããã¼ã«ã®ä½¿ãæ¹ã®èª¬æã§ã¯ãªãã¦ããããã使ã£ã¦ã©ã®ããã«ãããã°ããã®ãã¨ããã¨ããã説æãã¾ãã
ç°å¢
ãã£ã¹ããªãã¥ã¼ã·ã§ã³ã«ã¯Fedora 31(x86_64)ãå©ç¨ãã¾ããåä½ç°å¢ã¯QEMUãlibvirtãOracle VM VirtualBoxãªã©ã®ä»®æ³ç°å¢ã§ãè¯ãã§ãããç©çãã·ã³ã«ã¤ã³ã¹ãã¼ã«ãã¦ãæ§ãã¾ãããä»®æ³ç°å¢ãå©ç¨ããã»ããæ軽ã«ç°å¢æ§ç¯ã§ããã®ã§ããããã§ããã¦ã¼ã¶ã¼ã¯sudoã使ããããã«ãã¦ããã¦ãã ãããã¤ã³ã¹ãã¼ã«æãããã¯ã¤ã³ã¹ãã¼ã«å¾ã«ä»¥ä¸ã®ã°ã«ã¼ããã¤ã³ã¹ãã¼ã«ããã¨å¾ã§æ¥½ããããã¾ããã
- C Development Tools and Libraries
- Development Tools
- RPM Development Tools
- System tools
- Guest Agents(ä»®æ³ç°å¢ã«ã¤ã³ã¹ãã¼ã«ããå ´å)
ããã±ã¼ã¸ã°ã«ã¼ãã®ã¤ã³ã¹ãã¼ã«ã¯ä»¥ä¸ã®ã³ãã³ãã§è¡ãã¾ãã
[masami@unamebook ~]$ sudo dnf group install -y "C Development Tools and Libraries" "Development Tools" "RPM Development Tools" "System tools" "Guest Agents"
ãã¡ã¤ã«ã®ç·¨éãããã®ã«ã¨ãã£ã¿ãå¿ è¦ã§ããããã¯å¥½ããªã¨ãã£ã¿ã使ã£ã¦ãã ããã
ããã¨ãã
æ¬è¨äºã§è¡ããã¼ã«ã®å©ç¨æ¹æ³ãªã©ã¯ãã£ã¹ããªãã¥ã¼ã·ã§ã³ã«ä¾åããªããã¨ãå¤ãã¨æãã¾ãããã³ãã³ãã®åºåçµæãã½ã¼ã¹ã³ã¼ãã«ã¤ãã¦ã¯ãã£ã¹ããªãã¥ã¼ã·ã§ã³åºæã®patchãå½ãã£ã¦ããå ´åããããfedora 31以å¤ã®ãã£ã¹ããªãã¥ã¼ã·ã§ã³ï¼å ´åã«ãã£ã¦ã¯fedora 31ã§ãããã±ã¼ã¸ã®ãã¼ã¸ã§ã³éãï¼ã¨éããã¨ãããã¾ãã
uname(1)
uname(1)*1ãå®è¡ãããã¨ã®ããæ¹ã¯å¤ãã¨æãã¾ãããã¾ãã¯æ®éã«uname(1)ãå®è¡ãã¾ãããããã®ã³ãã³ãã¯coreutilsããã±ã¼ã¸ã«å«ã¾ãã¦ãã¾ãã
[masami@unamebook ~]$ uname -a Linux unamebook 5.3.11-300.fc31.x86_64 #1 SMP Tue Nov 12 19:08:07 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
unameã³ãã³ãã«æ¸¡ãã-aãªãã·ã§ã³ã¯ãã¹ã¦ã®æ å ±ã表示ããããªãã·ã§ã³ã§ããä¸è¨ã®åºåçµæãå解ãããã®ã以ä¸ã®ã表1 unameã®åºåå 容ãã§ãã
åºåå 容 | 該å½ããunameã³ãã³ãã®ãªãã·ã§ã³ | æå³ |
---|---|---|
Linux | -s | ã«ã¼ãã«å |
unamebook | -n | ãã¹ãå |
5.3.11-300.fc31.x86_64 | -r | ã«ã¼ãã«ãªãªã¼ã¹ |
#1 SMP Tue Nov 12 19:08:07 UTC 2019 | -v | ã«ã¼ãã«ãã¼ã¸ã§ã³*2 |
x86_64 | -m | ãã·ã³ã®ãã¼ãã¦ã§ã¢å |
x86_64 | -p | ããã»ããµå |
x86_64 | -i | ãã¼ãã¦ã§ã¢ãã©ãããã©ã¼ã |
GNU/Linux | -o | ãªãã¬ã¼ãã£ã³ã°ã·ã¹ãã å |
表1 unameã®åºåå 容
uname(1)ãåºåããå 容
uname(1)ãå®è¡ãã¦ã·ã¹ãã æ å ±ãè¦ããã¨ãã§ãã¾ããããã®æ å ±ã¯ã©ãããåå¾ããã®ã§ããããï¼ãã®æ å ±ã¯Linuxã«ã¼ãã«ãæã£ã¦ãã¦ãuname(1)ã¯ã·ã¹ãã ã³ã¼ã«ãéãã¦ã«ã¼ãã«ã«åãåãããè¡ããã«ã¼ãã«ããåãåã£ãçµæã表示ãã¦ãã¾ãããã®ã¨ãã«å©ç¨ããã·ã¹ãã ã³ã¼ã«ã¯uname(2)*3ã§ããuname(2)ã®ãããã¿ã¤ãã¯æ¬¡ã®ããã«ãªã£ã¦ãã¾ããã«ã¼ãã«ã¯å¼æ°ã§æ¸¡ãããbufå¤æ°ã«ã·ã¹ãã æ å ±ãã»ãããã¾ãã
int uname(struct utsname *buf)
uname(2)ã®ã¤ã³ã¿ã¼ãã§ã¼ã¹
uname(2)ã®è©³ç´°ã¯manãã¼ã¸ã§ç¢ºèªãã¦ãã ããã
[masami@unamebook ~]$ sudo dnf install -y man-pages
strace(1)
strace(1)ã¯ãuname(1)ã®å®è¡æã«uname(2)ãå¼ã°ãã¦ãããã¨ã確èªãã¾ããããããã§ã¯ãããã¬ã¯ä½¿ããã«strace(1)ãå©ç¨ãã¾ããstrace(1)ã¯ç°¡åã«è¨ãã¨æå®ããã³ãã³ãã»ããã»ã¹ã«ããã·ã¹ãã ã³ã¼ã«å¼ã³åºãããã¬ã¼ã¹ããã³ãã³ãã§ããã¾ãã¯straceããã±ã¼ã¸ãã¤ã³ã¹ãã¼ã«ãã¾ãã
[masami@unamebook ~]$ sudo dnf install -y strace
straceããã±ã¼ã¸ãã¤ã³ã¹ãã¼ã«ãããå®è¡ãã¦ã¿ã¾ãããããªãã·ã§ã³ã®ç´°ããå 容ã¯èª¬æãã¾ããããããã§ã¯uname(2)ã«çµã£ã¦è¡¨ç¤ºãããããã«å®è¡ãã¾ããã
[masami@unamebook ~]$ strace -v -s 1024 -e trace=uname -C uname -a uname({sysname="Linux", nodename="unamebook", release="5.3.11-300.fc31.x86_64", version="#1 SMP Tue Nov 12 19:08:07 UTC 2019", machine="x86_64", domainname="(none)"}) = 0 uname({sysname="Linux", nodename="unamebook", release="5.3.11-300.fc31.x86_64", version="#1 SMP Tue Nov 12 19:08:07 UTC 2019", machine="x86_64", domainname="(none)"}) = 0 uname({sysname="Linux", nodename="unamebook", release="5.3.11-300.fc31.x86_64", version="#1 SMP Tue Nov 12 19:08:07 UTC 2019", machine="x86_64", domainname="(none)"}) = 0 Linux unamebook 5.3.11-300.fc31.x86_64 #1 SMP Tue Nov 12 19:08:07 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux +++ exited with 0 +++ % time seconds usecs/call calls errors syscall ------ ----------- ----------- --------- --------- ---------------- 100.00 0.000007 2 3 uname ------ ----------- ----------- --------- --------- ---------------- 100.00 0.000007 3 total
uname(2)ã®å¼ã³åºãã3åããã¾ããããªã3åuname(2)ãå®è¡ãã¦ããã®ã§ããããï¼ããã¯ã½ã¼ã¹ã³ã¼ãã確èªããªãã¨ãããã¾ãããunameã³ãã³ããæä¾ãã¦ããã®ã¯coreutilsããã±ã¼ã¸ãªã®ã§coreutilsããã±ã¼ã¸ã®ã½ã¼ã¹ã³ã¼ãããã¦ã³ãã¼ããã¾ããããå©ç¨ãã¦ããã®ã¯fedoraã«ã¤ã³ã¹ãã¼ã«ããã¦ããcoreutilsããã±ã¼ã¸ãªã®ã§upstreamã§ã¯ãªãfedoraã®ã½ã¼ã¹ã³ã¼ããåå¾ãã¾ãã
[masami@unamebook ~]$ dnf download --source coreutils
ã½ã¼ã¹ããã±ã¼ã¸ï¼.src.rpmï¼ããã¦ã³ãã¼ããããã¤ã³ã¹ãã¼ã«ãã¾ãã
ã¾ãå±éå ã®ãã£ã¬ã¯ããªãã»ããã¢ãããã¾ãã
[masami@unamebook ~]$ rpmdev-setuptree
ããã¦rpmã³ãã³ãã§ã¤ã³ã¹ãã¼ã«ãã¾ãã
[masami@unamebook ~]$ rpm -i coreutils-8.31-6.fc31.src.rpm
ã¤ã³ã¹ãã¼ã«æã«æ¬¡ã®ãããªwarningãåºã¾ããç¡è¦ãã¦å¤§ä¸å¤«ã§ãã
warning: user mockbuild does not exist - using root warning: user mockbuild does not exist - using root
ããã§~/rpmbuildã«ã½ã¼ã¹ããã±ã¼ã¸ãã¤ã³ã¹ãã¼ã«ããã¾ããããã½ã¼ã¹ã³ã¼ãã¯ã¾ã å±éããã¦ããªãã§ã½ã¼ã¹ã³ã¼ãã®å±éï¼patchãå½ã¦ã¾ããããã¨ããã®åã«ããã¤ãå¿ è¦ãªããã±ã¼ã¸ãã¤ã³ã¹ãã¼ã«ãã¾ãã
[masami@unamebook ~]$ sudo dnf builddep -y coreutils
ããã§å¤§ä¸å¤«ã§ããã§ã¯ã½ã¼ã¹ã³ã¼ãã®æºåããã¾ãããã
[masami@unamebook ~]$ cd rpmbuild/SPECS/ [masami@unamebook SPECS]$ rpmbuild -bp coreutils.spec
ã½ã¼ã¹ã³ã¼ããå±éãpatchãé©ç¨ãããã½ã¼ã¹ã³ã¼ãã¯~/rpmbuild/BUILDã«ããã¾ãã
[masami@unamebook SPECS]$ cd ~/rpmbuild/BUILD/coreutils-8.31/ [masami@unamebook coreutils-8.31]$ ls ABOUT-NLS autom4te.cache build-aux configure DIR_COLORS dist-check.mk GNUmakefile lib Makefile.am NEWS src thanks-gen THANKStt.in aclocal.m4 bootstrap cfg.mk configure.ac DIR_COLORS.256color doc init.cfg m4 Makefile.in po tests THANKS.in TODO AUTHORS bootstrap.conf ChangeLog COPYING DIR_COLORS.lightbgcolor gnulib-tests INSTALL maint.mk man README THANKS THANKS-to-translators
uname(1)ã®ã½ã¼ã¹ã³ã¼ãã¯src/uname.cã§ããgrepã§uname(2)ã®å¼ã³åºãç®æã調ã¹ãã¨3ç®æãããã¨ããããã¾ãã
[masami@unamebook coreutils-8.31]$ grep -n "uname *(" src/uname.c 286: if (uname (&name) == -1) 313: uname(&u); 364: uname(&u);
286è¡ç®ä»è¿ãè¦ãã¨ãã®ããã«ãªã£ã¦ãã¾ããtoprintå¤æ°ã¯uname(1)ã®å¼æ°ã«å¿ãã¦ããããç«ã¡ã¾ãããªãã·ã§ã³ã«-aã渡ããå ´åã¯ãã®ifæã¯çã«ãªãã®ã§286è¡ç®ã®uname(2)ãå®è¡ããã¾ãã
280 if (toprint 281 & (PRINT_KERNEL_NAME | PRINT_NODENAME | PRINT_KERNEL_RELEASE 282 | PRINT_KERNEL_VERSION | PRINT_MACHINE)) 283 { 284 struct utsname name; 285 286 if (uname (&name) == -1) 287 die (EXIT_FAILURE, errno, _("cannot get system name"));
313è¡ç®ã¯ã©ããã¨ããã¨ãããã¯-pãªãã·ã§ã³ã®å¦çé¨åã§ãããã¯ãã®elseãããã¯ãå®è¡ãããããã§ãã
304 #if HAVE_SYSINFO && defined SI_ARCHITECTURE 305 { 306 static char processor[257]; 307 if (0 <= sysinfo (SI_ARCHITECTURE, processor, sizeof processor)) 308 element = processor; 309 } 310 #else 311 { 312 static struct utsname u; 313 uname(&u); 314 element = u.machine; 315 }
æ®ãã®364è¡ç®ã確èªãã¾ãããããã¡ãã¯-iãªãã·ã§ã³ã®ãã¼ãã¦ã§ã¢ãã©ãããã©ã¼ã åå¾é¨åã§ãããã¡ãããã¯ãã®elseãããã¯ãå¼ã°ãã¦ããããã§ãã
354 #if HAVE_SYSINFO && defined SI_PLATFORM 355 { 356 static char hardware_platform[257]; 357 if (0 <= sysinfo (SI_PLATFORM, 358 hardware_platform, sizeof hardware_platform)) 359 element = hardware_platform; 360 } 361 #else 362 { 363 static struct utsname u; 364 uname(&u); 365 element = u.machine; 366 if(strlen(element)==4 && element[0]=='i' && element[2]=='8' && element[3]=='6') 367 element[1]='3'; 368 } 369 #endif
ãã®3ç®æã®uname(2)ã®å¼ã³åºãã§ããã286è¡ç®ã¯upstreamã®ã³ã¼ãã«ãããã¾ããããããæ®ãã®2ç®æã¯upstreamã®ã³ã¼ãã«ã¯åå¨ãã¾ããããã®2ç®æã¯fedoraã®coreutilsããã±ã¼ã¸ãç¬èªå½ã¦ã¦ããpatchã§ãããã®patchã¯~/rpmbuild/SOURCES/coreutils-8.2-uname-processortype.patchã§ããèå³ã®ããæ¹ã¯ç¢ºèªãã¦ã¿ã¦ãã ããã
gdb(1)
ã½ã¼ã¹ã³ã¼ããèªãã§uname(2)ã®å¼ã³åºãç®æã3ç®æãããã¨ã¯ããã£ãã®ã§ãããä¸å¿å®éã®åä½ãè¦ã¦ã¿ã¾ããããããã§ã¯gdbãå©ç¨ãã¾ããgdbã使ã£ã¦ãããã°ãããå ´åã¯ãããã°æ å ±ãããã¨ä¾¿å©ã§ããé常ã®ããã±ã¼ã¸ã«å«ã¾ãããã¤ããªãã¡ã¤ã«ã¯ãããã°æ å ±ãåå¨ããªãããããããã°ãä¸ä¾¿ã§ããfedoraã®å ´åã¯ãããã°æ å ±ã¯debuginfoããã±ã¼ã¸ã¨ãã¦åå¨ãã¦ããã®ã§ãããã¤ã³ã¹ãã¼ã«ãã¾ããglibcã®debuginfoããã±ã¼ã¸ãåããã¦ã¤ã³ã¹ãã¼ã«ãã¾ãã
ã¨ããã®åã«debuginfo-installã³ãã³ããå¿ è¦ãªã®ã§ããã±ã¼ã¸ãã¤ã³ã¹ãã¼ã«ãã¾ãããã
[masami@unamebook ~]$ sudo dnf install -y dnf-utils
dnf-utilsããã±ã¼ã¸ãã¤ã³ã¹ãã¼ã«ãããdebuginfo-installã³ãã³ããå©ç¨ã§ãã¾ãã®ã§ãããã§debuginfoã®ããã±ã¼ã¸ãã¤ã³ã¹ãã¼ã«ãã¾ãã
[masami@unamebook ~]$ sudo debuginfo-install -y coreutils glibc
debuginfoããã±ã¼ã¸ãã¤ã³ã¹ãã¼ã«ãããgdbãèµ·åãã¾ããããgdbã¯èªåçã«ãããã°æ å ±ãèªã¿è¾¼ãã§ããã¾ãã
[masami@unamebook ~]$ gdb -q /usr/bin/uname Reading symbols from /usr/bin/uname... Reading symbols from /usr/lib/debug/usr/bin/uname-8.31-6.fc31.x86_64.debug... (gdb)
gdbãç«ã¡ä¸ãã£ããã¨ãããã280è¡ç®ã®ifæãããã«ãã¬ã¼ã¯ãã¤ã³ããå¼µãã¾ããããlistã³ãã³ãã§280è¡ç®ä»è¿ã表示ãã¾ãã
(gdb) list 280 275 toprint = decode_switches (argc, argv); 276 277 if (toprint == 0) 278 toprint = PRINT_KERNEL_NAME; 279 280 if (toprint 281 & (PRINT_KERNEL_NAME | PRINT_NODENAME | PRINT_KERNEL_RELEASE 282 | PRINT_KERNEL_VERSION | PRINT_MACHINE)) 283 { 284 struct utsname name;
breakã³ãã³ãï¼ç¥æ§ã¯bï¼ã§280è¡ç®ã«ãã¬ã¼ã¯ãã¤ã³ããã»ãããã¾ãã
(gdb) b 280 Breakpoint 1 at 0x27b4: /usr/src/debug/coreutils-8.31-6.fc31.x86_64/separate/../src/uname.c:280. (2 locations)
runã³ãã³ãï¼ç¥ç§°ã¯rï¼ã§unameã³ãã³ããå®è¡ãã¾ããuname(1)ã®ãªãã·ã§ã³ã«ã¯-aã渡ãã¦ãã¾ããunameã³ãã³ããå®è¡ããã¨å ç¨è¨å®ãããã¬ã¼ã¯ãã¤ã³ãã§æ¢ã¾ãã®ã§ããã¨ã¯nã§ã¹ãããå®è¡ãã¦ããã°uname(2)ã®å¼ã³åºãã3åè¡ãããã®ããããã¾ãã
(gdb) r -a Starting program: /usr/bin/uname -a Breakpoint 1, main (argc=2, argv=0x7fffffffe448) at ../src/uname.c:280 280 if (toprint (gdb) n 286 if (uname (&name) == -1) (gdb) n ~ç¥~ 301 if (toprint & PRINT_PROCESSOR) (gdb) 313 uname(&u); (gdb) n ~ç¥~ (gdb) n 364 uname(&u); (gdb) c Continuing. Linux unamebook 5.3.11-300.fc31.x86_64 #1 SMP Tue Nov 12 19:08:07 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux [Inferior 1 (process 6522) exited normally]
ä»åã¯ããã°ã©ã ãåç´ã§çãã®ã§ã¹ãããå®è¡ã§æ¸ã¾ãã¦ãã¾ãã ããã¾ã§ã§strace(1)ãã½ã¼ã¹ã³ã¼ããªã¼ãã£ã³ã°ãgdb(1)ã使ãuname -aã®å®è¡æã«uname(2)ã3åå¼ã°ããè¬ã調ã¹ããã¨ã«æåãã¾ããã
bpftrace
bpftraceã¯Linuxã®eBPFã使ç¨ãããã¬ã¼ã¹ãã¼ã«ã§ããeBFPã¨ã¯extended Berkeley Packet Filterã®ç¥ã§å æ¥ã¯ãã±ãããã£ã«ã¿ã®æ©è½ã§ããLinuxã§ã¯ãã®ãã±ãããã£ã«ã¿æ©è½ãé²åãããã±ãããã£ã«ã¿ã ãã§ã¯åã¾ããªããªã£ãæ©è½ã§ããLinuxã§ã¯bpf(2)ããããcè¨èªã§eBPFã®æ©è½ã使ã£ãããã°ã©ã ãä½æã§ãã¾ãããããã¯å¤§å¤ãªã®ã§æ®éã¯BCCã使ããã¨ãå¤ãã®ã§ã¯ãªãã§ãããããBCCã¯BPF Compiler Collectionã®ç¥ã§Pythonã¨cè¨èªã使ã£ã¦eBFPãå©ç¨ããããã°ã©ã ãä½ããã¨ãåºæ¥ã¾ããããã¦bpftraceã§ããBCCãããã¯ã¨ã³ãã¨ãã¦ä½¿ã£ãé«ã¬ãã«ã®ãã¬ã¼ã¹ç¨è¨èªã¨èª¬æããã¦ãã¾ããbpftraceã§ã¯ã«ã¼ãã«ã¬ãã«ã®ãã¬ã¼ã¹ãåããã¨ãåºæ¥ã¾ããFedoraã«ã¯ããã±ã¼ã¸ãããã®ã§ã¤ã³ã¹ãã¼ã«ãã¾ãããã
[masami@unamebook ~]$ sudo dnf install -y bpftrace
ã¤ã³ã¹ãã¼ã«ãå®äºãããuname(2)ã®ãã¬ã¼ã¹ãè¡ã£ã¦ã¿ã¾ããããã¾ãã¯ã·ã¹ãã ã³ã¼ã«ã®å¼ã³åºãããã¬ã¼ã¹ãã¾ãã ãã®ä»ã«ãã«ã¼ãã«ã®ã½ã¼ã¹ãèªã¿ããã®ã§ãã¡ããã¤ã³ã¹ãã¼ã«ãã¾ããããä»åã¯debuginfo-installã³ãã³ãã使ç¨ãã¦ãããã°æ å ±ã¨ã½ã¼ã¹ãã¤ã³ã¹ãã¼ã«ãã¾ããcoreutilsã®ã¨ãã¯åã«ã½ã¼ã¹ãåå¾ãããã ãã ã£ãã®ã§srpmããã±ã¼ã¸ãã¤ã³ã¹ãã¼ã«ãã¾ããããdebuginfoããã±ã¼ã¸ã®å ´åã¯ãããã°æ å ±ã¨ã½ã¼ã¹ã³ã¼ããã¤ã³ã¹ãã¼ã«ã§ãã¾ããgdb(1)ã®ç« ã§coreutilsã¨glibcã®debuginfoããã±ã¼ã¸ãã¤ã³ã¹ãã¼ã«ãã¾ãããããã®ã¨ãã«ã½ã¼ã¹ã³ã¼ããã¤ã³ã¹ãã¼ã«ãããã¾ãããããããã®2ã¤ã®ä½¿ãåãã¯ï¼ã¨ããçåãããã¨æãã¾ãããã½ã¼ã¹ãå¤æ´ãã¦åãã«ãããç¨éã«ã¯srpmããã±ã¼ã¸ãããããã°æ å ±ã®ã¿ãå¿ è¦ãªå ´åã¯debuginfoããã±ã¼ã¸ã使ç¨ããã°è¯ãã¨æãã¾ããã§ã¯ãã«ã¼ãã«ã®debuginfoããã±ã¼ã¸ãã¤ã³ã¹ãã¼ã«ãã¾ãã
[masami@unamebook ~]$ sudo debuginfo-install -y kernel-debuginfo-common-x86_64
debuginfoããã±ã¼ã¸ã«å«ã¾ããã½ã¼ã¹ã³ã¼ãã¯/usr/src/debug以ä¸ã«ã¤ã³ã¹ãã¼ã«ããã¾ãã
[masami@unamebook ~]$ ls /usr/src/debug/ coreutils-8.31-6.fc31.x86_64 glibc-2.30-13-g919af705ee kernel-5.3.fc31
ã¤ã³ã¹ãã¼ã«ã§ãããã«ã¼ãã«å´ã®uname(2)ãå¦çããé¢æ°ãæ¢ãã¾ããã·ã¹ãã ã³ã¼ã«ã¯include/linux/syscalls.hã§æ¢ããã¨ãåºæ¥ã¾ããã«ã¼ãã«ã®ã½ã¼ã¹ã³ã¼ãã¯ä»¥ä¸ã®å ´æã«ããã¾ãã
[masami@unamebook ~]$ cd /usr/src/debug/kernel-5.3.fc31/linux-5.3.11-300.fc31.x86_64/
ã¾ãã¯unameã§grepãããã¾ãããã
[masami@unamebook linux-5.3.11-300.fc31.x86_64]$ grep uname include/linux/syscalls.h asmlinkage long sys_newuname(struct new_utsname __user *name); asmlinkage long sys_memfd_create(const char __user *uname_ptr, unsigned int flags); asmlinkage long sys_uname(struct old_utsname __user *); asmlinkage long sys_olduname(struct oldold_utsname __user *);
ããã¤ãè¦ã¤ããã¾ãããsys_ã®prefixã¯ã·ã¹ãã ã³ã¼ã«ã表ãã¦ãã¾ããååããsys_newunameãsys_unameã®ã©ã¡ããã ããã¨æ³åã§ãã¾ããããã¡ã¤ã«ãå®éã«èªãã§ç¢ºèªãã¾ããããã¾ãã¯ãã®ã¾ã¾ãªååã®sys_unameãè¦ã¦ã¿ã¾ãã
/* obsolete: kernel/sys.c */ asmlinkage long sys_gethostname(char __user *name, int len); asmlinkage long sys_uname(struct old_utsname __user *); asmlinkage long sys_olduname(struct oldold_utsname __user *);
obsoleteã£ã¦ã³ã¡ã³ããããã¾ããããã¡ãã§ã¯ãªãããã§ããã§ã¯sys_newunameã¯ã©ãã§ããããããã¡ãã¯ç¹ã«ã³ã¡ã³ããããã¾ãããuname(2)ã®å®è¡æã¯sys_newuname()ãå®è¡ãããããã§ããã
asmlinkage long sys_setpriority(int which, int who, int niceval); ~ç¥~ asmlinkage long sys_newuname(struct new_utsname __user *name);
ã³ã¡ã³ãã«kernel/sys.cã¨ããã®ã§å®è£ ã¯ãã®ãã¡ã¤ã«ã«ããããã§ããã§ã¯ããã®ãã¡ã¤ã«ãè¦ã¦ã¿ã¾ããããSYSCALL_DEFINE1ã¨ããã®ã¯ã·ã¹ãã ã³ã¼ã«ã®é¢æ°ã«ä½¿ããããã¯ãã§ããSYSCALL_DEFINE1ã®1ã¯å¼æ°ãä¸ã¤åãåãã¨ããæå³ã§ããå®è£ ã¯æ¯è¼çåç´ã§ããã
SYSCALL_DEFINE1(newuname, struct new_utsname __user *, name) { struct new_utsname tmp; down_read(&uts_sem); memcpy(&tmp, utsname(), sizeof(tmp)); up_read(&uts_sem); if (copy_to_user(name, &tmp, sizeof(tmp))) return -EFAULT; if (override_release(name->release, sizeof(name->release))) return -EFAULT; if (override_architecture(name)) return -EFAULT; return 0; }
ããã¾ã§ã§ã¦ã¼ã¶ã¼ç©ºéã§uname(2)ãå®è¡ããã¨ã«ã¼ãã«ç©ºéã®sys_newuname()ãå®è¡ããããã¨ããããã¾ãããåç½®ããé·ããªãã¾ãããå®éã«bfptrace(1)ã使ã£ã¦è¦ã¾ããããã¾ãã¯åç´ã«sys_newutsname()ã®å®è¡ããã¬ã¼ã¹ãã¾ãããã®é¢æ°ãå®è¡ãããã¨ãã«å¼ã³åºãå ã®ã³ãã³ãåã表示ãããã®ã以ä¸ã®ã³ãã³ãã©ã¤ã³ã§ãã
[masami@unamebook ~]$ sudo bpftrace -e 'tracepoint:syscalls:sys_enter_newuname { printf("%s\n", comm); }'
ã³ãã³ããå ¥åãã¦ã¡ãã£ã¨ããã¨æ¬¡ã®ãããªã¡ãã»ã¼ã¸ã表示ããã¾ããçµäºãããå ´åã¯Ctrl-Cã§çµäºã§ãã¾ãã
Attaching 1 probe...
ã¡ãã»ã¼ã¸ã表示ããããå¥ã®ç«¯æ«ããuname -aãå®è¡ããã¨ä»¥ä¸ã®ããã«unameã3å表示ããã¾ããuname -aãå®è¡ããã¨uname(2)ã3åå®è¡ãããã¨ããã®ã¯strace(1)ã®ç« ã§èª¿ã¹ã¾ãããã
[masami@unamebook ~]$ sudo bpftrace -e 'tracepoint:syscalls:sys_enter_newuname { printf("%s\n", comm); }' Attaching 1 probe... uname uname uname ^C
systemtap
systemtapã¯bpftraceåæ§ã«ã«ã¼ãã«ã®ãã¬ã¼ã·ã³ã°ãè¡ããã¨ãã§ãããã¼ã«ã§ããsystemtapãå¿ç¨ããã¨ãã¬ã¼ã¹ä»¥ä¸ã®ãã¨ãã§ãã¾ããã¾ãã¯ã¤ã³ã¹ãã¼ã«ãã¾ãããã
[masami@unamebook ~]$ sudo dnf install -y systemtap
systemtapã¯stap(1)ãã³ãã³ãã©ã¤ã³ã®ããã°ã©ã ã¨ãªãã¾ããsystemtapã¯å°ç¨ã®ã¹ã¯ãªããè¨èªããããcè¨èªã®ã³ã¼ããåãè¾¼ããã¨ãã§ãã¾ããæ¬ç« ã§ã¯systemtapã使ã£ã¦sys_newutsname()ã®æåãå¤æ´ãã¦ã¿ã¾ããããuname(1)ã§è¡¨ç¤ºãããã¼ãåãªã©ã¯utsname()ããåå¾ãã¦ãã¾ããutsname()ã®æ»ãå¤ãtmpå¤æ°ã«ä¸æ¦ä¿åãããããcopy_to_user()ã§ã¦ã¼ã¶ã¼ç©ºéã®ããã°ã©ã ãã渡ãããnameã«ã³ãã¼ãã¾ãã
SYSCALL_DEFINE1(newuname, struct new_utsname __user *, name) { struct new_utsname tmp; down_read(&uts_sem); memcpy(&tmp, utsname(), sizeof(tmp)); up_read(&uts_sem); if (copy_to_user(name, &tmp, sizeof(tmp))) return -EFAULT; if (override_release(name->release, sizeof(name->release))) return -EFAULT; if (override_architecture(name)) return -EFAULT; return 0; }
ã§ã¯ãsystemtapã使ã£ã¦ããã°ã©ã ã«nodenameãæ¸ãæãã¦ã¿ã¾ããããsystemtapãå©ç¨ããã©ã¤ããããæ©è½ã®å®è£ ã¨ããæãã§ããsystemtapã®ããã°ã©ã ã¯æ¬¡ã®ããã«ãªãã¾ãã
#!/usr/bin/env stap %{ #include <linux/string.h> #include <linux/uaccess.h> #include <uapi/linux/utsname.h> %} function set_dummy_uname:long(name:long) %{ struct new_utsname u = { 0 }; if (copy_from_user(&u, (struct new_utsname *) STAP_ARG_name, sizeof(u))) STAP_RETURN(-EFAULT); strcpy(u.nodename, "livepatched"); if (copy_to_user((struct new_utsname *) STAP_ARG_name, &u, sizeof(u))) STAP_RETURN(-EFAULT); STAP_RETURN(0); %} probe begin { printf("start livepatch code. Ctrl-C to stop\n") } probe kernel.function("__do_sys_newuname").return { // Only set dummy nodename to test program if (execname() == "uname-test") { // Use @entry() to get name parameter in return probe. set_dummy_uname(@entry($name)) } } probe end { printf("Done\n") }
ãã®ããã°ã©ã ã§ã¯ã·ã¹ãã ã³ã¼ã«ã®returnæã«å¦çãå ¥ãã¦ãã¾ããã¾ãã·ã¹ãã ã³ã¼ã«ãå¼ã³åºããããã°ã©ã åã調ã¹ããã¹ãããã°ã©ã ã§ãªããã°ç¹ã«å¤æ´ã¯è¡ããªãã§çµäºãã¾ããnodenameãè¨å®ãã¦ããã®ã¯set_dummy_uname()ã§å¼ã³åºãæã«ã·ã¹ãã ã³ã¼ã«ã®ãã©ã¡ã¼ã¿ã¨ãã¦æ¸¡ãããnameå¤æ°ãset_dummy_uname()ã®å¼æ°ã¨ãã¦æ¸¡ãã¦ãã¾ããã·ã¹ãã ã³ã¼ã«ãå¼ã³åºããã®ããã¹ãããã°ã©ã ãªãnodenameãlivepatchedã«å¤æ´ãã¾ããsystamtapã¹ã¯ãªããã®ç¹å¾´ã¨ãã¦ãèªåã§å®è£ ããé¢æ°ã®å¼æ°ã«ã¢ã¯ã»ã¹ããå ´åã¯STAP_ARG_å¤æ°åã§ã¢ã¯ã»ã¹ãã¾ãããã®ã¹ã¯ãªããã§ã¯nameã¨ããå¤æ°åã§å¼æ°ãåãåã£ã¦ããããSTAP_ARG_nameã¨æ¸ãã¦ãã¾ãã
ããã§ä½¿ç¨ãããã¹ãããã°ã©ã ã§ãã以ä¸ã®ãããªç°¡åãªãã®ã§ãã
#include <stdio.h> #include <sys/utsname.h> int main(int argc, char **argv) { struct utsname name = { 0 }; if (uname(&name)) { perror("uname"); return -1; } printf("nodename: %s\n", name.nodename); return 0; }
ãã®cã³ã¼ããã³ã³ãã¤ã«ãã¾ãããã
[masami@unamebook ~]$ gcc uname-test.c -o uname-test
ã§ã¯ããã®systemtapã®ã¹ã¯ãªãããå®è¡ãã¾ããããããã§ã端æ«ã2ã¤ä½¿ãã¾ãã1ã¤ã¯uname-testããã°ã©ã ãå®è¡ãã¾ãããã1ã¤ã¯æ¬¡ã®ããã«systemtapã®ã¹ã¯ãªãããå®è¡ãã¾ããstart livepatch ~ã¨åºããæºåå®äºã§ãã
[masami@unamebook ~]$ sudo stap -g uname_livepatch.stp start livepatch code. Ctrl-C to stop
å¥ã®ç«¯æ«ã§ãã¹ããã¾ãã
[masami@unamebook ~]$ uname -n unamebook [masami@unamebook ~]$ ./uname-test nodename: livepatched [masami@unamebook ~]$ uname -n unamebook [masami@unamebook ~]$
次ã«systemtapã®ããã°ã©ã ãCtrl-Cã§æ¢ãã¦uname-testãå®è¡ãã¦ã¿ã¾ããsystemtapã®ã¹ã¯ãªãããçµäºãããã¨ã§sys_newuname()ã®æåããã¨ã«æ»ã£ããã¨ã§uname(2)ã®æ»ãå¤ããã¨ã«æ»ãã¾ãããã
[masami@unamebook ~]$ ./uname-test nodename: unamebook
Kernel Hack
åç« ã®systemtapã§ã¯systemtapãå©ç¨ãã¦ã«ã¼ãã«ã®æåãå¤ãã¦ã¿ã¾ãããæ¬ç« ã§ã¯ã«ã¼ãã«ã®ã½ã¼ã¹ã³ã¼ããå¤æ´ããåç« ã¨åæ§ã®æåã«å¤ãã¦ã¿ã¾ããã«ã¼ãã«ã®ã½ã¼ã¹ããã±ã¼ã¸ã«ããããå½ã¦ãã«ã¯git-am(1)ã§å½ã¦ããã¨ãã§ããããããä½ãå¿ è¦ãããã¾ãããããã®ä½ãæ¹ã¨ãã¦ã¡ã¤ã³ã©ã¤ã³ã®ã«ã¼ãã«ãå¤æ´ãã¦ããããã¤ãããFedoraã®ã«ã¼ãã«ã½ã¼ã¹ãå¤æ´ããã®2ãã¿ã¼ã³ãããã¾ããFedoraã®ã«ã¼ãã«ã«ã¯Fedoraããã¸ã§ã¯ããé©ç¨ããããããå«ã¾ãã¦ãããããã¡ã¤ã³ã©ã¤ã³ã®ã«ã¼ãã«ãå¤æ´ããå ´åãå¤æ´å 容ã«ãã£ã¦ã¯Fedoraã®ã«ã¼ãã«ã½ã¼ã¹ã¨ã³ã³ããªã¯ããçºçããå¯è½æ§ãããã¾ããããã§æ¬ç« ã§ã¯Fedoraã®ã«ã¼ãã«ã½ã¼ã¹ãå¤æ´ãã¦ããããä½ãã¾ããã¾ãã¯ã«ã¼ãã«ã®ã½ã¼ã¹ããã±ã¼ã¸ããã¦ã³ãã¼ããã¦ã¤ã³ã¹ãã¼ã«ãã¾ãã以åcoreutilsã®ã½ã¼ã¹ããã±ã¼ã¸ãã¤ã³ã¹ãã¼ã«ãã¦ããã®ã§ç¶ºéºãªrpmbuildãã£ã¬ã¯ããªãä½ãããã¨ããã§ãããã£ã¦ãæ¢åã®rpmbuildãã£ã¬ã¯ããªã¯ãªãã¼ã ãã¦ç½®ãã¦ãããæ°ãã«rpmbuildãã£ã¬ã¯ããªãä½æãã¾ããããã¦ã½ã¼ã¹ããã±ã¼ã¸ããã¦ã³ãã¼ããã¦ã¤ã³ã¹ãã¼ã«ãã¾ãã
[masami@unamebook ~]$ dnf download --source kernel [masami@unamebook ~]$ rpm -i kernel-5.3.11-300.fc31.src.rpm
ã«ã¼ãã«ããã±ã¼ã¸ã®ãã«ãã«å¿ è¦ãªä¾åããã±ã¼ã¸ã®ã¤ã³ã¹ãã¼ã«ãè¡ãã¾ãã
[masami@unamebook ~]$ sudo dnf builddep -y kernel [masami@unamebook ~]$ sudo dnf install -y pesign
ããã§ã«ã¼ãã«ã½ã¼ã¹ããã±ã¼ã¸ããã«ãããæºåã¯æ´ã£ãã®ã§ã§ãããspecãã¡ã¤ã«ã«ããbuildidãè¨å®ãã¦Fedoraã®rpmã¨åºå¥ã§ããããã«ãã¾ããã好ã¿ã®ã¨ãã£ã¿ã§kernel.specãéã# define buildid .localã®ä¸ã«%define buildid .unametestã追å ãã¾ãã
# define buildid .local %define buildid .unametest
ãã®æ®µéã§ã¯ã¾ã ~/rpmbuild/SOURCESã«ã«ã¼ãã«ã®ã³ã¼ããããããç½®ããã¦ããã ããªã®ã§ã½ã¼ã¹ã³ã¼ããå±éãã¾ãã
[masami@unamebook SPECS]$ rpmbuild -bp kernel.spec
å±éã«æåããã¨~/rpmbuild/BUILD/kernel-5.3.fc31/linux-5.3.11-300.unametest.fc31.x86_64/ã«ããããå½ã¦ãããã«ã¼ãã«ã®ã³ã¼ããç½®ããã¾ããã¾ãé常ã®ã«ã¼ãã«ã½ã¼ã¹ããªã¼ã¨ã¯éãconfigsãã£ã¬ã¯ããªãåå¨ãã¾ãããã®ãã£ã¬ã¯ããªã«ã¯fedoraã®åã¢ã¼ããã¯ãã£åãã®configãã¡ã¤ã«ãåå¨ãã¾ããrpmbuildã§ã¯ãªãããã¼ã«ã«ç°å¢ã§ãã«ãã試ãéã¯ãã®ãã£ã¬ã¯ããªã«ããconfigã使ç¨ãã¦make oldconfigãè¡ããã使ç¨ãã¦ããã«ã¼ãã«ã®ã³ã³ãã£ã°ãã¡ã¤ã«ã/bootã«ããã®ã§ãããã³ãã¼ãã¦ä½¿ãã¾ãããã ã§ã¯ãããããã¯ã«ã¼ãã«ã®ã½ã¼ã¹ã³ã¼ããå¼ã£ã¦ããã¾ããã¾ãã¯~/rpmbuild/BUILD/kernel-5.3.fc31ã«ç§»åãã linux-5.3.11-300.unametest.fc31.x86_64ãã³ãã¼ãã¦ä½æ¥ãã£ã¬ã¯ããªãä½ãã¾ããã³ãã¼å ã®ååã¯ä»»æã§ããããã§ã¯ linux-5.3.11-300.unametest.fc31.x86_64.hackã¨ãã¾ããã
[masami@unamebook kernel-5.3.fc31]$ cp -a linux-5.3.11-300.unametest.fc31.x86_64 linux-5.3.11-300.unametest.fc31.x86_64.hack
ä¸æ¦ã½ã¼ã¹ãããã£ã¦ããªãç¶æ ã§ãã«ããã§ãããã¨ã確èªãã¾ãããããã®æ®µéã§ãã«ãã«æåãããã¨ã確èªãã¦ããã°ãã½ã¼ã¹ã®å¤æ´å¾ã«ãã«ããéããªããªã£ãå ´åã®åé¡ã®åãåãã«å½¹ç«ã¡ã¾ãããã®æ®µéã§gitã®ãã©ã³ããä½ã£ã¦ããã¾ãã linux-5.3.11-300.unametest.fc31.x86_64ã«ã¯.gitãã£ã¬ã¯ããªããããgitããã§ã«å©ç¨ã§ããããã«ãªã£ã¦ãã¾ãã
[masami@unamebook kernel-5.3.fc31]$ cd linux-5.3.11-300.unametest.fc31.x86_64.hack/ [masami@unamebook linux-5.3.11-300.unametest.fc31.x86_64.hack]$ git checkout -b uname-hack [masami@unamebook linux-5.3.11-300.unametest.fc31.x86_64.hack]$ cp configs/kernel-5.3.11-x86_64.config .config [masami@unamebook linux-5.3.11-300.unametest.fc31.x86_64.hack]$ make oldconfig scripts/kconfig/conf --oldconfig Kconfig # # configuration written to .config #
make oldconfigã¯ç¹ã«åé¡ãªãå®äºããã¨æãã¾ããã§ã¯ãã«ã¼ãã«ã¨ã«ã¼ãã«ã¢ã¸ã¥ã¼ã«ããã«ããã¾ããbzImageã§å§ç¸®ãããã«ã¼ãã«ã®ã¤ã¡ã¼ã¸ããã«ãããmodulesã§ã«ã¼ãã«ã¢ã¸ã¥ã¼ã«ããã«ããã¦ãã¾ãã-j$(nproc)ã¯ä¸¦åãã«ãã®ãªãã·ã§ã³ã§ãããã°ã¤ã³ãã¦ããç°å¢ã§å©ç¨å¯è½ãªcpuæ°ããã¨ã«ãã«ãã並åå®è¡ãã¾ããã«ã¼ãã«ã®ãã«ãã¯æå¾ã«arch/x86/boot/bzImage is readyã¨ããã¡ãã»ã¼ã¸ãåºãã°æåã§ããrpmã®ã½ã¼ã¹ããã±ã¼ã¸ã使ã£ã¦ãã®ã§rpmbuildã§ãã«ããã¦ãè¯ãã®ã§ãããããã ã¨æéããããã®ã§ã¾ãã¯æ軽ã«makeã§ãã«ããã¦ãã¾ãã
[masami@unamebook linux-5.3.11-300.unametest.fc31.x86_64.hack]$ make -j$(nproc) bzImage ~ç¥~ BUILD arch/x86/boot/bzImage Setup is 17692 bytes (padded to 17920 bytes). System is 9085 kB CRC dde74ef3 Kernel: arch/x86/boot/bzImage is ready (#1)
ã¢ã¸ã¥ã¼ã«ã®ãã«ããå®è¡ãã¾ããã¢ã¸ã¥ã¼ã«ã®ãã«ãã¯æåæã«ããã¨ãã£ããã°ã¯ããã¾ããã次ã®ããã«ããã£ã¨ããã³ããã表示ããã¦ãããæåãã¦ãã¾ãã
[masami@unamebook linux-5.3.11-300.unametest.fc31.x86_64.hack]$ make -j$(nproc) modules ~ç¥~ LD [M] sound/x86/snd-hdmi-lpe-audio.ko LD [M] virt/lib/irqbypass.ko
ãã¦ãã«ã¼ãã«ã¨ã¢ã¸ã¥ã¼ã«ã®ãã«ãã«æåãããæºåã¯å®äºã§ããå®éã«ã«ã¼ãã«ã®ã½ã¼ã¹ã«æãå ãã¾ããããå¤æ´ããã®ã¯kernel/sys.cã§ããã«ã¬ã³ãããã»ã¹åã調ã¹ã¦ããã»ã¹åãuname-testãªãnodenameãå¤æ´ãã¾ãããã£ã¦ãããã¨ã¯systemtapã®å ´åã¨åæ§ã§ããå¤æ´å 容ã¯æ¬¡ã®ããã«ãªãã¾ãã
diff --git a/kernel/sys.c b/kernel/sys.c index 2969304..908ce7f 100644 --- a/kernel/sys.c +++ b/kernel/sys.c @@ -1243,6 +1243,10 @@ SYSCALL_DEFINE1(newuname, struct new_utsname __user *, name) down_read(&uts_sem); memcpy(&tmp, utsname(), sizeof(tmp)); up_read(&uts_sem); + + if (!strcmp(current->comm, "uname-test")) + strcpy(tmp.nodename, "livepatched"); + if (copy_to_user(name, &tmp, sizeof(tmp))) return -EFAULT;
systemtapã®å ´åã¯é¢æ°ã®éä¸ã«ã³ã¼ããå ¥ãã¦ããªãã®ã§é¢æ°ããè¿ãã¨ããã«å¦çãå ¥ãè¾¼ã¿ã¾ããããä»åã¯ç´æ¥ã«ã¼ãã«ã®ã³ã¼ããå¼ã£ã¦ããã®ã§ç´ ç´ãªã³ã¼ãã®å¤æ´ã«ãªã£ã¦ã¾ãããå¤æ´ãããã«ã¼ãã«ããã«ãã§ããã確èªãã¾ãããããã«ãæ¹æ³ã¯å ã»ã©ã¨åãã§ãã
[masami@unamebook linux-5.3.11-300.unametest.fc31.x86_64.hack]$ make -j$(nproc) bzImage ~ç¥~ BUILD arch/x86/boot/bzImage Setup is 17692 bytes (padded to 17920 bytes). System is 9089 kB CRC 27223b7c Kernel: arch/x86/boot/bzImage is ready (#2)
ä»åãæåãããarch/x86/boot/bzImage is readyã¨ããã¡ãã»ã¼ã¸ãåºã¾ãããã®ã¡ãã»ã¼ã¸ã®æå¾ã«ãã#2ã¨ããã®ã¯ãã®ã«ã¼ãã«ããã«ãããã®ã2åç®ã¨ããæå³ã§ãããã«ãã«æåããã®ã§ããããä½æãã¾ããããã¾ãæåã«gitã®ã¡ã¼ã«ã¢ãã¬ã¹ã¨ååãå¤æ´ãã¾ããããã¯Fedoraã®ã«ã¼ãã«ã®å ´åãããã©ã«ãã§ã¯Fedoraã®ã«ã¼ãã«ãã¼ã ã®ã¡ã¼ã«ã¢ãã¬ã¹ã使ãããã®ã§ä¸æ¸ããã¦èªåã®ã¡ã¼ã«ã¢ãã¬ã¹ã¨ååã«å¤æ´ãã¾ãããããããå¤æ´ãã³ãããããgit-format-patch(1)ã§ããããä½ãã¾ããåºæ¥ããããã¯ã«ã¬ã³ããã£ã¬ã¯ããªã«ç½®ããã¾ãã
[masami@unamebook linux-5.3.11-300.unametest.fc31.x86_64.hack]$ git config --local --add user.email <your email> [masami@unamebook linux-5.3.11-300.unametest.fc31.x86_64.hack]$ git config --local --add user.name "your name" [masami@unamebook linux-5.3.11-300.unametest.fc31.x86_64.hack]$ git add kernel/sys.c [masami@unamebook linux-5.3.11-300.unametest.fc31.x86_64.hack]$ git commit -m "uname: add test code" [uname-hack 9ea2b59] uname: add test code 1 file changed, 4 insertions(+) [masami@unamebook linux-5.3.11-300.unametest.fc31.x86_64.hack]$ git format-patch -s master 0001-uname-add-test-code.patch [masami@unamebook linux-5.3.11-300.unametest.fc31.x86_64.hack]$
ããã§åºæ¥ããããã¯æ¬¡ã®ããã«ãªãã¾ããã³ãããã¡ãã»ã¼ã¸ãå¤æ´å 容ãã¡ã¼ã«éä¿¡ç¨ã®ãµãã¸ã§ã¯ããªã©ãè¨å®ããã¦ãã¾ããæå¾ã®2.23.0ã¨ããã®ã¯gitã®ãã¼ã¸ã§ã³ã§ãã
From 9ea2b595c1c246a7ff94e6c4c721896ffcf9f5a6 Mon Sep 17 00:00:00 2001 From: Your Name <your email> Date: Mon, 25 Nov 2019 23:26:46 +0900 Subject: [PATCH] uname: add test code Signed-off-by:Your Name <your email> --- kernel/sys.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/kernel/sys.c b/kernel/sys.c index 2969304..908ce7f 100644 --- a/kernel/sys.c +++ b/kernel/sys.c @@ -1243,6 +1243,10 @@ SYSCALL_DEFINE1(newuname, struct new_utsname __user *, name) down_read(&uts_sem); memcpy(&tmp, utsname(), sizeof(tmp)); up_read(&uts_sem); + + if (!strcmp(current->comm, "uname-test")) + strcpy(tmp.nodename, "livepatched"); + if (copy_to_user(name, &tmp, sizeof(tmp))) return -EFAULT; -- 2.23.0
ã§ã¯ããã®ããããFedoraã®ã«ã¼ãã«ã½ã¼ã¹ããã±ã¼ã¸ã«è¿½å ãã¦rpmbuild(8)ã§ãã«ããã¾ãããããããã~/rpmbuild/SOURCESãã£ã¬ã¯ããªã«ã³ãã¼ãã¾ãã
[masami@unamebook linux-5.3.11-300.unametest.fc31.x86_64.hack]$ cp 0001-uname-add-test-code.patch ../../../SOURCES/.
ããã¦~/rpmbuild/SPECSã«ç§»åãã¾ããkernel.specãã¡ã¤ã«ãã¨ãã£ã¿ã§éãã# END OF PATCH DEFINITIONSã®è¡ã¾ã§ç§»åãã¾ããPatchXXX(Xã¯æ°å)ã®è¡ãããã¾ããããã®æ°åã¯ä»»æã§ããããã§ã¯999ã¨ãã¾ããã次ã®ããã«# END OF PATCH DEFINITIONSã®ä¸ã«2è¡ã追å ãã¾ãã
# uname hack patch Patch999: 0001-uname-add-test-code.patch # END OF PATCH DEFINITIONS
ããããããã«ããã¾ããããããã§ã¯å¿ è¦æå°éã®ã«ã¼ãã«ããã±ã¼ã¸ã ãä½æãã¾ãã次ã®ãããªã³ãã³ãã©ã¤ã³å¼æ°ã§ãã«ããè¡ãã¾ãã
[masami@unamebook SPECS]$ rpmbuild -bb --with baseonly --without debuginfo --without debug --target=$(uname -m) kernel.spec ~ç¥~ Executing(%clean): /bin/sh -e /var/tmp/rpm-tmp.0BA8HX + umask 022 + cd /home/masami/rpmbuild/BUILD + cd kernel-5.3.fc31 + /usr/bin/rm -rf /home/masami/rpmbuild/BUILDROOT/kernel-5.3.11-300.unametest.fc31.x86_64 + RPM_EC=0 ++ jobs -p + exit 0
åºæ¥ä¸ãã£ãrpmãã¡ã¤ã«ã¯~ rpmbuild/RPMS/x86_64/ã«ç½®ããã¾ãã
[masami@unamebook x86_64]$ ls kernel-5.3.11-300.unametest.fc31.x86_64.rpm kernel-devel-5.3.11-300.unametest.fc31.x86_64.rpm kernel-modules-extra-5.3.11-300.unametest.fc31.x86_64.rpm kernel-core-5.3.11-300.unametest.fc31.x86_64.rpm kernel-modules-5.3.11-300.unametest.fc31.x86_64.rpm
åºæ¥ä¸ãã£ãrpmãã¤ã³ã¹ãã¼ã«ãã¾ãã
[masami@unamebook x86_64]$ sudo dnf localinstall -y ./*.rpm
ã¤ã³ã¹ãã¼ã«ãããã«ã¼ãã«ã®åªå é ã確èªãã¾ããããé常ã¯ã¤ã³ã¹ãã¼ã«ããã«ã¼ãã«ã§èµ·åã§ããã¨æãã¾ãããåºæ¥ãªãã£ãå ´åã¯ããã§èª¿ã¹ãindexã使ã£ã¦grub2-rebootã³ãã³ãã§èµ·åããã«ã¼ãã«ãè¨å®ãã¦ãªãã¼ããã¾ãã
[masami@unamebook ~]$ sudo grubby --info=ALL index=0 kernel="/boot/vmlinuz-5.3.11-300.unametest.fc31.x86_64" args="ro resume=UUID=c98315dc-7144-427b-a6a0-2aad53d8ebc5 rhgb quiet" root="UUID=0b584087-de7b-42f8-8dea-d3b679d22613" initrd="/boot/initramfs-5.3.11-300.unametest.fc31.x86_64.img" title="Fedora (5.3.11-300.unametest.fc31.x86_64) 31 (Thirty One)" id="24b7d4741c7c4982889ac4d4acb27ae1-5.3.11-300.unametest.fc31.x86_64"
åèµ·åãããuname(1)ã§ã«ã¼ãã«ã確èªãã¾ããããunametestãå ¥ã£ã¦ããã®ã§ãã«ãããã«ã¼ãã«ã§æ£ããèµ·åããããããã¾ããã
[masami@unamebook ~]$ uname -a Linux unamebook 5.3.11-300.unametest.fc31.x86_64 #1 SMP Mon Nov 25 23:32:51 JST 2019 x86_64 x86_64 x86_64 GNU/Linux
ããã¦ãsystemtapã®ã¨ãã«ã使ã£ãuname-testãå®è¡ãã¦ã¿ã¾ãããã
[masami@unamebook ~]$ ./uname-test nodename: livepatched
nodenameãå¤ããã¾ããããããã§uname-testãuname-test2ã¨ãã¦ã³ãã¼ãã¦å®è¡ããã¨ããªãªã¸ãã«ã®nodenameãã§ã¾ããããã¨ãããã¨ã§ã«ã¼ãã«ã«æãå ¥ãã¦uname(2)ã®æåãå¤æ´ãããã¨ã«ãæåãã¾ããð
[masami@unamebook ~]$ cp uname-test uname-test2 [masami@unamebook ~]$ ./uname-test2 nodename: unamebook
Livepatch
systemtapã®ç« ã§ã¯systemtapãå©ç¨ãã¦ã«ã¼ãã«ã®æåãå¤ãã¦ã¿ã¾ããããLinuxã«ã¼ãã«ã«ã¯Livepatchã¨ããæ©è½ããããå®è¡ä¸ã®ã«ã¼ãã«ã®æåãåèµ·åãªãã«å¤æ´ããï¼patchãå½ã¦ãï¼ãã¨ãã§ããæ©è½ãããã¾ããæ¬ç« ã§ã¯ãã®æ©è½ã§unameã·ã¹ãã ã³ã¼ã«ã®æåãå¤æ´ãã¦ã¿ã¾ãããã ãFedoraã®ã«ã¼ãã«ã§ã¯Livepatchæ©è½ã¯æå¹ã«ãªã£ã¦ããªãããã«ã¼ãã«ã®ã½ã¼ã¹ããã±ã¼ã¸ããLivepatchãæå¹ã«ããã«ã¼ãã«ãä½ãå¿ è¦ãããã¾ããã«ã¼ãã«ã®ã½ã¼ã¹ã¯åç« ã§ãã¦ã³ãã¼ããã¦ãã¦ããã®ã§ããã«å¯¾ãã¦ã³ã¼ããå¼ã£ã¦ããã¾ããããããã§æ¬å½ã¯unameã®æåãå¤æ´ããã®ããã¿ã¼ãªã¨ããã§ãããunameã®å®è£ ãLivepatchããã®ã¯ã¡ãã£ã¨æéãªã®ã§åç´ã«å¼ããã¨ãã§ããgetpid(2)ã使ãã¾ãã
ã¾ã~/rpmbuild/SOURCESã«ç§»åããLivepatchã®æ©è½ãæå¹ã«ããè¨å®ã追å ãã¾ãã
[masami@unamebook ~]$ cd rpmbuild/SOURCES/ [masami@unamebook SOURCES]$ echo "CONFIG_LIVEPATCH=y" >> kernel-local [masami@unamebook SOURCES]$ echo "CONFIG_TEST_LIVEPATCH=m" >> kernel-local
kernel-localãã¡ã¤ã«ã¯ãã®ããã«ãªãã¾ãã
[masami@unamebook SOURCES]$ cat kernel-local # This file is intentionally left empty in the stock kernel. Its a nicety # added for those wanting to do custom rebuilds with altered config opts. CONFIG_LIVEPATCH=y CONFIG_TEST_LIVEPATCH=m
Fedoraã§ã¯kernel-localãã¡ã¤ã«ã«ã«ã¼ãã«ã®ã³ã³ãã£ã®ã¥ã¬ã¼ã·ã§ã³ãè¨å®ãããã¨ã§ãã¼ã¹ã¨ãªãè¨å®ãã¡ã¤ã«ï¼x86_64ãªãkernel-x86_64.configï¼ã«è¨å®ã追å ã§ãã¾ãã è¨å®ã追å ããã~/rpmbuild/SPECã«ç§»åãä¾åããã±ã¼ã¸ã®ã¤ã³ã¹ãã¼ã«ãè¡ãã¾ããkernel-localãã¡ã¤ã«ãä½ã£ãããã¨ã¯ãã«ãããã ãã§ãã
[masami@unamebook SOURCES]$ cd ~/rpmbuild/SPECS/
å ç¨ã¯unametestã¨ããå称ãã«ã¼ãã«ããã±ã¼ã¸ã«è¿½å ãã¾ããããä»åº¦ã¯getpidtestã¨ããå称ãä»ãã¾ããããkernel.specã以ä¸ã®ããã«å¤æ´ãã¾ãã
# define buildid .local %define buildid .getpidtest
specãã¡ã¤ã«ãå¤æ´ãããã«ã¼ãã«ããã«ããã¾ãã
[masami@unamebook SPECS]$ rpmbuild -bb --with baseonly --without debuginfo --without debug --target=$(uname -m) kernel.spec ~ç¥~ + cd kernel-5.3.fc31 + /usr/bin/rm -rf /home/masami/rpmbuild/BUILDROOT/kernel-5.3.11-300.getpidtest.fc31.x86_64 + RPM_EC=0 ++ jobs -p + exit 0
ãã«ããçµäºããã~/rpmbuild/RPMS/x86_64ã«ç§»åãã¦lsããã¨getpidtestã¨ååã®ä»ããrpmãåºæ¥ã¦ããã®ã確èªã§ãã¾ãã
[masami@unamebook x86_64]$ ls kernel-5.3.11-300.getpidtest.fc31.x86_64.rpm kernel-core-5.3.11-300.unametest.fc31.x86_64.rpm kernel-modules-5.3.11-300.getpidtest.fc31.x86_64.rpm kernel-modules-extra-5.3.11-300.unametest.fc31.x86_64.rpm kernel-5.3.11-300.unametest.fc31.x86_64.rpm kernel-devel-5.3.11-300.getpidtest.fc31.x86_64.rpm kernel-modules-5.3.11-300.unametest.fc31.x86_64.rpm kernel-core-5.3.11-300.getpidtest.fc31.x86_64.rpm kernel-devel-5.3.11-300.unametest.fc31.x86_64.rpm kernel-modules-extra-5.3.11-300.getpidtest.fc31.x86_64.rpm
æ°ãããã«ãããrpmãã¤ã³ã¹ãã¼ã«ãã¾ãã
[masami@unamebook x86_64]$ sudo dnf localinstall -y kernel-*.getpidtest.*
次ã«grubã®ã¨ã³ããªã確èªãã¾ãã
[masami@unamebook x86_64]$ sudo grubby --info=ALL | grep index -A1 index=0 kernel="/boot/vmlinuz-5.3.11-300.unametest.fc31.x86_64" -- index=1 kernel="/boot/vmlinuz-5.3.11-300.getpidtest.fc31.x86_64" -- index=2 kernel="/boot/vmlinuz-5.3.11-300.fc31.x86_64" -- index=3 kernel="/vmlinuz-0-rescue-24b7d4741c7c4982889ac4d4acb27ae1"
getpidtestã®ã«ã¼ãã«ã¯indexãï¼ã¨ãªã£ã¦ããã®ã§ãã®ã«ã¼ãã«ã§èµ·åããããã«ãã¾ãã
[masami@unamebook x86_64]$ sudo grub2-reboot 1
ããã§æºåå®äºãªã®ã§åèµ·åãã¾ããåèµ·åããããã¡ããuname(1)ã§æ£ããã«ã¼ãã«ã§èµ·åããã確èªãã¾ãð
[masami@unamebook ~]$ uname -a Linux unamebook 5.3.11-300.getpidtest.fc31.x86_64 #1 SMP Tue Nov 26 23:10:42 JST 2019 x86_64 x86_64 x86_64 GNU/Linux
ã«ã¼ãã«ãã«ãæã«ã©ã¤ããããæ©è½ãæå¹ã«ãªã£ã¦ããã確èªãã¾ããfedoraã¯/bootã«ã«ã¼ãã«ã®ã³ã³ãã£ã°ãç½®ãããã®ã§ããã§ç¢ºèªã§ãã¾ãã
[masami@unamebook ~]$ grep CONFIG_LIVEPATCH /boot/config-5.3.11-300.getpidtest.fc31.x86_64 CONFIG_LIVEPATCH=y
ã§ã¯ã©ã¤ãããããä½ãã¾ããããã«ã¼ãã«ã®ã©ã¤ããããã¯ã«ã¼ãã«ã¢ã¸ã¥ã¼ã«ã¨ãã¦ä½æãã¾ããã¾ãä½æ¥ãã£ã¬ã¯ããªãä½ãã¾ãã
[masami@unamebook ~]$ mkdir getpid-livepatch-module
ããã¦ãgetpid-livepatch.cã以ä¸ã®å 容ã§ä½æãã¾ããyour nameã®ã¨ããã¯é©å½ã«å¤ãã¦ãã ããã
#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt #include <linux/module.h> #include <linux/kernel.h> #include <linux/livepatch.h> #include <linux/string.h> #include <linux/sched.h> MODULE_DESCRIPTION("getpid livepatch test module"); MODULE_AUTHOR("your name"); MODULE_LICENSE("GPL"); MODULE_INFO(livepatch, "Y"); asmlinkage long livepatch_getpid(void) { pr_info("%s\n", __func__); if (unlikely(!strcmp(current->comm, "getpid-test"))) return 1; return task_tgid_vnr(current); } static struct klp_func funcs[] = { { .old_name = "__x64_sys_getpid", .new_func = livepatch_getpid, }, {} }; static struct klp_object objs[] = { { .funcs = funcs, }, {} }; static struct klp_patch patch = { .mod = THIS_MODULE, .objs = objs, }; static int getpid_livepatch_init(void) { int ret = 0; ret = klp_enable_patch(&patch); if (ret) { pr_info("failed to enable getpid live patch\n"); return ret; } pr_info("getpid livepatch test module is enabled\n"); return ret; } static void getpid_livepatch_cleanup(void) { } module_init(getpid_livepatch_init); module_exit(getpid_livepatch_cleanup);
ãã®ã©ã¤ããããã§ã¯getpid(2)ãå®è¡ããããã°ã©ã åãgetpid-testã®å ´åã«ï¼ãè¿ãããã以å¤ã®å ´åã¯æ®éã«pidãè¿ãã¦ãã¾ãããã®ãã¡ã¤ã«ããã«ãããã®ã«Makefileãå¿ è¦ã§ãã®ã§ãããä½æãã¾ããMakefileã®ã¤ã³ãã³ãã¯tabãªãã§æ°ãã¤ãã¦ãã ããã
KERNDIR := /lib/modules/`uname -r`/build BUILD_DIR := $(shell pwd) VERBOSE = 0 obj-m := getpid-livepatch.o smallmod-objs := getpid-livepatch.o all: make -C $(KERNDIR) M=$(BUILD_DIR) KBUILD_VERBOSE=$(VERBOSE) modules clean: rm -f *.o rm -f *.ko rm -f *.mod.c rm -f *~
ãã«ããã¾ãããã«ãã«æåããã¨getpid-livepatch.koã¨ãããã¡ã¤ã«ãã§ãã¾ãã
[masami@unamebook getpid-livepatch-module]$ make make -C /lib/modules/`uname -r`/build M=/home/masami/getpid-livepatch-module KBUILD_VERBOSE=0 modules make[1]: Entering directory '/usr/src/kernels/5.3.11-300.getpidtest.fc31.x86_64' CC [M] /home/masami/getpid-livepatch-module/getpid-livepatch.o Building modules, stage 2. MODPOST 1 modules CC /home/masami/getpid-livepatch-module/getpid-livepatch.mod.o LD [M] /home/masami/getpid-livepatch-module/getpid-livepatch.ko make[1]: Leaving directory '/usr/src/kernels/5.3.11-300.getpidtest.fc31.x86_64'
次ã«ãã¹ãããã°ã©ã ãç¨æãã¾ããããgetpid-test.cã¨ããååã§ãã¡ã¤ã«ãä½ãã以ä¸ã®å 容ã§ä¿åãã¾ãã
#include <sys/types.h> #include <unistd.h> #include <stdio.h> int main(int argc, char **argv) { printf("pid is %d\n", getpid()); return 0; }
ãã«ããã¾ãã
[masami@unamebook getpid-livepatch-module]$ gcc getpid-test.c -o getpid-test
å®è¡ããã¨ä»¥ä¸ã®ããã«pidã表示ããã¾ãã
[masami@unamebook getpid-livepatch-module]$ ./getpid-test pid is 1435
ã§ã¯ãã©ã¤ããããã®ã¢ã¸ã¥ã¼ã«ããã¼ããã¾ãã
[masami@unamebook getpid-livepatch-module]$ sudo insmod ./getpid-livepatch.ko
dmesgã³ãã³ãã§ã«ã¼ãã«ã®ãã°ãè¦ãã¨ä»¥ä¸ã®ãããªè¡ãããã®ã確èªã§ãã¾ãã
[ 959.659727] getpid_livepatch: loading out-of-tree module taints kernel. [ 959.659729] getpid_livepatch: tainting kernel with TAINT_LIVEPATCH [ 959.659787] getpid_livepatch: module verification failed: signature and/or required key missing - tainting kernel [ 959.668116] livepatch: enabling patch 'getpid_livepatch' [ 959.670655] livepatch: 'getpid_livepatch': starting patching transition [ 959.670802] getpid_livepatch: getpid livepatch test module is enabled
ãã ãlivepatch_getpid()ã®æåã«pr_info()ã§é¢æ°åã表示ããã¦ããã®ã§ä»¥ä¸ã®ãããªãã°ã大éã«åºã¦ãã¨æãã¾ããã
[ 1042.927756] getpid_livepatch: livepatch_getpid
ããã¯ãã¦ããgetpid-testãå度å®è¡ããã¨pidã¨ãã¦1ãè¿ã£ã¦ãã¾ããã¨ãããã¨ã§ã«ã¼ãã«ã®ã©ã¤ããããæ©è½ã使ã£ãã©ã¤ãããããæåã§ãð
[masami@unamebook getpid-livepatch-module]$ ./getpid-test pid is 1
ããã°ã©ã åãéãã°ãã¡ããpidã¯æ®éã«è¿ã£ã¦ãã¾ãã
[masami@unamebook getpid-livepatch-module]$ cp getpid-test getpid-test2 [masami@unamebook getpid-livepatch-module]$ ./getpid-test2 pid is 1455
ãã¾ã
Fedoraãupstreamã¨ãã¦ããRHELã¨CentOSã®uname(1)ã®æåãç´¹ä»ãã¾ãã
RHEL 8.1
ãã¼ã¸ã§ã³ã¯8.1ã§ããããã§uname(1)ãå®è¡ããã¨uname(2)ã3åå¼ã°ãã¦ããã®ããããã¾ããã
[masami@rhel8 ~]$ cat /etc/os-release | grep VERSION_ID VERSION_ID="8.1" [masami@rhel8 ~]$ strace -v -s 1024 -e trace=uname -C uname -a uname({sysname="Linux", nodename="rhel8", release="4.18.0-147.0.3.el8_1.x86_64", version="#1 SMP Mon Nov 11 12:58:36 UTC 2019", machine="x86_64", domainname="(none)"}) = 0 uname({sysname="Linux", nodename="rhel8", release="4.18.0-147.0.3.el8_1.x86_64", version="#1 SMP Mon Nov 11 12:58:36 UTC 2019", machine="x86_64", domainname="(none)"}) = 0 uname({sysname="Linux", nodename="rhel8", release="4.18.0-147.0.3.el8_1.x86_64", version="#1 SMP Mon Nov 11 12:58:36 UTC 2019", machine="x86_64", domainname="(none)"}) = 0 Linux rhel8 4.18.0-147.0.3.el8_1.x86_64 #1 SMP Mon Nov 11 12:58:36 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux +++ exited with 0 +++ % time seconds usecs/call calls errors syscall ------ ----------- ----------- --------- --------- ---------------- 100.00 0.000068 22 3 uname ------ ----------- ----------- --------- --------- ---------------- 100.00 0.000068
coreutilsã®ãã¼ã¸ã§ã³ã¯8.30ã§ãã
[masami@rhel8 ~]$ rpm -qi coreutils | grep -e Version -e Release Version : 8.30 Release : 6.el8
CentOS 8
CentOSã®ãã¼ã¸ã§ã³ã¯8ã§ãããã¡ããuname(2)ã3åå¼ã°ãã¦ã¾ããã
masami@centos8 ~]$ cat /etc/os-release | grep VERSION_ID VERSION_ID="8" [masami@centos8 ~]$ strace -v -s 1024 -e trace=uname -C uname -a uname({sysname="Linux", nodename="centos8", release="4.18.0-80.11.2.el8_0.x86_64", version="#1 SMP Tue Sep 24 11:32:19 UTC 2019", machine="x86_64", domainname="(none)"}) = 0 uname({sysname="Linux", nodename="centos8", release="4.18.0-80.11.2.el8_0.x86_64", version="#1 SMP Tue Sep 24 11:32:19 UTC 2019", machine="x86_64", domainname="(none)"}) = 0 uname({sysname="Linux", nodename="centos8", release="4.18.0-80.11.2.el8_0.x86_64", version="#1 SMP Tue Sep 24 11:32:19 UTC 2019", machine="x86_64", domainname="(none)"}) = 0 Linux centos8 4.18.0-80.11.2.el8_0.x86_64 #1 SMP Tue Sep 24 11:32:19 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux +++ exited with 0 +++ % time seconds usecs/call calls errors syscall ------ ----------- ----------- --------- --------- ---------------- 100.00 0.000013 4 3 uname ------ ----------- ----------- --------- --------- ---------------- 100.00 0.000013 3 total
coreutilsã®ãã¼ã¸ã§ã³ã¯ãã¡ãã8.30ã§ãã
[masami@centos8 ~]$ rpm -qi coreutils | grep -e Version -e Release Version : 8.30 Release : 6.el8
ã¾ã¨ã
æå¾ã¯getpid(2)ã使ãã¾ãããã主ã«uname(1)ã¨uname(2)ã使ã£ã¦ã¦ã¼ã¶ã¼ã©ã³ãã§ã®ãããã°ããã«ã¼ãã«ãå¼ãã¨ããã¾ã§ãè¡ãã¾ãã(_´Ðï½)ï¾~~ï½µï¾ï½¶ï¾ï½°
Raspberry Piã§å¦ã¶ã³ã³ãã¥ã¼ã¿ã¢ã¼ããã¯ã㣠(Make:PROJECTS)
- ä½è : Eben Upton,Jeff Duntemann,Ralph Roberts,Tim Mamtora,Ben Everard,å®®ä¸å¥è¼,åä¸ç§,æ ªå¼ä¼ç¤¾ã¯ã¤ã¼ã
- åºç社/ã¡ã¼ã«ã¼: ãªã©ã¤ãªã¼ã¸ã£ãã³
- çºå£²æ¥: 2019/09/17
- ã¡ãã£ã¢: åè¡æ¬ï¼ã½ããã«ãã¼ï¼
- ãã®ååãå«ãããã°ãè¦ã
*1:1ã¨ããã®ã¯manã»ã¯ã·ã§ã³ã®çªå·ã§ãã1ã¯é常ã®ã³ãã³ãã§ãã
*2:ã«ã¼ãã«ãã¼ã¸ã§ã³ã«ãã#1ã¨ããã®ã¯ãã«ãç°å¢ã«ã¦ãã«ãããåæ°ã§ãã
*3:ã·ã¹ãã ã³ã¼ã«ã®manã»ã¯ã·ã§ã³ã¯2ã§ã