Re: The su manual doesn't mention use root account by default
Hi Ingo, Thanks for your detailed explanation! Best Regards Nan Xiao On Wed, Jun 12, 2019 at 4:55 PM Ingo Schwarze wrote: > > Hello Nan Xiao, > > Nan Xiao wrote on Wed, Jun 12, 2019 at 02:19:08PM +0800: > > > I read su manual (https://man.openbsd.org/su.1), but can't find words > > which said if no account is provided, root is the default. > > The BUGS section says so indirectly, but i agree that is not sufficient. > A manual page ought to explain the behaviour of a utility explicitly > and in the DESCRIPTION section. All the more so for aspects as important > as the one you are talking about. > > > But for > > doas(https://man.openbsd.org/doas.1), it has following words: > > > > -u userExecute the command as user. The default is root. > > > > I am not a nitpicker, just curious whether I miss something? Thanks! > > In OpenBSD, we do not regard it as nitpicking when people point out > bugs in manual pages. We regard bugs in manual pages just as much as > bugs as bugs in code. We insist that manual pages have to be correct, > complete, and concise. > > Consequently, your report is very much appreciated and i committed > the bugfix shown below. > > Thank you, > Ingo > > > P.S. > The reason this particular bug was able to survive for so long appears > to be that su(1) has been obsolete as a tool for getting a root shell > for a very long time. For that purpose, it is less secure than sudo(1) > used to be, and even sudo(1) was swapped out of OpenBSD because > something simpler like doas(1) is even more secure unless you really > need the additional functionality. And even then, if possible, > getting your task done in a simpler way that doas(1) can handle may > provide a security benefit. > > Even though su(1) can still be used today to relinquish privilege > when you are already root, no more development is done on it and people > rarely look at the manual page. The last time new functionality was > added to the su(1) manual page was almost a decade ago, and the > last time before that 17 years ago. > > Even though UNIX manual pages were always high quality documentation, > two decades ago, they weren't fully up to modern OpenBSD quality > standards yet. > > > CVSROOT:/cvs > Module name:src > Changes by: schwa...@cvs.openbsd.org2019/06/12 02:29:17 > > Modified files: > usr.bin/su : su.1 > > Log message: > when "login" is not specified, "root" is used; > omission reported by Nan Xiao on misc@ > > > Index: su.1 > === > RCS file: /cvs/src/usr.bin/su/su.1,v > retrieving revision 1.31 > retrieving revision 1.32 > diff -u -r1.31 -r1.32 > --- su.130 Jul 2015 08:03:49 - 1.31 > +++ su.112 Jun 2019 08:29:17 - 1.32 > @@ -49,6 +49,11 @@ > .Nm > utility allows a user to run a shell with the user and group ID of another > user > without having to log out and in as that other user. > +If the target > +.Ar login > +name is not specified, > +.Dq root > +is used. > .Pp > By default, the environment is unmodified with the exception of > .Ev LOGNAME ,
The su manual doesn't mention use root account by default
Hi misc@, Greeting from me! I read su manual (https://man.openbsd.org/su.1), but can't find words which said if no account is provided, root is the default. But for doas(https://man.openbsd.org/doas.1), it has following words: -u userExecute the command as user. The default is root. I am not a nitpicker, just curious whether I miss something? Thanks! Best Regards Nan Xiao
Inquiry the status of lmbench
Hi misc@, Greeting from me! I want to use lmbench on OpenBSD, but installing it reports following error: # pkg_add lmbench quirks-3.7 signed on 2018-09-04T22:05:13Z Can't find lmbench Obsolete package: lmbench (outdated and/or no longer required by other ports) I want to know why OpenBSD doesn't provide lmbench anymore. Because it is not applicable of current OS and computer architecture or other reasons? If lmbench is obsolete, what benchmark tools should be recommended on OpenBSD? Thanks very much in advance! Best Regards Nan Xiao
Re: "Cannot allocate memory" error when memory is enough
Hi Stuart, This is my kernel information: $ sysctl -n kern.version | head -1 OpenBSD 6.3 (GENERIC.MP) #4: Sun Jun 17 11:22:20 CEST 2018 I remember I used to build -current code before. So is it possible that will mess up my system? Thanks! Best Regards Nan Xiao On Sun, Jul 8, 2018 at 10:17 PM, Stuart Henderson wrote: > On 2018/07/08 21:56, Nan Xiao wrote: >> Hi Stuart, >> >> Thanks for your reply! >> >> $ cat /etc/installurl >> https://ftp.openbsd.org/pub/OpenBSD >> >> Does my /etc/installurl will always fetch -current? >> >> Thanks in advance! >> Best Regards >> Nan Xiao >> >> >> On Sun, Jul 8, 2018 at 7:33 AM, Stuart Henderson >> wrote: >> > On 2018-07-07, Tom Smyth wrote: >> >> Hi otto >> >> >> >> I must check that last time i read man page it was related it was for >> >> syspatch >> > >> > /etc/installurl is used if present, pkg_add selects /snapshots/ or /6.3/ >> > etc depending on the kernel version string. >> > >> > If set, PKG_PATH overrides /etc/installurl, and this takes either a short >> > hostname (in which case the same rules apply for version string), or a >> > full path (either as a static string or with placeholders replaced by >> > arch/version). >> > >> > That is why I asked if PKG_PATH was set. >> > >> > > > It depends on what kernel you are running. > > $ sysctl -n kern.version | head -1 > OpenBSD 6.3-current (GENERIC.MP) #6: Thu Jul 5 21:40:47 BST 2018 > > -> fetches -current packages > > $ sysctl -n kern.version | head -1 > OpenBSD 6.3 (GENERIC.MP) #107: Sat Mar 24 14:21:59 MDT 2018 > > -> fetches release packages > > Also I would recommend against using ftp.openbsd.org, pick a local mirror > or if using releases one of the CDNs instead .. >
Re: "Cannot allocate memory" error when memory is enough
Hi Stuart, Thanks for your reply! $ cat /etc/installurl https://ftp.openbsd.org/pub/OpenBSD Does my /etc/installurl will always fetch -current? Thanks in advance! Best Regards Nan Xiao On Sun, Jul 8, 2018 at 7:33 AM, Stuart Henderson wrote: > On 2018-07-07, Tom Smyth wrote: >> Hi otto >> >> I must check that last time i read man page it was related it was for >> syspatch > > /etc/installurl is used if present, pkg_add selects /snapshots/ or /6.3/ > etc depending on the kernel version string. > > If set, PKG_PATH overrides /etc/installurl, and this takes either a short > hostname (in which case the same rules apply for version string), or a > full path (either as a static string or with placeholders replaced by > arch/version). > > That is why I asked if PKG_PATH was set. > >
Re: "Cannot allocate memory" error when memory is enough
HI Stuart, Thanks for your reply! I don't set PKG_PATH environment. Yes, it seems I installed the current package: $ ls -l /usr/local/bin/egdb -rwxr-xr-x 1 root bin 10040410 Jun 28 19:03 /usr/local/bin/egdb But I can't remember what I have done. I can only remember I modified /etc/installurl before. Thanks! Best Regards Nan Xiao On Sat, Jul 7, 2018 at 8:23 PM, Stuart Henderson wrote: > On 2018-07-07, Nan Xiao wrote: >> Hi Philip, >> >> Thanks very much for your time and effort! >> >> The following is the command output: >> >> $ readelf -Wl /usr/local/bin/egdb | awk '/RANDOM/{print ($5+0)/1024}' >> 88.4844 >> >> The same as yours. > > That is from -current. > >> Honestly, I am not sure whether the package is for -stable or -current. >> >> After installation, I just add following config in /etc/installurl: >> $ cat /etc/installurl >> https://ftp.openbsd.org/pub/OpenBSD >> >> Then I use "pkg_add -u" sometimes. Doesn't >> https://ftp.openbsd.org/pub/OpenBSD guarantee it selects correct >> packages? Or I miss something? > > Do you have PKG_PATH set in the environment? > > Whatever the reason, it looks like you have a -current version of the > gdb package installed. > > The one in 6.3 should look like this: > > $ ls -l /usr/local/bin/egdb > -rwxr-xr-x 1 root bin 9452688 Mar 28 00:40 /usr/local/bin/egdb > > $ readelf -Wl /usr/local/bin/egdb | awk '/RANDOM/{print($5+0)/1024}' > 0.0078125 > >
Re: "Cannot allocate memory" error when memory is enough
Hi Philip, Thanks very much for your time and effort! The following is the command output: $ readelf -Wl /usr/local/bin/egdb | awk '/RANDOM/{print ($5+0)/1024}' 88.4844 The same as yours. Honestly, I am not sure whether the package is for -stable or -current. After installation, I just add following config in /etc/installurl: $ cat /etc/installurl https://ftp.openbsd.org/pub/OpenBSD Then I use "pkg_add -u" sometimes. Doesn't https://ftp.openbsd.org/pub/OpenBSD guarantee it selects correct packages? Or I miss something? Thanks very much in advance! Best Regards Nan Xiao On Sat, Jul 7, 2018 at 1:08 PM, Philip Guenther wrote: > On Wed, Jul 4, 2018 at 6:31 PM Nan Xiao wrote: >> >> Thanks very much for your time and patience. I run "syspatch" command >> regularly, so it should be 6.3-stable. >> >> >> My full dmesg output is here: > > ... > Okay, nothing weird in there. > > >> And full ouput of "vmstat -m": > > > Nothing stands out in that output either, with nothing showing failures or > consuming much more than might be expected. > > So, I'm back to my theory that the programs that are failing to run for you > are from packages built for -current and not -stable and have > PT_OPENBSD_RANDOMIZE segments larger than are permitted by -stable. > > For example, the gdb-7.12.1p2 package in -current has an 88kB > PT_OPENBSD_RANDOMIZE segment: > > : morgaine; readelf -Wl /usr/local/bin/egdb | awk '/RANDOM/{print > ($5+0)/1024} > 88.4844 > : morgaine; > > That's bigger than what a -stable kernel will permit. > > So, what's the output of that command for the egdb binary that fails for > you, and how confident are you that it's from a -stable package and not a > -current package? > > > Philip Guenther >
Re: "Cannot allocate memory" error when memory is enough
152 71808740 222 1730 171713 407 0 1580 anonpl16 460632780 9971 3829 376861 1222 0 2510 bufpl256 23275163029263 25346 23267 2079 2091 0 80 mbufpl 256 279977040 226 2573 25363776 0 80 mtagpl80400 1 0 1 1 0 80 mcl2k 2048 52430 1112 8 4 5 0 80 mcl2k2 2112 168584540 38 2924 28923267 0 80 mcl4k 4096333050 6434221212 0 80 mcl8k 819264643005046 4 6 0 80 mcl9k 9216 574300 2 0 2 2 0 80 mcl12k 12288860200 4 1 3 3 0 80 mcl16k 16384826600 8 5 3 3 0 80 mcl64k 65536 4716500 8 5 3 3 0 80 sockpl 384252810 52 3470 3464 6 8 0 80 procpl 568716780 5712 7 5 6 0 80 processpl736711490 5612 6 6 7 0 80 zombiepl 1447109300 1246 1246 0 1 0 80 ucredpl 96 36660 25 1 0 1 1 0 80 pgrppl40 25540 25 1 0 1 1 0 80 sessionpl112 9260 24 1 0 1 1 0 80 lockfpl 88 94004646 0 1 0 80 filepl 112 106165690 0 121 152 148 4 5 0 80 fdescpl 440711280 35 568 563 5 6 0 80 pipepl 112889480 14 9 8 1 2 0 80 kqueuepl 56 1605 1 0 1 1 0 80 knotepl 112 720 22 1 0 1 1 0 80 futexpl 48 887482001919 0 1 0 80 sigapl 432711270 34 335 331 4 6 0 80 scxspl 192 8989268200 70370 70369 1 2 0 81 idrpl 32 1160 91 1 0 1 1 0 80 drmobj 584 520 45 4 0 4 4 0 80 drmvma 280 430 41 3 0 3 3 0 80 drmreq 152 6500 2 2 0 1 0 80 ehcixfer 264 7802 1 0 1 1 0 80 cardslot 16100 1 1 0 1 0 80 uhcixfer 264 14206 1 0 1 1 0 80 percpumem 16 290 29 1 0 1 1 0 80 namei 1024 278179075 00 22587 22586 1 3 0 81 vnodes 20033443033443 1761 0 1761 1761 0 80 uvmvnodes 7233443033443 609 0 609 609 0 80 nchpl 144 143137897 0 5926 23616 220 220 0 80 ffsino 240 59883336021732 33805 31863 1942 1967 0 80 dino1pl 128 59883336021732 10274 9199 1075 1079 0 80 dirhash 1024242630 767 1751 165596 203 0 80 shmpl112100 1 1 0 1 0 80 art_node 16 900 23 1 0 1 1 0 80 art_table 32 1760 99 1 0 1 1 0 80 art_heap4256 1750 98 7 0 7 7 0 80 art_heap8 4096101 1 0 1 1 0 80 pfosfpen 112 14280 71421 02121 0 80 pfosfp40 8460 423 5 0 5 5 0 80 rttmr 72 11001111 0 1 0 80 tcpcb544 201504 2 1 1 2 0 80 tcpqe 32 71949100 2559 2559 0 8 0 80 sackhl24 22200 158 158 0 1 0 80 syncache 264 39003838 0 1 0 80 rtentry 112 900 23 1 0 1 1 0 80 plcache 128 200 20 1 0 1 1 0 80 plimitpl 152 18970 16 1 0 1 1 0 80 inpcbpl 280235780 10 539 538 1 2 0 80 arp 56 6003 1 0 1 1 0 80 In use 29879K, total allocated 40592K; utilization 73.6% Thanks in advance! Best Regards Nan Xiao On Thu, Jul 5, 2018 at 2:24 AM, Philip Guenther wrote: > On Wed, Jul 4, 2018 at 12:57 AM Nan Xiao wrote: >> >> My OS is 6.3. I already use "pkg_add -u" to upgrade all installed >> packages. cmake and egdb are are installed by "pkg_add", not compiled >> by me. > > > You don't mention -release, or -stable, or -current, which is utterly > critical: 6.3-release and 6.3-stable are not guaranteed to run -current > packages, and ditto for even merely an older -current kernel+base vs fresh > -current packages. Your messages continue to lack these critical details, > which is why we tell everyone to *include your full dmesg output*. That > would have instantly answered what version you were running and how out of > date (or not) it is! > > >> >> "vmstat -m" gives some information: >> >> $ vmstat -m > > > ...but you trimmed out most of what would show failures or odd consumption > patterns. > > >> It seems kernel dynamic memory is run out, and devbuf and temp consume >> most of the space. > > > What I saw in the output doesn't indicate that. > > > Philip Guenther >
Re: "Cannot allocate memory" error when memory is enough
HI Philip, Thanks very much for your detailed explanation! My OS is 6.3. I already use "pkg_add -u" to upgrade all installed packages. cmake and egdb are are installed by "pkg_add", not compiled by me. "vmstat -m" gives some information: $ vmstat -m Memory statistics by bucket size Size In Use Free Requests HighWater Couldfree 16 752 283226592131280 3 32 482 1054 691465 640 99 64 622 41141023682 320 191519 128 4496560 27265523 1603596104 256 164364 107121 80 19059 512 387197 63372 40 18454 1024 1507 5 125086 20 0 2048 36 4 2193 10 0 4096 555 1 80673 5 0 8192 207 1450 5 0 16384 10 0 15 5 0 327689 0 29163 5 0 655369 0 21946371 5 0 2621443 0 3 5 0 5242882 0 2 5 0 .. Memory statistics by type Type Kern Type InUse MemUse HighUse Limit Requests Limit Limit Size(s) devbuf 2991 7220K 7220K 78644K 1463470 0 16,32,64,128,256,512,1024,2048,4096,8192,16384,32768,65536,262144,524288 .. dirhash 678 130K239K 78644K183870 0 16,32,64,128,256,512 .. ttys 408 1724K 1724K 78644K 4080 0 512,1024,4096,8192 .. VM swap 7 299K299K 78644K70 0 16,64,2048,262144 UVM amap 29512K441K 78644K 43028130 0 16,32,64,128,256,512 .. temp54 2082K 2211K 78644K 228087350 0 16,32,64,128,256,512,1024,2048,4096,8192,16384,32768,65536,524288 .. DRM 275 114K116K 78644K 14100 0 16,32,64,128,256,512,1024,2048,4096,16384 Memory Totals: In UseFreeRequests 12378K619K53994333 Memory resource pool statistics NameSize Requests FailInUse Pgreq Pgrel Npage Hiwat Minpg Maxpg Idle phpool 112849530 4236 125 1 124 124 0 80 extentpl 40 1260 48 1 0 1 1 0 80 pmappl 192662210 34 105 103 2 3 0 80 .. In use 34552K, total allocated 40384K; utilization 85.6% It seems kernel dynamic memory is run out, and devbuf and temp consume most of the space. Could you give some suggestions? Thanks very much in advance! Best Regards Nan Xiao On Wed, Jul 4, 2018 at 10:57 AM, Philip Guenther wrote: > On Tue, 3 Jul 2018, Philip Guenther wrote: > > > Flakey button on my mouse; time to clean it again and throw it out if it > keeps glitching. Sorry about that. > > >> On Tue, Jul 3, 2018 at 4:53 PM Nan Xiao wrote: >> > Thanks for your reply! The "ulimit -a" outputs following: >> > >> > $ ulimit -a >> > time(cpu-seconds)unlimited >> > file(blocks) unlimited >> > coredump(blocks) unlimited >> > data(kbytes) 33554432 >> > stack(kbytes)8192 >> > lockedmem(kbytes)1332328 >> > memory(kbytes) 3978716 >> > nofiles(descriptors) 128 >> > processes1310 >> > >> > It seems should be enough to launch cmake or egdb. > > But it wasn't and the kernel can only indicate that with a single error > code, so now you have to actually dig into what's going on. There are > many possibilities, as a search for ENOMEM in /usr/src/sys/kern/*exec*.c > will show. > 1) the ELF interpreter (normal ld.so) could be too large > 2) the PT_OPENBSD_RANDOMIZE segment could be larger than permitted by the >kernel > 3) program's text segment could exceed the maximum for the arch, MAXTSIZ > 4) the program's vnode couldn't be mmaped for some reason > 5) the argument list and environment were together too big for the stack > 6) the signal trampoline couldn't be mapped into the process VM > 7) other random memory allocation problems > > Of those, (1), (4), and (6) are *really* unlikely. (3) is possible if > you're building a debugging binary that's *huge* as a result. (5) would > result in _all_ programs failing in that shell. I think (7) would show up > in a close examination of the "vmstat -m" output. > > (2) is perhaps the most likely, as recent compiler changes have increased > the expected size of the PT_OPENBSD_RANDOMIZE segment and while the kernel > limit on that was also increased recently, you didn't provide any > information about your setup: are your kernel, userland, and ports all in > sync? > > > Philip Guenther
Re: "Cannot allocate memory" error when memory is enough
Hi Marc, Thanks for your reply! The "ulimit -a" outputs following: $ ulimit -a time(cpu-seconds)unlimited file(blocks) unlimited coredump(blocks) unlimited data(kbytes) 33554432 stack(kbytes)8192 lockedmem(kbytes)1332328 memory(kbytes) 3978716 nofiles(descriptors) 128 processes1310 It seems should be enough to launch cmake or egdb. Thanks! Best Regards Nan Xiao On Tue, Jul 3, 2018 at 9:37 PM, Marc Espie wrote: > On Tue, Jul 03, 2018 at 05:31:22PM +0800, Nan Xiao wrote: >> Hi all, >> >> Greeting from me! >> >> I am running OpenBSD 6.3, and don't know from when, loading some >> binary will prompt "Cannot allocate memory": >> >> $ egdb >> ksh: egdb: Cannot allocate memory >> >> $ cmake >> ksh: cmake: Cannot allocate memory >> >> But the memory seems enough: >> $top >> .. >> Memory: Real: 57M/1365M act/tot Free: 2546M Cache: 925M Swap: 0K/4103M >> .. >> >> I try to use "ktrace/kdump" tool, but can't find something special: >> .. >> 21881 ktrace NAMI "/usr/local/bin/egdb" >> 21881 ktrace RET execve -1 errno 12 Cannot allocate memory >> .. >> >> Could anyone give some clues? Thanks very much in advance! >> Best Regards >> Nan Xiao > > Check your limits. > > ulimit -a > > from the shell will tell you what's wrong. > > you might also need to brush up on login.conf and get your user into > a different class.
"Cannot allocate memory" error when memory is enough
Hi all, Greeting from me! I am running OpenBSD 6.3, and don't know from when, loading some binary will prompt "Cannot allocate memory": $ egdb ksh: egdb: Cannot allocate memory $ cmake ksh: cmake: Cannot allocate memory But the memory seems enough: $top .. Memory: Real: 57M/1365M act/tot Free: 2546M Cache: 925M Swap: 0K/4103M .. I try to use "ktrace/kdump" tool, but can't find something special: .. 21881 ktrace NAMI "/usr/local/bin/egdb" 21881 ktrace RET execve -1 errno 12 Cannot allocate memory .. Could anyone give some clues? Thanks very much in advance! Best Regards Nan Xiao
Re: The compiler error about modifying libcrypto
Hi Theo, Thanks for your kind reply! Best Regards Nan Xiao On Thu, May 31, 2018 at 7:24 PM, Theo Buehler wrote: > On Thu, May 31, 2018 at 10:50:35AM +0800, Nan Xiao wrote: >> My OS is OpenBSD 6.3. > > -current? > > If not, please install the latest snapshot before trying to build > -current from source. > > See also https://www.openbsd.org/faq/current.html > >> Since now the -current modify the interface of >> libcrypto, there is error in "make": >> .. >> ===> lib/libcrypto > > Don't do "make" from /usr/src. > > Please read https://man.openbsd.org/release.8 and follow at least > up through step 3. > > If you have things prepared as described in release(8) and you do > "make build", it will do "make includes" and install the current > headers, thus preventing the compilation failure you ran into.
The compiler error about modifying libcrypto
Hi misc@, Greeting from me! My OS is OpenBSD 6.3. Since now the -current modify the interface of libcrypto, there is error in "make": .. ===> lib/libcrypto cc -O2 -pipe -g -Wall -Wundef -Werror -DLIBRESSL_INTERNAL -DDSO_DLFCN -DHAVE_DLFCN_H -DHAVE_FUNOPEN -DOPENSSL_NO_HW_PADLOCK -I/usr/src/lib/libcrypto -I/usr/src/lib/libcrypto/asn1 -I/usr/src/lib/libcrypto/bn -I/usr/src/lib/libcrypto/evp -I/usr/src/lib/libcrypto/modes -I/usr/src/lib/libcrypto/obj -DAES_ASM -DBSAES_ASM -DVPAES_ASM -DOPENSSL_IA32_SSE2 -DRSA_ASM -DOPENSSL_BN_ASM_MONT -DOPENSSL_BN_ASM_MONT5 -DOPENSSL_BN_ASM_GF2m -DMD5_ASM -DGHASH_ASM -DRC4_MD5_ASM -DSHA1_ASM -DSHA256_ASM -DSHA512_ASM -DWHIRLPOOL_ASM -DOPENSSL_CPUID_OBJ -MD -MP -MD -MP -c /usr/src/lib/libcrypto/evp/p_lib.c -o p_lib.o /usr/src/lib/libcrypto/evp/p_lib.c:96:1: error: conflicting types for 'EVP_PKEY_size' EVP_PKEY_size(const EVP_PKEY *pkey) ^ /usr/include/openssl/evp.h:871:5: note: previous declaration is here int EVP_PKEY_size(EVP_PKEY *pkey); ^ 1 error generated. *** Error 1 in lib/libcrypto (:41 'p_lib.o': @cc -O2 -pipe -g -Wall -Wundef -Werror -DLIBRESSL_INTERNAL -DDSO_DLFCN -DHAVE_DLFCN...) *** Error 1 in lib (:48 'all') *** Error 1 in /usr/src (:48 'all') .. The compiler searches "/usr/include/openssl" first, so is there any method to let compiler uses "/usr/src/lib/libcrypto/evp" as first search path? Thanks in advance! Best Regards Nan Xiao
Re: Is -current snapshot only used in current system?
Hi Peter & Otto, Thanks very much for your response! My laptop is very old: Fujitsu LifeBook T5010 (https://www.pcmag.com/article2/0,2817,2352819,00.asp) . During booting, it shows: >>OpenBSD/amd64 BOOT 3.39 Then it flashes one line (I can't see that line clearly, and it should display load something), and the system will reboot again. The system will loop the above flow, reboot again and again. Now I doubt it is related to partition issue, but not sure. I divided the whole disk (MBR) into 2 partitions: >From offset 64, 4G swap, the left is mounted as '/'. This method at least works for OpenBSD 6.2. Thanks very much! Best Regards Nan Xiao On Wed, May 16, 2018 at 5:07 PM, Otto Moerbeek <o...@drijf.net> wrote: > On Wed, May 16, 2018 at 04:51:24PM +0800, Nan Xiao wrote: > >> Hi misc@, >> >> Greeting from me! >> >> Maybe a dumb question here. I want to use -current snapshot, and >> my current OBSD is 6.3. So I download the newest -current bsd.rd, >> and use it to upgrade. It prompts me the upgrade is success, but >> the system can't boot. So I think this method only applies to system >> is already -current, right? Because I can't find answer from >> https://www.openbsd.org/faq/current.html, just want to confirm it. >> >> Thanks very much in advance! >> >> Best Regards >> Nan Xiao > > The bsd.rd upgrade from release/stable to current should work in > general. But since you neglect to give any details what did not work, > we cannot tell what is going on. > > -Otto
Is -current snapshot only used in current system?
Hi misc@, Greeting from me! Maybe a dumb question here. I want to use -current snapshot, and my current OBSD is 6.3. So I download the newest -current bsd.rd, and use it to upgrade. It prompts me the upgrade is success, but the system can't boot. So I think this method only applies to system is already -current, right? Because I can't find answer from https://www.openbsd.org/faq/current.html, just want to confirm it. Thanks very much in advance! Best Regards Nan Xiao
Re: The vim display issue on OpenBSD
Hi all, I guess this issue (https://github.com/vim/vim/issues/2008) may be the cause. My vim version is 8.0.987. Best Regards Nan Xiao On Wed, Mar 14, 2018 at 9:24 AM, Nan Xiao <xiaonan830...@gmail.com> wrote: > Hi Stuart, > > Thanks for your reply! > > When I don't use SSH client, the vim display correct result. > > My OS is Windows, and my SSH client is Cygwin, it display 0. > > I try putty and MobaXterm, both display: > > 1q q > > > Except vim, vi display correct for all the SSH clients. So it seems > interesting. > Best Regards > Nan Xiao > > > On Tue, Mar 13, 2018 at 10:24 PM, Stuart Henderson <s...@spacehopper.org> > wrote: >> On 2018/03/13 21:59, Nan Xiao wrote: >>> Hi Stuart, >>> >>> No! It doesn't happen when run "env -i vim $filename". >>> >>> But check my environment: >>> >>> # env >>> _=/usr/bin/env >>> LOGNAME=root >>> HOME=/root >>> SSH_TTY=/dev/ttyp0 >>> LSCOLORS=fxexcxdxbxegedabagacad >>> SHELL=/bin/ksh >>> PS1=$USER:$PWD# >>> TERM=xterm >>> SSH_CONNECTION=10.217.243.14 63260 10.217.242.61 22 >>> LD_LIBRARY_PATH=/usr/local/lib >>> MAIL=/var/mail/root >>> SSH_CLIENT=10.217.243.14 63260 22 >>> PATH=/sbin:/usr/sbin:/bin:/usr/bin:/usr/X11R6/bin:/usr/local/sbin:/usr/local/bin:/usr/local/jre-1.8.0/bin >>> USER=root >>> >>> Don't know what causes the problem. >>> Best Regards >>> Nan Xiao >>> >>> >>> On Tue, Mar 13, 2018 at 6:39 PM, Stuart Henderson <s...@spacehopper.org> >>> wrote: >>> > On 2018-03-13, Nan Xiao <xiaonan830...@gmail.com> wrote: >>> >> Hi Ville, >>> >> >>> >> I don't have ~/.vimrc, only a ~/.viminfo, thanks! >>> > >>> > Perhaps something in your environment is causing a problem. >>> > >>> > Does it also happen if you run "env -i vim $filename"? >>> > >>> > >> >> The only thing that looks odd in there is the LD_LIBRARY_PATH setting >> though I don't see how that would be triggering this.. >> >> Other thing I'm wondering is what terminal it is. >> >> Perhaps running it under script(1) and examining ./typescript would >> give another clue. >> >>
Re: The vim display issue on OpenBSD
Hi Stuart, Thanks for your reply! When I don't use SSH client, the vim display correct result. My OS is Windows, and my SSH client is Cygwin, it display 0. I try putty and MobaXterm, both display: 1q q Except vim, vi display correct for all the SSH clients. So it seems interesting. Best Regards Nan Xiao On Tue, Mar 13, 2018 at 10:24 PM, Stuart Henderson <s...@spacehopper.org> wrote: > On 2018/03/13 21:59, Nan Xiao wrote: >> Hi Stuart, >> >> No! It doesn't happen when run "env -i vim $filename". >> >> But check my environment: >> >> # env >> _=/usr/bin/env >> LOGNAME=root >> HOME=/root >> SSH_TTY=/dev/ttyp0 >> LSCOLORS=fxexcxdxbxegedabagacad >> SHELL=/bin/ksh >> PS1=$USER:$PWD# >> TERM=xterm >> SSH_CONNECTION=10.217.243.14 63260 10.217.242.61 22 >> LD_LIBRARY_PATH=/usr/local/lib >> MAIL=/var/mail/root >> SSH_CLIENT=10.217.243.14 63260 22 >> PATH=/sbin:/usr/sbin:/bin:/usr/bin:/usr/X11R6/bin:/usr/local/sbin:/usr/local/bin:/usr/local/jre-1.8.0/bin >> USER=root >> >> Don't know what causes the problem. >> Best Regards >> Nan Xiao >> >> >> On Tue, Mar 13, 2018 at 6:39 PM, Stuart Henderson <s...@spacehopper.org> >> wrote: >> > On 2018-03-13, Nan Xiao <xiaonan830...@gmail.com> wrote: >> >> Hi Ville, >> >> >> >> I don't have ~/.vimrc, only a ~/.viminfo, thanks! >> > >> > Perhaps something in your environment is causing a problem. >> > >> > Does it also happen if you run "env -i vim $filename"? >> > >> > > > The only thing that looks odd in there is the LD_LIBRARY_PATH setting > though I don't see how that would be triggering this.. > > Other thing I'm wondering is what terminal it is. > > Perhaps running it under script(1) and examining ./typescript would > give another clue. > >
Re: The vim display issue on OpenBSD
Hi Stuart, No! It doesn't happen when run "env -i vim $filename". But check my environment: # env _=/usr/bin/env LOGNAME=root HOME=/root SSH_TTY=/dev/ttyp0 LSCOLORS=fxexcxdxbxegedabagacad SHELL=/bin/ksh PS1=$USER:$PWD# TERM=xterm SSH_CONNECTION=10.217.243.14 63260 10.217.242.61 22 LD_LIBRARY_PATH=/usr/local/lib MAIL=/var/mail/root SSH_CLIENT=10.217.243.14 63260 22 PATH=/sbin:/usr/sbin:/bin:/usr/bin:/usr/X11R6/bin:/usr/local/sbin:/usr/local/bin:/usr/local/jre-1.8.0/bin USER=root Don't know what causes the problem. Best Regards Nan Xiao On Tue, Mar 13, 2018 at 6:39 PM, Stuart Henderson <s...@spacehopper.org> wrote: > On 2018-03-13, Nan Xiao <xiaonan830...@gmail.com> wrote: >> Hi Ville, >> >> I don't have ~/.vimrc, only a ~/.viminfo, thanks! > > Perhaps something in your environment is causing a problem. > > Does it also happen if you run "env -i vim $filename"? > >
Re: The vim display issue on OpenBSD
Hi Ville, I don't have ~/.vimrc, only a ~/.viminfo, thanks! Best Regards Nan Xiao On Tue, Mar 13, 2018 at 1:47 PM, Ville Valkonen <weezeld...@gmail.com> wrote: > Hi, > > can you please show your ~/.vimrc? > > Thanks, > Ville > > On Tue, 13 Mar 2018 at 4.52, Nan Xiao <xiaonan830...@gmail.com> wrote: >> >> I tried other options, but still the same problem ... >> Best Regards >> Nan Xiao >> >> >> On Tue, Mar 13, 2018 at 12:51 AM, jungle Boogie <jungleboog...@gmail.com> >> wrote: >> > On 11 March 2018 at 18:18, Nan Xiao <xiaonan830...@gmail.com> wrote: >> >> Hi all, >> >> >> >> Update: >> >> >> >> I try to install vim-8.0.0987p0-no_x11, still the same problem, thanks! >> > >> > I am using vim-8.0.1589-no_x11-python3 without any issues on openBSD >> > snapshot from this morning. >> > >> >> Best Regards >> >> Nan Xiao >> >> >> >
Re: The vim display issue on OpenBSD
I tried other options, but still the same problem ... Best Regards Nan Xiao On Tue, Mar 13, 2018 at 12:51 AM, jungle Boogie <jungleboog...@gmail.com> wrote: > On 11 March 2018 at 18:18, Nan Xiao <xiaonan830...@gmail.com> wrote: >> Hi all, >> >> Update: >> >> I try to install vim-8.0.0987p0-no_x11, still the same problem, thanks! > > I am using vim-8.0.1589-no_x11-python3 without any issues on openBSD > snapshot from this morning. > >> Best Regards >> Nan Xiao >>
The sysctl(3) is changed to sysctl(2)?
Hi all, Greetings from me! I find sysctl(3) in OpenBSD 6.2 is changed to system call in -current (please refer the manual: https://man.openbsd.org/sysctl.2). So the sysctl would be a system call instead of library function in future OpenBSD? Thanks in advance! Best Regards Nan Xiao
Re: The vim display issue on OpenBSD
Hi all, Update: I try to install vim-8.0.0987p0-no_x11, still the same problem, thanks! Best Regards Nan Xiao On Mon, Mar 12, 2018 at 9:14 AM, Nan Xiao <xiaonan830...@gmail.com> wrote: > Hi all, > > Thanks for all your kind response! > > I reinstall vim: > > # pkg_add vim > quirks-2.367 signed on 2017-10-03T11:21:28Z > Ambiguous: choose package for vim > a 0: > 1: vim-8.0.0987p0-gtk2 > 2: vim-8.0.0987p0-gtk2-lua > 3: vim-8.0.0987p0-gtk2-perl-python-ruby > 4: vim-8.0.0987p0-gtk2-perl-python3-ruby > 5: vim-8.0.0987p0-no_x11 > 6: vim-8.0.0987p0-no_x11-lua > 7: vim-8.0.0987p0-no_x11-perl-python-ruby > 8: vim-8.0.0987p0-no_x11-perl-python3-ruby > 9: vim-8.0.0987p0-no_x11-ruby > Your choice: 1 > vim-8.0.0987p0-gtk2: ok > > I selected vim-8.0.0987p0-gtk2, and the error occurs. > > Since I use terminal, I shouldn't install vim-8.0.0987p0-gtk2? > > Thanks in advance! > Best Regards > Nan Xiao > > > On Sat, Mar 10, 2018 at 1:20 AM, Andreas Kusalananda Kähäri > <andreas.kah...@icm.uu.se> wrote: >> On Fri, Mar 09, 2018 at 03:19:32PM +0800, Nan Xiao wrote: >>> Hi all, >>> >>> Greetings from me! >>> >>> I meet a weird issue: there is a file which contains only "1": >>> >>> # cat a >>> 1 >>> >>> While use vim to open it, it displays "0". I find the number behind >>> cursor will decrease 1. >>> >>> Does anyone bump into this issue? Thanks very much in advance! >>> >>> P.S., my OpenBSD is 6.2 release, and vim is 8.0.1476. >>> >>> Best Regards >>> Nan Xiao >>> >> >> Vim will decrement the value under the cursor if you press Ctrl+X (and >> increment it with Ctrl+A). >> >> Are you pressing Ctrl+X, or is something sending this to your Vim >> session upon starting Vim? Is there something in your .vimrc file that >> causes the equivalent of pressing Ctrl+X to be applied on startup? >> >> >> >> -- >> Andreas Kusalananda Kähäri, >> National Bioinformatics Infrastructure Sweden (NBIS), >> Uppsala University, Sweden.
Re: The vim display issue on OpenBSD
Hi all, Thanks for all your kind response! I reinstall vim: # pkg_add vim quirks-2.367 signed on 2017-10-03T11:21:28Z Ambiguous: choose package for vim a 0: 1: vim-8.0.0987p0-gtk2 2: vim-8.0.0987p0-gtk2-lua 3: vim-8.0.0987p0-gtk2-perl-python-ruby 4: vim-8.0.0987p0-gtk2-perl-python3-ruby 5: vim-8.0.0987p0-no_x11 6: vim-8.0.0987p0-no_x11-lua 7: vim-8.0.0987p0-no_x11-perl-python-ruby 8: vim-8.0.0987p0-no_x11-perl-python3-ruby 9: vim-8.0.0987p0-no_x11-ruby Your choice: 1 vim-8.0.0987p0-gtk2: ok I selected vim-8.0.0987p0-gtk2, and the error occurs. Since I use terminal, I shouldn't install vim-8.0.0987p0-gtk2? Thanks in advance! Best Regards Nan Xiao On Sat, Mar 10, 2018 at 1:20 AM, Andreas Kusalananda Kähäri <andreas.kah...@icm.uu.se> wrote: > On Fri, Mar 09, 2018 at 03:19:32PM +0800, Nan Xiao wrote: >> Hi all, >> >> Greetings from me! >> >> I meet a weird issue: there is a file which contains only "1": >> >> # cat a >> 1 >> >> While use vim to open it, it displays "0". I find the number behind >> cursor will decrease 1. >> >> Does anyone bump into this issue? Thanks very much in advance! >> >> P.S., my OpenBSD is 6.2 release, and vim is 8.0.1476. >> >> Best Regards >> Nan Xiao >> > > Vim will decrement the value under the cursor if you press Ctrl+X (and > increment it with Ctrl+A). > > Are you pressing Ctrl+X, or is something sending this to your Vim > session upon starting Vim? Is there something in your .vimrc file that > causes the equivalent of pressing Ctrl+X to be applied on startup? > > > > -- > Andreas Kusalananda Kähäri, > National Bioinformatics Infrastructure Sweden (NBIS), > Uppsala University, Sweden.
Re: The vim display issue on OpenBSD
Hi Stuart, I am very sorry, and the VIM's version is 8.0.987. I reported wrong version from other machine. I should installed it from ports. Thanks! Best Regards Nan Xiao On Fri, Mar 9, 2018 at 9:37 PM, Stuart Henderson <s...@spacehopper.org> wrote: > No ideas then, sorry. > > Maybe try it from ports/packages instead in case there's anything > funny with your build? (I know that's not a standard ports one > because we didn't have 8.0.1476). > > > On 2018/03/09 21:32, Nan Xiao wrote: >> Hi Stuart, >> >> hexdump doesn't show anything exceptionally: >> # hexdump -C a >> 31 0a |1.| >> 0002 >> >> I don't have .vimrc, just a .viminfo and .vim directory: >> >> # ls -alth .vim* >> -rw--- 1 root wheel 725B Mar 9 21:27 .viminfo >> >> .vim: >> total 24 >> drwx-- 7 root wheel 1.0K Mar 9 21:28 .. >> drwxr-xr-x 2 root wheel 512B Aug 29 2017 . >> -rw-r--r-- 1 root wheel93B Aug 29 2017 .netrwhist >> >> Thanks! >> Best Regards >> Nan Xiao >> >> >> On Fri, Mar 9, 2018 at 6:43 PM, Stuart Henderson <s...@spacehopper.org> >> wrote: >> > On 2018-03-09, Nan Xiao <xiaonan830...@gmail.com> wrote: >> >> Hi all, >> >> >> >> Greetings from me! >> >> >> >> I meet a weird issue: there is a file which contains only "1": >> >> >> >> # cat a >> >> 1 >> >> >> >> While use vim to open it, it displays "0". I find the number behind >> >> cursor will decrease 1. >> >> >> >> Does anyone bump into this issue? Thanks very much in advance! >> >> >> >> P.S., my OpenBSD is 6.2 release, and vim is 8.0.1476. >> >> >> >> Best Regards >> >> Nan Xiao >> >> >> >> >> > >> > I don't see it here. Are you sure there's nothing strange in the file? >> > >> > hexdump -C a >> > >> > Do you have a .vimrc? If so, does it still happen if you move it out the >> > way? >> > >> >
Re: The vim display issue on OpenBSD
Hi Stuart, hexdump doesn't show anything exceptionally: # hexdump -C a 31 0a |1.| 0002 I don't have .vimrc, just a .viminfo and .vim directory: # ls -alth .vim* -rw--- 1 root wheel 725B Mar 9 21:27 .viminfo .vim: total 24 drwx-- 7 root wheel 1.0K Mar 9 21:28 .. drwxr-xr-x 2 root wheel 512B Aug 29 2017 . -rw-r--r-- 1 root wheel93B Aug 29 2017 .netrwhist Thanks! Best Regards Nan Xiao On Fri, Mar 9, 2018 at 6:43 PM, Stuart Henderson <s...@spacehopper.org> wrote: > On 2018-03-09, Nan Xiao <xiaonan830...@gmail.com> wrote: >> Hi all, >> >> Greetings from me! >> >> I meet a weird issue: there is a file which contains only "1": >> >> # cat a >> 1 >> >> While use vim to open it, it displays "0". I find the number behind >> cursor will decrease 1. >> >> Does anyone bump into this issue? Thanks very much in advance! >> >> P.S., my OpenBSD is 6.2 release, and vim is 8.0.1476. >> >> Best Regards >> Nan Xiao >> >> > > I don't see it here. Are you sure there's nothing strange in the file? > > hexdump -C a > > Do you have a .vimrc? If so, does it still happen if you move it out the way? > >
The vim display issue on OpenBSD
Hi all, Greetings from me! I meet a weird issue: there is a file which contains only "1": # cat a 1 While use vim to open it, it displays "0". I find the number behind cursor will decrease 1. Does anyone bump into this issue? Thanks very much in advance! P.S., my OpenBSD is 6.2 release, and vim is 8.0.1476. Best Regards Nan Xiao
Linking gdb errors when compiling -current src tree
Hi misc@, Greetings from me! I am trying to follow this link (https://man.openbsd.org/release#3._Build_a_new_base_system) to build base system of -current src tree. But unfortunately, I come across following error in linking gdb: cc -O2 -pipe -DPIE_DEFAULT=1 -o gdb gdb.o libgdb.a ../bfd/libbfd.a -lreadline ../opcodes/libopcodes.a -liberty -lncurses -lm -liberty -lkvm libgdb.a(main.o): In function `captured_main': /usr/src/gnu/usr.bin/binutils/gdb/main.c:(.text+0x7e6): warning: warning: strcpy() is almost always misused, please use strlcpy() /usr/src/gnu/usr.bin/binutils/gdb/main.c:(.text+0x7ff): warning: warning: strcat() is almost always misused, please use strlcat() libgdb.a(target.o): In function `normal_pid_to_str': /usr/src/gnu/usr.bin/binutils/gdb/target.c:(.text+0x3047): warning: warning: sprintf() is often misused, please use snprintf() libgdb.a(main.o): In function `captured_main': /usr/src/gnu/usr.bin/binutils/gdb/main.c:(.text+0xa4): undefined reference to `bindtextdomain' /usr/src/gnu/usr.bin/binutils/gdb/main.c:(.text+0xac): undefined reference to `textdomain' /usr/src/gnu/usr.bin/binutils/gdb/main.c:(.text+0x4b7): undefined reference to `dcgettext' /usr/src/gnu/usr.bin/binutils/gdb/main.c:(.text+0x606): undefined reference to `dcgettext' /usr/src/gnu/usr.bin/binutils/gdb/main.c:(.text+0x78d): undefined reference to `dcgettext' /usr/src/gnu/usr.bin/binutils/gdb/main.c:(.text+0x9b9): undefined reference to `dcgettext' /usr/src/gnu/usr.bin/binutils/gdb/main.c:(.text+0xa60): undefined reference to `dcgettext' libgdb.a(main.o):/usr/src/gnu/usr.bin/binutils/gdb/main.c:(.text+0xb46): more undefined references to `dcgettext' follow cc: error: linker command failed with exit code 1 (use -v to see invocation) *** Error 1 in gnu/usr.bin/binutils/obj/gdb (Makefile:1176 'gdb') *** Error 1 in gnu/usr.bin/binutils/obj (Makefile:21479 'all-gdb') *** Error 1 in gnu/usr.bin/binutils (Makefile.bsd-wrapper:46 'all') *** Error 1 in gnu/usr.bin (:48 'all') *** Error 1 in gnu (:48 'all') *** Error 1 in . (:48 'all') *** Error 1 in . (Makefile:95 'do-build') *** Error 1 in /usr/src (Makefile:74 'build') Could anyone give some clues about this issue? Thanks very much in advance! Best Regards Nan Xiao
Re: The difference between binutils and binutils-2.17?
Hi Philip, Got it! Thanks very much for your response! Best Regards Nan Xiao On Thu, Oct 12, 2017 at 3:22 PM, Philip Guenther <guent...@gmail.com> wrote: > On Thu, Oct 12, 2017 at 12:14 AM, Nan Xiao <xiaonan830...@gmail.com> wrote: >> >> Maybe a stupid question, as you have mentioned, >> "so the in-tree gdb is rapidly declining in utility already.", and >> egdb seems a better gdb, why does OpenBSD still keep old in-tree gdb >> rather than replacing it will new egdb? > > > I mentioned "GPLv2" multiple times in my previous post: the project does not > accept GPLv3 software in base. > > This is the same reason why we do not include a newer version of binutils, > nor a newer version of gcc, so it should not be a surprise. > > > Philip Guenther >
Re: The difference between binutils and binutils-2.17?
Hi Philip, Thanks for your detailed explanation! Maybe a stupid question, as you have mentioned, "so the in-tree gdb is rapidly declining in utility already.", and egdb seems a better gdb, why does OpenBSD still keep old in-tree gdb rather than replacing it will new egdb? Thanks in advance! Best Regards Nan Xiao On Thu, Oct 12, 2017 at 1:45 PM, Philip Guenther <guent...@gmail.com> wrote: > On Wed, Oct 11, 2017 at 5:55 PM, Nan Xiao <xiaonan830...@gmail.com> wrote: >> >> I find there are binutils and binutils-2.17 in gnu/usr.bin/ dirctory >> of OpenBSD source code. What's the difference between them? When I use >> binutils command, such as "ar", it comes from binutils or >> binutils-2.17? > > > If you examine the output from building OpenBSD you'll see that the only > files installed from the gnu/usr.bin/binutils directory (which is binutils > version 2.15) are gdb and its documentation. That same build output will > show that gas, GNU ld, strings, objdump, readelf, and the other 'binary > utilities' are installed from the gnu/usr.bin/binutils-2.17 directory. > > > If someone made gdb (a GPLv2 licensed version) build against binutils-2.17 > and submitted a diff to do so in tree and thus eliminate the need for the > old 2.15 binutils directory, that would be a moderately useful chunk of > work. I saw "moderately" because the old GPLv2 versions of gdb don't > understand newer versions of DWARF debugging information generated by clang > and new gcc's, so the in-tree gdb is rapidly declining in utility already. > Such a project, however, may be a good project for understanding tool chain, > ELF, and build issue. Not an easy task, but even if the attempt fails > whoever tries will almost certainly learn in proportion to their tenacity in > the attempt. > > On the other hand, you really need to have access to most of the archs on > which OpenBSD builds in order to test the change. An examination of the cvs > logs for the gdb bits may be a first step to seeing what didn't work the > last time someone (probably miod) tried to do that. > > > Philip Guenther >
The difference between binutils and binutils-2.17?
Hi misc@, Greetings from me! I find there are binutils and binutils-2.17 in gnu/usr.bin/ dirctory of OpenBSD source code. What's the difference between them? When I use binutils command, such as "ar", it comes from binutils or binutils-2.17? Thanks in advance! Best Regards Nan Xiao
Is there git-flow-completion for ksh?
Hi misc@, I know there is git-flow-completion for bash. For default ksh on OpenBSD, is there any out-of-box git-flow-completion? I try to google, but can't find it. Thanks very much in advance! Best Regards Nan Xiao
What is the correct debugger used for debugging program built with clang++?
Hi misc@, The default "c++" compiler shipped with OpenBSD doesn't support "C++11", so I use "clang++" to build program which use Standard C++ Thread Library: # cat hello.cpp #include #include void hello() { std::cout << "Hello World!\n"; } int main(void) { std::thread t(hello); t.join(); return 0; } # clang++ -g -pthread -std=c++11 hello.cpp It seems OpenBSD doesn't support lldb, so I need to use gdb to debug program: # gdb -q a.out (gdb) start Die: DW_TAG_ (abbrev = 91, offset = 10917) has children: FALSE attributes: DW_AT_type (DW_FORM_ref4) constant ref: 155 (adjusted) Dwarf Error: Cannot find type of die [in module /root/Project/a.out] Hello World! Program exited normally. Current language: auto; currently c (gdb) It seems gdb doesn't support well in debugging program compiled with clang++. So is there any method or debugger used for debuggin programs built with clang++? Thanks very much in advance! Best Regards Nan Xiao
The dlopen manual lacks RTLD_TRACE info
Hi misc@, I find the ldd program actually uses "RTLD_TRACE" when calling "dlopen": dlhandle = dlopen(buf, RTLD_TRACE); While the manual (https://man.openbsd.org/dlopen.3) seems doesn't provide introduction of RTLD_TRACE. Should OpenBSD manual add RTLD_TRACE info? Thanks in advance! Best Regards Nan Xiao
Why the executable file type is also "DYN", not "EXEC"?
Hi all, I find the type of executable file format on OpenBSD is "DYN", not "EXEC": # readelf -h /usr/bin/ldd ELF Header: Magic: 7f 45 4c 46 02 01 01 00 00 00 00 00 00 00 00 00 Class: ELF64 Data: 2's complement, little endian Version: 1 (current) OS/ABI:UNIX - System V ABI Version: 0 Type: DYN (Shared object file) .. Is there any special consideration for it? Thanks very much in advance! Best Regards Nan Xiao
Re: Open /dev/mem file failed when running as a root priviledge
Hi trondd, Thanks for your answer! I try to use "sysctl" command to modify "kern.allowkmem"'s value: # sysctl kern.allowkmem=1 sysctl: kern.allowkmem: Operation not permitted Since it doesn't work. So I create a "/etc/sysctl.conf" and add follwing value: kern.allowkmem=1 After referring the manuals of sysctl(https://man.openbsd.org/sysctl.8) and sysctl.conf(https://man.openbsd.org/sysctl.conf.5), I can't find how to reload the sysctl.conf, so I have no choine but to reboot it and it takes effect. So the only method of reloading sysctl.conf is just reboot? Sorry for my further question. Thank very much in advance! Best Regards Nan Xiao Best Regards Nan Xiao On Tue, Sep 12, 2017 at 9:19 AM, trondd <tro...@kagu-tsuchi.com> wrote: > On Mon, September 11, 2017 8:58 pm, Nan Xiao wrote: >> Hi all, >> >> Greetings from me! >> >> I want to run dmidecode (https://github.com/mirror/dmidecode) on OpenBSD >> 6.1, but executing it will report following errors: >> >> # ./dmidecode >> # dmidecode 3.1 >> Scanning /dev/mem for entry point. >> /dev/mem: Operation not permitted >> >> After single-step debugging, I find the error is from open /dev/mem: >> >> if ((fd = open(filename, O_RDONLY)) == -1) >> { >> if (errno != ENOENT) >> perror(filename); >> return NULL; >> } >> >> I execute program as a root, and the attributes of `/dev/mem`: >> >> # ls -lt /dev/mem >> crw-r- 1 root kmem2, 0 Aug 25 18:38 /dev/mem >> >> So it should open successfully. Could anyone give some clues of this >> issue? >> >> Thanks very much in advance! >> >> Best Regards >> Nan Xiao >> > > /dev/mem and /dev/kmem were locked down. > > https://marc.info/?l=openbsd-cvs=147481705211536=2 > > I can't recall if it's been further closed since last year. >
Open /dev/mem file failed when running as a root priviledge
Hi all, Greetings from me! I want to run dmidecode (https://github.com/mirror/dmidecode) on OpenBSD 6.1, but executing it will report following errors: # ./dmidecode # dmidecode 3.1 Scanning /dev/mem for entry point. /dev/mem: Operation not permitted After single-step debugging, I find the error is from open /dev/mem: if ((fd = open(filename, O_RDONLY)) == -1) { if (errno != ENOENT) perror(filename); return NULL; } I execute program as a root, and the attributes of `/dev/mem`: # ls -lt /dev/mem crw-r- 1 root kmem2, 0 Aug 25 18:38 /dev/mem So it should open successfully. Could anyone give some clues of this issue? Thanks very much in advance! Best Regards Nan Xiao
Re: Set date during OpenBSD installation
Hi Moss, Thanks for your response! Hi Florian, You are right! "Hardware clock in UTC time" fix it, thanks very much! Best Regards Nan Xiao On Sat, Aug 19, 2017 at 12:23 PM, Nan Xiao <xiaonan830...@gmail.com> wrote: > Hi all, > > Greetings from me! I am a newbie of OpenBSD, and come across > a confusion of setting date during installation: > > I install OpenBSD on VirtualBox and host machine is ArchLinux. > During setup, it prompts me: > >> What timezone are you in? ('?' for list) [Asia/Singapore] > Since my host machine is indeed located in Singapore, and I press > Enter. > > Before finish of installation, it prompts me: > >> Time appears wrong. Set to 'Sat Aug 19 11:56:42 +08 2017'? [yes] > My host machine time is actually "Sat Aug 19 11:56:42 +08 2017", so I > press Enter. > > After installation, I use "date" command to check time: > > #date > Sat Aug 19 03:57:14 GMT 2017 > > The time is correct. But after reboot. The time changes: > > #date > Sat Aug 19 20:01:00 +8 2017 > #date > Sat Aug 19 12:01:05 UTC 2017 > > It seems that after rebooting, the OS considers current UTC+8 time as > the UTC time, and add another 8 hours. I can't figure out what is the > problem during installation, and can't find similar issue in archives > of mailing list. > > Could anyone give some tips? Thanks very much in advance! > > Best Regards > Nan Xiao
Set date during OpenBSD installation
Hi all, Greetings from me! I am a newbie of OpenBSD, and come across a confusion of setting date during installation: I install OpenBSD on VirtualBox and host machine is ArchLinux. During setup, it prompts me: > What timezone are you in? ('?' for list) [Asia/Singapore] Since my host machine is indeed located in Singapore, and I press Enter. Before finish of installation, it prompts me: > Time appears wrong. Set to 'Sat Aug 19 11:56:42 +08 2017'? [yes] My host machine time is actually "Sat Aug 19 11:56:42 +08 2017", so I press Enter. After installation, I use "date" command to check time: #date Sat Aug 19 03:57:14 GMT 2017 The time is correct. But after reboot. The time changes: #date Sat Aug 19 20:01:00 +8 2017 #date Sat Aug 19 12:01:05 UTC 2017 It seems that after rebooting, the OS considers current UTC+8 time as the UTC time, and add another 8 hours. I can't figure out what is the problem during installation, and can't find similar issue in archives of mailing list. Could anyone give some tips? Thanks very much in advance! Best Regards Nan Xiao