Page MenuHomeFreeBSD

markj (Mark Johnston)
User

Projects

User Details

User Since
Mar 12 2014, 1:00 AM (262 w, 1 d)

Recent Activity

Yesterday

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.
Wed, Mar 20, 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.
Wed, Mar 20, 8:43 PM
markj closed D19633: Use -fdebug-prefix-map in the kernel build..
Wed, Mar 20, 8:43 PM
markj updated the diff for D19633: Use -fdebug-prefix-map in the kernel build..
  • Add compiler version guards.
Wed, Mar 20, 1:03 AM

Tue, Mar 19

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.

Tue, Mar 19, 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...

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

Mon, Mar 18

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:

Mon, Mar 18, 7:05 PM
markj added inline comments to D19615: vm_fault_copy_entry: accept invalid source pages..
Mon, Mar 18, 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

Mon, Mar 18, 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.
Mon, Mar 18, 5:12 AM
markj committed rS345255: Revert r345244 for now..
Revert r345244 for now.
Mon, Mar 18, 5:04 AM
markj added inline comments to D19615: vm_fault_copy_entry: accept invalid source pages..
Mon, Mar 18, 3:11 AM

Sun, Mar 17

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

This was committed in r345244.

Sun, Mar 17, 5:59 PM
markj reopened D19598: Remove incorrect comments..
Sun, Mar 17, 5:59 PM
markj committed rS345244: Optimize lseek(SEEK_DATA) on UFS..
Optimize lseek(SEEK_DATA) on UFS.
Sun, Mar 17, 5:34 PM
markj closed D19598: Remove incorrect comments..
Sun, Mar 17, 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."

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

Fri, Mar 15

markj added inline comments to D19599: Add a UFS-specific implementation for lseek(SEEK_DATA)..
Fri, Mar 15, 10:05 PM
markj accepted D19601: stack(9): Drop unused API mode and comment that referenced it.
Fri, Mar 15, 9:59 PM
markj updated the diff for D19598: Remove incorrect comments..
  • Describe nbp, runb and runp parameters per kib's suggestion.
Fri, Mar 15, 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.
Fri, Mar 15, 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.

Fri, Mar 15, 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).

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

Thu, Mar 14

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.

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

Wed, Mar 13

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

Mon, Mar 11

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*().

Mon, Mar 11, 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.

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

Introduce a wrapper and define __BYTE_ORDER etc.

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

Sat, Mar 9

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

Fri, Mar 8

markj added inline comments to D19514: KPTI: add control from proccontrol(8).
Fri, Mar 8, 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.
Fri, Mar 8, 9:07 PM
markj closed D19496: Detect some attempts to destroy a condvar with waiters..
Fri, Mar 8, 9:07 PM
markj added a comment to D19500: Add endian.h to LHDRS..

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

Fri, Mar 8, 7:50 PM

Thu, Mar 7

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

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

Thu, Mar 7, 8:54 PM
markj added reviewers for D19500: Add endian.h to LHDRS.: emaste, brooks.
Thu, Mar 7, 8:45 PM
markj created D19500: Add endian.h to LHDRS..
Thu, Mar 7, 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?
Thu, Mar 7, 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.

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

Wed, Mar 6

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."
Wed, Mar 6, 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.
Wed, Mar 6, 3:40 PM
markj committed rS344830: Implement minidump support for RISC-V..
Implement minidump support for RISC-V.
Wed, Mar 6, 12:01 AM
markj closed D18320: RISC-V: add minidump support.
Wed, Mar 6, 12:01 AM
markj committed rS344829: Add riscv minidump support to libkvm..
Add riscv minidump support to libkvm.
Wed, Mar 6, 12:00 AM
markj closed D19171: Add RISC-V minidump support to libkvm.
Wed, Mar 6, 12:00 AM

Tue, Mar 5

markj closed D19170: Initialize dump_avail on RISC-V.
Tue, Mar 5, 11:58 PM
markj committed rS344828: Initialize dump_avail[] on riscv..
Initialize dump_avail[] on riscv.
Tue, Mar 5, 11:58 PM
markj committed rS344827: Add pmap_get_tables() for riscv..
Add pmap_get_tables() for riscv.
Tue, Mar 5, 11:57 PM
markj closed D18321: RISC-V: Add definition for pmap_get_tables().
Tue, Mar 5, 11:57 PM
markj committed rS344823: Show wiring state of map entries in procstat -v..
Show wiring state of map entries in procstat -v.
Tue, Mar 5, 7:45 PM
markj closed D19461: Show wiring state of map entries in procstat -v..
Tue, Mar 5, 7:45 PM
markj committed rS344822: MFC r344600:.
MFC r344600:
Tue, Mar 5, 7:41 PM
markj committed rS344821: MFC r344600:.
MFC r344600:
Tue, Mar 5, 7:41 PM
markj committed rS344820: MFC r344278:.
MFC r344278:
Tue, Mar 5, 7:39 PM
markj committed rS344819: MFC r344278:.
MFC r344278:
Tue, Mar 5, 7:37 PM

Mon, Mar 4

markj added inline comments to D19461: Show wiring state of map entries in procstat -v..
Mon, Mar 4, 10:21 PM
markj updated the diff for D19461: Show wiring state of map entries in procstat -v..
  • Change man page wording.
  • Call the flag KVME_FLAG_USER_WIRED; we do not set it if the mapping is wired by vslock().
Mon, Mar 4, 10:20 PM
markj abandoned D19462: Show wiring state of map entries in procstat -v..
Mon, Mar 4, 10:20 PM
markj added a comment to D19390: Split kernel and user wire accounting..

IMO the concept should be defined at the mapping level, not at the level of the physical page; to effect wiring, the VM can use the reference counter to ensure that the page is not reclaimable, and the PG_USER_WIRED flag caches the information that at least one non-kernel mapping of the page is wired. This is similar in principle to, e.g., PGA_WRITEABLE.

Mon, Mar 4, 9:09 PM
markj added reviewers for D19461: Show wiring state of map entries in procstat -v.: alc, kib.
Mon, Mar 4, 9:00 PM
markj created D19462: Show wiring state of map entries in procstat -v..
Mon, Mar 4, 8:59 PM
markj created D19461: Show wiring state of map entries in procstat -v..
Mon, Mar 4, 8:57 PM
markj added a comment to D19390: Split kernel and user wire accounting..
In D19390#416489, @kib wrote:

[I am not suggesting to redo the patch, only discussing the possible approaches].

Mon, Mar 4, 8:54 PM

Sat, Mar 2

markj accepted D19170: Initialize dump_avail on RISC-V.
Sat, Mar 2, 7:28 PM
markj added a comment to D19227: geom: add feature: gconcat online append.

Feel free to break the change into multiple patches. The change to use a TAILQ could certainly be committed on its own as a "no functional change" diff.

Not sure how to do this? My current workflow is copy-pasting the output of svnlite diff into phabricator. I'm not aware of a convenient way to split up diffs like this.

Sat, Mar 2, 7:15 PM

Fri, Mar 1

markj added a comment to D19265: libctf, dtrace: Plumb through support for CONSTVAL values.
In D19265#415876, @cem wrote:

Ah, I assumed this was a port from OneFS. I'll try running the suite this afternoon.

Thanks!

Fri, Mar 1, 11:15 PM
markj added inline comments to D19170: Initialize dump_avail on RISC-V.
Fri, Mar 1, 6:06 PM
markj added a comment to D19265: libctf, dtrace: Plumb through support for CONSTVAL values.
In D19265#415623, @cem wrote:
In D19265#414685, @cem wrote:

My notion is that any time a script refers to a constval args[n], libdtrace would emit the "load immediate" DIF instruction which loads the constant value into a register, and any time it refers to a non-constval args[n+1], libdtrace knows to emit DIF with the ABI argument index shifted to take into account the fact that args[n] isn't represented in the ABI.

That sounds pretty reasonable. Any idea how difficult it would be to implement?

Fri, Mar 1, 4:08 PM
markj accepted D19264: ctf: Add support for typed constant values.
Fri, Mar 1, 4:05 PM
markj accepted D19409: fortuna: Deduplicate kernel vs user includes.
Fri, Mar 1, 3:52 PM
markj added a comment to D18320: RISC-V: add minidump support.

Am I right that we only write 4KB at a time?

Yes. I tried writing out more than one page at a time and it failed quite spectacularly, so this could be a good spot to revisit and introduce pmap_kenter_temporary() as we discussed on IRC.

Fri, Mar 1, 3:49 PM

Thu, Feb 28

markj added inline comments to D19170: Initialize dump_avail on RISC-V.
Thu, Feb 28, 11:42 PM
markj added inline comments to D19264: ctf: Add support for typed constant values.
Thu, Feb 28, 11:24 PM
markj committed rS344670: Allow FIONBIO and FIOASYNC ioctls on POSIX shm descriptors..
Allow FIONBIO and FIOASYNC ioctls on POSIX shm descriptors.
Thu, Feb 28, 10:00 PM
markj closed D19330: Allow setting O_NONBLOCK on shm file descriptors.
Thu, Feb 28, 10:00 PM
markj added inline comments to D19227: geom: add feature: gconcat online append.
Thu, Feb 28, 9:42 PM