Page MenuHomeFreeBSD
Feed Advanced Search

Mar 26 2019

markj added a comment to D19705: Avoid mapping the current directory with -fdebug-prefix-map..

fine with me, although I'd prefer the elftoolchain change and the build changes committed separately

Mar 26 2019, 1:22 AM

Mar 25 2019

markj added inline comments to D19705: Avoid mapping the current directory with -fdebug-prefix-map..
Mar 25 2019, 11:48 PM
markj updated the diff for D19705: Avoid mapping the current directory with -fdebug-prefix-map..

Use open_memstream(3) instead.

Mar 25 2019, 11:48 PM
markj committed rS345513: Reject F_SETLK_REMOTE commands when sysid == 0..
Reject F_SETLK_REMOTE commands when sysid == 0.
Mar 25 2019, 9:39 PM
markj closed D19702: Ignore F_SETLK_REMOTE requests for sysid 0..
Mar 25 2019, 9:39 PM
markj added a reviewer for D19705: Avoid mapping the current directory with -fdebug-prefix-map.: kaiw.
Mar 25 2019, 9:26 PM
markj updated the test plan for D19705: Avoid mapping the current directory with -fdebug-prefix-map..
Mar 25 2019, 9:25 PM
markj updated the test plan for D19705: Avoid mapping the current directory with -fdebug-prefix-map..
Mar 25 2019, 9:24 PM
markj created D19705: Avoid mapping the current directory with -fdebug-prefix-map..
Mar 25 2019, 9:22 PM
markj added inline comments to D19702: Ignore F_SETLK_REMOTE requests for sysid 0..
Mar 25 2019, 8:29 PM
markj updated the diff for D19702: Ignore F_SETLK_REMOTE requests for sysid 0..

Make the check more strict: disallow sysid == 0 for any F_REMOTE request.

Mar 25 2019, 8:19 PM
markj abandoned D19704: Ignore F_SETLK_REMOTE requests for sysid 0..
Mar 25 2019, 8:19 PM
markj created D19704: Ignore F_SETLK_REMOTE requests for sysid 0..
Mar 25 2019, 8:18 PM
markj added a comment to D19702: Ignore F_SETLK_REMOTE requests for sysid 0..
In D19702#422050, @kib wrote:

Is there a check that F_REMOTE has l_sysid != 0 ? I cannot find it, if any. We require PRIV_NFS_LOCKD for it, but I think slightly less trust would be due.

Mar 25 2019, 7:26 PM
markj added a reviewer for D19702: Ignore F_SETLK_REMOTE requests for sysid 0.: kib.
Mar 25 2019, 4:33 PM
markj created D19702: Ignore F_SETLK_REMOTE requests for sysid 0..
Mar 25 2019, 4:32 PM
markj committed rS345502: MFC r344823:.
MFC r344823:
Mar 25 2019, 2:09 PM
markj committed rS345501: MFC r344935:.
MFC r344935:
Mar 25 2019, 2:05 PM
markj committed rS345500: MFC r345355:.
MFC r345355:
Mar 25 2019, 2:04 PM

Mar 22 2019

markj added a comment to D19679: Add myself as a committer.

Approved.

Mar 22 2019, 5:14 PM
markj added a comment to D19679: Add myself as a committer.

Approved.

Mar 22 2019, 4:16 PM
markj added inline comments to D19679: Add myself as a committer.
Mar 22 2019, 4:02 PM
markj added inline comments to D19390: Split kernel and user wire accounting..
Mar 22 2019, 3:21 PM
markj added a comment to D19390: Split kernel and user wire accounting..

In light of r345382, I don't think this approach can work as-is: vm_page_unwire_user() uses the number of wired mappings to determine whether a page is user wired, but apparently it is possible to remove mappings of wired pages from a user pmap without unwiring.

Mar 22 2019, 3:18 PM

Mar 21 2019

markj committed rS345396: Welcome Mitchell Horne (mhorne@) to the ranks of src committers..
Welcome Mitchell Horne (mhorne@) to the ranks of src committers.
Mar 21 2019, 10:31 PM
markj committed rS345384: Use an explicit comparison with VM_GUEST_NO..
Use an explicit comparison with VM_GUEST_NO.
Mar 21 2019, 8:08 PM
markj committed rS345382: Disallow preemptive creation of wired superpage mappings..
Disallow preemptive creation of wired superpage mappings.
Mar 21 2019, 7:53 PM
markj closed D19670: Do not preemptively create wired superpage mappings..
Mar 21 2019, 7:53 PM
markj updated the diff for D19670: Do not preemptively create wired superpage mappings..

Update vm_fault_populate() as well.

Mar 21 2019, 6:49 PM
markj added reviewers for D19670: Do not preemptively create wired superpage mappings.: kib, alc.
Mar 21 2019, 4:20 PM
markj created D19670: Do not preemptively create wired superpage mappings..
Mar 21 2019, 4:18 PM
markj committed rS345359: Don't attempt to measure TSC skew when running as a VM guest..
Don't attempt to measure TSC skew when running as a VM guest.
Mar 21 2019, 2:52 AM

Mar 20 2019

markj committed rS345355: Ensure that we use a 64-bit value for the last mmap() argument..
Ensure that we use a 64-bit value for the last mmap() argument.
Mar 20 2019, 11:35 PM
markj committed rS345348: Use -fdebug-prefix-map to map auto-generated kernel build paths..
Use -fdebug-prefix-map to map auto-generated kernel build paths.
Mar 20 2019, 8:43 PM
markj closed D19633: Use -fdebug-prefix-map in the kernel build..
Mar 20 2019, 8:43 PM
markj updated the diff for D19633: Use -fdebug-prefix-map in the kernel build..
  • Add compiler version guards.
Mar 20 2019, 1:03 AM

Mar 19 2019

markj added a comment to D19633: Use -fdebug-prefix-map in the kernel build..

Ed pointed out that we may not want absolute paths in general. That's probably true, but I'll note that this change just makes things consistent for now. I think mapping the symlink paths is a no-brainer, at least.

Mar 19 2019, 2:44 PM
markj added a comment to D19500: Add endian.h to LHDRS..
In D19500#419336, @imp wrote:
In D19500#418483, @imp wrote:

Here's what I had come up with for a glibc compatable header. Feel free to steal any or all of this. Foundation copyright is fine.

I didn't bother to fix the namespace pollution when I did this, but I was never targeting MESA. I did this to save me from hacking a dozen places in nvme-cli. The pollution was fine for the nvme-cli.

For now I'm just trying to create a minimal header that survives an exp-run; we can always add to it.

OK. If we're doing an exp run, then maybe we should include my stuff so we can do just one. It was done by examining a number of different versions of endian.h to figure out what Linux users want to the largest extent possible w/o violating POLA...

Mar 19 2019, 2:54 AM
markj updated the summary of D19633: Use -fdebug-prefix-map in the kernel build..
Mar 19 2019, 2:43 AM
markj added reviewers for D19633: Use -fdebug-prefix-map in the kernel build.: jhb, emaste, brooks, imp.
Mar 19 2019, 2:43 AM
markj created D19633: Use -fdebug-prefix-map in the kernel build..
Mar 19 2019, 2:16 AM
markj abandoned D19632: Use -fdebug-prefix-map..
Mar 19 2019, 2:05 AM
markj created D19632: Use -fdebug-prefix-map..
Mar 19 2019, 2:04 AM

Mar 18 2019

markj accepted D19615: vm_fault_copy_entry: accept invalid source pages..

I'm writing a few test cases for mlock as part of the user wiring work. I added one which does the following:

Mar 18 2019, 7:05 PM
markj added inline comments to D19615: vm_fault_copy_entry: accept invalid source pages..
Mar 18 2019, 2:48 PM
markj accepted D19615: vm_fault_copy_entry: accept invalid source pages..

Assuming it was this report panic: invalid dst page 0xfffff8007f14af98 https://syzkaller.appspot.com/bug?id=de0b1fa4863a64133877eb032d3ef876cb70d00a, eventual commit message should contain Reported-by: syzbot+514d40ce757a3f8b15bc@syzkaller.appspotmail.com

Mar 18 2019, 2:47 PM
markj reopened D19599: Add a UFS-specific implementation for lseek(SEEK_DATA)..

This is broken in a couple of ways:

  • bn += blockcnt isn't right if bn is has a partial offset into the indirect block.
  • The innermost loop contains a severe bug: it doesn't update ap->in_lbn for the remaining indirect block descriptors, so we may load an indirect block at the wrong logical offset in the vnode. This can cause data corruption if the vnode is subsequently modified.
Mar 18 2019, 5:12 AM
markj committed rS345255: Revert r345244 for now..
Revert r345244 for now.
Mar 18 2019, 5:04 AM
markj added inline comments to D19615: vm_fault_copy_entry: accept invalid source pages..
Mar 18 2019, 3:11 AM

Mar 17 2019

markj committed rS345250: MFC r344599:.
MFC r344599:
Mar 17 2019, 8:43 PM
markj committed rS345249: MFC r344588:.
MFC r344588:
Mar 17 2019, 8:43 PM
markj committed rS345248: MFC r344670:.
MFC r344670:
Mar 17 2019, 8:41 PM
markj committed rS345247: MFC r344450, r344452, r344453:.
MFC r344450, r344452, r344453:
Mar 17 2019, 8:30 PM
markj committed rS345245: Fix the gcc build (-Wstrict-prototypes) after r345244..
Fix the gcc build (-Wstrict-prototypes) after r345244.
Mar 17 2019, 6:06 PM
markj closed D19599: Add a UFS-specific implementation for lseek(SEEK_DATA)..

This was committed in r345244.

Mar 17 2019, 5:59 PM
markj reopened D19598: Remove incorrect comments..
Mar 17 2019, 5:59 PM
markj committed rS345244: Optimize lseek(SEEK_DATA) on UFS..
Optimize lseek(SEEK_DATA) on UFS.
Mar 17 2019, 5:34 PM
markj closed D19598: Remove incorrect comments..
Mar 17 2019, 5:34 PM
markj added a comment to D19598: Remove incorrect comments..

I would preface the actual condition "The nbp parameter is non-NULL when the mapping is for a block that contains data, one of an external data block, a direct block, or the final block in a chain of indirect blocks." before the correct clarification "If mapping an extended attribute block, nbp must point to a buffer for that block."

Mar 17 2019, 5:28 PM
markj updated the diff for D19598: Remove incorrect comments..
  • Update based on Kirk's comment.
Mar 17 2019, 5:03 PM

Mar 15 2019

markj added inline comments to D19599: Add a UFS-specific implementation for lseek(SEEK_DATA)..
Mar 15 2019, 10:05 PM
markj accepted D19601: stack(9): Drop unused API mode and comment that referenced it.
Mar 15 2019, 9:59 PM
markj updated the diff for D19598: Remove incorrect comments..
  • Describe nbp, runb and runp parameters per kib's suggestion.
Mar 15 2019, 9:23 PM
markj updated the diff for D19599: Add a UFS-specific implementation for lseek(SEEK_DATA)..
  • Return ENXIO if the offset is negative. Upper layers do not check this for us.
  • Don't use ufs_getlbns() to map direct blocks.
  • Assert num == 0 when we break from the loop.
Mar 15 2019, 9:22 PM
markj added a comment to D19599: Add a UFS-specific implementation for lseek(SEEK_DATA)..
In D19599#419613, @kib wrote:

This looks still inefficient, you do a lot of calculations for each sequential block number. Right now you getblk() indirect blocks for each possible bn. As a hypothetical optimal implementation, you can read indirect blocks and scan them until you find non-zero block pointer. Then you can reconstruct the offset (or keep the offset calculation in parallel with sliding the cursor over the blocks).

Hmm, that's what my implementation does. (My first implementation was indeed inefficient in the way that you described.) The innermost for-loop scans the current indirect block looking for a non-zero entry.

Mar 15 2019, 6:27 PM
markj added a comment to D19599: Add a UFS-specific implementation for lseek(SEEK_DATA)..
In D19599#419613, @kib wrote:

This looks still inefficient, you do a lot of calculations for each sequential block number. Right now you getblk() indirect blocks for each possible bn. As a hypothetical optimal implementation, you can read indirect blocks and scan them until you find non-zero block pointer. Then you can reconstruct the offset (or keep the offset calculation in parallel with sliding the cursor over the blocks).

Mar 15 2019, 6:12 PM
markj updated the diff for D19598: Remove incorrect comments..
  • Readd a comment explaining the return value.
Mar 15 2019, 6:02 PM
markj updated the diff for D19599: Add a UFS-specific implementation for lseek(SEEK_DATA)..
  • Rename ufs_readmeta() to ufs_readindir().
Mar 15 2019, 4:43 PM
markj added reviewers for D19599: Add a UFS-specific implementation for lseek(SEEK_DATA).: kib, mckusick.
Mar 15 2019, 4:39 PM
markj added reviewers for D19598: Remove incorrect comments.: fsu, mckusick, kib.
Mar 15 2019, 4:39 PM
markj created D19599: Add a UFS-specific implementation for lseek(SEEK_DATA)..
Mar 15 2019, 4:38 PM
markj created D19598: Remove incorrect comments..
Mar 15 2019, 4:38 PM
markj committed rS345186: MFC r342214:.
MFC r342214:
Mar 15 2019, 3:16 PM

Mar 14 2019

markj added a comment to D19500: Add endian.h to LHDRS..
In D19500#418483, @imp wrote:

Here's what I had come up with for a glibc compatable header. Feel free to steal any or all of this. Foundation copyright is fine.

I didn't bother to fix the namespace pollution when I did this, but I was never targeting MESA. I did this to save me from hacking a dozen places in nvme-cli. The pollution was fine for the nvme-cli.

Mar 14 2019, 1:46 PM
markj updated the diff for D19500: Add endian.h to LHDRS..
  • Don't define bswap*() in <endian.h>.
Mar 14 2019, 1:44 PM

Mar 13 2019

markj accepted D19514: KPTI: add control from proccontrol(8).
Mar 13 2019, 8:03 PM

Mar 11 2019

markj added a comment to D19500: Add endian.h to LHDRS..

So, I don't yet have a good solution for the mesa build. Hiding the bswap* declarations behind an #if __BSD_VISIBLE guard didn't fix the problem there.

I'm inclined to think that because mesa is already including machine/endian.h, it "knows what it's doing" and should perhaps continue to do that instead of including endian.h.

I can probably make it do that, or use the system bswap32. However, it would not surprise me that this crops up elsewhere, since Linux does not define bswap*().

Mar 11 2019, 6:05 PM
markj added a comment to D19500: Add endian.h to LHDRS..

So, I don't yet have a good solution for the mesa build. Hiding the bswap* declarations behind an #if __BSD_VISIBLE guard didn't fix the problem there.

Mar 11 2019, 5:09 PM
markj updated the diff for D19500: Add endian.h to LHDRS..

Introduce a wrapper and define __BYTE_ORDER etc.

Mar 11 2019, 5:05 PM
markj added a reviewer for D19500: Add endian.h to LHDRS.: imp.
Mar 11 2019, 5:05 PM
markj added a comment to D19500: Add endian.h to LHDRS..
Mar 11 2019, 11:19 AM
markj committed rS344988: MFC r344550:.
MFC r344550:
Mar 11 2019, 12:53 AM

Mar 9 2019

markj committed rS344973: MFC r343354:.
MFC r343354:
Mar 9 2019, 9:10 PM
markj accepted D19514: KPTI: add control from proccontrol(8).
Mar 9 2019, 1:53 AM

Mar 8 2019

markj added inline comments to D19514: KPTI: add control from proccontrol(8).
Mar 8 2019, 9:18 PM
markj committed rS344935: Have pthread_cond_destroy() return EBUSY if the condvar has waiters..
Have pthread_cond_destroy() return EBUSY if the condvar has waiters.
Mar 8 2019, 9:07 PM
markj closed D19496: Detect some attempts to destroy a condvar with waiters..
Mar 8 2019, 9:07 PM
markj added a comment to D19500: Add endian.h to LHDRS..

https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=236398

Mar 8 2019, 7:50 PM

Mar 7 2019

markj added a comment to D19500: Add endian.h to LHDRS..

Fine with me; should we have an exp-run?

Mar 7 2019, 8:54 PM
markj added reviewers for D19500: Add endian.h to LHDRS.: emaste, brooks.
Mar 7 2019, 8:45 PM
markj created D19500: Add endian.h to LHDRS..
Mar 7 2019, 8:44 PM
markj added a comment to D19496: Detect some attempts to destroy a condvar with waiters..
In D19496#417321, @ngie wrote:

Two questions:

  • is there a test case for the EBUSY behavior?
Mar 7 2019, 7:45 PM
markj added a comment to D19496: Detect some attempts to destroy a condvar with waiters..
In D19496#417290, @jhb wrote:

This looks right to me. The only change I had locally is that I had added a helper function in thr_umtx.h since that seemed to match the style of other code in libthr:

static inline int
_thr_ucond_has_waiters(struct ucond *cv)
{
    return (cv->c_has_waiters != 0);
}

and then used that instead of looking at cvp->kcond directly. I don't mind either way though.

Mar 7 2019, 6:24 PM
markj added reviewers for D19496: Detect some attempts to destroy a condvar with waiters.: jhb, kib.
Mar 7 2019, 6:09 PM
markj created D19496: Detect some attempts to destroy a condvar with waiters..
Mar 7 2019, 6:09 PM

Mar 6 2019

markj committed rS344845: Reorder copyright lines to preserve the source of "All rights reserved.".
Reorder copyright lines to preserve the source of "All rights reserved."
Mar 6 2019, 4:50 PM
markj added a comment to D19390: Split kernel and user wire accounting..
In D19390#416928, @kib wrote:
  1. To get accurate user wiring accounting at the pmap layer, you need both the page flag (PG_USER_WIRED ?) and the mapping flag (PG_W), or yet another counter on the page. This seems to be too intrusive for such small feature.
Mar 6 2019, 3:40 PM
markj committed rS344830: Implement minidump support for RISC-V..
Implement minidump support for RISC-V.
Mar 6 2019, 12:01 AM
markj closed D18320: RISC-V: add minidump support.
Mar 6 2019, 12:01 AM
markj committed rS344829: Add riscv minidump support to libkvm..
Add riscv minidump support to libkvm.
Mar 6 2019, 12:00 AM