Link [ NetBSD | NetBSD OpenGrok source search | PR fulltext-search | Summary of daily snapshot builds | history of daily build result | pkgsrc commit viewer ]


   
        usage: [branch:branch] [user:user] [path@revision] keyword [... [-excludekeyword [...]]] (e.g. branch:MAIN sys/arch/arm, if_wm.c@1.234 )




switch to index mode

recent branches: MAIN (4h)  netbsd-8 (5d)  netbsd-10 (5d)  netbsd-9 (11d)  thorpej-ifq (175d)  thorpej-altq-separation (178d) 

2024-05-10 07:33:56 UTC Now

2020-02-23 08:57:44 UTC MAIN commitmail json YAML

install rw_lock_op link too.

(mrg)

2020-02-23 08:54:55 UTC MAIN commitmail json YAML

Simplify some branches and kassert some redundant assignments.

(riastradh)

2020-02-23 08:54:47 UTC MAIN commitmail json YAML

Fix mistake in use of usbd_xfer_schedule_timeout in motg.

This code path is used both for xfers that are new, and xfers that
are being done piece by piece and are partway done.  For the latter
case, skip usbd_xfer_schedule_timeout so we schedule it only once per
xfer.

(riastradh)

2020-02-23 08:53:26 UTC MAIN commitmail json YAML

If zfs=YES, unconditioally do zfs mount/unmount -a.

If you set zfs=YES, presumably you positively want the automatic rc.d
actions, so if there's no /sbin/zfs or if zfs can't find pools with
/etc/zfs/zpool.cache, presumably you would like feedback about that
in rc.log.

(riastradh)

2020-02-23 08:53:14 UTC MAIN commitmail json YAML

Allow random seed on zfs.

(riastradh)

2020-02-23 08:49:46 UTC MAIN commitmail json YAML

2020-02-23 08:49:34 UTC MAIN commitmail json YAML

Teach LFS_ORPHAN_NEXTFREE about lfs64.

(riastradh)

2020-02-23 08:42:53 UTC MAIN commitmail json YAML

lfs_writer_enter can't fail; keep it simple and don't pretend it can.

Assert that mtsleep can't fail either -- it doesn't catch signals and
there's no timeout.

(riastradh)

2020-02-23 08:41:08 UTC MAIN commitmail json YAML

Call lfs_orphan in lfs_rename while we're still in the dirop.

(riastradh)

2020-02-23 08:40:59 UTC MAIN commitmail json YAML

In lfs_update, hold lfs_writer around lfs_vflush.

Otherwise, we might do

lfs_vflush
-> lfs_seglock
-> lfs_segwait(SEGM_CKP)
  -> lfs_writer_enter

which is the reverse of the lfs_writer -> lfs_seglock ordering.

(riastradh)

2020-02-23 08:40:49 UTC MAIN commitmail json YAML

Initialize/destroy lfs_allclean_wakeup in modcmd, not lfs_mountfs.

Fixes reloading lfs.kmod.

(riastradh)

2020-02-23 08:40:37 UTC MAIN commitmail json YAML

Break deadlock in PR kern/52301.

The lock order is lfs_writer -> lfs_seglock.  The problem in 52301 is
that lfs_segwrite violates this lock order by sometimes doing
lfs_seglock -> lfs_writer, either (a) when doing a checkpoint or (b),
opportunistically, when there are no dirops pending.  Both cases can
deadlock, because dirops sometimes take the seglock (lfs_truncate,
lfs_valloc, lfs_vfree):

(a) There may be dirops pending, and they may be waiting for the
seglock, so we can't wait for them to complete while holding the
seglock.

(b) The test for fs->lfs_dirops == 0 happens unlocked, and the state
may change by the time lfs_writer_enter acquires lfs_lock.

To resolve this in each case:

(a) Do lfs_writer_enter before lfs_seglock, since we will need it
unconditionally anyway.  The worst performance impact of this should
be that some dirops get delayed a little bit.

(b) Create a new lfs_writer_tryenter to use at this point so that the
test for fs->lfs_dirops == 0 and the acquisition of lfs_writer happen
atomically under lfs_lock.

(riastradh)

2020-02-23 08:40:28 UTC MAIN commitmail json YAML

Don't lfs_writer_enter while holding v_interlock.

There's no need to lfs_writer_enter at all here, as far as I can see.
lfs_flush_fs will do it for us.

(riastradh)

2020-02-23 08:40:19 UTC MAIN commitmail json YAML

Take a reference and fix assertions in lfs_flush_dirops.

Fixes panic:

KASSERT((ip->i_state & IN_ADIROP) == 0) at lfs_vnops.c:1670
lfs_flush_dirops
lfs_check
lfs_setattr
VOP_SETATTR
change_mode
sys_fchmod
syscall

This assertion -- and the assertion that vp->v_uflag has VU_DIROP set
-- is valid only until we release lfs_lock, because we may race with
lfs_unmark_dirop which will remove the nodes and change the flags.

Further, vp itself is valid only as long as it is referenced, which it
is as long as it's on the dchain, but lfs_unmark_dirop drops the
dchain's reference.

(riastradh)

2020-02-23 08:40:08 UTC MAIN commitmail json YAML

2020-02-23 08:39:48 UTC MAIN commitmail json YAML

Serialize access to the splay tree with lfs_lock.

(riastradh)

2020-02-23 08:39:39 UTC MAIN commitmail json YAML

Assert lfs_writer where I think we can now prove it.

(riastradh)

2020-02-23 08:39:28 UTC MAIN commitmail json YAML

Prevent new dirops while we issue lfs_flush_dirops.

lfs_flush_dirops assumes (by KASSERT((ip->i_state & IN_ADIROP) == 0))
that vnodes on the dchain will not become involved in active dirops
even while holding no other locks (lfs_lock, v_interlock), so we must
set lfs_writer here.  All other callers already set lfs_writer.

We set fs->lfs_writer++ without explicitly doing lfs_writer_enter
because

(a) we already waited for the dirops to drain, and
(b) we hold lfs_lock and cannot drop it before setting lfs_writer.

(riastradh)

2020-02-23 08:39:19 UTC MAIN commitmail json YAML

Teach lfs to transition ro<->rw.

(riastradh)

2020-02-23 08:39:09 UTC MAIN commitmail json YAML

Just use VOP_BWRITE for lfs_bwrite_log.

Hope this doesn't cause trouble with vfs_suspend.

(riastradh)

2020-02-23 08:38:58 UTC MAIN commitmail json YAML

Use a marker node to iterate lfs_dchainhd / i_lfs_dchain.

I believe elements can be removed while the lock is dropped,
including the next node we're hanging on to.

(riastradh)

2020-02-23 07:17:01 UTC MAIN commitmail json YAML

Prevent a race between audiodetach and fileops methods using psref(9).
Fix PR kern/54427.
Thank you so much riastradh@

(isaki)

2020-02-23 06:33:20 UTC MAIN commitmail json YAML

2020-02-23 06:15:27 UTC MAIN commitmail json YAML

Teach device nodes on zfs to handle fsync by calling spec_fsync too.

(riastradh)

2020-02-23 05:50:25 UTC MAIN commitmail json YAML

Teach zfs spec nodes to VOP_BWRITE too.

Fixes hang on writing to, e.g., ffs mounted on a device node that
lives on zfs.

XXX pullup

(riastradh)

2020-02-23 05:15:54 UTC MAIN commitmail json YAML

zfs: Allow modules to be loaded once in the ZFS chroot

Rather than copying the needed modules from FFS to the ramdisk,
load then directly from FFS instead.

This way, we can symlink ramdisk stand into /altroot and let nature take
it's course like loading firmware.

Set shell exit on error rather than using chained commands.
zpool import seems to SIGBUS randomly on amd64 and if we didn't do the
former then zpool would hang the init. Now at least we exit to the shell.

(roy)

2020-02-23 05:14:29 UTC MAIN commitmail json YAML

add location info to sd instances if we know which drive bay they live in
Sun Fire v210 only for now, others should be easy to add

(macallan)

2020-02-23 04:24:56 UTC MAIN commitmail json YAML

Improve error handling around audio_hw_probe().
It was difficult to return multiple errors.

(isaki)

2020-02-23 04:02:46 UTC MAIN commitmail json YAML

Make start_input/halt_input optional if the driver has no recording,
make start_output/halt_output optional if the driver has no playback.
And remove such never called functions.

(isaki)

2020-02-23 02:37:53 UTC MAIN commitmail json YAML

Note genet(4) addition

(jmcneill)

2020-02-23 02:06:01 UTC MAIN commitmail json YAML

Use C++ syntax for defining types, not C one.

(joerg)

2020-02-23 02:03:19 UTC MAIN commitmail json YAML

Don't hard-code LLVM version, extract it from external/apache2/llvm.

(joerg)

2020-02-23 02:02:33 UTC MAIN commitmail json YAML

Doesn't need or use HAVE_LLVM.

(joerg)

2020-02-23 02:01:17 UTC MAIN commitmail json YAML

Fix harmless syntax error.

(joerg)

2020-02-23 01:53:03 UTC MAIN commitmail json YAML

no need to call config_init_mi() in rumpdev any more - rump_init() now calls
config_init(), and the sysctl shouldn't be needed

PR kern/55004

(jdolecek)

2020-02-23 00:14:31 UTC MAIN commitmail json YAML

2020-02-22 23:40:06 UTC MAIN commitmail json YAML

bsd-family-tree

(sevan)

2020-02-22 23:38:04 UTC MAIN commitmail json YAML

Sync with FreeBSD r358254

(sevan)

2020-02-22 23:17:59 UTC MAIN commitmail json YAML

2020-02-22 22:47:35 UTC MAIN commitmail json YAML

Correct C99 / C++11 feature testing. Document remaining missing symbols.

(joerg)

2020-02-22 22:20:47 UTC MAIN commitmail json YAML

Make LFS/rump play nice with aiodoned removal.

PR kern/55004 (Hundreds of file system tests now fail on real hardware)

(ad)

2020-02-22 22:09:07 UTC MAIN commitmail json YAML

RPi4 UEFI firmware 1.1 reports the wrong IRQ for the VC mailbox. Use
polling mode for now until this is sorted out.

(jmcneill)

2020-02-22 22:02:46 UTC MAIN commitmail json YAML

Avoid undefined behavior in fread(3)

On the first call to fread(3), just after fopen(3) the internal buffers
are empty. This means that _r and _p (among others) are zeroed.

Passing NULL to the 2nd argument of memcpy(3) for the zero length is
undefined. Calling _p += 0 triggers LLVM UBSan (NULL pointer arithmetic).
Calling _p += 0, p += 0 and resid -= 0 has no effect.

Replace the "fp->_r = 0;" logic with a short circuit jump to __srefill()
that sets _r internally and refills the FILE buffers.

No functional change from an end user point of view, except skipping a few
dummy operations on the first call, for a FILE pointer, to fread(3).

(kamil)

2020-02-22 21:59:31 UTC MAIN commitmail json YAML

check for errors from proc_vmspace_getref().

(chs)

2020-02-22 21:45:35 UTC MAIN commitmail json YAML

rump_init(): need to call config_init() now.

PR kern/55004 (Hundreds of file system tests now fail on real hardware)

(ad)

2020-02-22 21:44:51 UTC MAIN commitmail json YAML

2020-02-22 21:24:45 UTC MAIN commitmail json YAML

Add rw_lock_op(): return either RW_READER or RW_WRITER for a lock that is
known to be held by the caller.  Panic if the lock is not held.

(ad)

2020-02-22 21:07:46 UTC MAIN commitmail json YAML

exit1(): remove from the radix tree before setting zombie status, as
radix_tree_remove_node() can block on locks when freeing.

Reported-by: syzbot+02bf066c30f812b14f25@syzkaller.appspotmail.com

(ad)

2020-02-22 20:29:16 UTC MAIN commitmail json YAML

Fix a couple of printf formats in debug messages.

(thorpej)

2020-02-22 20:12:40 UTC MAIN commitmail json YAML

add relaxed atomics, ok ad@ riastradh@

(maxv)

2020-02-22 20:08:39 UTC MAIN commitmail json YAML

Be less strict: when copyinstr() returns ENAMETOOLONG, it does initialize
the buffer, so mark it as such.

(maxv)

2020-02-22 19:54:35 UTC MAIN commitmail json YAML

Update the t_modctl test to ensure that static evcnts are added.

While here, remove the explicit call to sysctl_setup() routine,
since the module infrastructure already invokes such routines
automatically.

(pgoyette)

2020-02-22 19:51:57 UTC MAIN commitmail json YAML

Teach module infrastructure to attach any static evcnts that might be
defined in a module, similar to the automatic invocation of sysctl(9)
setup functions.  As requested by riastradh@

(pgoyette)

2020-02-22 19:49:11 UTC MAIN commitmail json YAML

2020-02-22 19:46:49 UTC MAIN commitmail json YAML

do not wait for memory in pgo_fault methods, just return ENOMEM
and let the uvm_fault code wait if it is appropriate.

(chs)

2020-02-22 19:44:07 UTC MAIN commitmail json YAML

Disable t_ptrace_wait* tests for MKSANITIZER/MKLIBCSANITIZER

A subset of tests is not compatible with the sanitizers.

(kamil)

2020-02-22 19:37:31 UTC MAIN commitmail json YAML

2020-02-22 19:25:25 UTC MAIN commitmail json YAML

2020-02-22 19:23:09 UTC MAIN commitmail json YAML

2020-02-22 19:21:41 UTC MAIN commitmail json YAML

2020-02-22 19:14:57 UTC MAIN commitmail json YAML

Update t_siginfo.c build rules

Add logic for MKSANITIZER/MKLIBCSANITIZER checks.

(kamil)

2020-02-22 19:09:51 UTC MAIN commitmail json YAML

Disable the t_siginfo test under MKSANITIZER / MKLIBCSANITIZER

Signal crash events are incompatible with sanitizers.

(kamil)

2020-02-22 19:03:04 UTC MAIN commitmail json YAML

2020-02-22 18:57:50 UTC MAIN commitmail json YAML

2020-02-22 18:57:31 UTC MAIN commitmail json YAML

2020-02-22 18:57:09 UTC MAIN commitmail json YAML

2020-02-22 18:56:57 UTC MAIN commitmail json YAML

2020-02-22 17:33:42 UTC MAIN commitmail json YAML

Make it clear that the pfn argument to alpha_init() is no longer used.

(thorpej)

2020-02-22 14:47:29 UTC MAIN commitmail json YAML

common/lib/libc/stdlib: Fix possible signed integer overflow.

common/lib/libc/stdlib/random.c:482:6 can result in signed integer overflow.

This bug was reported by UBSan runs.

The change has been tested using the following program to generate random numbers
in both the old and the new library and can be used to verify the correctness of the
library after the change.

#include <stdio.h>
#include <stdlib.h>

#define COUNT 1000 * 1000

int
main(void)
{
        int i;
        FILE *fp = fopen("numbers.txt", "w");

        srandom(0xdeadbeef);

        for(i = 0; i < COUNT; i++) {
                fprintf(fp, "%ld\n", random());
        }

        fclose(fp);

        return 0;
}

Reviewed by: riastradh@ , kamil@

(fox)

2020-02-22 14:26:18 UTC MAIN commitmail json YAML

Clarify that the -k option only provides the address of the module's
text segment.  The addresses of any other segments are not available.

(pgoyette)

2020-02-22 14:07:57 UTC MAIN commitmail json YAML

Avoid undefined behavior in the rand48(3) implementation

Instead of implicid promotion to signed int,
explicitly cast the arguments to unsigned int.

_rand48.c:53:27, signed integer overflow:
58989 * 58970 cannot be represented in type 'int'

_rand48.c:53:38, signed integer overflow:
-2093025904 + -1496809120 cannot be represented in type 'int'

_rand48.c:53:57, signed integer overflow:
57068 * 42787 cannot be represented in type 'int'

New and old code produce the same code as tested with:

#include <stdio.h>
#include <stdlib.h>

#define COUNT 1000 * 1000

int
main(void)
{
FILE *fp;
        int i;

        fp = fopen("numbers.txt", "w+");
if (!fp)
abort();

        for(i = 0; i < COUNT; i++) {
                fprintf(fp, "%f\n", drand48());
                fprintf(fp, "%ld\n", lrand48());
                fprintf(fp, "%ld\n", mrand48());
        }

        fclose(fp);

        return 0;
}

(kamil)

2020-02-22 14:06:05 UTC MAIN commitmail json YAML

Remove vestigial remnant of an earlier modification to the module
implementation.  There currently is no such thing as a module's
"alias".

(pgoyette)

2020-02-22 13:41:41 UTC MAIN commitmail json YAML

Add support for hardware rx filters.

(jmcneill)

2020-02-22 13:20:21 UTC MAIN commitmail json YAML

Reorder words to fix grammar

Noted by <leot>

(kamil)

2020-02-22 11:56:14 UTC MAIN commitmail json YAML

rand48: Document that short integers are unsigned

(kamil)

2020-02-22 11:55:43 UTC MAIN commitmail json YAML

Revert unrelated changes to prior

(roy)

2020-02-22 11:52:45 UTC MAIN commitmail json YAML

rc.d/network: improve wording of waiting for DAD to finish

(roy)

2020-02-22 11:24:47 UTC MAIN commitmail json YAML

Improve readability of __dorand48()

Break long lines into shorter instructions per line.

No Functional Change.

(kamil)

2020-02-22 10:30:37 UTC MAIN commitmail json YAML

Remove check for bestmode==-1 (shouldn't happen)

(jmcneill)

2020-02-22 10:29:17 UTC MAIN commitmail json YAML

Avoid undefined behavior in left shift

crypt.c:772:11, left shift of 1363235140 by 1 places cannot be represented
in type 'int32_t' (aka 'int')

(kamil)

2020-02-22 10:22:32 UTC MAIN commitmail json YAML

Avoid undefined behavior in bit shift operations

crypt.c:839:40, left shift of negative value -1197182952
crypt.c:840:40, left shift of negative value -264997776

(kamil)

2020-02-22 10:05:12 UTC MAIN commitmail json YAML

Avoid NULL pointer arithmetics on environ

_env.c:260:9, pointer expression with base 0 overflowed to 0
_env.c:260:9, load of null pointer of type 'char *'

(kamil)

2020-02-22 09:59:22 UTC MAIN commitmail json YAML

Avoid unportable shift construct

boot.c:150:29, left shift of 255 by 24 places cannot be represented in type 'int'
boot.c:153:29, left shift of 255 by 24 places cannot be represented in type 'int'

(kamil)

2020-02-22 09:54:27 UTC MAIN commitmail json YAML

2020-02-22 09:53:48 UTC MAIN commitmail json YAML

zfs: build a ramdisk on amd64 with enough to mount rpool/ROOT on /

Until we get ZFS integrated into our boot loader, this is the next best
thing. The idea is simple - have a small FFS partition with a kernel,
modules and this ramdisk. Once the ramdisk boots it will mount the FFS
partition read only, copy the needed ZFS modules to the ramdisk and then
unmount the partition. Then we import the ZFS root pool, mount the
ZFS root filesystem and then pivot to it.

Because the initial FFS partition is not mounted at this point, we
can mount it in /altroot so we can replace the kernel and modules with
newer ones so it's easily maintainable.

This ZFS boot strapper currently makes the following assumptions:
* The device NAME=boot is the FFS with kernel, modules and this ramdisk.
* The ZFS root pool and root filesystem are called rpool/ROOT.

A boot.cfg menu entry can then be added like so:
menu=Boot ZFS root:fs /ramdisk-zfsroot.fs;boot

(roy)

2020-02-22 09:42:27 UTC MAIN commitmail json YAML

mesa: sync w/ pkgsrc: don't assume the current gl dispatch table points
to noop if NULL, instead call the ENTRY_CURRENT_TABLE_GET function.

Additionally the previous i386 implementation probably never worked
because it looks like it used the wrong asm label when computing GOT ptr.
Likely relevant to PR port-i386/54782.

XXX pullup -9

(tnn)

2020-02-22 09:42:20 UTC MAIN commitmail json YAML

pass the address of the field, instead of relying on it being the first
field of the structure, no functional change

(maxv)

2020-02-22 09:34:26 UTC MAIN commitmail json YAML

If the default GOP mode is unavailable, fallback to the first mode defined.
PR# port-amd64/55000

(jmcneill)

2020-02-22 09:30:42 UTC MAIN commitmail json YAML

pass the address of the field, instead of relying on it being the first
field of the structure, no functional change

(maxv)

2020-02-22 09:24:05 UTC MAIN commitmail json YAML

pass the address of the field, instead of relying on it being the first
field of the structure, no functional change, ok kamil

(maxv)

2020-02-22 08:58:39 UTC MAIN commitmail json YAML

Inline the block in the parent block, for clarity, and also to prevent a
false positive with kMSan.

Here, LLVM reorders the conditions and checks 'vattr' before 'error'. But
if 'error' is non-zero then 'vattr' is not initialized, and kMSan notices
the uninitialized memory read.

(maxv)

2020-02-22 08:39:33 UTC MAIN commitmail json YAML

Zero out 'tv', to prevent uninitialized bytes in its padding from leaking
to userland. Found by kMSan.

Reported-by: syzbot+8134380511a82c8f5fd7@syzkaller.appspotmail.com

(maxv)

2020-02-22 08:22:10 UTC MAIN commitmail json YAML

Fix previous for _ARM32_NEED_BUS_DMA_BOUNCE

(skrll)

2020-02-22 08:15:09 UTC MAIN commitmail json YAML

Make calling get_props() lockless.
get_props() of all MD drivers now can be called without sc_lock.

(isaki)

2020-02-22 08:03:19 UTC MAIN commitmail json YAML

On audio_[pr]mixer_halt(), it's better to reset parameters in intr_lock.

(isaki)

2020-02-22 08:01:59 UTC MAIN commitmail json YAML

Add KASSERTs.  audio_[pr]mixer_start() need exlock.

(isaki)

2020-02-22 07:59:47 UTC MAIN commitmail json YAML

Move #if DIAGNOSTIC..#endif to correct place.
It should ignore stray interrupts regardless of DIAGNOSTIC.

(isaki)

2020-02-22 07:09:18 UTC MAIN commitmail json YAML

hw_if->query_format is already mandatory method.  Drop null checks.

(isaki)

2020-02-22 06:58:40 UTC MAIN commitmail json YAML

2020-02-22 06:36:07 UTC MAIN commitmail json YAML

Change two aprint_error_dev() to device_printf() (and improve messages).
This is also called from other than boot.

(isaki)

2020-02-22 06:28:10 UTC MAIN commitmail json YAML

const-ify.  These arguments are no longer written back.

(isaki)

2020-02-22 06:22:46 UTC MAIN commitmail json YAML

Fix/Update comments.

(isaki)

2020-02-22 05:53:19 UTC MAIN commitmail json YAML

Update AUDIO_SETINFO_channels test.
The kernel limits the number of channels that userland apps can set to
the number of channels supported by the hardware or less.

(isaki)

2020-02-22 05:51:39 UTC MAIN commitmail json YAML

Limit the number of channels that userland apps can set (by AUDIO_SETINFO)
to the number of channels supported by the hardware or less, if the hardware
supports multi channels.
- On monaural or stereo hardware, userland apps can always set 1ch or 2ch.
  The kernel (audio layer) can convert mono-stereo each other.
- On 3ch (2.1ch) hardware, for example, userland apps can set 1, 2, or 3ch,
  but not 4ch or more.
This allows userland apps to know actual number of channels supported by
the hardware in the same way as before.
PR kern/54973.

(isaki)

2020-02-22 02:28:06 UTC MAIN commitmail json YAML

2020-02-22 00:42:15 UTC MAIN commitmail json YAML

Avoid undefined behavior

route.c:1523:20, left shift of 1073741824 by 1 places cannot be represented
in type 'int'

(kamil)

2020-02-22 00:38:15 UTC MAIN commitmail json YAML

Avoid unportable left shift construct

left shift of 9 by 28 places cannot be represented in type 'int'

(kamil)

2020-02-22 00:32:09 UTC MAIN commitmail json YAML

Avoid undefined behavior in *_BITMAP_FREE() macros

left shift of 1 by 31 places cannot be represented in type 'int'

(kamil)

2020-02-22 00:28:36 UTC MAIN commitmail json YAML

2020-02-22 00:24:15 UTC MAIN commitmail json YAML

Avoid undefined behavior in get_modstat_info

t_modctl.c:114:16, member access within misaligned address 0x71bf5bcede84
for type 'struct modstat_t'

t_modctl.c:116:13, load of misaligned address 0x7e81bc3c9104 for type
'struct modstat_t' which requires 8 byte alignment

(kamil)

2020-02-22 00:18:55 UTC MAIN commitmail json YAML

Avoid undefined behavior in disabledstat

t_builtin.c:174:16, member access within misaligned address 0x741271c25004
for type 'struct modstat_t'

t_builtin.c:175:4, member access within misaligned address 0x741271c251c4
for type 'struct modstat_t'

(kamil)

2020-02-22 00:17:54 UTC MAIN commitmail json YAML

2020-02-21 23:27:06 UTC MAIN commitmail json YAML

Make sure to convey a failure to the calling function

Likely fix for PR kern/54999, but that was a one-off panic.

(maya)

2020-02-21 22:25:50 UTC MAIN commitmail json YAML

Mark division by 0 as expected in sigfpe_int

Disable ubsan instrumentation on the operation.

(kamil)

2020-02-21 22:15:00 UTC MAIN commitmail json YAML

Avoid undefined behavior in is_module_present()

t_fopen.c:339:18, member access within misaligned address 0x7f7ff7ebd004
for type 'modstat_t' (aka 'struct modstat') which requires 8 byte alignment

(kamil)

2020-02-21 22:04:06 UTC MAIN commitmail json YAML

Avoid undefined behavior in *BIT macros

hash_page.c:792:2, left shift of 1 by 31 places cannot be represented in type 'int'
hash_page.c:855:2, left shift of 1 by 31 places cannot be represented in type 'int'
hash_page.c:779:3, left shift of 1 by 31 places cannot be represented in type 'int'

(kamil)

2020-02-21 18:34:37 UTC MAIN commitmail json YAML

In pmap_changeprot_local(), drop the dirty bit along with the write bit.

(maxv)

2020-02-21 18:31:56 UTC MAIN commitmail json YAML

2020-02-21 15:15:48 UTC MAIN commitmail json YAML

Do not try to recovery from data page fault in interrupt context;
catch up belatedly with powerpc/trap.c rev 1.49 and etc.:

    http://cvsweb.netbsd.org/bsdweb.cgi/src/sys/arch/powerpc/powerpc/trap.c#rev1.49

(rin)

2020-02-21 15:00:44 UTC MAIN commitmail json YAML

LLVM doesn't use term.h, so don't check for it when probing here either.
Increase robustness of checks for incremental builds by forcing a
dependency on the Makefile itself.

(joerg)

2020-02-21 14:49:58 UTC MAIN commitmail json YAML

Tiny improvements to copyin() and copyout():

- Use lwz/stw instead of 4-byte lswi/stswi for 405 and later, which
  support unaligned word load/store by hardware. In many cases, both
  source and destination are aligned on word boundaries.

- Use dcbst instead of dcbf to flush cache. The former does not
  invalidate the cache line. Copied data should be used soon after.

(rin)

2020-02-21 14:27:20 UTC MAIN commitmail json YAML

Cosmetic changes for assembler codes. No binary changes.

(rin)

2020-02-21 13:38:05 UTC MAIN commitmail json YAML

When UPAGES > 1, both __HAVE_CPU_UAREA_ROUTINES and PMAP_MAP_POOLPAGE
must be defined in order to allocate physically contiguous memory for
u-area.

(rin)

2020-02-21 13:33:07 UTC MAIN commitmail json YAML

Use designated initialisers

(skrll)

2020-02-21 13:32:31 UTC MAIN commitmail json YAML

Comment out badaddr() and badaddr_read() on ibm4xx for now.

They are not used nor exposed externally in any header file; these
functions may have never been tested so far.

Enable them again when necessary.

Note that badaddr() for oea is used by macppc port, where it is
declared as an external function.

(rin)

2020-02-21 13:16:16 UTC MAIN commitmail json YAML

In ppc4xx_tlb_find_victim(), mark kernel stack page TLBF_REF instead of
TLBF_USED. This should be originally intended behavior of this code
segment, because

- TLBF_USED is already checked just before, so marking this page
  TLBF_USED is no-op.
- TLBF_REF flag exempts that page from being flushed from TLB in next
  scan, when kernel stack may be still there with high probability.

(rin)

2020-02-21 13:15:54 UTC MAIN commitmail json YAML

2020-02-21 12:56:37 UTC MAIN commitmail json YAML

Reduce UPAGES from 2 to 1 for ibm4xx, which was originally 1 and bumped
to 2 in rev 1.29:

    http://cvsweb.netbsd.org/bsdweb.cgi/src/sys/arch/powerpc/include/param.h#rev1.29

Since page size is 16KB on ibm4xx, USPACE is still 16KB, which is the
same size as on other powerpc processors.

This avoids kernel crash described in PR kern/54994. Also, even if the
PR is resolved, fork(2) easily fails with ENOMEM if UPAGES is 2, which
requires physically contiguous pages for u-area. No bad side effect is
observed as far as I can see.

XXX
Even with this commit, kern/54994 still critically affects other archs
with __HAVE_CPU_UAREA_ROUTINES, i.e., alpha, mips, powerpc/{oea,booke},
and riscv.

(rin)

2020-02-21 12:41:29 UTC MAIN commitmail json YAML

2020-02-21 02:04:40 UTC MAIN commitmail json YAML

OOPS -- fix mistake in previous commit.

bbusy really needs to return the error; otherwise things are very
bad!

(riastradh)

2020-02-21 00:26:23 UTC MAIN commitmail json YAML

2020-02-20 23:57:16 UTC MAIN commitmail json YAML

Refactor dbregs_dont_inherit_lwp()

Switch from native LWP calls to pthread(3) calls.

(kamil)

2020-02-20 22:52:11 UTC MAIN commitmail json YAML

The global offset table is spelled .TOC. on PPC64, so preserve that symbol.

(joerg)

2020-02-20 22:38:54 UTC MAIN commitmail json YAML

Minor changes to t_ptrace_wait*

Add check for security.models.extensions.user_set_dbregs in the
concurrent event tests.

Use unconditionally atf_tc_skip(); as the test is racy.

(kamil)

2020-02-20 21:14:23 UTC MAIN commitmail json YAML

protect deferred lists' manipulation by config_misc_lock, same as
config_pending semaphore itself; right now this also covers
DVF_ATTACH_INPROGRESS flag

(jdolecek)

2020-02-20 19:59:12 UTC MAIN commitmail json YAML

2020-02-20 18:24:21 UTC MAIN commitmail json YAML

2020-02-20 15:48:52 UTC MAIN commitmail json YAML

Fix kassert in lfs by initializing vp first.

(riastradh)

2020-02-20 15:48:38 UTC MAIN commitmail json YAML

Buffer cache SDT probes.

(riastradh)

2020-02-20 15:48:05 UTC MAIN commitmail json YAML

Use vn_bwrite, not genfs_nullop, for VOP_BWRITE.

VOP_BWRITE is responsible for calling biodone; can't just leave it
hanging.

XXX pullup

(riastradh)

2020-02-20 15:04:53 UTC MAIN commitmail json YAML

Fix two entries.

(wiz)

2020-02-20 14:54:22 UTC netbsd-9 commitmail json YAML

2020-02-20 14:53:09 UTC netbsd-9 commitmail json YAML

Pull up following revision(s) (requested by riastradh in ticket #716):

sys/dev/usb/usbdi.c: revision 1.194

When aborting a pipe, set pipe->up_running = 0.

This prevents any concurrent usb_transfer_complete from restarting
the pipe with usbd_start_next.

(martin)

2020-02-20 14:49:47 UTC netbsd-9 commitmail json YAML

Pull up following revision(s) (requested by riastradh in ticket #715):

external/cddl/osnet/dist/cmd/zpool/zpool_vdev.c: revision 1.5

zpool: The NetBSD specific ioctl needs to include sys/ioctl.h

(martin)

2020-02-20 14:48:19 UTC netbsd-9 commitmail json YAML

Pull up following revision(s) (requested by riastradh in ticket #714):

crypto/external/bsd/openssl/dist/crypto/rand/rand_unix.c: revision 1.14

Open /dev/urandom with O_CLOEXEC.

Let's avoid bleeding file descriptors into our clients' children,
shall we?

XXX pullup

(martin)

2020-02-20 14:42:30 UTC netbsd-9 commitmail json YAML

Pull up following revision(s) (requested by riastradh in ticket #713):

lib/libdm/libdm_ioctl.c: revision 1.4

Let's not write temporary files to fixed paths in /tmp, shall we?
XXX pullup

(martin)

2020-02-20 14:38:29 UTC netbsd-9 commitmail json YAML

Pull up following revision(s) (requested by sevan in ticket #712):

sys/arch/hpcmips/hpcmips/hpcapm_machdep.c: revision 1.6

spelling

(martin)

2020-02-20 14:36:38 UTC netbsd-9 commitmail json YAML

Pull up following revision(s) (requested by skrll in ticket #711):

sys/arch/arm/ti/if_cpsw.c: revision 1.9

Fix KERNHIST build (and simplify)

(martin)

2020-02-20 14:32:21 UTC netbsd-8 commitmail json YAML

2020-02-20 14:31:46 UTC netbsd-8 commitmail json YAML

Pull up following revision(s) (requested by sevan in ticket #1506):

sys/arch/hpcmips/hpcmips/hpcapm_machdep.c: revision 1.6

spelling

(martin)

2020-02-20 12:15:33 UTC MAIN commitmail json YAML

When emulating obsoleted arm32 instructions, use ufetch(9) rather than
dereference tf_pc directly to retrieve an instruction.

Even if tf_pc is valid when processor decodes the instruction, someone
can unmap its page before tf_pc is read in the exception handler.

Now, SIGSEGV is delivered correctly to the process in this case, rather
than kernel panic.

Pointed out by maxv.
Discussed with ryo and skrll.

(rin)

2020-02-20 09:07:39 UTC MAIN commitmail json YAML

in bus_dmamap_load_pglist() try a 32-element array of
bus_dma_segment_t's before attempting to allocate.

this hopefully avoids hangs i've had in X since updating
from netbsd-8 to netbsd-9 that i've tracked down to this
function failing with ENOMEM.

XXX: maybe can avoid the alloc entirely by batching these
calls in 32 segments each.

XXX pullup-9

(mrg)

2020-02-20 08:31:18 UTC MAIN commitmail json YAML

Pull in arm_generic_dma.c to RPI kernel for arm_generic_dma_tag, which is
required by fdt_dma_machdep.c.

(rin)

2020-02-20 08:27:40 UTC MAIN commitmail json YAML

2020-02-20 08:06:15 UTC MAIN commitmail json YAML

shmif: use cprng_strong32 to generate random bytes for a MAC address

cprng_fast32 sometimes returns indentical bytes, which look
"20:0e:11:33" in a MAC address, on different rump_server instances.
That leads MAC address duplications resulting in a test failure.

Fix it by using cprng_strong32 instead of cprng_fast32.  However
we should rather fix cprng_fast32 (or rump itself) somehow.

The fix mitigates PR kern/54897 but test failures due to other
causes still remain.

(ozaki-r)

2020-02-20 08:02:26 UTC MAIN commitmail json YAML

tests: abort if MAC address duplication found

(ozaki-r)

2020-02-20 07:58:19 UTC MAIN commitmail json YAML

tests: dump stats of an interface before destroying it

(ozaki-r)

2020-02-20 07:52:55 UTC MAIN commitmail json YAML

Use orr instead of mov (an alias for orr) to appease clang... *shrug*

(skrll)

2020-02-20 07:07:02 UTC MAIN commitmail json YAML

libpthread sets initial value of MSR for lwp's. However, appropriate
value differs b/w oea/booke/ibm4xx, and there's no way to obtain it
from userland. Therefore, this initial value should be corrected by
cpu_setmcontext().

- Comment this in libpthread
- Add KASSERT in cpu_mcontext_validate()

(rin)

2020-02-20 06:36:05 UTC MAIN commitmail json YAML

Oops, sort header again. My bad...

(rin)

2020-02-20 06:12:47 UTC MAIN commitmail json YAML

Provide no-op's as pcu_ops_md_defs[PCU_FPU] even if !PPC_HAVE_FPU.

This is required by subr_pcu.c rev 1.21 and later:
http://cvsweb.netbsd.org/bsdweb.cgi/src/sys/kern/subr_pcu.c#rev1.21

Otherwise, panic occurs when FP instruction is emulated on machines
without FPU.

Note that PowerPC UISA as well as SVR4 ABI require FP instructions,
and emulation is enabled unconditionally on machines without FPU.

(rin)

2020-02-20 05:57:49 UTC MAIN commitmail json YAML

Convert mi_userret(9) into powerpc-specific userret().

This is necessary in order to support RAS.

There are some sanity checks in userret() as well.

(rin)

2020-02-20 05:55:24 UTC MAIN commitmail json YAML

2020-02-20 05:46:08 UTC MAIN commitmail json YAML

2020-02-20 05:34:37 UTC MAIN commitmail json YAML

Clear ti_ctx when flushing a TLB entry for clarity.

(rin)

2020-02-20 05:21:55 UTC MAIN commitmail json YAML

Fix off-by-one error for ctx (ASID).

Note that NUM_CTX = 256 = 0 stands for disabling protection by ASID.

(rin)

2020-02-20 05:13:16 UTC MAIN commitmail json YAML

Fix NULL dereference; "pap" argument of pmap_extract(9) can be NULL.

(rin)

2020-02-20 05:10:02 UTC MAIN commitmail json YAML

eieio is implemented as sync on 40x. Therefore, "sync; eieio" and
"eieio; sync" can be replaced by a single sync.

(rin)

2020-02-20 05:03:54 UTC MAIN commitmail json YAML

Add PPC_IBM440 flag as 440 is significantly different from 40x processors.
(It may be more easily supported by booke than by ibm4xx.)

(rin)

2020-02-20 04:59:43 UTC MAIN commitmail json YAML

Fix !__HAVE_FAST_SOFTINTS build for debugging.

(rin)

2020-02-20 04:54:47 UTC MAIN commitmail json YAML

Make this compile again with PGALLOC_VERBOSE.

(rin)

2020-02-20 01:44:06 UTC MAIN commitmail json YAML

Add support for brcm,bcm2711-emmc2

(jmcneill)

2020-02-20 01:43:08 UTC MAIN commitmail json YAML

Remove custom bus dma tag handling.

(jmcneill)

2020-02-20 01:36:38 UTC MAIN commitmail json YAML

Attach bcmgpio before devices that may need it

(jmcneill)

2020-02-20 01:35:55 UTC MAIN commitmail json YAML

2020-02-19 21:51:21 UTC MAIN commitmail json YAML

Remove unused "rel" global variable and make the -r option a no-op.

(martin)

2020-02-19 21:49:48 UTC MAIN commitmail json YAML

Do not force -Os optimization (unless SMALLPROG)

(martin)

2020-02-19 21:45:10 UTC MAIN commitmail json YAML

Rever previous: the d_packname in struct disklabel is not NUL terminated.
Disable the warning instead.

(martin)

2020-02-19 21:42:54 UTC MAIN commitmail json YAML

2020-02-19 18:08:03 UTC MAIN commitmail json YAML

2020-02-19 17:13:00 UTC MAIN commitmail json YAML

Fix clang(1) build

Namespace a symbol that can be unused.

(kamil)

2020-02-19 17:05:06 UTC MAIN commitmail json YAML

Mark previous #ifdef __NetBSD__, per request from hannken.

(riastradh)

2020-02-19 16:11:19 UTC MAIN commitmail json YAML

Report the OS name and release appropriately for NetBSD.

We are not OpenSolaris or uts!

(riastradh)

2020-02-19 16:07:38 UTC MAIN commitmail json YAML

usbdi dtrace probes

(riastradh)

2020-02-19 16:05:41 UTC MAIN commitmail json YAML

2020-02-19 16:04:40 UTC MAIN commitmail json YAML

2020-02-19 16:04:01 UTC MAIN commitmail json YAML

umass dtrace probes

(riastradh)

2020-02-19 16:03:30 UTC MAIN commitmail json YAML

New dtrace usb provider, with a handful of probes in usb.c.

(riastradh)

2020-02-19 16:02:50 UTC MAIN commitmail json YAML

Make sure the umass transfer callback is run in error branches.

(riastradh)

2020-02-19 16:02:34 UTC MAIN commitmail json YAML

Consolidate logic to call the transfer callback.

No functional change intended.

(riastradh)

2020-02-19 16:01:37 UTC MAIN commitmail json YAML

Fix mistakes in timeout/abort/completion changes in motg(4).

- Call usbd_xfer_schedule_timeout so we actually do time out.

- Don't call usbd_xfer_trycomplete until all the data have been
  transferred -- it commits to completion, not timeout.

- Use xfer->ux_status != USBD_IN_PROGRESS to test whether, after a
  partial write, an xfer has been interrupted or timed out and need
  not be continued.

- Remove wrong assertion.

(riastradh)

2020-02-19 16:00:28 UTC MAIN commitmail json YAML

Abort default pipe too on detach before detaching children.

This ensures that pending xfers on the default pipe will be aborted
before we wait for children, which, in the case of scsibus -> sd,
means waiting for pending xfers to complete -- xfers that may never
complete if something is wedged.

(riastradh)

2020-02-19 13:32:40 UTC MAIN commitmail json YAML

Revert last. It was objected to pre-commit, there is no actual error
analysis or report and there is existing logic supposed to handle this.

(joerg)

2020-02-19 09:59:39 UTC MAIN commitmail json YAML

Disable HAVE_TERMINFO and HAVE_TERMIOS_H for ./build.sh tools build

These headers enable optional features and are not portable to all host
Operating Systems.

Speculative fix for certain Linux distributions.

(kamil)

2020-02-19 09:00:44 UTC MAIN commitmail json YAML

2020-02-19 09:00:34 UTC MAIN commitmail json YAML

add a couple of GPUs i have:

product ATI RADEON_HD4290      0x9714  Radeon HD4290 Graphics
product NVIDIA GF_440          0x0de0  GeForce GT 440

(mrg)

2020-02-19 05:52:52 UTC MAIN commitmail json YAML

Define VOP_STRATEGY on zfs device nodes too.

Fixes eternal hangs in attempts to do I/O on device nodes on zfs.

XXX pullup

(riastradh)

2020-02-19 02:51:54 UTC MAIN commitmail json YAML

When a media change is requested, don't just all (*if_init)().  That's
needlessly disruptive and incompatible with future locking changes.
We can use both ether_mediachange() and ether_mediastatus() instead.

(thorpej)

2020-02-18 21:29:39 UTC MAIN commitmail json YAML

2020-02-18 21:29:31 UTC MAIN commitmail json YAML