summaryrefslogtreecommitdiff
path: root/sys
AgeCommit message (Collapse)Author
2019-12-05Various cleanup tweaks. 'return' is not a function. KNF. Whitespace,Kenneth R Westerback
Comment fixes.
2019-12-05Don't discard error from mode sense (6) if mode sense (10) isKenneth R Westerback
not attempted.
2019-12-05Shrink scsi_mode_do_sense() parameter list by eliminating the threeKenneth R Westerback
pointers returning possible block descriptor values for block size, block count and density. Most calls were passing "NULL, NULL, NULL" since they did not care. Call scsi_parse_blkdesc() directly in those few cases where one or more of the values is of interest. No intentional functional change.
2019-12-05No need for 'byte2' parameter to scsi_mode_sense[_big]() since weKenneth R Westerback
always pass 0. i.e. never disable block descriptors, never accept long LBA values.
2019-12-05Move prototypes for scsi_mode_sense(), scsi_mode_sense_big(),Kenneth R Westerback
scsi_mode_sense_page() and scsi_mode_sense_big_page() into scsi_base.c. They are just internal helper functions for scsi_do_mode_sense().
2019-12-05Move uvmexp_print() to a better place.Martin Pieuchot
ok mlarkin@
2019-12-05Remove clause #3 from mrg@NetBSD license.Martin Pieuchot
In May 29 2008, Matthew R. Green removed it in NetBSD: github.com/IIJ-NetBSD/netbsd-src/commit/7ea20401d535da9996394136ef ok deraadt@
2019-12-05Convert infinite sleeps to tsleep_nsec(9).Martin Pieuchot
ok jca@
2019-12-04Add sizes for free() in autri(4).Frederic Cambus
OK mpi@
2019-12-04Convert infinite sleeps to {m,t}sleep_nsec(9).Martin Pieuchot
ok krw@, jca@
2019-12-04Fix a bad offset calculation in uvm_share.Mike Larkin
Syzkaller found a bug in uvm_share when using a vmd(8) mmap region with an offset that ended up making an overlap with a previous vmm(4) uvm_map range. This diff reworks the range and offset calculation in uvm_share. Only vmm(4) uses this, so there should be no visible effects outside vmm(4) environments. Syzkaller also went sorta crazy on this one, finding multiple reproducers for the same bug with just slightly different parameters, thus the multiple "Reported-by" lines below. ok stefan@, anton@ Reported-by: syzbot+2c625ab1b8e964da644a@syzkaller.appspotmail.com Reported-by: syzbot+1300829862412751462d@syzkaller.appspotmail.com Reported-by: syzbot+27cfad3394f34528cbec@syzkaller.appspotmail.com Reported-by: syzbot+3e700c5698177f91cce1@syzkaller.appspotmail.com
2019-12-04Fix uvm_unmap_remove panic when tearing down VMs.Mike Larkin
Type confusion when tearing down a vmm(4) VM's vm_map led UVM to interpret the vm_map as a struct uvmspace, and occasionally fail. stefan@ pointed out the root cause a while back but I never had time to look at this until now. Syzkaller also found a reproducer for this, so the "Reported by" line below is a clue to let it know to close that bug. idea by, and ok stefan@ also ok anton@ Reported-by: syzbot+dbd6e2a7583e958e69f8@syzkaller.appspotmail.com
2019-12-03Check for expected mode sense page code as well as expected mode page length ↵Kenneth R Westerback
when constructing the pointer to the page data. Remove now unneeded DISK_PGCODE(). Usual misc whitespace/modernization tweaks to functions being modified.
2019-12-03Add display of mode sense data to SCSIDEBUG.Kenneth R Westerback
2019-12-03Since device tree trip points might not be sorted, but our codePatrick Wildt
expected a sorted list, do the sorting ourselves upon parsing the trip points. ok kurt@
2019-12-03Add pwmfan(4), a driver for PWM-regulated fans.Patrick Wildt
ok kurt@
2019-12-03Add rkpwm(4), a driver for the RK3399's PWM controller.Patrick Wildt
ok kurt@
2019-12-03Add support for the RK3399's PWM clock to rkclock(4).Patrick Wildt
ok kurt@
2019-12-02Revert "timeout(9): switch to tickless backend"cheloha
It appears to have caused major performance regressions all over the network stack. Reported by bluhm@ ok deraadt@
2019-12-02Have SCSIDEBUG show the number of bytes of VPD inquiry data received,Kenneth R Westerback
not the number of bytes that were available in the buffer.
2019-12-02Don't forget the scsi_vpd_header when calculating the number of bytesKenneth R Westerback
obtained by scsi_inquire_vpd().
2019-12-02Replace rwsleep(9) with rwsleep_nsec(9) in vfs_lockf.c.Visa Hankala
Prompted by and OK cheloha@ OK mpi@ anton@
2019-12-02Remove now unneeded kernel locking from vfs_lockf.c.Visa Hankala
OK mpi@ anton@
2019-12-02Stop supporting UVM_FLAG_TRYLOCK in uvm_mapanon(), it is not used.Martin Pieuchot
ok tedu@, visa@
2019-12-02drm/i915/userptr: Try to acquire the page lock around set_page_dirty()Jonathan Gray
From Chris Wilson e80e88ef6057c7947409bda9898387d25e54aaa9 in linux 4.19.y/4.19.87 2d691aeca4aecbb8d0414a777a46981a8e142b05 in mainline linux
2019-12-02drm/amd/powerplay: issue no PPSMC_MSG_GetCurrPkgPwr on unsupported ASICsJonathan Gray
From Evan Quan 8a67fbf6597122c4a5e2c48716bc441364357eef in linux 4.19.y/4.19.87 355d991cb6ff6ae76b5e28b8edae144124c730e4 in mainline linux
2019-12-02tc_windup: separate timecounter.tc_freq_adj from timehands.th_adjustmentcheloha
We currently mix timecounter.tc_freq_adj and timehands.th_adjtimedelta in ntp_update_second() to produce timehands.th_adjustment, our net skew. But if you set a low enough adjfreq(2) adjustment you can freeze time. This prevents ntp_update_second() from running again. So even if you then set a sane adjfreq(2) you cannot unfreeze time without rebooting. If we just reread timecounter.tc_freq_adj every time we recompute timehands.th_scale we avoid this trap. visa@ notes that this is more costly than what we currently do but that the cost itself is negligible. Intuitively, timecounter.tc_freq_adj is a constant skew and should be handled separately from timehands.th_adjtimedelta, an adjustment that we chip away at very slowly. tedu@ notes that this problem is sort-of an argument for imposing range limits on adjfreq(2) inputs. He's right, but I think we should still separate the counter adjustment from the adjtime(2) adjustment, with or without range limits. ok visa@
2019-12-02For 32 bit systems, cast the long long used by strtoll() to unsigned longTheo de Raadt
and then a void * for calling the hexdump() operator with bluhm
2019-12-01Add sizes for free() in auvia(4).Frederic Cambus
OK mpi@
2019-12-01Don't require a valid sa_len for a bunch of IPv4 "get" ioctlsJeremie Courreges-Anglas
Same fix as for the IPv6 case. Fixes a regression in ports/net/openvpn spotted by landry@, ok bluhm@
2019-12-01comply with POSIX and make execve() return EACCES for directoriesChristian Weisgerber
ok millert@ deraadt@
2019-12-01Tweak variable names to be consistent with 'pg_code' and 'pg_length'Kenneth R Westerback
field names in sense mode structs.
2019-12-01Make prototype and implementation signatures the same by removingKenneth R Westerback
'const' from the only two 'const int' instances.
2019-12-01Don't overwrite original error returned by scsi_do_mode_sense().Kenneth R Westerback
2019-12-01Change Elf64 types and structs to match the System V ABI specification.Jonathan Gray
Change Elf64_Half from a uint32_t type to a uint16_t type. The size of structs do not change as the previous uses of Elf64_Half become Elf64_Word (uint32_t). Remove Elf64_Quarter as 16 bit values now use Elf64_Half. Replace Elf_Byte use with unsigned char. Change some uses of Elf64_Xword to Elf64_Addr (both uint64_t). Corrects behaviour with libelf where the file size of a symtab section came back as 26 not 24 as libelf determines this by the size of a the involved types not the size of the struct in exec_elf.h. As a result libelf's elf_getdata() returned ELF_E_SECTION due to the size of the section not being a multiple of the file size of the section type. This occurred with the new runtime linker for radeon shaders in Mesa 19.2. Sync description of Elf32 and Elf64 types in elf(5) with FreeBSD and adjust types in structs mentioned. ok guenther@ deraadt@
2019-12-01revert exec_elf.h rev 1.85Jonathan Gray
committed by mistake as part of an unrelated change
2019-12-01this hexdump tie-in is incorrect, disable for nowTheo de Raadt
2019-12-01Remove unused test program.Visa Hankala
OK deraadt@
2019-11-30temporarily neuter the syscall-callfrom check as a few peopleTheo de Raadt
haven't crossed over the ABI break as easily as expected.
2019-11-30cardbus(4): tsleep(9) -> tsleep_nsec(9); ok jca@cheloha
2019-11-30pckbc(4): tsleep(9) -> tsleep_nsec(9); ok jca@cheloha
2019-11-30onewire(4), owtemp(4): tsleep(9) -> tsleep_nsec(9); ok jca@cheloha
2019-11-30utwitch(4): tsleep(9) -> tsleep_nsec(9); ok jca@cheloha
2019-11-30Move kernel locking inside the sleep machinery. This enables callingVisa Hankala
rwsleep(9) with PCATCH and rw_enter(9) with RW_INTR without the kernel lock. In addition, now tsleep(9) with PCATCH should be safe to use without the kernel lock if the sleep is purely time-based. Tested by anton@, cheloha@, chris@ OK anton@, cheloha@
2019-11-29Fix size of reserved bytes section in xsave header.mortimer
ok guenther@ kettenis@
2019-11-29Add uvm_objfree function to free all pages in a uvm_obj in one go.Bob Beck
Use this in the buffer cache to free all the pages from a buffer, resulting in a considerable speedup when throwing away pages from the buffer cache. Lots of work done with mlarkin and kettenis ok kettinis@ deraadt@
2019-11-29Change the default security level for incoming IPsec flows fromtobhe
isakmpd and iked to REQUIRE. Filter policy violations earlier. ok sashan@ bluhm@
2019-11-29Improve support for the RK3399's eMMC in sdhc(4). Fix the compatiblePatrick Wildt
check for the quirk that makes sure we don't try to change the voltage to anything else. Configure the eMMC Core's clock, register ourselves as clock driver for rkemmcphy(4) to use, and enable the PHY. Tested by kurt@ ok kettenis@
2019-11-29Add rkemmcphy(4), a driver for the RK3399's eMMC PHY.Patrick Wildt
2019-11-29Make rkgrf(4) behave like a simplebus(4) so we can attach driversPatrick Wildt
to its subnodes, which are some PHYs. Tested by kurt@ ok kettenis@