Re: [PATCH v2 5/9] i2c: zx2967: don't open code to reject transfers when suspended

2018-12-25 Thread Jun Nie
Wolfram Sang 于2018年12月23日周日 上午4:26写道: > > This is handled by the I2C core meanwhile. > > Signed-off-by: Wolfram Sang > --- > drivers/i2c/busses/i2c-zx2967.c | 8 > 1 file changed, 8 deletions(-) > Reviewed-by: Jun Nie

[PATCH v2] ASoC: sgtl5000: Allow SCLK pad drive strength to be changed

2018-12-25 Thread Alison Wang
This patch introduces "sclk-strength" property to allow SCLK pad drive strength to be changed via device tree. When running playback test on LS1028ARDB, Tx Frame sync error interrupt will occur sometimes. Some noises also exist. After changing SCLK pad drive strength to the maximum value, the

[PATCH v8 06/25] x86/thinkpad_acpi: Use arch_nvram_ops methods instead of nvram_read_byte() and nvram_write_byte()

2018-12-25 Thread Finn Thain
Make use of arch_nvram_ops in the thinkpad_acpi driver so that the nvram_* function exports can be removed. Signed-off-by: Finn Thain Acked-by: Henrique de Moraes Holschuh Reviewed-by: Darren Hart --- I've tested this on a ThinkPad T43. --- drivers/platform/x86/thinkpad_acpi.c | 20

[PATCH v8 01/25] scsi/atari_scsi: Don't select CONFIG_NVRAM

2018-12-25 Thread Finn Thain
On powerpc, setting CONFIG_NVRAM=n builds a kernel with no NVRAM support. Setting CONFIG_NVRAM=m enables the /dev/nvram misc device module without enabling NVRAM support in drivers. Setting CONFIG_NVRAM=y enables the misc device (built-in) and also enables NVRAM support in drivers. m68k shares

[PATCH v8 10/25] m68k/mac: Adopt naming and calling conventions for PRAM routines

2018-12-25 Thread Finn Thain
Adopt the existing *_read_byte and *_write_byte naming convention. Rename via_pram_readbyte and via_pram_writebyte to avoid confusion. Adjust calling conventions of mac_pram_* functions to match the arch_nvram_ops struct methods. Signed-off-by: Finn Thain Acked-by: Geert Uytterhoeven Tested-by:

[PATCH v8 09/25] m68k/atari: Implement arch_nvram_ops methods and enable CONFIG_HAVE_ARCH_NVRAM_OPS

2018-12-25 Thread Finn Thain
Atari RTC NVRAM has a checksum so implement the remaining arch_nvram_ops methods for the set_checksum and initialize ioctls. Enable CONFIG_HAVE_ARCH_NVRAM_OPS. Signed-off-by: Finn Thain Acked-by: Geert Uytterhoeven --- Changed since v7: - Changed the default for CONFIG_NVRAM, because "select

[PATCH v8 04/25] char/nvram: Re-order functions to remove forward declarations and #ifdefs

2018-12-25 Thread Finn Thain
Also give functions more sensible names: nvram_misc_* for misc device ops, nvram_proc_* for proc file ops and nvram_module_* for init and exit functions. This helps to distinguish them from struct nvram_ops methods. Signed-off-by: Finn Thain --- drivers/char/nvram.c | 167

[PATCH v8 08/25] char/nvram: Implement NVRAM read/write methods

2018-12-25 Thread Finn Thain
Refactor the RTC "CMOS" NVRAM functions so that they can be used as arch_nvram_ops methods. Checksumming logic is moved from the misc device operations to the nvram read/write operations. This makes the misc device implementation more generic. This also preserves the locking semantics such that

[PATCH v8 14/25] char/nvram: Add "devname:nvram" module alias

2018-12-25 Thread Finn Thain
Signed-off-by: Finn Thain --- drivers/char/nvram.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/char/nvram.c b/drivers/char/nvram.c index 889123ddace4..b77c27d68762 100644 --- a/drivers/char/nvram.c +++ b/drivers/char/nvram.c @@ -554,3 +554,4 @@ module_exit(nvram_module_exit);

[PATCH v8 18/25] powerpc: Implement nvram sync ioctl

2018-12-25 Thread Finn Thain
Add the powerpc-specific sync() method to struct nvram_ops and implement the corresponding ioctl in the nvram module. This allows the nvram module to replace the generic_nvram module. Signed-off-by: Finn Thain Tested-by: Stan Johnson --- On PPC32, the IOC_NVRAM_SYNC ioctl call always returns 0,

[PATCH v8 11/25] m68k/mac: Use macros for RTC accesses not magic numbers

2018-12-25 Thread Finn Thain
This is intended to improve code style and not affect code behaviour. Signed-off-by: Finn Thain Acked-by: Geert Uytterhoeven Tested-by: Stan Johnson --- arch/m68k/mac/misc.c | 59 ++-- 1 file changed, 41 insertions(+), 18 deletions(-) diff --git

[PATCH v8 24/25] powerpc: Adopt nvram module for PPC64

2018-12-25 Thread Finn Thain
Adopt nvram module to reduce code duplication. This means CONFIG_NVRAM becomes available to CONFIG_PPC64 builds (until now it was only PPC32). The IOC_NVRAM_GET_OFFSET ioctl as implemented on PPC64 validates the offset returned by pmac_get_partition(). Add this test to the nvram module. Note

[PATCH v8 13/25] m68k: Dispatch nvram_ops calls to Atari or Mac functions

2018-12-25 Thread Finn Thain
A multi-platform kernel binary has to decide at run-time how to dispatch the arch_nvram_ops calls. Add a platform-independent arch_nvram_ops struct for this, to replace the atari-specific one. Enable CONFIG_HAVE_ARCH_NVRAM_OPS for Macs. Signed-off-by: Finn Thain Tested-by: Christian T. Steigies

[PATCH v8 21/25] nvram: Drop nvram_* symbol exports and prototypes

2018-12-25 Thread Finn Thain
Drivers now use the arch_nvram_ops calls so remove the function exports and prototypes. nvram_check_checksum() is unused so remove it. Signed-off-by: Finn Thain Acked-by: Geert Uytterhoeven --- arch/m68k/atari/nvram.c | 6 +++--- drivers/char/nvram.c| 27 +--

[PATCH v8 20/25] powerpc, fbdev: Use arch_nvram_ops methods instead of nvram_read_byte() and nvram_write_byte()

2018-12-25 Thread Finn Thain
Make use of arch_nvram_ops in device drivers so that the nvram_* function exports can be removed. Since they are no longer global symbols, rename the PPC32 nvram_* functions appropriately. Signed-off-by: Finn Thain --- arch/powerpc/kernel/setup_32.c | 8

[PATCH v8 15/25] powerpc: Clean up nvram includes

2018-12-25 Thread Finn Thain
The nvram_read_byte() and nvram_write_byte() definitions in asm/nvram.h duplicate those in linux/nvram.h. Get rid of the former to prepare for adoption of struct arch_nvram_ops (which is defined in linux/nvram.h for general use). Signed-off-by: Finn Thain Tested-by: Stan Johnson ---

[PATCH v8 22/25] powerpc: Remove CONFIG_GENERIC_NVRAM and adopt CONFIG_HAVE_ARCH_NVRAM_OPS

2018-12-25 Thread Finn Thain
Switch PPC32 kernels from the generic_nvram module to the nvram module. Also fix a theoretical bug where CHRP omits the chrp_nvram_init() call when CONFIG_NVRAM_MODULE=m. Signed-off-by: Finn Thain Tested-by: Laurent Vivier Tested-by: Stan Johnson --- The change in the name of the module is

[PATCH v8 17/25] powerpc: Implement arch_nvram_ops.get_size() and remove old nvram_* exports

2018-12-25 Thread Finn Thain
Implement arch_nvram_ops for PPC32 and make use of it in the generic_nvram misc device module so that the nvram_* function exports can be removed. Signed-off-by: Finn Thain Tested-by: Stan Johnson --- arch/powerpc/include/asm/nvram.h | 3 --- arch/powerpc/kernel/setup_32.c | 10 +++---

[PATCH v8 00/25] Re-use nvram module

2018-12-25 Thread Finn Thain
The generic NVRAM module, drivers/char/generic_nvram.c, implements a /dev/nvram misc device. This module is used only by 32-bit PowerPC platforms. Unfortunately, it isn't generic enough to be more widely used. The RTC "CMOS" NVRAM module, drivers/char/nvram.c, also implements a /dev/nvram misc

[PATCH v8 23/25] char/generic_nvram: Remove as unused

2018-12-25 Thread Finn Thain
Thereby eliminating some twisted CONFIG_NVRAM logic. Signed-off-by: Finn Thain --- drivers/char/Makefile| 6 +- drivers/char/generic_nvram.c | 160 --- 2 files changed, 1 insertion(+), 165 deletions(-) delete mode 100644 drivers/char/generic_nvram.c

[PATCH v8 25/25] powerpc: Remove pmac_xpram_{read,write} functions

2018-12-25 Thread Finn Thain
The arch_nvram_ops methods provide a uniform API to replace the nvram_{read,write}_byte exports and pmac_xpram_{read,write} functions. The latter API gets removed in this patch. To make that possible, add a get_partition() method to the nvram_ops struct and call it from pmac_time_init().

[PATCH v8 02/25] m68k/atari: Move Atari-specific code out of drivers/char/nvram.c

2018-12-25 Thread Finn Thain
Move the m68k-specific code out of the driver to make the driver generic. I've used 'SPDX-License-Identifier: GPL-2.0+' for the new file because the old file is covered by MODULE_LICENSE("GPL"). Signed-off-by: Finn Thain Tested-by: Christian T. Steigies Acked-by: Geert Uytterhoeven ---

[PATCH v8 07/25] char/nvram: Allow the set_checksum and initialize ioctls to be omitted

2018-12-25 Thread Finn Thain
The drivers/char/nvram module has previously only supported RTC "CMOS" NVRAM, for which it provides appropriate checksum ioctls. Make these ioctls optional so the module can be re-used with other kinds of NVRAM. The ops struct methods that implement the ioctls now return error codes so that a

[PATCH v8 16/25] powerpc: Add missing ppc_md.nvram_size for CHRP and PowerMac

2018-12-25 Thread Finn Thain
Add the nvram_size() function to those PowerPC platforms that don't already have one: CHRP and PowerMac. This means that the ppc_md.nvram_size() function can be used to implement arch_nvram_ops.get_size() Since we are addressing inconsistencies here, also rename chrp_nvram_read and

[PATCH v8 12/25] m68k/mac: Fix PRAM accessors

2018-12-25 Thread Finn Thain
PMU-based m68k Macs pre-date PowerMac-style NVRAM. Use the appropriate PMU commands. Also implement the missing XPRAM accessors for VIA-based Macs. Signed-off-by: Finn Thain Acked-by: Geert Uytterhoeven Tested-by: Stan Johnson --- Changed since v7: - Updated PMU response decoding due to

[PATCH v8 19/25] powerpc, fbdev: Use NV_CMODE and NV_VMODE only when CONFIG_PPC32 && CONFIG_PPC_PMAC && CONFIG_NVRAM

2018-12-25 Thread Finn Thain
This patch addresses inconsistencies in Mac framebuffer drivers and their use of Kconfig symbols relating to NVRAM, so PPC64 can use CONFIG_NVRAM. Macintosh framebuffer drivers use default settings for color mode and video mode that are found in NVRAM. On PCI Macs, MacOS stores display settings

[PATCH v8 03/25] m68k/atari: Replace nvram_{read,write}_byte with arch_nvram_ops

2018-12-25 Thread Finn Thain
By implementing an arch_nvram_ops struct, any platform can re-use the drivers/char/nvram.c module without needing any arch-specific code in that module. Atari does so here. Atari has one user of nvram_check_checksum() whereas the other "CMOS" platforms don't use that function at all. Replace this

[PATCH v8 05/25] char/nvram: Adopt arch_nvram_ops

2018-12-25 Thread Finn Thain
Different platforms and architectures offer different NVRAM sizes and access methods. E.g. PPC32 has byte-at-a-time accessor functions whereas PPC64 has byte-range accessor functions. Adopt the nvram_ops struct so the nvram module can call such functions as are defined by the various platforms and

Re: [PATCH] acpi: fix a potential inconsistency caused by double-fetch

2018-12-25 Thread kbuild test robot
Hi Kangjie, Thank you for the patch! Perhaps something to improve: [auto build test WARNING on pm/linux-next] [also build test WARNING on v4.20 next-20181224] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system] url:

Re: [PATCH v7 1/2] dmaengine: 8250_mtk_dma: add MediaTek uart DMA support

2018-12-25 Thread Nicolas Boichat
On Tue, Dec 25, 2018 at 8:06 PM Long Cheng wrote: > > Thanks for your comments. > > On Tue, 2018-12-25 at 15:16 +0800, Nicolas Boichat wrote: > > Not a full review, a few comments below. > > > > Thanks, > > > > would you like help to full review at this version patch? and then i > can modify

[RFC PATCH] media: rcar-vin: Allow independent VIN link enablement

2018-12-25 Thread Steve Longerbeam
There is a block of code in rvin_group_link_notify() that prevents enabling a link to a VIN node if any entity in the media graph is in use. This prevents enabling a VIN link even if there is an in-use entity somewhere in the graph that is independent of the link's pipeline. For example, the code

Re: [GIT PULL for v4.21] First part of media patches

2018-12-25 Thread pr-tracker-bot
The pull request you sent on Thu, 20 Dec 2018 10:32:23 -0200: > git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media > tags/media/v4.20-6 has been merged into torvalds/linux.git: https://git.kernel.org/torvalds/c/5813540b584c3b1a507d1c61896bec164cad0905 Thank you! --

Re: [GIT PULL for v4.21] second set of media patches: ipu3 driver

2018-12-25 Thread pr-tracker-bot
The pull request you sent on Thu, 20 Dec 2018 10:45:44 -0200: > git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media > tags/media/v4.20-7 has been merged into torvalds/linux.git: https://git.kernel.org/torvalds/c/996680d461f8f759082e64f2395c1f7c25d9d549 Thank you! --

Re: [git pull] drm for 4.21-rc1 (for the merge window).

2018-12-25 Thread pr-tracker-bot
The pull request you sent on Fri, 14 Dec 2018 13:20:36 +1000: > git://anongit.freedesktop.org/drm/drm tags/drm-next-2018-12-14 has been merged into torvalds/linux.git: https://git.kernel.org/torvalds/c/4971f090aa7f6ce5daa094ce4334f6618f93a7eb Thank you! -- Deet-doot-dot, I am a bot.

Re: [GIT PULL] mtd: Changes for 4.21

2018-12-25 Thread pr-tracker-bot
The pull request you sent on Wed, 19 Dec 2018 17:07:22 +0100: > git://git.infradead.org/linux-mtd.git tags/mtd/for-4.21 has been merged into torvalds/linux.git: https://git.kernel.org/torvalds/c/eaa76499711535fd64d747cc4ef0d78ab0fd41c6 Thank you! -- Deet-doot-dot, I am a bot.

Re: [GIT PULL] ACPI updates for v4.21-rc1

2018-12-25 Thread pr-tracker-bot
The pull request you sent on Fri, 21 Dec 2018 12:08:11 +0100: > git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git > acpi-4.21-rc1 has been merged into torvalds/linux.git: https://git.kernel.org/torvalds/c/e6d1315006383e525595bb3337d08bccec373ccc Thank you! -- Deet-doot-dot, I

Re: [GIT PULL] sound updates for 4.21

2018-12-25 Thread pr-tracker-bot
The pull request you sent on Thu, 20 Dec 2018 16:38:30 +0100: > git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound.git > tags/sound-4.21-rc1 has been merged into torvalds/linux.git: https://git.kernel.org/torvalds/c/8e61e7b5c4de2bea534438bd7a008accd85492b0 Thank you! -- Deet-doot-dot,

Re: [GIT PULL] Power management updates for v4.21-rc1

2018-12-25 Thread pr-tracker-bot
The pull request you sent on Fri, 21 Dec 2018 12:06:11 +0100: > git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git pm-4.21-rc1 has been merged into torvalds/linux.git: https://git.kernel.org/torvalds/c/1e2af254ef130e37d9fb3cb1bc9bfbf6ea184b4a Thank you! -- Deet-doot-dot, I am a

Re: [GIT PULL] Device properties framework updates for v4.21-rc1

2018-12-25 Thread pr-tracker-bot
The pull request you sent on Fri, 21 Dec 2018 12:10:10 +0100: > git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git > devprop-4.21-rc1 has been merged into torvalds/linux.git: https://git.kernel.org/torvalds/c/d8924c0d76aaa52e4811b5c64115d9a7f36cc73a Thank you! --

Re: [GIT PULL] i3c: Initial pull request

2018-12-25 Thread pr-tracker-bot
The pull request you sent on Wed, 19 Dec 2018 16:54:47 +0100: > git://git.kernel.org/pub/scm/linux/kernel/git/i3c/linux.git tags/i3c/for-4.21 has been merged into torvalds/linux.git: https://git.kernel.org/torvalds/c/b3cc2bfe7244e848f5e8caa77bbdc72c04abd17c Thank you! -- Deet-doot-dot, I am a

Re: [GIT PULL] regulator updates for v4.21

2018-12-25 Thread pr-tracker-bot
The pull request you sent on Mon, 24 Dec 2018 18:58:48 +: > https://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator.git > tags/regulator-v4.21 has been merged into torvalds/linux.git: https://git.kernel.org/torvalds/c/79f20778fb228ae372cd7602745382fd4543ef31 Thank you! --

Re: [GIT PULL] pwm: Changes for v4.21-rc1

2018-12-25 Thread pr-tracker-bot
The pull request you sent on Mon, 24 Dec 2018 12:15:08 +0100: > git://git.kernel.org/pub/scm/linux/kernel/git/thierry.reding/linux-pwm.git > tags/pwm/for-4.21-rc1 has been merged into torvalds/linux.git: https://git.kernel.org/torvalds/c/d923fd6dc133ee8d8fe800e4e4beb9175368b21b Thank you! --

Re: [GIT PULL] EDAC pile for 4.21

2018-12-25 Thread pr-tracker-bot
The pull request you sent on Thu, 20 Dec 2018 21:11:45 +0100: > git://git.kernel.org/pub/scm/linux/kernel/git/bp/bp.git tags/edac_for_4.21 has been merged into torvalds/linux.git: https://git.kernel.org/torvalds/c/b271b2127e6654a72dc1685f0825fe1cc2f36939 Thank you! -- Deet-doot-dot, I am a

Re: [GIT PULL] SPI updates for v4.21

2018-12-25 Thread pr-tracker-bot
The pull request you sent on Mon, 24 Dec 2018 19:10:47 +: > https://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi.git tags/spi-v4.21 has been merged into torvalds/linux.git: https://git.kernel.org/torvalds/c/0051db82182bfd80d6c76982bcb36b09eb338a89 Thank you! -- Deet-doot-dot, I am

Re: [GIT PULL] LED updates for 4.21-rc1

2018-12-25 Thread pr-tracker-bot
The pull request you sent on Fri, 21 Dec 2018 16:54:51 +0100: > git://git.kernel.org/pub/scm/linux/kernel/git/j.anaszewski/linux-leds.git > tags/leds-for-4.21-rc1 has been merged into torvalds/linux.git: https://git.kernel.org/torvalds/c/4e4390ad067a61ce4e7607bd0df31f19a4caa36a Thank you! --

Re: [GIT PULL] regmap updates for v4.21

2018-12-25 Thread pr-tracker-bot
The pull request you sent on Mon, 24 Dec 2018 19:15:32 +: > https://git.kernel.org/pub/scm/linux/kernel/git/broonie/regmap.git > tags/regmap-v4.21 has been merged into torvalds/linux.git: https://git.kernel.org/torvalds/c/b1669432b3555954124ffd987a6ff2308344c88f Thank you! --

Re: [GIT PULL] clk changes for the merge window

2018-12-25 Thread pr-tracker-bot
The pull request you sent on Fri, 21 Dec 2018 13:34:08 -0800: > https://git.kernel.org/pub/scm/linux/kernel/git/clk/linux.git > tags/clk-for-linus has been merged into torvalds/linux.git: https://git.kernel.org/torvalds/c/1fbb2dc6f0ce95e73b9bd7e8e899089f5cebc99a Thank you! -- Deet-doot-dot,

Re: [GIT PULL] platform-drivers-x86 for 4.21-1

2018-12-25 Thread pr-tracker-bot
The pull request you sent on Wed, 12 Dec 2018 16:02:25 +0200: > git://git.infradead.org/linux-platform-drivers-x86.git > tags/platform-drivers-x86-v4.21-1 has been merged into torvalds/linux.git: https://git.kernel.org/torvalds/c/c76cd634eb5bfd497617ea224a54a03b545c8c4d Thank you! --

[PATCH] scsi: avoid a double-fetch and a redundant copy

2018-12-25 Thread Kangjie Lu
What we need is only "pack_id", so do not create a heap object or copy the whole object in. The fix efficiently copies "pack_id" only. Signed-off-by: Kangjie Lu --- drivers/scsi/sg.c | 4 ++-- kernel/sched/core.c | 18 -- 2 files changed, 14 insertions(+), 8 deletions(-)

Re: [PATCH V5 2/4] thermal: imx_sc: add i.MX system controller thermal support

2018-12-25 Thread Eduardo Valentin
On Thu, Dec 20, 2018 at 09:08:32AM +, Anson Huang wrote: > i.MX8QXP is an ARMv8 SoC which has a Cortex-M4 system controller > inside, the system controller is in charge of controlling power, > clock and thermal sensors etc.. > > This patch adds i.MX system controller thermal driver support, >

[PATCH] staging: wilc1000: make function wilc_get_stats_async static

2018-12-25 Thread Marko Stankovic
Makes local function wilc_get_stats_async() static Cleans up sparse warning: symbol 'wilc_get_stats_async' was not declared. Should it be static? Signed-off-by: Marko Stankovic --- drivers/staging/wilc1000/host_interface.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

[PATCH] staging: wilc100: make function wilc_get_stats_async static

2018-12-25 Thread Marko Stankovic
Makes local function wilc_get_stats_async() static Cleans up sparse warning: symbol 'wilc_get_stats_async' was not declared. Should it be static? Signed-off-by: Marko Stankovic --- drivers/staging/wilc1000/host_interface.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

Re: [PATCH] acpi: fix a potential inconsistency caused by double-fetch

2018-12-25 Thread kbuild test robot
Hi Kangjie, Thank you for the patch! Yet something to improve: [auto build test ERROR on pm/linux-next] [also build test ERROR on v4.20 next-20181224] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system] url:

[PATCH] sched: fix a potential double-fetch bug in sched_copy_attr

2018-12-25 Thread Kangjie Lu
"uattr->size" is copied in from user space and checked. However, it is copied in again after the security check. A malicious user may race to change it. The fix checks if uattr->size is ever changed after the check. Signed-off-by: Kangjie Lu --- kernel/sched/core.c | 18 -- 1

Re: [PATCH 00/20] drop useless LIST_HEAD

2018-12-25 Thread Tom Psyborg
there was discussion about this just some days ago. CC 4-5 lists is more than enough On 23/12/2018, Julia Lawall wrote: > > > On Sun, 23 Dec 2018, Tom Psyborg wrote: > >> Why do you CC this to so many lists? > > Because the different files are in different subsystems. The cover letter > goes to

[PATCH] acpi: fix a potential inconsistency caused by double-fetch

2018-12-25 Thread Kangjie Lu
"user_buf->length" is in user space, and copied in twice. The second copy is after it passes the security check. If a user program races to change user_buf->length in user space, the data fetched in the second copy may invalidate the security check. The fix avoids the double-fetch issue by using

Re: [PATCH] scsi: avoid a double-fetch and a redundant copy

2018-12-25 Thread kbuild test robot
Hi Kangjie, Thank you for the patch! Perhaps something to improve: [auto build test WARNING on scsi/for-next] [also build test WARNING on v4.20 next-20181224] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system] url:

Re: [PATCH] scsi: avoid a double-fetch and a redundant copy

2018-12-25 Thread kbuild test robot
Hi Kangjie, Thank you for the patch! Yet something to improve: [auto build test ERROR on scsi/for-next] [also build test ERROR on v4.20 next-20181224] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system] url:

[PATCH] scsi: a potential double-fetch bug when copying msg

2018-12-25 Thread Kangjie Lu
user_msg[0] is copied in twice from user space. It contains size and is critical. The fix ensures it is not changed in the second copy. Signed-off-by: Kangjie Lu --- drivers/scsi/dpt_i2o.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/scsi/dpt_i2o.c b/drivers/scsi/dpt_i2o.c

[PATCH] scsi: fix a double-fetch bug in adpt_i2o_passthru

2018-12-25 Thread Kangjie Lu
user_msg[0] is a size variable, which is copied in from user space and checked. It is copied in again from user space after the check, and used in the following execution. Malicious user programs can race to change user_msg[0] between the two copies, leading to incorrect size. The fix ensures to

Re: [GIT PULL for v4.21] second set of media patches: ipu3 driver

2018-12-25 Thread Linus Torvalds
On Thu, Dec 20, 2018 at 4:45 AM Mauro Carvalho Chehab wrote: > > Also, it would be good if you merge first the docs-next pull request from > Jon, as otherwise, you'll see some warnings when building documentation, > due to an issue at scripts/kernel-doc, whose fix is at documentation tree. I

[PATCH] scsi: aacraid: fix a potential data inconsistency caused by double-fetch

2018-12-25 Thread Kangjie Lu
"user_srb->count" may be changed by malicious user races. Let's set "user_srbcmd->count" fetched in the second copy to be the one fetched in the first copy. Signed-off-by: Kangjie Lu --- drivers/scsi/aacraid/commctrl.c | 2 ++ 1 file changed, 2 insertions(+) diff --git

Re: [PATCH] ubifs: Get/put page when changing PG_private

2018-12-25 Thread Richard Weinberger
Am Dienstag, 25. Dezember 2018, 03:42:37 CET schrieb zhangjun: > Hello,richard > > > Before fully understanding this regression, in order to fix the bug of > cma_alloc(), > submit a conservative patch that modifies count in iomap_migrate_page(). > Can you consider merging first? No. There is

[PATCH] scsi: avoiding fetching signature from user space again after check

2018-12-25 Thread Kangjie Lu
The signature is checked so that it must be "MEGANIT". After the check, if we fetch the signature again from user space, it may have been modified by malicious user programs through race conditions. The fix avoids fetching the signature again. Signed-off-by: Kangjie Lu ---

Re: [PATCH] fs: coda: fix a double-fetch case in coda_psdev_write

2018-12-25 Thread Jan Harkes
This has come up before, and as you noticed nothing in that header is looked at after that second copy. Also if the user space cache manager was trying to be malicious it wouldn't have to resort to multi-threaded race conditions. It could make a setuid root shell appear, or many other things a

[PATCH] scsi: fix a double-fetch bug in sg_write

2018-12-25 Thread Kangjie Lu
"opcode" has been copied in from user space and checked. We should not copy it in again, which may have been modified by malicous multi-threading user programs through race conditions. The fix uses the opcode fetched in the first copy. Signed-off-by: Kangjie Lu --- drivers/scsi/sg.c | 3 ++- 1

[PATCH] scsi: avoid a double-fetch and a redundant copy

2018-12-25 Thread Kangjie Lu
What we need is only "pack_id", so do not create a heap object or copy the whole object in. The fix efficiently copies "pack_id" only. Signed-off-by: Kangjie Lu --- drivers/scsi/sg.c | 12 ++-- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/drivers/scsi/sg.c

[PATCH] hwtracing: stm: avoid a double-fetch case when fetching policy id

2018-12-25 Thread Kangjie Lu
"size" is fetched from user space and security checked. The fix avoids fetching it again. Since "size" is no longer used after the second fetch in the current code, so let's just skip copying "size" in the second fetch. Signed-off-by: Kangjie Lu --- drivers/hwtracing/stm/core.c | 3 ++- 1 file

[PATCH] wmi: avoid a double-fetch issue in wmi_ioctl

2018-12-25 Thread Kangjie Lu
buf->length is first copied in from user space and security-checked. The second copy issued by copy_from_user copies it again. The data in user space may have been modified by malicious users. filter_callback() further uses the potentially modified data. The fix avoids the double-fetch that

[PATCH] fs: coda: fix a double-fetch case when copy data to req->uc_data

2018-12-25 Thread Kangjie Lu
"hdr" has been copied in from user space and "hdr.opcode" is checked. The code copies it again. User space data between the two copies is subject to modification if the user-space code is multithreaded and malicious. The modification may invalidate the check. The fix avoids copying the header

[PATCH] fs: coda: fix a double-fetch case in coda_psdev_write

2018-12-25 Thread Kangjie Lu
"hdr" has been copied in from user space and "hdr.opcode" is checked. The code copies it again. User space data between the two copies is subject to modification if the user-space code is multithreaded and malicious. The modification may invalidate the check. In the original code, "hdr.opcode" is

Re: Racoh Computer (Fair Pay OS) Year End Summary (slight update/correction)

2018-12-25 Thread Ywe Cærlyn
Racoh Computer design year end summary: I have been working with the philosophy behind Racoh Computer the last half year and a bit more, an ultimate computer based on principles from my research on monotheism that has been top 1% on academia.edu, and present a summary of it:

Re: You removed Weboob package over political reasons? Whole Internet laughs at you

2018-12-25 Thread Stefan Monnier
> We, the men who actually do work, are treated as the same > worker-slaves everywhere. I wasn't too sure whether the Debian guys were making the right decision, but when I read the above, I'm now convinced that they did. Stefan

Re: [PATCH net V2 4/4] vhost: log dirty page correctly

2018-12-25 Thread Michael S. Tsirkin
On Tue, Dec 25, 2018 at 05:43:25PM +0800, Jason Wang wrote: > > On 2018/12/25 上午1:41, Michael S. Tsirkin wrote: > > On Mon, Dec 24, 2018 at 11:43:31AM +0800, Jason Wang wrote: > > > On 2018/12/14 下午9:20, Michael S. Tsirkin wrote: > > > > On Fri, Dec 14, 2018 at 10:43:03AM +0800, Jason Wang wrote:

Re: [PATCH v4 1/2] spi: Add Renesas R-Car Gen3 RPC SPI controller driver

2018-12-25 Thread Sergei Shtylyov
On 12/24/2018 09:52 AM, Mason Yang wrote: > Add a driver for Renesas R-Car Gen3 RPC SPI controller. > > Signed-off-by: Mason Yang > --- > drivers/spi/Kconfig | 6 + > drivers/spi/Makefile | 1 + > drivers/spi/spi-renesas-rpc.c | 788 >

[RFC PATCH 0/1] mm: add a warning about high order allocations

2018-12-25 Thread Konstantin Khorenko
Q: Why do we need to bother at all? A: If a node is highly loaded and its memory is significantly fragmented (unfortunately almost any node with serious load has highly fragmented memory) then any high order memory allocation can trigger massive memory shrink and result in quite a big allocation

[PATCH 1/1] mm/page_alloc: add a warning about high order allocations

2018-12-25 Thread Konstantin Khorenko
Adds sysctl "vm.warn_high_order". If set it will warn about allocations with order >= vm.warn_high_order. Prints only 32 warnings at most and skips all __GFP_NOWARN allocations. The code is under config option, disabled by default. If enabled, default vm.warn_high_order is 3

Re: [PATCH -next] ASoC: Intel: remove set but not used variable 'stage_type'

2018-12-25 Thread kbuild test robot
Hi YueHaibing, Thank you for the patch! Perhaps something to improve: [auto build test WARNING on next-20181224] url: https://github.com/0day-ci/linux/commits/YueHaibing/ASoC-Intel-remove-set-but-not-used-variable-stage_type/20181225-195025 config: x86_64-allmodconfig (attached as .config

Re: tpm_tis TPM2.0 not detected on cold boot

2018-12-25 Thread Michael Niewöhner
On Sun, 2018-12-23 at 12:55 +0100, Michael Niewöhner wrote: > Hi Mimi, > > On Sat, 2018-12-22 at 17:53 -0500, Mimi Zohar wrote: > > On Sat, 2018-12-22 at 14:47 +0100, Michael Niewöhner wrote: > > > > > When I remove the timeout and boot directly to the linux kernel, I get > > > that > > > "2314

Re: [PATCH v1 06/11] platform/x86: apple-gmux: hide PCI specific code

2018-12-25 Thread Sinan Kaya
On Mon, Dec 24, 2018 at 5:05 AM Andy Shevchenko wrote: > > > > On Saturday, December 22, 2018, Lukas Wunner wrote: >> >> On Sat, Dec 22, 2018 at 12:14:47AM +, Sinan Kaya wrote: >> > Code is scanning PCI bus to find out if it is switchable or not. If >> > CONFIG_PCI is not set, assume

[PATCH] drm/intel_dsi_vbt: Remove duplicate header

2018-12-25 Thread Brajeswar Ghosh
Remove video/mipi_display.h which is included more than once Signed-off-by: Brajeswar Ghosh --- drivers/gpu/drm/i915/intel_dsi_vbt.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/gpu/drm/i915/intel_dsi_vbt.c b/drivers/gpu/drm/i915/intel_dsi_vbt.c index ac83d6b89ae0..40a5efa33c3d

[PATCH] drm/i915_request.h: Remove duplicate header

2018-12-25 Thread Brajeswar Ghosh
Remove i915_scheduler.h which is included more than once Signed-off-by: Brajeswar Ghosh --- drivers/gpu/drm/i915/i915_request.h | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/gpu/drm/i915/i915_request.h b/drivers/gpu/drm/i915/i915_request.h index 7fa94b024968..3d9d225bc5fc 100644

RE: [EXT] [PATCH] infiniband/qedr: Potential null ptr dereference of qp

2018-12-25 Thread Michal Kalderon
> From: Aditya Pakki > Sent: Monday, December 24, 2018 8:25 PM > > External Email > > -- > External Email > > idr_find() may fail and return a NULL pointer. The fix checks the return value > of the function and returns an

Re: [PATCH net-next 0/3] vhost: accelerate metadata access through vmap()

2018-12-25 Thread Michael S. Tsirkin
On Tue, Dec 25, 2018 at 06:09:19PM +0800, Jason Wang wrote: > > On 2018/12/25 上午2:12, Michael S. Tsirkin wrote: > > On Mon, Dec 24, 2018 at 04:32:39PM +0800, Jason Wang wrote: > > > On 2018/12/14 下午8:33, Michael S. Tsirkin wrote: > > > > On Fri, Dec 14, 2018 at 11:42:18AM +0800, Jason Wang wrote:

Re: [PATCH net-next 3/3] vhost: access vq metadata through kernel virtual address

2018-12-25 Thread Michael S. Tsirkin
On Tue, Dec 25, 2018 at 06:05:25PM +0800, Jason Wang wrote: > > On 2018/12/25 上午2:10, Michael S. Tsirkin wrote: > > On Mon, Dec 24, 2018 at 03:53:16PM +0800, Jason Wang wrote: > > > On 2018/12/14 下午8:36, Michael S. Tsirkin wrote: > > > > On Fri, Dec 14, 2018 at 11:57:35AM +0800, Jason Wang wrote:

Re: BUG: unable to handle kernel paging request in tpg_fill_plane_buffer

2018-12-25 Thread syzbot
syzbot has found a reproducer for the following crash on: HEAD commit:6a1d293238c1 Add linux-next specific files for 20181224 git tree: linux-next console output: https://syzkaller.appspot.com/x/log.txt?x=17afe9c740 kernel config:

Re: [PATCH v2] signal: add procfd_signal() syscall

2018-12-25 Thread Aleksa Sarai
On 2018-12-25, Lai Jiangshan wrote: > On Tue, Dec 25, 2018 at 1:32 PM Lai Jiangshan > wrote: > > > > Is it possible to avoid adding any syscall? > > > > Since holding /proc/pid/reg_file can also hold the pid. > > With this guarantee, /proc/pid/uuid (universally unique identifier ) can be > >

Re: [PATCH v7 1/2] dmaengine: 8250_mtk_dma: add MediaTek uart DMA support

2018-12-25 Thread Long Cheng
Thanks for your comments. On Tue, 2018-12-25 at 15:16 +0800, Nicolas Boichat wrote: > Not a full review, a few comments below. > > Thanks, > would you like help to full review at this version patch? and then i can modify these at next version patch. thanks. > On Tue, Dec 25, 2018 at 9:27 AM

Re: [PATCH 2/6] i2c: mediatek: speeds is replaced by macros definitions

2018-12-25 Thread Nicolas Boichat
On Fri, Dec 21, 2018 at 8:59 PM qii wang wrote: > > Different speeds have been defined by macros, > so we use macros definitions. > > Signed-off-by: qii wang Reviewed-by: Nicolas Boichat > --- > drivers/i2c/busses/i2c-mt65xx.c |4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) >

Re: [PATCH 4/6] i2c: mediatek: Add offsets array for new i2c registers

2018-12-25 Thread Nicolas Boichat
On Fri, Dec 21, 2018 at 8:59 PM qii wang wrote: > > New i2c registers would have different offsets, so we use different > offsets array to distinguish different i2c registers version. > > Signed-off-by: qii wang Reviewed-by: Nicolas Boichat > --- > drivers/i2c/busses/i2c-mt65xx.c | 163 >

[PATCH -next] ASoC: Intel: remove set but not used variable 'stage_type'

2018-12-25 Thread YueHaibing
Fixes gcc '-Wunused-but-set-variable' warning: sound/soc/intel/haswell/sst-haswell-ipc.c: In function 'hsw_stream_message': sound/soc/intel/haswell/sst-haswell-ipc.c:669:29: warning: variable 'stage_type' set but not used [-Wunused-but-set-variable] It never used since commit ba57f68235cf

[PATCH] dmaengine: fsl-dpaa2-qdma: Add qDMA controller driver for Layerscape SoCs

2018-12-25 Thread Peng Ma
Add NXP Data Path Acceleration Architecture 2 (dpaa2) queue direct memory(qDMA) controller driver support. This module can be found on NXP LS2 SoCs. Signed-off-by: Peng Ma --- drivers/dma/Kconfig |2 + drivers/dma/Makefile|1 +

Re: [PATCH net-next 0/3] vhost: accelerate metadata access through vmap()

2018-12-25 Thread Jason Wang
On 2018/12/25 上午2:12, Michael S. Tsirkin wrote: On Mon, Dec 24, 2018 at 04:32:39PM +0800, Jason Wang wrote: On 2018/12/14 下午8:33, Michael S. Tsirkin wrote: On Fri, Dec 14, 2018 at 11:42:18AM +0800, Jason Wang wrote: On 2018/12/13 下午11:27, Michael S. Tsirkin wrote: On Thu, Dec 13, 2018 at

Happy Christmas

2018-12-25 Thread LAMIDO SANUSI
Happy Christmas, Death without a WILL is a damning circumstance that causes lot of problems to family. With confidentiality I am reaching out to you regarding a circumstance within my jurisdiction.One of our client passed on without a WILL over two years now. Efforts to trace any relation

Re: [PATCH net-next 3/3] vhost: access vq metadata through kernel virtual address

2018-12-25 Thread Jason Wang
On 2018/12/25 上午2:10, Michael S. Tsirkin wrote: On Mon, Dec 24, 2018 at 03:53:16PM +0800, Jason Wang wrote: On 2018/12/14 下午8:36, Michael S. Tsirkin wrote: On Fri, Dec 14, 2018 at 11:57:35AM +0800, Jason Wang wrote: On 2018/12/13 下午11:44, Michael S. Tsirkin wrote: On Thu, Dec 13, 2018 at

Re: [PATCH] x86/efi: Don't unmap EFI boot services code/data regions for EFI_OLD_MEMMAP and EFI_MIXED_MODE

2018-12-25 Thread Ingo Molnar
* Prakhya, Sai Praneeth wrote: > > > > + /* > > > > + * To Do: Remove this check after adding functionality to unmap > > > > EFI > > boot > > > > + * services code/data regions from direct mapping area because > > > > + * "efi=old_map" maps EFI regions in swapper_pg_dir. >

Re: [PATCH v3 0/3] fat: Added functions to determine the FAT variant (12/16/32bit)

2018-12-25 Thread Sergey Senozhatsky
On (12/24/18 21:04), OGAWA Hirofumi wrote: > FWIW, > > Acked-by: OGAWA Hirofumi > > for all of this patchset. Looks good to me. FWIW, Reviewed-by: Sergey Senozhatsky -ss

[PATCH v3 2/3] f2fs: check PageWriteback flag for ordered case

2018-12-25 Thread Chao Yu
For all ordered cases in f2fs_wait_on_page_writeback(), we need to check PageWriteback status, so let's clean up to relocate the check into f2fs_wait_on_page_writeback(). Signed-off-by: Chao Yu --- v3: - add parameter to skip check for unlocked page. fs/f2fs/checkpoint.c | 8 +++-

Re: [PATCH net V2 4/4] vhost: log dirty page correctly

2018-12-25 Thread Jason Wang
On 2018/12/25 上午1:41, Michael S. Tsirkin wrote: On Mon, Dec 24, 2018 at 11:43:31AM +0800, Jason Wang wrote: On 2018/12/14 下午9:20, Michael S. Tsirkin wrote: On Fri, Dec 14, 2018 at 10:43:03AM +0800, Jason Wang wrote: On 2018/12/13 下午10:31, Michael S. Tsirkin wrote: Just to make sure I

Re: general protection fault in put_pid

2018-12-25 Thread Dmitry Vyukov
On Sun, Dec 23, 2018 at 1:32 PM Manfred Spraul wrote: > > Hi Dmitry, > > let's simplify the mail, otherwise noone can follow: > > On 12/23/18 11:42 AM, Dmitry Vyukov wrote: > > > >> My naive attempts to re-reproduce this failed so far. > >> But I noticed that _all_ logs for these 3 crashes: > >>

<    1   2   3   >