[PATCHv2 1/1] ext4/f2fs: don't put symlink in pagecache into highmem

2018-02-06 Thread Jin Qian
From: Jin Qian partial backport from 21fc61c73c3903c4c312d0802da01ec2b323d174 upstream to v4.4 to prevent virt_to_page on highmem. ext4_encrypted_follow_link uses kmap() for cpage caddr = kmap(cpage); _ext4_fname_disk_to_usr calls virt_to_page on the kmapped address

[PATCHv2 1/1] KEYS: encrypted: fix buffer overread in valid_master_desc()

2018-02-06 Thread Jin Qian
: David Howells Signed-off-by: James Morris Signed-off-by: Jin Qian Signed-off-by: Jin Qian --- security/keys/encrypted-keys/encrypted.c | 31 +++ 1 file changed, 15 insertions(+), 16 deletions(-) diff --git a/security/keys/encrypted-keys/encrypted.c b/security/k

[PATCH 1/1] KEYS: encrypted: fix buffer overread in valid_master_desc()

2018-02-06 Thread Jin Qian
: David Howells Signed-off-by: James Morris Signed-off-by: Jin Qian Signed-off-by: Jin Qian --- security/keys/encrypted-keys/encrypted.c | 31 +++ 1 file changed, 15 insertions(+), 16 deletions(-) diff --git a/security/keys/encrypted-keys/encrypted.c b/security/k

[PATCH 1/1] KEYS: encrypted: fix buffer overread in valid_master_desc()

2018-02-06 Thread Jin Qian
: David Howells Signed-off-by: James Morris Signed-off-by: Jin Qian --- security/keys/encrypted-keys/encrypted.c | 31 +++ 1 file changed, 15 insertions(+), 16 deletions(-) diff --git a/security/keys/encrypted-keys/encrypted.c b/security/keys/encrypted-keys/

[PATCHv2 1/1] ext4: don't put symlink in pagecache into highmem

2018-02-06 Thread Jin Qian
From: Jin Qian partial backport from 21fc61c73c3903c4c312d0802da01ec2b323d174 upstream to v4.4 to prevent virt_to_page on highmem. ext4_encrypted_follow_link uses kmap() for cpage caddr = kmap(cpage); _ext4_fname_disk_to_usr calls virt_to_page on the kmapped address

[PATCH 1/1] KEYS: encrypted: fix buffer overread in valid_master_desc()

2018-02-05 Thread Jin Qian
: David Howells Signed-off-by: James Morris Signed-off-by: Jin Qian --- security/keys/encrypted-keys/encrypted.c | 31 +++ 1 file changed, 15 insertions(+), 16 deletions(-) diff --git a/security/keys/encrypted-keys/encrypted.c b/security/keys/encrypted-keys/

[PATCH 1/1] ext4: don't put symlink in pagecache into highmem

2018-02-05 Thread Jin Qian
From: Jin Qian partial backport of 21fc61c73c3903c4c312d0802da01ec2b323d174. ext4_encrypted_follow_link uses kmap() for cpage caddr = kmap(cpage); _ext4_fname_disk_to_usr calls virt_to_page on the kmapped address. _ext4_fname_disk_to_usr() ext4_fname_decrypt() sg_init_one

[PATCHv3 1/1] mmc: core: export emmc revision

2017-10-12 Thread Jin Qian
From: Jin Qian Expose emmc revision as part of device attributes. Signed-off-by: Jin Qian --- Documentation/ABI/testing/sysfs-bus-mmc | 4 drivers/mmc/core/mmc.c | 2 ++ 2 files changed, 6 insertions(+) create mode 100644 Documentation/ABI/testing/sysfs-bus-mmc diff

[PATCHv2 1/1] ANDROID: mmc: core: export emmc revision

2017-10-12 Thread Jin Qian
From: Jin Qian Expose emmc revision as part of device attributes. Signed-off-by: Jin Qian --- Documentation/ABI/testing/sysfs-bus-mmc | 4 drivers/mmc/core/mmc.c | 2 ++ 2 files changed, 6 insertions(+) create mode 100644 Documentation/ABI/testing/sysfs-bus-mmc diff

[PATCHv2 1/1] ANDROID: mmc: core: export emmc revision

2017-10-11 Thread Jin Qian
From: Jin Qian Expose emmc revision as part of device attributes. Signed-off-by: Jin Qian --- Documentation/ABI/testing/sysfs-bus-mmc | 4 drivers/mmc/core/mmc.c | 2 ++ 2 files changed, 6 insertions(+) create mode 100644 Documentation/ABI/testing/sysfs-bus-mmc diff

[PATCH 1/1] ANDROID: mmc: core: export emmc revision

2017-10-11 Thread Jin Qian
From: Jin Qian Expose emmc revision as part of device attributes. Signed-off-by: Jin Qian --- drivers/mmc/core/mmc.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/mmc/core/mmc.c b/drivers/mmc/core/mmc.c index 36217ad5e9b1..4aa4cfb2c9e1 100644 --- a/drivers/mmc/core/mmc.c +++ b

Re: [PATCH] goldfish_pipe: use GFP_ATOMIC under spin lock

2017-06-13 Thread Jin Qian
I meant that the patch needs Cc: sta...@vger.kernel.org. Thanks, jin On Mon, Jun 12, 2017 at 11:02 PM, Greg Kroah-Hartman wrote: > On Fri, Jun 09, 2017 at 12:15:42PM -0700, Jin Qian wrote: >> Reviewed-by: Jin Qian >> >> Can we merge this to stable? > > I don'

Re: [PATCH] goldfish_pipe: use GFP_ATOMIC under spin lock

2017-06-09 Thread Jin Qian
Reviewed-by: Jin Qian Can we merge this to stable? Thanks! jin On Mon, May 22, 2017 at 11:48 AM, Alan Cox wrote: > On Mon, 22 May 2017 13:51:52 +0200 > Michal Hocko wrote: > >> On Sun 21-05-17 09:48:36, Michal Hocko wrote: >> > On Sun 21-05-17 00:45:46, Wei Yongjun

Re: [PATCH 1/1] mmc: core: export emmc revision via sysfs

2017-03-22 Thread Jin Qian
Removed redundant signoff. export rev to collect some statistics on how many devices are running with which mmc revision. Other attr name seems follow cid. or ext_csd.. Thanks, jin On Tue, Mar 21, 2017 at 3:17 PM, Jaehoon Chung wrote: > Hi, > > On 03/22/2017 07:01 AM, Jin Q

[PATCHv2 1/1] mmc: core: export emmc revision via sysfs

2017-03-22 Thread Jin Qian
Extend sysfs to access ext_csd revision information. Signed-off-by: Jin Qian --- drivers/mmc/core/mmc.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/mmc/core/mmc.c b/drivers/mmc/core/mmc.c index 7fd722868875..08c62c9bec48 100644 --- a/drivers/mmc/core/mmc.c +++ b/drivers/mmc

[PATCH 1/1] mmc: core: export emmc revision via sysfs

2017-03-21 Thread Jin Qian
Extend sysfs to access ext_csd revision information. Signed-off-by: Jin Qian Signed-off-by: Jin Qian --- drivers/mmc/core/mmc.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/mmc/core/mmc.c b/drivers/mmc/core/mmc.c index 7fd722868875..08c62c9bec48 100644 --- a/drivers/mmc/core

Re: allocate an official device major number for virtio device?

2016-03-03 Thread Jin Qian
On Thu, Mar 3, 2016 at 9:18 AM, Greg Kroah-Hartman wrote: > A: No. > Q: Should I include quotations after my reply? > > http://daringfireball.net/2007/07/on_top > > On Thu, Mar 03, 2016 at 03:52:20AM +, Ning, Yu wrote: >> Well, virtio_blk does use dynamic major number allocation, but the >> al

Re: allocate an official device major number for virtio device?

2016-03-02 Thread Jin Qian
n Wed, Mar 02, 2016 at 05:08:00PM -0800, Jin Qian wrote: >> Hi - >> >> Can we allocate an official device major number for virtio devices? >> Currently it's using 240-254 (LOCAL/EXPERIMENTAL USE). The reason we >> ask for this is because userspace will need to trea

allocate an official device major number for virtio device?

2016-03-02 Thread Jin Qian
Hi - Can we allocate an official device major number for virtio devices? Currently it's using 240-254 (LOCAL/EXPERIMENTAL USE). The reason we ask for this is because userspace will need to treat virtio block devices differently and need a way to detect such device. For example, it checks major num

[PATCH v3 8/8] goldfish: Enable ACPI-based enumeration for android pipe

2015-12-02 Thread Jin Qian
From: Jason Hu Add ACPI binding to the android pipe driver Signed-off-by: Jason Hu Signed-off-by: Jin Qian --- drivers/platform/goldfish/goldfish_pipe.c | 8 1 file changed, 8 insertions(+) diff --git a/drivers/platform/goldfish/goldfish_pipe.c b/drivers/platform/goldfish

[PATCH v3 2/8] android_pipe: don't be clever with #define offsets

2015-12-02 Thread Jin Qian
From: Alex Bennée You just make it harder to figure out when commands are being used. Signed-off-by: Alex Bennée Signed-off-by: Jin Qian --- drivers/platform/goldfish/goldfish_pipe.c | 16 +--- 1 file changed, 5 insertions(+), 11 deletions(-) diff --git a/drivers/platform

[PATCH v3 3/8] android_pipe: Pin pages to memory while copying and other cleanups

2015-12-02 Thread Jin Qian
Dall Signed-off-by: Jin Qian --- drivers/platform/goldfish/goldfish_pipe.c | 129 +- 1 file changed, 72 insertions(+), 57 deletions(-) diff --git a/drivers/platform/goldfish/goldfish_pipe.c b/drivers/platform/goldfish/goldfish_pipe.c index 0fb3a34..20a9337 100644 --

[PATCH v3 5/8] platform: goldfish: pipe: don't log when dropping PIPE_ERROR_AGAIN

2015-12-02 Thread Jin Qian
existing (wrong) behavior of dropping errors on the floor. Signed-off-by: Greg Hackmann Signed-off-by: Jin Qian --- drivers/platform/goldfish/goldfish_pipe.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/platform/goldfish/goldfish_pipe.c b/drivers/platform

[PATCH v3 4/8] platform: goldfish: pipe: add devicetree bindings

2015-12-02 Thread Jin Qian
ck that is currently under development. Signed-off-by: Greg Hackmann Signed-off-by: Jin Qian --- Documentation/devicetree/bindings/goldfish/pipe.txt | 17 + drivers/platform/goldfish/goldfish_pipe.c | 10 +- 2 files changed, 26 insertions(+), 1 deletion(-) create m

[PATCH v3 7/8] goldfish_pipe: Pass physical addresses to the device if supported

2015-12-02 Thread Jin Qian
https://android-review.googlesource.com/128280 for the QEMU-side patch. In addition, use the mmap semaphore (in read mode) to safeguard the call to get_user_pages(). Signed-off-by: Yu Ning Signed-off-by: Jin Qian --- drivers/platform/goldfish/goldfish_pipe.c | 29 +++-- 1 f

[PATCH v3 6/8] [MIPS] Enable platform support for Goldfish virtual devices

2015-12-02 Thread Jin Qian
From: Miodrag Dinic Enable CONFIG_GOLDFISH for MIPS platforms. Signed-off-by: Miodrag Dinic Signed-off-by: Jin Qian --- drivers/platform/goldfish/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/platform/goldfish/Kconfig b/drivers/platform/goldfish/Kconfig

[PATCH v3 1/8] goldfish: refactor goldfish platform configs

2015-12-02 Thread Jin Qian
the goldfish bus into its own config option. Signed-off-by: Greg Hackmann Signed-off-by: Jin Qian --- drivers/platform/Kconfig | 3 +-- drivers/platform/goldfish/Kconfig | 18 ++ drivers/platform/goldfish/Makefile | 2 +- 3 files changed, 20 insertions(+), 3

[PATCH v3 0/8] *** Upstream goldfish driver updates ***

2015-12-02 Thread Jin Qian
This is to upstream a few patches to fix issues in existing goldfish drivers so that android kernel team don't have to maintain cleanup patches outside mainline kernel tree. Alex Bennée (1): android_pipe: don't be clever with #define offsets Christoffer Dall (1): android_pipe: Pin pages to me

[PATCH v2 1/1] platform: goldfish: pipe: add devicetree bindings

2015-11-25 Thread Jin Qian
From: Greg Hackmann Signed-off-by: Greg Hackmann (cherry picked from commit 3c56d07eb796066530e93a40e74dea3bc59bf4cf) Signed-off-by: Jin Qian --- Documentation/devicetree/bindings/goldfish/pipe.txt | 17 + drivers/platform/goldfish/goldfish_pipe.c | 10 +- 2

[PATCH 4/8] platform: goldfish: pipe: add devicetree bindings

2015-11-24 Thread Jin Qian
From: Greg Hackmann Signed-off-by: Greg Hackmann (cherry picked from commit 3c56d07eb796066530e93a40e74dea3bc59bf4cf) Signed-off-by: Jin Qian --- drivers/platform/goldfish/goldfish_pipe.c | 10 +- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/drivers/platform/goldfish

[PATCH 3/8] android_pipe: Pin pages to memory while copying and other cleanups

2015-11-24 Thread Jin Qian
Dall (cherry picked from commit ca8dafc623c6956fad77df80540a1e31f5f8fe2b) Signed-off-by: Jin Qian --- drivers/platform/goldfish/goldfish_pipe.c | 129 +- 1 file changed, 72 insertions(+), 57 deletions(-) diff --git a/drivers/platform/goldfish/goldfish_pipe.c b/drive

[PATCH 1/8] goldfish: refactor goldfish platform configs

2015-11-24 Thread Jin Qian
the goldfish bus into its own config option. Signed-off-by: Greg Hackmann (cherry picked from commit 711910868190ee3645c1c52701bdde87783f) Signed-off-by: Jin Qian --- drivers/platform/Kconfig | 3 +-- drivers/platform/goldfish/Kconfig | 18 ++ drivers/platform

[PATCH 2/8] android_pipe: don't be clever with #define offsets

2015-11-24 Thread Jin Qian
From: Alex Bennée You just make it harder to figure out when commands are being used. Signed-off-by: Alex Bennée (cherry picked from commit b765d478f67a2f6cb43c40a99114ea5ff1bcff97) Signed-off-by: Jin Qian --- drivers/platform/goldfish/goldfish_pipe.c | 16 +--- 1 file changed, 5

[PATCH 6/8] [MIPS] Enable platform support for Goldfish virtual devices

2015-11-24 Thread Jin Qian
From: Miodrag Dinic Enable CONFIG_GOLDFISH for MIPS platforms. Signed-off-by: Miodrag Dinic (cherry picked from commit 77559b0f7df9c7b81cb2500f4fe07b4dbbaf239a) Signed-off-by: Jin Qian --- drivers/platform/goldfish/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a

[PATCH 7/8] goldfish_pipe: Pass physical addresses to the device if supported

2015-11-24 Thread Jin Qian
https://android-review.googlesource.com/128280 for the QEMU-side patch. In addition, use the mmap semaphore (in read mode) to safeguard the call to get_user_pages(). Signed-off-by: Yu Ning (cherry picked from commit acf92a5c274dfbdfff877ed86bebc4b2b92fe1d9) Signed-off-by: Jin Qian --- drivers/pl

[PATCH 8/8] goldfish: Enable ACPI-based enumeration for android pipe

2015-11-24 Thread Jin Qian
From: Jason Hu Add ACPI binding to the android pipe driver Signed-off-by: Jason Hu (cherry picked from commit 044d26f395f8c45ada0ead21285ffe4628f05046) Signed-off-by: Jin Qian --- drivers/platform/goldfish/goldfish_pipe.c | 8 1 file changed, 8 insertions(+) diff --git a/drivers

[PATCH 5/8] platform: goldfish: pipe: don't log when dropping PIPE_ERROR_AGAIN

2015-11-24 Thread Jin Qian
existing (wrong) behavior of dropping errors on the floor. Signed-off-by: Greg Hackmann (cherry picked from commit 1bebc767c41766fc00787473e364db83d5fe6989) Signed-off-by: Jin Qian --- drivers/platform/goldfish/goldfish_pipe.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git

Re: [PATCH 1/1] power: validate wakeup source before activating it.

2015-05-15 Thread Jin Qian
really happen during driver development. Hope this is ok. Thanks, jin On Thu, May 14, 2015 at 5:22 PM, Rafael J. Wysocki wrote: > On Wednesday, May 06, 2015 03:26:56 PM Jin Qian wrote: >> A rogue wakeup source not registered in wakeup_sources list is not visible >> from wakeup_sou

Re: [PATCH 3/3] power: add a dummy wakeup_source to record statistics

2015-05-15 Thread Jin Qian
May 15, 2015 at 5:41 PM, Rafael J. Wysocki wrote: > On Wednesday, April 22, 2015 05:50:12 PM Jin Qian wrote: >> After a wakeup_source is destroyed, we lost all information such as how >> long this wakeup_source has been active. Add a dummy wakeup_source to >> record such info.

[PATCHv3 3/3] power: add a dummy wakeup_source to record statistics

2015-05-15 Thread Jin Qian
After a wakeup_source is destroyed, we lost all information such as how long this wakeup_source has been active. Add a dummy wakeup_source to record such info. Signed-off-by: Jin Qian --- drivers/base/power/wakeup.c | 36 1 file changed, 36 insertions

[PATCHv3 1/3] power: validate wakeup source before activating it.

2015-05-15 Thread Jin Qian
A rogue wakeup source not registered in wakeup_sources list is not visible from wakeup_sources_stats_show. Check if the wakeup source is registered properly by looking at the timer struct. Signed-off-by: Jin Qian --- drivers/base/power/wakeup.c | 18 ++ 1 file changed, 18

Re: [PATCH 2/3] power: increment wakeup_count when save_wakeup_count failed.

2015-05-15 Thread Jin Qian
out the problematic wakeup event with inaccurate wakeup_count : ) Thanks, jin On Fri, May 15, 2015 at 5:34 PM, Rafael J. Wysocki wrote: > On Wednesday, April 22, 2015 05:50:11 PM Jin Qian wrote: >> user-space aborts suspend attempt if writing wakeup_count failed. >> Count th

[PATCH 1/1] power: validate wakeup source before activating it.

2015-05-06 Thread Jin Qian
A rogue wakeup source not registered in wakeup_sources list is not visible from wakeup_sources_stats_show. Check if the wakeup source is registered properly by looking at the timer struct. Signed-off-by: Jin Qian --- drivers/base/power/wakeup.c | 18 ++ 1 file changed, 18

Re: [PATCH v2 1/3] power: validate wakeup source before activating it.

2015-05-06 Thread Jin Qian
I have to break the line since it's over 80 characters : ) I'll follow CodingStyle and send a new patch. Thanks, jin On Wed, May 6, 2015 at 3:39 PM, Rafael J. Wysocki wrote: > On Wednesday, May 06, 2015 03:11:48 PM Jin Qian wrote: >> Hi Rafael, >> >> I kept br

Re: [PATCH v2 1/3] power: validate wakeup source before activating it.

2015-05-06 Thread Jin Qian
s). It's not very useful to print name if we have stack dump from WARN_ONCE. Thanks, jin On Wed, May 6, 2015 at 3:00 PM, Rafael J. Wysocki wrote: > On Wednesday, May 06, 2015 11:51:07 AM Jin Qian wrote: >> A rogue wakeup source not registered in wakeup_sources list

[PATCH v2 1/3] power: validate wakeup source before activating it.

2015-05-06 Thread Jin Qian
A rogue wakeup source not registered in wakeup_sources list is not visible from wakeup_sources_stats_show. Check if the wakeup source is registered properly by looking at the timer struct. Signed-off-by: Jin Qian --- drivers/base/power/wakeup.c | 19 +++ 1 file changed, 19

[PATCH v2 1/3] power: validate wakeup source before activating it.

2015-05-05 Thread Jin Qian
A rogue wakeup source not registered in wakeup_sources list is not visible from wakeup_sources_stats_show. Check if the wakeup source is registered properly by looking at the timer function. Signed-off-by: Jin Qian --- drivers/base/power/wakeup.c | 19 +++ 1 file changed, 19

Re: [PATCH 1/3] power: validate wakeup source before activating it.

2015-04-27 Thread Jin Qian
to be noticed considering we deal with particular wakeup source. I can make the pr_err BUG_ON or WARN_ON if they're more noticeable. Thanks, jin On Sat, Apr 25, 2015 at 1:12 PM, Pavel Machek wrote: > On Wed 2015-04-22 17:50:10, Jin Qian wrote: >> A rogue wakeup source not registere

Re: [PATCH 2/3] power: increment wakeup_count when save_wakeup_count failed.

2015-04-27 Thread Jin Qian
anks, jin On Mon, Apr 27, 2015 at 10:53 AM, Jin Qian wrote: > write fails when there's any new wakeup event after previous read. > > https://www.kernel.org/doc/Documentation/ABI/testing/sysfs-power > > What: /sys/power/wakeup_count > Date: July 2010

[PATCH 2/3] power: increment wakeup_count when save_wakeup_count failed.

2015-04-22 Thread Jin Qian
user-space aborts suspend attempt if writing wakeup_count failed. Count the write failure towards wakeup_count. Signed-off-by: Jin Qian --- drivers/base/power/wakeup.c | 17 + 1 file changed, 17 insertions(+) diff --git a/drivers/base/power/wakeup.c b/drivers/base/power

[PATCH 3/3] power: add a dummy wakeup_source to record statistics

2015-04-22 Thread Jin Qian
After a wakeup_source is destroyed, we lost all information such as how long this wakeup_source has been active. Add a dummy wakeup_source to record such info. Signed-off-by: Jin Qian --- drivers/base/power/wakeup.c | 35 +++ 1 file changed, 35 insertions

[PATCH 1/3] power: validate wakeup source before activating it.

2015-04-22 Thread Jin Qian
A rogue wakeup source not registered in wakeup_sources list is not visible from wakeup_sources_stats_show. Check if the wakeup source is registered properly by looking at the timer function. Signed-off-by: Jin Qian --- drivers/base/power/wakeup.c | 19 +++ 1 file changed, 19