MFC r345009:Fix a scribbler in the PMS driver.The ESGL bit was left uninitialized when executing the REPORT LUNSioctl. This could allow a zeroed data buffer to be treated as ascatter/gather lis
MFC r345009:Fix a scribbler in the PMS driver.The ESGL bit was left uninitialized when executing the REPORT LUNSioctl. This could allow a zeroed data buffer to be treated as ascatter/gather list. The firmware would eventually walk past the endof the data buffer, potentially find what looked like a validaddress/length pair, and write the result to semi-random memory.Obtained from: Dell EMC IsilonSponsored by: Dell EMC Isilon
show more ...
MFC r344473:CID 1332000: Logically dead code in sys/dev/pms/RefTisa/tisa/sassata/sas/ini/itdio.cA pointer is first tested for NULL. If non-NULL, another pointer isset equal to the first. The sec
MFC r344473:CID 1332000: Logically dead code in sys/dev/pms/RefTisa/tisa/sassata/sas/ini/itdio.cA pointer is first tested for NULL. If non-NULL, another pointer isset equal to the first. The second pointer is then checked for NULLand an error path taken if so. This second test and the associatedpath is dead code as the pointer value, having just been checked forNULL, cannot be NULL at this point. Remove the dead code.Sponsored by: Dell EMC Isilon
pms/freebsd: fix compiler warnings - A number of unused variable warnings, - a missing prototype warning (actually a dead function), - and a potential use of an uninitialized variable.Reviewed
pms/freebsd: fix compiler warnings - A number of unused variable warnings, - a missing prototype warning (actually a dead function), - and a potential use of an uninitialized variable.Reviewed by: pfgSponsored by: Dell EMC IsilonDifferential Revision: https://reviews.freebsd.org/D12683
sys/dev: Replace zero with NULL for pointers.Makes things easier to read, plus architectures may set NULL to somethingdifferent than zero.Found with: devel/coccinelleMFC after: 3 weeks
Always null-terminate ccb_pathinq.(sim_vid|hba_vid|dev_name)The sim_vid, hba_vid, and dev_name fields of struct ccb_pathinq arefixed-length strings. AFAICT the only place they're read is insbin/c
Always null-terminate ccb_pathinq.(sim_vid|hba_vid|dev_name)The sim_vid, hba_vid, and dev_name fields of struct ccb_pathinq arefixed-length strings. AFAICT the only place they're read is insbin/camcontrol/camcontrol.c, which assumes they'll be null-terminated.However, the kernel doesn't null-terminate them. A bunch of copy-pasted codeuses strncpy to write them, and doesn't guarantee null-termination. For atleast 4 drivers (mpr, mps, ciss, and hyperv), the hba_vid field actuallyoverflows. You can see the result by doing "camcontrol negotiate da0 -v".This change null-terminates those fields everywhere they're set in thekernel. It also shortens a few strings to ensure they'll fit within the16-character field.PR: 215474Reported by: CoverityCID: 1009997 1010000 1010001 1010002 1010003 1010004 1010005CID: 1331519 1010006 1215097 1010007 1288967 1010008 1306000CID: 1211924 1010009 1010010 1010011 1010012 1010013 1010014CID: 1147190 1010017 1010016 1010018 1216435 1010020 1010021CID: 1010022 1009666 1018185 1010023 1010025 1010026 1010027CID: 1010028 1010029 1010030 1010031 1010033 1018186 1018187CID: 1010035 1010036 1010042 1010041 1010040 1010039Reviewed by: imp, sephe, slmMFC after: 4 weeksSponsored by: Spectra Logic CorpDifferential Revision: https://reviews.freebsd.org/D9037Differential Revision: https://reviews.freebsd.org/D9038
Don't repeat the the word 'the'(one manual change to fix grammar)Confirmed With: dbApproved by: secteam (not really, but this is a comment typo fix)
dev/pms: minor spelling fixes for the FreeBSD-specific part.
sys: use our roundup2/rounddown2() macros when param.h is available.rounddown2 tends to produce longer lines than the original codeand when the code has a high indentation level it was not really
sys: use our roundup2/rounddown2() macros when param.h is available.rounddown2 tends to produce longer lines than the original codeand when the code has a high indentation level it was not reallyadvantageous to do the replacement.This tries to strike a balance between readability using the macrosand flexibility of having the expressions, so not everything isconverted.
As <machine/pmap.h> is included from <vm/pmap.h>, there is no need toinclude it explicitly when <vm/pmap.h> is already included.Reviewed by: alc, kibDifferential Revision: https://reviews.freebsd
As <machine/pmap.h> is included from <vm/pmap.h>, there is no need toinclude it explicitly when <vm/pmap.h> is already included.Reviewed by: alc, kibDifferential Revision: https://reviews.freebsd.org/D5373
ostiInitiatorIOCompleted(): wrong sizeof() argument.Detected by: PVS Static AnalysisCID: 1331601, 1331523
Don't forget to check the vendor when probing. Also, there's no needto double check for if the card has probed before. In fact, there's noreason to single check either. Simplify the code as a resul
Don't forget to check the vendor when probing. Also, there's no needto double check for if the card has probed before. In fact, there's noreason to single check either. Simplify the code as a result.$FreeBSD$ added to lxutil.c in a non-standard way to help keep thediffs with upstream to a minimum.Differential Revision: https://reviews.freebsd.org/D3263
Disable debugging.Submitted by: Vasanthalakshmi Tharmarajan <[email protected]>Reviewed by: scottl
Driver 'pmspcv' added. Supports PMC-Sierra PM8001/8081/8088/8089/8074/8076/8077 SAS/SATA HBA Controllers.