nand: create device with 0640 permissionrw-r----- is the usual/standard permissions for such devices.Direct commit to stable/12 as this code has been removed in HEAD.MFC after: 1 weekSponsored
nand: create device with 0640 permissionrw-r----- is the usual/standard permissions for such devices.Direct commit to stable/12 as this code has been removed in HEAD.MFC after: 1 weekSponsored by: The FreeBSD Foundation
show more ...
MFC r349268: nandsim: correct test to avoid out-of-bounds accessPreviously nandsim_chip_status returned EINVAL iff both of user-providedchip->ctrl_num and chip->num were out of bounds. If only on
MFC r349268: nandsim: correct test to avoid out-of-bounds accessPreviously nandsim_chip_status returned EINVAL iff both of user-providedchip->ctrl_num and chip->num were out of bounds. If only one failed thebounds check arbitrary memory would be read and returned.The NAND framework is not built by default, nandsim is not intended forproduction use (it is a simulator), and the nandsim device has root-onlypermissions.admbugs: 827Reported by: Daniel Hodson of elttamSecurity: kernel information leak or DoSSponsored by: The FreeBSD Foundation
Remove Atmel AT91RM9200 and AT91SAM9 support.The last known robust version of this code base was FreeBSD 8.2. Thereare no users of this on current, and all users of it have abandonedthis platform
Remove Atmel AT91RM9200 and AT91SAM9 support.The last known robust version of this code base was FreeBSD 8.2. Thereare no users of this on current, and all users of it have abandonedthis platform or are in legacy mode with a prior version of FreeBSD.All known users on arm@ approved this removal, and there were noobjections.Differential Revision: https://reviews.freebsd.org/D16312
Use M. Warner Losh everywhere on my copyrights.Remove 'All Rights Reserved' where I can.
sys/dev: further adoption of SPDX licensing ID tags.Mainly focus on files that use BSD 2-Clause license, however the tool Iwas using misidentified many licenses so this was mostly a manual - error
sys/dev: further adoption of SPDX licensing ID tags.Mainly focus on files that use BSD 2-Clause license, however the tool Iwas using misidentified many licenses so this was mostly a manual - errorprone - task.The Software Package Data Exchange (SPDX) group provides a specificationto make it easier for automated tools to detect and summarize well knownopensource licenses. We are gradually adopting the specification, notingthat the tags are considered only advisory and do not, in any way,superceed or replace the license texts.
The nandsim(4) simulator driver doesn't have any protection againstraces at least in its ioctl handler, and at the same time it createsdevice entry with 0666 permissions.To plug possible issues i
The nandsim(4) simulator driver doesn't have any protection againstraces at least in its ioctl handler, and at the same time it createsdevice entry with 0666 permissions.To plug possible issues in it:- Mark it as needing Giant.- Switch device mode to 0600.Submitted by: C TurtReviewed by: impMFC after: 1 weekSecurity: Possible double free in ioctl handler
- Allow different slicers for different flash types to be registered with geom_flashmap(4) and teach it about MMC for slicing enhanced user data area partitions. The FDT slicer still is the defau
- Allow different slicers for different flash types to be registered with geom_flashmap(4) and teach it about MMC for slicing enhanced user data area partitions. The FDT slicer still is the default for CFI, NAND and SPI flash on FDT-enabled platforms.- In addition to a device_t, also pass the name of the GEOM provider in question to the slicers as a single device may provide more than provider.- Build a geom_flashmap.ko.- Use MODULE_VERSION() so other modules can depend on geom_flashmap(4).- Remove redundant/superfluous GEOM routines that either do nothing or provide/just call default GEOM (slice) functionality.- Trim/adjust includesSubmitted by: jhibbits (RouterBoard bits)Reviewed by: jhibbits
Fix typo in r311971.Reported by: ohartmann at walstatt.org
Report random flash storage as non-rotating to GEOM_DISK.While doing it, introduce respective constants in geom_disk.h.MFC after: 1 week
Remove NULL checks after M_WAITOK allocations from nand(4).MFC after: 1 month
sys/dev: minor spelling fixes.Most affect comments, very few have user-visible effects.
sys/dev: use our nitems() macro when it is avaliable through param.h.No functional change, only trivial cases are done in this sweep,Drivers that can get further enhancements will be done independ
sys/dev: use our nitems() macro when it is avaliable through param.h.No functional change, only trivial cases are done in this sweep,Drivers that can get further enhancements will be done independently.Discussed in: freebsd-current
Cleanup unnecessary semicolons from the kernel.Found with devel/coccinelle.
No need to test command values this way. There can be only one, eventhough the encoding is bit-wise today...
Remove one more that crept in unnecessarily from previous commit.
Remove some unnecessary includes.
Use the correct le*dec function to decode a 16bit type.PR: 194228Submitted by: David HorwittMFC after: 2 weeks
Map the LAW for the RouterBoard's NAND LBC memory.Without creating a LAW entry, any access to the NAND hangs the CPU.The original intent was to add a quirk to map all of the RouterBoard's LBCadd
Map the LAW for the RouterBoard's NAND LBC memory.Without creating a LAW entry, any access to the NAND hangs the CPU.The original intent was to add a quirk to map all of the RouterBoard's LBCaddress space in one shot, which would fix it for both NAND and the CF, andthat's probably still in the cards. However, for now, this makes NAND usablewithout a separate hack.Things left before the RouterBoard can run standalone:* Add partitions to the NAND (not specified by the FDT, which we currently require).* Create a YAFFS partition for the kernel. The Mikrotik boot loader requires a 4MB partition at the beginning of NAND, with a file called 'kernel' in the root.
CALLOUT_MPSAFE has lost its meaning since r141428, i.e., for more than tenyears for head. However, it is continuously misused as the mpsafe argumentfor callout_init(9). Deprecate the flag and cle
CALLOUT_MPSAFE has lost its meaning since r141428, i.e., for more than tenyears for head. However, it is continuously misused as the mpsafe argumentfor callout_init(9). Deprecate the flag and clean up callout_init() callsto make them more consistent.Differential Revision: https://reviews.freebsd.org/D2613Reviewed by: jhbMFC after: 2 weeks
Implement a driver for the PowerPC-base RouterBoard (RB333/600/800/1100)Summary:This has been tested on the RB800, but should work on the RB333, RB600, andRB1100 as well.It's currently missing
Implement a driver for the PowerPC-base RouterBoard (RB333/600/800/1100)Summary:This has been tested on the RB800, but should work on the RB333, RB600, andRB1100 as well.It's currently missing ECC support, but read and write are complete.Reviewers: impReviewed By: impSubscribers: impDifferential Revision: https://reviews.freebsd.org/D2223
machine/fdt.h no longer exists for powerpc.MFC after: 1 month
Pull in r267961 and r267973 again. Fix for issues reported will follow.
Revert r267961, r267973:These changes prevent sysctl(8) from returning proper output,such as: 1) no output from sysctl(8) 2) erroneously returning ENOMEM with tools like truss(1) or uname(1
Revert r267961, r267973:These changes prevent sysctl(8) from returning proper output,such as: 1) no output from sysctl(8) 2) erroneously returning ENOMEM with tools like truss(1) or uname(1) truss: can not get etype: Cannot allocate memory
Extend the meaning of the CTLFLAG_TUN flag to automatically check ifthere is an environment variable which shall initialize the SYSCTLduring early boot. This works for all SYSCTL types both statica
Extend the meaning of the CTLFLAG_TUN flag to automatically check ifthere is an environment variable which shall initialize the SYSCTLduring early boot. This works for all SYSCTL types both statically anddynamically created ones, except for the SYSCTL NODE type and SYSCTLswhich belong to VNETs. A new flag, CTLFLAG_NOFETCH, has been added tobe used in the case a tunable sysctl has a custom initialisationfunction allowing the sysctl to still be marked as a tunable. Thekernel SYSCTL API is mostly the same, with a few exceptions for somespecial operations like iterating childrens of a static/extern SYSCTLnode. This operation should probably be made into a factored outcommon macro, hence some device drivers use this. The reason forchanging the SYSCTL API was the need for a SYSCTL parent OID pointerand not only the SYSCTL parent OID list pointer in order to quicklygenerate the sysctl path. The motivation behind this patch is to avoidparameter loading cludges inside the OFED driver subsystem. Instead ofadding special code to the OFED driver subsystem to post-load tunablesinto dynamically created sysctls, we generalize this in the kernel.Other changes:- Corrected a possibly incorrect sysctl name from "hw.cbb.intr_mask"to "hw.pcic.intr_mask".- Removed redundant TUNABLE statements throughout the kernel.- Some minor code rewrites in connection to removing not neededTUNABLE statements.- Added a missing SYSCTL_DECL().- Wrapped two very long lines.- Avoid malloc()/free() inside sysctl string handling, in case it iscalled to initialize a sysctl from a tunable, hence malloc()/free() isnot ready when sysctls from the sysctl dataset are registered.- Bumped FreeBSD version to indicate SYSCTL API change.MFC after: 2 weeksSponsored by: Mellanox Technologies
Add fdt binding for nand for Atmel parts. This does little more thanmatch the device. Pinctrl will need to be added before this will work,in addition to migrating the current board_foo.c method of
Add fdt binding for nand for Atmel parts. This does little more thanmatch the device. Pinctrl will need to be added before this will work,in addition to migrating the current board_foo.c method of configuringthese pins to something else. Non-FDT systems won't be affected, yet.
12