Page MenuHomeFreeBSD

kib (Konstantin Belousov)
User

Projects

User Details

User Since
May 16 2014, 7:35 PM (319 w, 6 d)

Recent Activity

Today

kib added a comment to D25455: Add support for re-resolving arm64 ifuncs when all CPUs are online.

It is fine, except one detail that I do not like. You do the late pass after the APs were released.

Fri, Jul 3, 7:35 AM
kib added a comment to D25550: Handle non-PLT GNU IFUNC relocations in rtld.

Provide the amd64 example, in binary form.

Fri, Jul 3, 7:22 AM

Yesterday

kib added a comment to D25502: shm_open2: Implement SHM_GROW_ON_WRITE.

My recollection was that we can't really change struct shmfd like that on stable without KBI break, and we should probably fix it at least on stable/12; leading to "ok, just validate it for the MFC then we can drop the check and expand shm_size after."

Thu, Jul 2, 5:00 PM
kib added a comment to D25502: shm_open2: Implement SHM_GROW_ON_WRITE.
In D25502#564145, @kib wrote:

For this current diff, it occurs to me that this specific instance should be checking for overflow of SIZE_MAX rather than OFF_MAX since shm_size is a size_t. I'll make that tweak pre-commit.

Uhh. So the check in shm_dotruncate_locked() is boosted, and also we could have mis-synchronization between shm_object size and shm_size.

I'll (separately) add a check for length > SIZE_MAX in shm_dotruncate_locked and kick back an EFBIG there; is there another source of mis-synchronization for shm_object size and shm_size, or are you generally referring to the truncation of shm_size that could happen when assigning the off_t length to 32-bit quantity?

Thu, Jul 2, 4:35 PM
kib added inline comments to D25273: amd64 pmap: LA57 AKA 5-level paging.
Thu, Jul 2, 2:07 PM
kib committed rS362887: mlx5_core: remove unneccessary LFENCE instruction..
mlx5_core: remove unneccessary LFENCE instruction.
Thu, Jul 2, 10:45 AM
kib committed rS362886: linuxkpi: improvements for linux_pid_task() and linux_get_pid_task()..
linuxkpi: improvements for linux_pid_task() and linux_get_pid_task().
Thu, Jul 2, 10:43 AM
kib closed D25534: linuxkpi: improvements for linux_pid_task() and linux_get_pid_task()..
Thu, Jul 2, 10:43 AM
kib committed rS362885: Use tdfind() in pget()..
Use tdfind() in pget().
Thu, Jul 2, 10:41 AM
kib closed D25532: Use tdfind() in pget()..
Thu, Jul 2, 10:41 AM
kib updated the diff for D25273: amd64 pmap: LA57 AKA 5-level paging.

bhyve: Handle guest' LA57 paging mode.
This is in fact independent of the rest of the patch, since guest can set the bit in %cr4 at will.

Thu, Jul 2, 9:09 AM
kib updated the diff for D24652: Non-transparent superpages support..

Refresh patch after rebase. Fix conflicts in vm_map.c.

Thu, Jul 2, 8:46 AM
kib added inline comments to D25455: Add support for re-resolving arm64 ifuncs when all CPUs are online.
Thu, Jul 2, 3:04 AM
kib accepted D25537: Consolidate duplicated logic in csu Makefiles to lib/csu/Makefile.inc..
Thu, Jul 2, 3:02 AM

Wed, Jul 1

kib requested review of D25534: linuxkpi: improvements for linux_pid_task() and linux_get_pid_task()..
Wed, Jul 1, 12:03 PM
kib requested review of D25532: Use tdfind() in pget()..
Wed, Jul 1, 10:30 AM
kib committed rS362819: MFC r362033:.
MFC r362033:
Wed, Jul 1, 1:12 AM
kib accepted D23913: vfs: introduce basic smr-protected path lookup.
In D23913#563590, @mjg wrote:
In D23913#563051, @kib wrote:
In D23913#563019, @mjg wrote:

I don't see it. Relying on dooming would require moving the VIRF_DOOMED flag into hold count to maintain atomicity vs vhold_smr. It would be the same patch + more work.

I asked pho to test the updated version.

I mean get the transient reference, check for DOOMED, drop the reference if DOOMED and return failure from cached lookup.

I see two problems there:

  • setting DOOMED and checking hold count for free should be ordered (arguably it already is)
  • transient reference might either break some asserts or cause missed free.

I think that only missed free is serious enough to be counter-argument, but it might be fixable with less work than making the hold count flagged counter.

Well to expand on it the race between freeing the vnode and vhold_smr is the crux here. I tried to not have the flag in the count, but as it is there is no way to know when the vnode is no longer reachable. With the change as proposed we maintain the invariant that vnode handed over to uma_zfree will never get any new references (even transient). Consequently I think this is the most debuggable approach in the long run.

Wed, Jul 1, 12:23 AM
kib added inline comments to D25392: Fix Linux recvmsg(2) when msg_namelen returned is 0.
Wed, Jul 1, 12:14 AM
kib accepted D25461: Rework linux accept(2).
Wed, Jul 1, 12:10 AM
kib added a comment to D25502: shm_open2: Implement SHM_GROW_ON_WRITE.
In D25502#563799, @kib wrote:

I realized that we do not check for the overflow in vn_io_fault() either.
I am fine with this commit as-is, and you could fix vn_io_fault() (if needed) later.
For instance, despite no check on filedesc/VFS layer, ffs_write() eventually does

	if ((uoff_t)uio->uio_offset + uio->uio_resid > fs->fs_maxfilesize)
		return (EFBIG);

which probably is good enough to avoid corruption for FFS.
But rangelocks are probably not immune.

Sure- I'll check out vn_io_fault later. I'm somewhat unsure about what to do there; it seems like in some cases (e.g. shmfd) it could make sense to allow the overflow because the file won't grow like most traditional filesystems so we'll just truncate the write to the pre-allocated size of the file. It would be simpler to not care about shmfd being an odd duck.

vn_io_fault() is not used for shmfd.

Wed, Jul 1, 12:04 AM

Tue, Jun 30

kib added a comment to D25493: Replace OPENSSL_NO_SSL3_METHODs with dummies.
In D25493#563935, @jhb wrote:

I believe this is correct. I think you only put things in Symbol.map if you want them public for when you link new binaries. We use __sym_compat without any corresponding Symbol.map entries for other compat shims in libc (e.g. fts* symbols in lib/libc/gen/Symbol.map are only the latest FBSD1.5 version and don't include the legacy versions for FBSD1.0 and FBSD1.1.)

Tue, Jun 30, 10:51 PM
kib added a comment to D25511: Fix for mis-interpretation of PCB_KERNFPU..

Do we need a similar change in arm64 and i386?

Tue, Jun 30, 9:11 AM
kib added inline comments to D25461: Rework linux accept(2).
Tue, Jun 30, 6:49 AM
kib accepted D25502: shm_open2: Implement SHM_GROW_ON_WRITE.

I realized that we do not check for the overflow in vn_io_fault() either.
I am fine with this commit as-is, and you could fix vn_io_fault() (if needed) later.
For instance, despite no check on filedesc/VFS layer, ffs_write() eventually does

	if ((uoff_t)uio->uio_offset + uio->uio_resid > fs->fs_maxfilesize)
		return (EFBIG);

which probably is good enough to avoid corruption for FFS.
But rangelocks are probably not immune.

Tue, Jun 30, 6:11 AM

Mon, Jun 29

kib requested review of D25511: Fix for mis-interpretation of PCB_KERNFPU..
Mon, Jun 29, 10:18 PM
kib updated the summary of D25510: amd64: allow parallel shootdown IPIs.
Mon, Jun 29, 10:04 PM
kib updated the summary of D25510: amd64: allow parallel shootdown IPIs.
Mon, Jun 29, 10:04 PM
kib updated the summary of D25510: amd64: allow parallel shootdown IPIs.
Mon, Jun 29, 10:01 PM
kib requested review of D25510: amd64: allow parallel shootdown IPIs.
Mon, Jun 29, 9:51 PM
kib updated the diff for D24217: amd64 pmap: fine-grained pv list locking.

Fix pv list locking in pmap_remove_pde(), restore assert in pmap_delayed_invl_page().

Mon, Jun 29, 5:41 AM
kib added inline comments to D24217: amd64 pmap: fine-grained pv list locking.
Mon, Jun 29, 5:40 AM
kib added inline comments to D25502: shm_open2: Implement SHM_GROW_ON_WRITE.
Mon, Jun 29, 5:25 AM

Sun, Jun 28

kib added inline comments to D24217: amd64 pmap: fine-grained pv list locking.
Sun, Jun 28, 11:09 PM
kib added a comment to D25483: am64 pmap: microoptimize local shootdowns for PCID PTI configurations.

As I understand, for correctness, the return-from-exception code must restore the default ucr3 mask (PMAP_UCR3_NOMASK). If it fails to do so, a subsequent exception+return to usermode will use a stale mask and thus will fail to flush upt TLB entries. Is that right?

Sun, Jun 28, 11:04 PM
kib updated the diff for D24217: amd64 pmap: fine-grained pv list locking.

Handle the latest batch of reviewer' notes.

Sun, Jun 28, 10:36 PM
kib added a comment to D24217: amd64 pmap: fine-grained pv list locking.

The introduction of PVLL and conversion from rw_lock/unlock to pv_list_lock/unlock could have been done separately, for instance.

My intent was to try to split commits. Maintaining the split with git-svn workflow is too much work.

Sun, Jun 28, 10:34 PM
kib updated the diff for D25483: am64 pmap: microoptimize local shootdowns for PCID PTI configurations.

Add asserts about interrupt enable state.
Collape pmap_activate_sw_pcid_pti1() into the caller.

Sun, Jun 28, 9:33 PM
kib added a comment to D25483: am64 pmap: microoptimize local shootdowns for PCID PTI configurations.

Just to make sure that I understand: the idea is to reduce the amount of work done in invalidation handlers, by deferring the flush of upt TLB entries until the interrupted thread is about to switch back to user mode?

Sun, Jun 28, 8:33 PM
kib added inline comments to D25461: Rework linux accept(2).
Sun, Jun 28, 4:25 AM
kib added a comment to D23913: vfs: introduce basic smr-protected path lookup.
In D23913#563019, @mjg wrote:

I don't see it. Relying on dooming would require moving the VIRF_DOOMED flag into hold count to maintain atomicity vs vhold_smr. It would be the same patch + more work.

I asked pho to test the updated version.

Sun, Jun 28, 4:20 AM
kib committed rS362711: top: do not try to use sysctl machdep.smp_active..
top: do not try to use sysctl machdep.smp_active.
Sun, Jun 28, 12:29 AM

Sat, Jun 27

kib updated the diff for D25273: amd64 pmap: LA57 AKA 5-level paging.

Handle wakeup.
Update description of ptepindex.

Sat, Jun 27, 10:50 PM
kib closed D25187: amd64 pmap: explain pteindex.
Sat, Jun 27, 7:29 PM
kib committed rS362706: amd64 pmap: explain ptepindex..
amd64 pmap: explain ptepindex.
Sat, Jun 27, 7:29 PM
kib added a comment to D23913: vfs: introduce basic smr-protected path lookup.

I think this is fine on principle.

Sat, Jun 27, 6:52 PM
kib added a comment to D25451: Revert OPENSSL_NO_SSL3_METHOD to keep ABI compatibility..
In D25451#562953, @cem wrote:

We could provide dummy implementations of these symbols, rather than enabling SSLv3 code in 2020 in our unreleased development version of FreeBSD.

In D25451#562076, @kib wrote:
In D25451#562063, @cem wrote:

For example, when we moved from openssl 1.0 to 1.1 in base, that broke ABI for anything linking against base openssl.

We did not, because the dso version was bumped.

That is an interesting definition of ABI stability. I do not think it is a useful one. When we bumped SONAME, we also removed the old DSO version, breaking any program that linked to it. Removing an entire DSO SONAME is a bigger ABI break than a handful of SSLv3 symbols.

The solution here is to not break most things most of the time. Removing SSL3 is a good use of the limited exception to the general rule. Binaries that want to depend on known-broken parts of OpenSSL should link a specific version from ports. SSL3 (1996) has had security smell since as early as 2005 (early SHA1 weaknesses) and was completely broken in 2014 with POODLE; it was deprecated in 2015.

Point of binary compatibility is that you have the binary continuing working. If you force somebody to relink the binary it is exactly the reverse of ABI stability.
And if somebody cannot relink, he is left with a broken system that cannot be fixed.

Bumping SONAME is worse than removing SSLv3 symbols in all of these respects.

In which way ?

Sat, Jun 27, 6:05 PM
kib updated the diff for D25187: amd64 pmap: explain pteindex.

comma

Sat, Jun 27, 4:27 AM
kib closed D25482: vm_page_free_prep(): correct description of the required page and object state..
Sat, Jun 27, 2:32 AM
kib committed rS362670: vm_page_free_prep(): correct description of the required page and object state..
vm_page_free_prep(): correct description of the required page and object state.
Sat, Jun 27, 2:32 AM
kib requested review of D25483: am64 pmap: microoptimize local shootdowns for PCID PTI configurations.
Sat, Jun 27, 2:25 AM
kib accepted D25430: Fix one more case of vnode_pager I/O errors.
Sat, Jun 27, 2:07 AM
kib requested review of D25482: vm_page_free_prep(): correct description of the required page and object state..
Sat, Jun 27, 2:01 AM
kib added a comment to D23913: vfs: introduce basic smr-protected path lookup.

Where is VHOLD_NO_SMR set ?

Sat, Jun 27, 1:48 AM

Fri, Jun 26

kib updated the diff for D25187: amd64 pmap: explain pteindex.

Alc suggestions.

Fri, Jun 26, 10:02 PM
kib updated the diff for D25187: amd64 pmap: explain pteindex.

Separately mention the root page.

Fri, Jun 26, 8:28 PM
kib updated the diff for D25187: amd64 pmap: explain pteindex.

Change herald sentence as suggested by Mark. Add articles.

Fri, Jun 26, 8:05 PM
kib added inline comments to D25187: amd64 pmap: explain pteindex.
Fri, Jun 26, 8:02 PM
kib added inline comments to D25459: domain: make it safer to add domains post-domainfinalize.
Fri, Jun 26, 7:19 PM
kib accepted D25469: Only include object files from .ALLSRC when linking crt1 objects..
Fri, Jun 26, 7:10 PM
kib added a comment to D25304: Include ABI note tag in shared libraries..
In D25304#562372, @jhb wrote:

It also affects what OSABI GDB assigns if you do 'file /path/to/dso' or 'add-symbol-file /path/to/dso'. Mostly this would matter in the context of GDB used on a non-FreeBSD host (on FreeBSD hosts the fallback default OSABI is FreeBSD, so when you fail to recognize a shared library, it ends up still working due to the accident).

Removing the EI_OSABI check on aarch64 and riscv64 means ldd would try to dlopen() Linux shared libraries on those platforms instead of erroring out.

Fri, Jun 26, 7:09 PM
kib added inline comments to D25461: Rework linux accept(2).
Fri, Jun 26, 6:18 PM
kib added inline comments to D25304: Include ABI note tag in shared libraries..
Fri, Jun 26, 6:00 PM
kib added inline comments to D25304: Include ABI note tag in shared libraries..
Fri, Jun 26, 3:08 AM

Thu, Jun 25

kib added inline comments to D25304: Include ABI note tag in shared libraries..
Thu, Jun 25, 9:48 PM
kib added a comment to D25451: Revert OPENSSL_NO_SSL3_METHOD to keep ABI compatibility..
In D25451#562063, @cem wrote:

Sure, and sometimes that's fine.

For example, when we moved from openssl 1.0 to 1.1 in base, that broke ABI for anything linking against base openssl.

We did not, because the dso version was bumped.

Thu, Jun 25, 9:36 PM
kib added inline comments to D25455: Add support for re-resolving arm64 ifuncs when all CPUs are online.
Thu, Jun 25, 9:13 PM
kib added inline comments to D25304: Include ABI note tag in shared libraries..
Thu, Jun 25, 9:06 PM
kib added a comment to D25451: Revert OPENSSL_NO_SSL3_METHOD to keep ABI compatibility..
In D25451#562007, @cem wrote:

Because you cannot get stable branches ABI-stable if head is not.

I don't understand this remark, can you elaborate? Thanks.

Thu, Jun 25, 8:59 PM
kib accepted D25400: Remove some redundant assignments and computations..
Thu, Jun 25, 8:58 PM
kib added a comment to D25451: Revert OPENSSL_NO_SSL3_METHOD to keep ABI compatibility..
In D25451#561969, @cem wrote:

Er, why? CURRENT is not ABI stable and SSLv3 is very broken. Applications that want to use a broken cipher can get that from ports.

Thu, Jun 25, 8:21 PM
kib added inline comments to D25400: Remove some redundant assignments and computations..
Thu, Jun 25, 8:04 PM
kib accepted D25330: Partially implement Linux MADV_DONTNEED semantics..
Thu, Jun 25, 7:52 PM
kib updated the diff for D25187: amd64 pmap: explain pteindex.

Handle the first round of comments.

Thu, Jun 25, 7:50 PM
kib added inline comments to D25187: amd64 pmap: explain pteindex.
Thu, Jun 25, 7:49 PM
kib accepted D25451: Revert OPENSSL_NO_SSL3_METHOD to keep ABI compatibility..
Thu, Jun 25, 7:12 PM
kib accepted D25414: bhyve: allow for automatic destruction on power-off.
Thu, Jun 25, 11:44 AM
kib accepted D25169: man page of select(2) should mention pselect(2).
Thu, Jun 25, 11:41 AM
kib committed rS362608: MFC r362347:.
MFC r362347:
Thu, Jun 25, 6:39 AM
kib committed rS362607: MFC r362346:.
MFC r362346:
Thu, Jun 25, 5:44 AM
kib committed rS362606: MFC r362342:.
MFC r362342:
Thu, Jun 25, 5:35 AM
kib committed rS362605: MFC r362342:.
MFC r362342:
Thu, Jun 25, 5:24 AM
kib committed rS362604: MFC r362347:.
MFC r362347:
Thu, Jun 25, 5:20 AM
kib committed rS362603: MFC r362346:.
MFC r362346:
Thu, Jun 25, 5:17 AM

Wed, Jun 24

kib committed rS362572: MFC r362031, r362065, r362075:.
MFC r362031, r362065, r362075:
Wed, Jun 24, 6:36 AM
kib abandoned D25404: ufs: a fix for sync write.

Agreed, sorry for the noise.

Wed, Jun 24, 6:29 AM

Tue, Jun 23

kib added a comment to D25160: ufs: add O_DSYNC support.

I am not sure what you see in dtrace, but I see a bug in ffs_write() regardless of IO_DATASYNC. D25404

Tue, Jun 23, 4:14 AM
kib requested review of D25404: ufs: a fix for sync write.
Tue, Jun 23, 4:13 AM
kib added inline comments to D25249: x86: Scale default msi/msix vector limit with MAXCPU.
Tue, Jun 23, 3:38 AM
kib accepted D25374: Always compile the brand and ignore init ELF notes standalone..
Tue, Jun 23, 3:36 AM
kib committed rS362529: MFC r362251:.
MFC r362251:
Tue, Jun 23, 3:33 AM
kib committed rS362528: MFC r362250:.
MFC r362250:
Tue, Jun 23, 3:32 AM
kib committed rS362527: MFC r362249:.
MFC r362249:
Tue, Jun 23, 3:31 AM
kib closed D24761: Document BUS_OOMERR..
Tue, Jun 23, 3:28 AM
kib closed D24761: Document BUS_OOMERR..
Tue, Jun 23, 3:23 AM
kib requested review of D25187: amd64 pmap: explain pteindex.
Tue, Jun 23, 3:21 AM
kib closed D24842: Fix r361037..
Tue, Jun 23, 3:19 AM
kib closed D24819: Fix spurious ENOTCONN from closed unix domain socket other' side..
Tue, Jun 23, 3:19 AM
kib requested review of D24842: Fix r361037..
Tue, Jun 23, 3:19 AM
kib committed rS362525: MFC r362250:.
MFC r362250:
Tue, Jun 23, 3:19 AM