Re: r340343 triggers kernel assertion if file is opened with O_BENEATH flag set through symlink
On Wed, Nov 28, 2018 at 01:46:17AM +0200, Konstantin Belousov wrote: > On Wed, Nov 28, 2018 at 12:54:21AM +0300, Vladimir Kondratyev wrote: > > Following test case triggers assertion after r340343: > > > > > > #include > > > > int > > main(int argc, char **argv) > > { > > openat(open("/etc", O_RDONLY), "termcap", O_RDONLY | O_BENEATH); > > } > > > > It results in: > > > > panic: Assertion (ndp->ni_lcf & NI_LCF_LATCH) != 0 failed at > > /usr/src/sys/kern/vfs_lookup.c:182 > > > > The following should fix it. Problem was that the topping directory was > only latched when the initial path was absolute. Since your example > switched from the relative argument to the absolute symlink, the BENEATH > tracker rightfully complained that there were no recorded top. > > I also added some asserts I used during the debugging. > > diff --git a/sys/kern/vfs_lookup.c b/sys/kern/vfs_lookup.c > index 78893c4f2bd..7a80775d91d 100644 > --- a/sys/kern/vfs_lookup.c With this patch I got a: $ ./beneath.sh open("a/b") succeeded stat("a/b panic: Assertion (ndp->ni_lcf & NI_LCF_LATCH) != 0 failed at ../../../kern/vfs_lookup.c:269 cpuid = 4 time = 1543397647 KDB: stack backtrace: db_trace_self_wrapper() at db_trace_self_wrapper+0x2b/frame 0xfe00c71881a0 vpanic() at vpanic+0x1a3/frame 0xfe00c7188200 panic() at panic+0x43/frame 0xfe00c7188260 namei_handle_root() at namei_handle_root+0xf7/frame 0xfe00c71882b0 namei() at namei+0x617/frame 0xfe00c71884f0 vn_open_cred() at vn_open_cred+0x526/frame 0xfe00c7188640 vn_open() at vn_open+0x4c/frame 0xfe00c7188680 kern_openat() at kern_openat+0x2e9/frame 0xfe00c71888e0 sys_openat() at sys_openat+0x69/frame 0xfe00c7188910 syscallenter() at syscallenter+0x4e3/frame 0xfe00c71889f0 amd64_syscall() at amd64_syscall+0x4d/frame 0xfe00c7188ab0 fast_syscall_common() at fast_syscall_common+0x101/frame 0xfe00c7188ab0 --- syscall (499, FreeBSD ELF64, sys_openat), rip = 0x8003a215a, rsp = 0x7fffe4f8, rbp = 0x7fffe5e0 --- https://people.freebsd.org/~pho/stress/log/kostik1127.txt - Peter ___ freebsd-current@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"
Fujitsu Lifebook E751 (iGPU: HM65): distorted console with UEFI boot
-BEGIN PGP SIGNED MESSAGE- Hash: SHA512 I ran into some trouble booting off a Fujitsu Lifebook E751 (firmware is latest, r1.22 from 2013). The E751 is of model series S26391-K326-V100 and equipted with a Core i5-2520M CPU and supposed to be also equipted with a iGPU HM65 according to the techniscal specifications from Fujitsu. Trying to boot off 12-PRERELEASE/12-RC2 and/or 13-CURRENT (most recent I could grap from the download page), the screen becomes distorted immediately after the kernel has loaded and initialised/booted. The screen is at the loader's all right so far. Trying to disable graphics mode via escaping to the loader's prompt and setting set hw.vga.textmode=1 subsequently loading the kernel and then booting, doesn't help. The screen is distorted again. The notebook seems UEFI only and doesn't boot off from MBR partioned devices (i.e. NanoBSD I used to use). Loading /boot/kernel/i915kms.ko after manually having loaded /boot/kernel/kernel (and not booted yet) doesn't change anything either. Booting off and installing Linux (Ubuntu, Mint so far, most revent verions I can get my hands on) is no problem. The console works fine from the beginning and so the graphics. Is there a chance to get a FreeBSD booting the easy way? The provided boot images do not contain any of the graphics/drm-stable|next|legacy-kmod stuff, I tried to load i915kms.ko off from /boot/modules/ (were those modules from the ports are supposed to reside) but no chance. Before starting investigating this issue further I'd like to ask wether there is a general support provided or is that type of notebook dead matter for FreeBSD of the modern kind? Thanks in advance, oh p.s. please CC me, I'm not subscribing all lists. - -- O. Hartmann -BEGIN PGP SIGNATURE- iLUEARMKAB0WIQQZVZMzAtwC2T/86TrS528fyFhYlAUCW/5lKgAKCRDS528fyFhY lMhRAf4yv4MqmHYVZIKo+TE1VACuHpXSv8ad4JzVKMG/S9uGcLLDfLgSM9699FDP /QhIMCCHJ1hGAtXACdwGCsyZ5LmiAf93JHFU0W+GJWdXJI+sRcWvEZrzQlb5Czhf vaM5QZ+3n0ermbe5/Ibvo/yzhL5YyonG7/lEqvnf7GAA+snv+Dvg =XD7b -END PGP SIGNATURE- ___ freebsd-current@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"
/usr/doc: can not build documentation: parser error : Failure to process entity chap.mirrors.ftp.index.inc
Last time I built the documentation was 2017. Since then my attempts to build the /usr/doc failed. Just retrieving the recent /usr/doc via svn (r52522), reinstalling textproc/docproj via portmaster -df (recursively to ensure nothing is missing), ends up in errors. One of the prominent error after performing a make distclean clean in /usr/doc is the error shown below. What is wrong here? [...] env \ XML_CATALOG_FILES="file:///usr/obj/usr/doc/en_US.ISO8859-1/books/handbook/catalog-cwd.xml file:///usr/doc/en_US.ISO8859-1/share/xml/catalog.xml file:///usr/doc/share/xml/catalog.xml file:///usr/local/share/xml/catalog" /usr/local/bin/xmllint --nonet --noent --valid --dropdtd --xinclude /usr/doc/en_US.ISO8859-1/books/handbook/book.xml > book.parsed.xml.tmp warning: failed to load external entity "/usr/doc/en_US.ISO8859-1/books/handbook/mirrors.xml.ftp.index.inc" /usr/doc/en_US.ISO8859-1/books/handbook/mirrors/chapter.xml:100: parser error : Failure to process entity chap.mirrors.ftp.index.inc ^ /usr/doc/en_US.ISO8859-1/books/handbook/mirrors/chapter.xml:100: parser error : Entity 'chap.mirrors.ftp.index.inc' not defined ___ freebsd-current@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"
Re: Fujitsu Lifebook E751 (iGPU: HM65): distorted console with UEFI boot
Note about hw.vga.textmode: this tunable has no meaning for UEFI - first of all, there is no API to change to VGA text mode in UEFI, secondly, there may or may not be VGA (firmware) at all. We only do land in kernel with linear framebuffer mode active and all we have is information about that mode (FB address, size and color bits). In *worst* case, it is actually even possible that we only have UEFI API for boot loader and no linear framebuffer for kernel. distorted console after kernel start means that either the kernel efifb driver does something wrong, or the console device gfx mode change did happen but the FB driver was not properly informed about the fact. rgds, toomas > On 28 Nov 2018, at 11:51, O. Hartmann wrote: > > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA512 > > I ran into some trouble booting off a Fujitsu Lifebook E751 (firmware is > latest, r1.22 > from 2013). The E751 is of model series S26391-K326-V100 and equipted with a > Core > i5-2520M CPU and supposed to be also equipted with a iGPU HM65 according to > the > techniscal specifications from Fujitsu. > > Trying to boot off 12-PRERELEASE/12-RC2 and/or 13-CURRENT (most recent I > could grap from > the download page), the screen becomes distorted immediately after the kernel > has > loaded and initialised/booted. The screen is at the loader's all right so far. > > Trying to disable graphics mode via escaping to the loader's prompt and > setting > > set hw.vga.textmode=1 > > subsequently loading the kernel and then booting, doesn't help. The screen is > distorted > again. The notebook seems UEFI only and doesn't boot off from MBR partioned > devices (i.e. > NanoBSD I used to use). > > Loading /boot/kernel/i915kms.ko > > after manually having loaded /boot/kernel/kernel (and not booted yet) doesn't > change > anything either. > > Booting off and installing Linux (Ubuntu, Mint so far, most revent verions I > can get my > hands on) is no problem. The console works fine from the beginning and so the > graphics. > > Is there a chance to get a FreeBSD booting the easy way? > > The provided boot images do not contain any of the > graphics/drm-stable|next|legacy-kmod > stuff, I tried to load i915kms.ko off from /boot/modules/ (were those modules > from the > ports are supposed to reside) but no chance. > > Before starting investigating this issue further I'd like to ask wether there > is a > general support provided or is that type of notebook dead matter for FreeBSD > of the > modern kind? > > Thanks in advance, > > oh > > p.s. please CC me, I'm not subscribing all lists. > > - -- > O. Hartmann > -BEGIN PGP SIGNATURE- > > iLUEARMKAB0WIQQZVZMzAtwC2T/86TrS528fyFhYlAUCW/5lKgAKCRDS528fyFhY > lMhRAf4yv4MqmHYVZIKo+TE1VACuHpXSv8ad4JzVKMG/S9uGcLLDfLgSM9699FDP > /QhIMCCHJ1hGAtXACdwGCsyZ5LmiAf93JHFU0W+GJWdXJI+sRcWvEZrzQlb5Czhf > vaM5QZ+3n0ermbe5/Ibvo/yzhL5YyonG7/lEqvnf7GAA+snv+Dvg > =XD7b > -END PGP SIGNATURE- > ___ > freebsd-current@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/freebsd-current > To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org" ___ freebsd-current@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"
Re: Fujitsu Lifebook E751 (iGPU: HM65): distorted console with UEFI boot
Hi, On Wed, 28 Nov 2018 10:51:11 +0100 "O. Hartmann" wrote: > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA512 > > I ran into some trouble booting off a Fujitsu Lifebook E751 (firmware is > latest, r1.22 > from 2013). The E751 is of model series S26391-K326-V100 and equipted with a > Core > i5-2520M CPU and supposed to be also equipted with a iGPU HM65 according to > the > techniscal specifications from Fujitsu. > > Trying to boot off 12-PRERELEASE/12-RC2 and/or 13-CURRENT (most recent I > could grap from > the download page), the screen becomes distorted immediately after the kernel > has > loaded and initialised/booted. The screen is at the loader's all right so far. > > Trying to disable graphics mode via escaping to the loader's prompt and > setting > > set hw.vga.textmode=1 > > subsequently loading the kernel and then booting, doesn't help. The screen is > distorted > again. The notebook seems UEFI only and doesn't boot off from MBR partioned > devices (i.e. > NanoBSD I used to use). > > Loading /boot/kernel/i915kms.ko > > after manually having loaded /boot/kernel/kernel (and not booted yet) doesn't > change > anything either. > > Booting off and installing Linux (Ubuntu, Mint so far, most revent verions I > can get my > hands on) is no problem. The console works fine from the beginning and so the > graphics. > > Is there a chance to get a FreeBSD booting the easy way? > > The provided boot images do not contain any of the > graphics/drm-stable|next|legacy-kmod > stuff, I tried to load i915kms.ko off from /boot/modules/ (were those modules > from the > ports are supposed to reside) but no chance. > > Before starting investigating this issue further I'd like to ask wether there > is a > general support provided or is that type of notebook dead matter for FreeBSD > of the > modern kind? > > Thanks in advance, > > oh > > p.s. please CC me, I'm not subscribing all lists. > > - -- > O. Hartmann > -BEGIN PGP SIGNATURE- > > iLUEARMKAB0WIQQZVZMzAtwC2T/86TrS528fyFhYlAUCW/5lKgAKCRDS528fyFhY > lMhRAf4yv4MqmHYVZIKo+TE1VACuHpXSv8ad4JzVKMG/S9uGcLLDfLgSM9699FDP > /QhIMCCHJ1hGAtXACdwGCsyZ5LmiAf93JHFU0W+GJWdXJI+sRcWvEZrzQlb5Czhf > vaM5QZ+3n0ermbe5/Ibvo/yzhL5YyonG7/lEqvnf7GAA+snv+Dvg > =XD7b > -END PGP SIGNATURE- Could you post a picture somewhere ? I have a laptop which have efifb problem, what I need to do is (at loader prompt) : gop set 4 (to switch to a different mode) gop set 0 (switch to the correct mode) You can gop list (iirc) to checks the available mode. The problem is that we are mixing serial and gop in loader.efi and when you set one mode in serial (or for SIMPLE_TEXT_PROTOCOL) is can mess the graphical mode. -- Emmanuel Vadot ___ freebsd-current@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"
Re: r340343 triggers kernel assertion if file is opened with O_BENEATH flag set through symlink
On Wed, Nov 28, 2018 at 10:50:59AM +0100, Peter Holm wrote: > On Wed, Nov 28, 2018 at 01:46:17AM +0200, Konstantin Belousov wrote: > > On Wed, Nov 28, 2018 at 12:54:21AM +0300, Vladimir Kondratyev wrote: > > > Following test case triggers assertion after r340343: > > > > > > > > > #include > > > > > > int > > > main(int argc, char **argv) > > > { > > > openat(open("/etc", O_RDONLY), "termcap", O_RDONLY | O_BENEATH); > > > } > > > > > > It results in: > > > > > > panic: Assertion (ndp->ni_lcf & NI_LCF_LATCH) != 0 failed at > > > /usr/src/sys/kern/vfs_lookup.c:182 > > > > > > > The following should fix it. Problem was that the topping directory was > > only latched when the initial path was absolute. Since your example > > switched from the relative argument to the absolute symlink, the BENEATH > > tracker rightfully complained that there were no recorded top. > > > > I also added some asserts I used during the debugging. > > > > diff --git a/sys/kern/vfs_lookup.c b/sys/kern/vfs_lookup.c > > index 78893c4f2bd..7a80775d91d 100644 > > --- a/sys/kern/vfs_lookup.c > > With this patch I got a: > > $ ./beneath.sh > open("a/b") succeeded > stat("a/b > panic: Assertion (ndp->ni_lcf & NI_LCF_LATCH) != 0 failed at > ../../../kern/vfs_lookup.c:269 > cpuid = 4 > time = 1543397647 > KDB: stack backtrace: > db_trace_self_wrapper() at db_trace_self_wrapper+0x2b/frame 0xfe00c71881a0 > vpanic() at vpanic+0x1a3/frame 0xfe00c7188200 > panic() at panic+0x43/frame 0xfe00c7188260 > namei_handle_root() at namei_handle_root+0xf7/frame 0xfe00c71882b0 > namei() at namei+0x617/frame 0xfe00c71884f0 > vn_open_cred() at vn_open_cred+0x526/frame 0xfe00c7188640 > vn_open() at vn_open+0x4c/frame 0xfe00c7188680 > kern_openat() at kern_openat+0x2e9/frame 0xfe00c71888e0 > sys_openat() at sys_openat+0x69/frame 0xfe00c7188910 > syscallenter() at syscallenter+0x4e3/frame 0xfe00c71889f0 > amd64_syscall() at amd64_syscall+0x4d/frame 0xfe00c7188ab0 > fast_syscall_common() at fast_syscall_common+0x101/frame 0xfe00c7188ab0 > --- syscall (499, FreeBSD ELF64, sys_openat), rip = 0x8003a215a, rsp = > 0x7fffe4f8, rbp = 0x7fffe5e0 --- > > https://people.freebsd.org/~pho/stress/log/kostik1127.txt Thank you for reporting this. The issue is due to wrong assert, which is valid for later call to namei_handle_root(), but not for the very first call. Below is the updated patch. diff --git a/sys/kern/vfs_lookup.c b/sys/kern/vfs_lookup.c index 78893c4f2bd..cb69a75ea65 100644 --- a/sys/kern/vfs_lookup.c +++ b/sys/kern/vfs_lookup.c @@ -202,8 +202,10 @@ nameicap_cleanup(struct nameidata *ndp, bool clean_latch) vdrop(nt->dp); uma_zfree(nt_zone, nt); } - if (clean_latch && (ndp->ni_lcf & NI_LCF_LATCH) != 0) + if (clean_latch && (ndp->ni_lcf & NI_LCF_LATCH) != 0) { + ndp->ni_lcf &= ~NI_LCF_LATCH; vrele(ndp->ni_beneath_latch); + } } /* @@ -446,7 +448,7 @@ namei(struct nameidata *ndp) if (error == 0 && dp->v_type != VDIR) error = ENOTDIR; } - if (error == 0 && (ndp->ni_lcf & NI_LCF_BENEATH_ABS) != 0) { + if (error == 0 && (cnp->cn_flags & BENEATH) != 0) { if (ndp->ni_dirfd == AT_FDCWD) { ndp->ni_beneath_latch = fdp->fd_cdir; vrefact(ndp->ni_beneath_latch); @@ -471,6 +473,8 @@ namei(struct nameidata *ndp) vrele(dp); goto out; } + MPASS((ndp->ni_lcf & (NI_LCF_BENEATH_ABS | NI_LCF_LATCH)) != + NI_LCF_BENEATH_ABS); if (((ndp->ni_lcf & NI_LCF_STRICTRELATIVE) != 0 && lookup_cap_dotdot != 0) || ((ndp->ni_lcf & NI_LCF_STRICTRELATIVE) == 0 && ___ freebsd-current@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"
Re: Fujitsu Lifebook E751 (iGPU: HM65): distorted console with UEFI boot
-BEGIN PGP SIGNED MESSAGE- Hash: SHA512 Am Wed, 28 Nov 2018 15:00:42 +0100 Emmanuel Vadot schrieb: > Hi, > > On Wed, 28 Nov 2018 10:51:11 +0100 > "O. Hartmann" wrote: > > > -BEGIN PGP SIGNED MESSAGE- > > Hash: SHA512 > > > > I ran into some trouble booting off a Fujitsu Lifebook E751 (firmware is > > latest, r1.22 > > from 2013). The E751 is of model series S26391-K326-V100 and equipted with > > a Core > > i5-2520M CPU and supposed to be also equipted with a iGPU HM65 according to > > the > > techniscal specifications from Fujitsu. > > > > Trying to boot off 12-PRERELEASE/12-RC2 and/or 13-CURRENT (most recent I > > could grap > > from the download page), the screen becomes distorted immediately after the > > kernel has > > loaded and initialised/booted. The screen is at the loader's all right so > > far. > > > > Trying to disable graphics mode via escaping to the loader's prompt and > > setting > > > > set hw.vga.textmode=1 > > > > subsequently loading the kernel and then booting, doesn't help. The screen > > is > > distorted again. The notebook seems UEFI only and doesn't boot off from MBR > > partioned > > devices (i.e. NanoBSD I used to use). > > > > Loading /boot/kernel/i915kms.ko > > > > after manually having loaded /boot/kernel/kernel (and not booted yet) > > doesn't change > > anything either. > > > > Booting off and installing Linux (Ubuntu, Mint so far, most revent verions > > I can get > > my hands on) is no problem. The console works fine from the beginning and > > so the > > graphics. > > > > Is there a chance to get a FreeBSD booting the easy way? > > > > The provided boot images do not contain any of the > > graphics/drm-stable|next|legacy-kmod stuff, I tried to load i915kms.ko off > > from /boot/modules/ (were those modules from the ports are supposed to > > reside) but no > > chance. > > > > Before starting investigating this issue further I'd like to ask wether > > there is a > > general support provided or is that type of notebook dead matter for > > FreeBSD of the > > modern kind? > > > > Thanks in advance, > > > > oh > > > > p.s. please CC me, I'm not subscribing all lists. > > > > - -- > > O. Hartmann > > -BEGIN PGP SIGNATURE- > > > > iLUEARMKAB0WIQQZVZMzAtwC2T/86TrS528fyFhYlAUCW/5lKgAKCRDS528fyFhY > > lMhRAf4yv4MqmHYVZIKo+TE1VACuHpXSv8ad4JzVKMG/S9uGcLLDfLgSM9699FDP > > /QhIMCCHJ1hGAtXACdwGCsyZ5LmiAf93JHFU0W+GJWdXJI+sRcWvEZrzQlb5Czhf > > vaM5QZ+3n0ermbe5/Ibvo/yzhL5YyonG7/lEqvnf7GAA+snv+Dvg > > =XD7b > > -END PGP SIGNATURE- > > Could you post a picture somewhere ? > > I have a laptop which have efifb problem, what I need to do is (at > loader prompt) : > > gop set 4 (to switch to a different mode) > gop set 0 (switch to the correct mode) > > You can gop list (iirc) to checks the available mode. > > The problem is that we are mixing serial and gop in loader.efi and > when you set one mode in serial (or for SIMPLE_TEXT_PROTOCOL) is can > mess the graphical mode. > Sorry, I have no upload place to put some screenshots. The natural resolution of the display is 1280x800 pixel. When existing to the loader and issuing as recommended the command "gop list", I get three modes: mode 0: 1024x768x32, stride=1024 mode 1: 640x480x32, stride=640 mode 2: 800x600x32, stride=800 Setting mode 1 and 2 via gop set X solves the problem and the screen is, at least during a live session of the latest 12-PRE USB image, readable and looking normal. As soon as I have an installation media, I'll check whether the screen is operable after installation (and, of course, loader settings as required), or not. Thanks for the quick help! Kind regards, O. Hartmann - -- O. Hartmann Ich widerspreche der Nutzung oder Übermittlung meiner Daten für Werbezwecke oder für die Markt- oder Meinungsforschung (§ 28 Abs. 4 BDSG). -BEGIN PGP SIGNATURE- iLUEARMKAB0WIQQZVZMzAtwC2T/86TrS528fyFhYlAUCW/7g9AAKCRDS528fyFhY lGKLAf9uL2wkoLhxrT/ca/EylOlGvOZ/n+9TVCuI1YZyhjHAjQICN863czLtfIvF pu7OyWNxeWvDS5bvdCol1bpOQ8kUAgCDGZZT3Y2GSALuyfk2L2M4xGb/uegdnlD1 7M9gnnIwQ5bfyZkF1kvN3MGMn3WtnVZduSpjg8SURmkC+1xFDXNl =XJxh -END PGP SIGNATURE- ___ freebsd-current@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"