module: Convert symbol namespace to string literalClean up the existing export namespace code along the same lines ofcommit 33def8498fdd ("treewide: Convert macro and uses of __section(foo)to __s
module: Convert symbol namespace to string literalClean up the existing export namespace code along the same lines ofcommit 33def8498fdd ("treewide: Convert macro and uses of __section(foo)to __section("foo")") and for the same reason, it is not desired for thenamespace argument to be a macro expansion itself.Scripted using git grep -l -e MODULE_IMPORT_NS -e EXPORT_SYMBOL_NS | while read file; do awk -i inplace ' /^#define EXPORT_SYMBOL_NS/ { gsub(/__stringify\(ns\)/, "ns"); print; next; } /^#define MODULE_IMPORT_NS/ { gsub(/__stringify\(ns\)/, "ns"); print; next; } /MODULE_IMPORT_NS/ { $0 = gensub(/MODULE_IMPORT_NS\(([^)]*)\)/, "MODULE_IMPORT_NS(\"\\1\")", "g"); } /EXPORT_SYMBOL_NS/ { if ($0 ~ /(EXPORT_SYMBOL_NS[^(]*)\(([^,]+),/) { if ($0 !~ /(EXPORT_SYMBOL_NS[^(]*)\(([^,]+), ([^)]+)\)/ && $0 !~ /(EXPORT_SYMBOL_NS[^(]*)\(\)/ && $0 !~ /^my/) { getline line; gsub(/[[:space:]]*\\$/, ""); gsub(/[[:space:]]/, "", line); $0 = $0 " " line; } $0 = gensub(/(EXPORT_SYMBOL_NS[^(]*)\(([^,]+), ([^)]+)\)/, "\\1(\\2, \"\\3\")", "g"); } } { print }' $file; doneRequested-by: Masahiro Yamada <[email protected]>Signed-off-by: Peter Zijlstra (Intel) <[email protected]>Link: https://mail.google.com/mail/u/2/#inbox/FMfcgzQXKWgMmjdFwwdsfgxzKpVHWPlcAcked-by: Greg KH <[email protected]>Signed-off-by: Linus Torvalds <[email protected]>
show more ...
vfio/qat: fix overflow check in qat_vf_resume_write()The unsigned variable `size_t len` is cast to the signed type `loff_t`when passed to the function check_add_overflow(). This function considers
vfio/qat: fix overflow check in qat_vf_resume_write()The unsigned variable `size_t len` is cast to the signed type `loff_t`when passed to the function check_add_overflow(). This function considersthe type of the destination, which is of type loff_t (signed),potentially leading to an overflow. This issue is similar to the onedescribed in the link below.Remove the cast.Note that even if check_add_overflow() is bypassed, by setting `len` toa value that is greater than LONG_MAX (which is considered as a negativevalue after the cast), the function copy_from_user(), invoked a few lineslater, will not perform any copy and return `len` as (len > INT_MAX)causing qat_vf_resume_write() to fail with -EFAULT.Fixes: bb208810b1ab ("vfio/qat: Add vfio_pci driver for Intel QAT SR-IOV VF devices")CC: [email protected] # 6.10+Link: https://lore.kernel.org/all/[email protected]Reported-by: Zijie Zhao <[email protected]>Signed-off-by: Giovanni Cabiddu <[email protected]>Reviewed-by: Xin Zeng <[email protected]>Link: https://lore.kernel.org/r/[email protected]Signed-off-by: Alex Williamson <[email protected]>
[tree-wide] finally take no_llseek outno_llseek had been defined to NULL two years ago, in commit 868941b14441("fs: remove no_llseek")To quote that commit, At -rc1 we'll need do a mechanical
[tree-wide] finally take no_llseek outno_llseek had been defined to NULL two years ago, in commit 868941b14441("fs: remove no_llseek")To quote that commit, At -rc1 we'll need do a mechanical removal of no_llseek - git grep -l -w no_llseek | grep -v porting.rst | while read i; do sed -i '/\<no_llseek\>/d' $i done would do it.Unfortunately, that hadn't been done. Linus, could you do that now, sothat we could finally put that thing to rest? All instances are of theform .llseek = no_llseek,so it's obviously safe.Signed-off-by: Al Viro <[email protected]>Signed-off-by: Linus Torvalds <[email protected]>
vfio/qat: Add vfio_pci driver for Intel QAT SR-IOV VF devicesAdd vfio pci variant driver for Intel QAT SR-IOV VF devices. This driverregisters to the vfio subsystem through the interfaces exposed
vfio/qat: Add vfio_pci driver for Intel QAT SR-IOV VF devicesAdd vfio pci variant driver for Intel QAT SR-IOV VF devices. This driverregisters to the vfio subsystem through the interfaces exposed by thesubsystem. It follows the live migration protocol v2 defined inuapi/linux/vfio.h and interacts with Intel QAT PF driver through a setof interfaces defined in qat/qat_mig_dev.h to support live migration ofIntel QAT VF devices.This version only covers migration for Intel QAT GEN4 VF devices.Co-developed-by: Yahui Cao <[email protected]>Signed-off-by: Yahui Cao <[email protected]>Signed-off-by: Xin Zeng <[email protected]>Reviewed-by: Giovanni Cabiddu <[email protected]>Reviewed-by: Kevin Tian <[email protected]>Link: https://lore.kernel.org/r/[email protected]Signed-off-by: Alex Williamson <[email protected]>