All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ojaswin Mujoo <ojaswin98@gmail.com>
To: Dan Carpenter <dan.carpenter@oracle.com>
Cc: kbuild@lists.01.org, nsaenz@kernel.org, lkp@intel.com,
	kbuild-all@lists.01.org, gregkh@linuxfoundation.org,
	stefan.wahren@i2se.com, arnd@arndb.de, phil@raspberrypi.com,
	bcm-kernel-feedback-list@broadcom.com,
	linux-arm-kernel@lists.infradead.org,
	linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v3 3/5] staging: vchiq: Move vchiq char driver to its own file
Date: Mon, 5 Jul 2021 16:28:04 +0530	[thread overview]
Message-ID: <20210705105804.GA41070@ojas> (raw)
In-Reply-To: <202107051622.6i1l1vdL-lkp@intel.com>

Hello Dan,

On Mon, Jul 05, 2021 at 12:56:09PM +0300, Dan Carpenter wrote:
> Hi Ojaswin,
> 
> url:    https://github.com/0day-ci/linux/commits/Ojaswin-Mujoo/vchiq-Patch-to-separate-platform-and-cdev-code/20210705-000124
> base:   https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging.git 77ad1f0e99bd00af024e650b862cfda3137af660
> config: i386-randconfig-m021-20210705 (attached as .config)
> compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
> 
> If you fix the issue, kindly add following tag as appropriate
> Reported-by: kernel test robot <lkp@intel.com>
> Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
> 
> smatch warnings:
> drivers/staging/vc04_services/interface/vchiq_arm/vchiq_dev.c:1235 vchiq_release() warn: argument 3 to %lx specifier is cast from pointer
> 
> vim +1235 drivers/staging/vc04_services/interface/vchiq_arm/vchiq_dev.c
> 
> 62b5eb4fdf3f5f Ojaswin Mujoo 2021-07-04  1227  static int vchiq_release(struct inode *inode, struct file *file)
> 62b5eb4fdf3f5f Ojaswin Mujoo 2021-07-04  1228  {
> 62b5eb4fdf3f5f Ojaswin Mujoo 2021-07-04  1229  	struct vchiq_instance *instance = file->private_data;
> 62b5eb4fdf3f5f Ojaswin Mujoo 2021-07-04  1230  	struct vchiq_state *state = vchiq_get_state();
> 62b5eb4fdf3f5f Ojaswin Mujoo 2021-07-04  1231  	struct vchiq_service *service;
> 62b5eb4fdf3f5f Ojaswin Mujoo 2021-07-04  1232  	int ret = 0;
> 62b5eb4fdf3f5f Ojaswin Mujoo 2021-07-04  1233  	int i;
> 62b5eb4fdf3f5f Ojaswin Mujoo 2021-07-04  1234  
> 62b5eb4fdf3f5f Ojaswin Mujoo 2021-07-04 @1235  	vchiq_log_info(vchiq_arm_log_level, "%s: instance=%lx", __func__,
> 62b5eb4fdf3f5f Ojaswin Mujoo 2021-07-04  1236  		       (unsigned long)instance);
> 
> This should eventually be converted to %p so it doesn't defeat KASLR.
> (Not that we really care on raspberry pi, I think?)
Yes, that does seem right, however, this patchset only moves the code from
vchiq_arm.c to vchiq_dev.c and I've not really touched any of the
existing code itself (Except moving it to a new file which is why it shows up
in the patch). 

Hence, I'm not sure if this fix is in scope of this patchset. (I also
have a similar warning by kernel test robot here [1] which and I'm not
sure if I need to act upon). Maybe we can look at this in a separate
patch?

[1] https://lkml.org/lkml/2021/7/4/138
> 
> 62b5eb4fdf3f5f Ojaswin Mujoo 2021-07-04  1237  
> 62b5eb4fdf3f5f Ojaswin Mujoo 2021-07-04  1238  	if (!state) {
> 62b5eb4fdf3f5f Ojaswin Mujoo 2021-07-04  1239  		ret = -EPERM;
> 62b5eb4fdf3f5f Ojaswin Mujoo 2021-07-04  1240  		goto out;
> 62b5eb4fdf3f5f Ojaswin Mujoo 2021-07-04  1241  	}
> 62b5eb4fdf3f5f Ojaswin Mujoo 2021-07-04  1242  
> 62b5eb4fdf3f5f Ojaswin Mujoo 2021-07-04  1243  	/* Ensure videocore is awake to allow termination. */
> 62b5eb4fdf3f5f Ojaswin Mujoo 2021-07-04  1244  	vchiq_use_internal(instance->state, NULL, USE_TYPE_VCHIQ);
> 62b5eb4fdf3f5f Ojaswin Mujoo 2021-07-04  1245  
> 
> ---
> 0-DAY CI Kernel Test Service, Intel Corporation
> https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
> 

Thank you for looking into this,
Ojaswin

WARNING: multiple messages have this Message-ID (diff)
From: Ojaswin Mujoo <ojaswin98@gmail.com>
To: Dan Carpenter <dan.carpenter@oracle.com>
Cc: kbuild@lists.01.org, nsaenz@kernel.org, lkp@intel.com,
	kbuild-all@lists.01.org, gregkh@linuxfoundation.org,
	stefan.wahren@i2se.com, arnd@arndb.de, phil@raspberrypi.com,
	bcm-kernel-feedback-list@broadcom.com,
	linux-arm-kernel@lists.infradead.org,
	linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v3 3/5] staging: vchiq: Move vchiq char driver to its own file
Date: Mon, 5 Jul 2021 16:28:04 +0530	[thread overview]
Message-ID: <20210705105804.GA41070@ojas> (raw)
In-Reply-To: <202107051622.6i1l1vdL-lkp@intel.com>

Hello Dan,

On Mon, Jul 05, 2021 at 12:56:09PM +0300, Dan Carpenter wrote:
> Hi Ojaswin,
> 
> url:    https://github.com/0day-ci/linux/commits/Ojaswin-Mujoo/vchiq-Patch-to-separate-platform-and-cdev-code/20210705-000124
> base:   https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging.git 77ad1f0e99bd00af024e650b862cfda3137af660
> config: i386-randconfig-m021-20210705 (attached as .config)
> compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
> 
> If you fix the issue, kindly add following tag as appropriate
> Reported-by: kernel test robot <lkp@intel.com>
> Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
> 
> smatch warnings:
> drivers/staging/vc04_services/interface/vchiq_arm/vchiq_dev.c:1235 vchiq_release() warn: argument 3 to %lx specifier is cast from pointer
> 
> vim +1235 drivers/staging/vc04_services/interface/vchiq_arm/vchiq_dev.c
> 
> 62b5eb4fdf3f5f Ojaswin Mujoo 2021-07-04  1227  static int vchiq_release(struct inode *inode, struct file *file)
> 62b5eb4fdf3f5f Ojaswin Mujoo 2021-07-04  1228  {
> 62b5eb4fdf3f5f Ojaswin Mujoo 2021-07-04  1229  	struct vchiq_instance *instance = file->private_data;
> 62b5eb4fdf3f5f Ojaswin Mujoo 2021-07-04  1230  	struct vchiq_state *state = vchiq_get_state();
> 62b5eb4fdf3f5f Ojaswin Mujoo 2021-07-04  1231  	struct vchiq_service *service;
> 62b5eb4fdf3f5f Ojaswin Mujoo 2021-07-04  1232  	int ret = 0;
> 62b5eb4fdf3f5f Ojaswin Mujoo 2021-07-04  1233  	int i;
> 62b5eb4fdf3f5f Ojaswin Mujoo 2021-07-04  1234  
> 62b5eb4fdf3f5f Ojaswin Mujoo 2021-07-04 @1235  	vchiq_log_info(vchiq_arm_log_level, "%s: instance=%lx", __func__,
> 62b5eb4fdf3f5f Ojaswin Mujoo 2021-07-04  1236  		       (unsigned long)instance);
> 
> This should eventually be converted to %p so it doesn't defeat KASLR.
> (Not that we really care on raspberry pi, I think?)
Yes, that does seem right, however, this patchset only moves the code from
vchiq_arm.c to vchiq_dev.c and I've not really touched any of the
existing code itself (Except moving it to a new file which is why it shows up
in the patch). 

Hence, I'm not sure if this fix is in scope of this patchset. (I also
have a similar warning by kernel test robot here [1] which and I'm not
sure if I need to act upon). Maybe we can look at this in a separate
patch?

[1] https://lkml.org/lkml/2021/7/4/138
> 
> 62b5eb4fdf3f5f Ojaswin Mujoo 2021-07-04  1237  
> 62b5eb4fdf3f5f Ojaswin Mujoo 2021-07-04  1238  	if (!state) {
> 62b5eb4fdf3f5f Ojaswin Mujoo 2021-07-04  1239  		ret = -EPERM;
> 62b5eb4fdf3f5f Ojaswin Mujoo 2021-07-04  1240  		goto out;
> 62b5eb4fdf3f5f Ojaswin Mujoo 2021-07-04  1241  	}
> 62b5eb4fdf3f5f Ojaswin Mujoo 2021-07-04  1242  
> 62b5eb4fdf3f5f Ojaswin Mujoo 2021-07-04  1243  	/* Ensure videocore is awake to allow termination. */
> 62b5eb4fdf3f5f Ojaswin Mujoo 2021-07-04  1244  	vchiq_use_internal(instance->state, NULL, USE_TYPE_VCHIQ);
> 62b5eb4fdf3f5f Ojaswin Mujoo 2021-07-04  1245  
> 
> ---
> 0-DAY CI Kernel Test Service, Intel Corporation
> https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
> 

Thank you for looking into this,
Ojaswin

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

WARNING: multiple messages have this Message-ID (diff)
From: Ojaswin Mujoo <ojaswin98@gmail.com>
To: kbuild-all@lists.01.org
Subject: Re: [PATCH v3 3/5] staging: vchiq: Move vchiq char driver to its own file
Date: Mon, 05 Jul 2021 16:28:04 +0530	[thread overview]
Message-ID: <20210705105804.GA41070@ojas> (raw)
In-Reply-To: <202107051622.6i1l1vdL-lkp@intel.com>

[-- Attachment #1: Type: text/plain, Size: 3131 bytes --]

Hello Dan,

On Mon, Jul 05, 2021 at 12:56:09PM +0300, Dan Carpenter wrote:
> Hi Ojaswin,
> 
> url:    https://github.com/0day-ci/linux/commits/Ojaswin-Mujoo/vchiq-Patch-to-separate-platform-and-cdev-code/20210705-000124
> base:   https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging.git 77ad1f0e99bd00af024e650b862cfda3137af660
> config: i386-randconfig-m021-20210705 (attached as .config)
> compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
> 
> If you fix the issue, kindly add following tag as appropriate
> Reported-by: kernel test robot <lkp@intel.com>
> Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
> 
> smatch warnings:
> drivers/staging/vc04_services/interface/vchiq_arm/vchiq_dev.c:1235 vchiq_release() warn: argument 3 to %lx specifier is cast from pointer
> 
> vim +1235 drivers/staging/vc04_services/interface/vchiq_arm/vchiq_dev.c
> 
> 62b5eb4fdf3f5f Ojaswin Mujoo 2021-07-04  1227  static int vchiq_release(struct inode *inode, struct file *file)
> 62b5eb4fdf3f5f Ojaswin Mujoo 2021-07-04  1228  {
> 62b5eb4fdf3f5f Ojaswin Mujoo 2021-07-04  1229  	struct vchiq_instance *instance = file->private_data;
> 62b5eb4fdf3f5f Ojaswin Mujoo 2021-07-04  1230  	struct vchiq_state *state = vchiq_get_state();
> 62b5eb4fdf3f5f Ojaswin Mujoo 2021-07-04  1231  	struct vchiq_service *service;
> 62b5eb4fdf3f5f Ojaswin Mujoo 2021-07-04  1232  	int ret = 0;
> 62b5eb4fdf3f5f Ojaswin Mujoo 2021-07-04  1233  	int i;
> 62b5eb4fdf3f5f Ojaswin Mujoo 2021-07-04  1234  
> 62b5eb4fdf3f5f Ojaswin Mujoo 2021-07-04 @1235  	vchiq_log_info(vchiq_arm_log_level, "%s: instance=%lx", __func__,
> 62b5eb4fdf3f5f Ojaswin Mujoo 2021-07-04  1236  		       (unsigned long)instance);
> 
> This should eventually be converted to %p so it doesn't defeat KASLR.
> (Not that we really care on raspberry pi, I think?)
Yes, that does seem right, however, this patchset only moves the code from
vchiq_arm.c to vchiq_dev.c and I've not really touched any of the
existing code itself (Except moving it to a new file which is why it shows up
in the patch). 

Hence, I'm not sure if this fix is in scope of this patchset. (I also
have a similar warning by kernel test robot here [1] which and I'm not
sure if I need to act upon). Maybe we can look at this in a separate
patch?

[1] https://lkml.org/lkml/2021/7/4/138
> 
> 62b5eb4fdf3f5f Ojaswin Mujoo 2021-07-04  1237  
> 62b5eb4fdf3f5f Ojaswin Mujoo 2021-07-04  1238  	if (!state) {
> 62b5eb4fdf3f5f Ojaswin Mujoo 2021-07-04  1239  		ret = -EPERM;
> 62b5eb4fdf3f5f Ojaswin Mujoo 2021-07-04  1240  		goto out;
> 62b5eb4fdf3f5f Ojaswin Mujoo 2021-07-04  1241  	}
> 62b5eb4fdf3f5f Ojaswin Mujoo 2021-07-04  1242  
> 62b5eb4fdf3f5f Ojaswin Mujoo 2021-07-04  1243  	/* Ensure videocore is awake to allow termination. */
> 62b5eb4fdf3f5f Ojaswin Mujoo 2021-07-04  1244  	vchiq_use_internal(instance->state, NULL, USE_TYPE_VCHIQ);
> 62b5eb4fdf3f5f Ojaswin Mujoo 2021-07-04  1245  
> 
> ---
> 0-DAY CI Kernel Test Service, Intel Corporation
> https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org
> 

Thank you for looking into this,
Ojaswin

  reply	other threads:[~2021-07-05 10:58 UTC|newest]

Thread overview: 47+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-04 15:56 [PATCH v3 0/5] vchiq: Patch to separate platform and cdev code Ojaswin Mujoo
2021-07-04 15:56 ` Ojaswin Mujoo
2021-07-04 15:57 ` [PATCH v3 1/5] staging: vchiq: Refactor vchiq " Ojaswin Mujoo
2021-07-04 15:57   ` Ojaswin Mujoo
2021-07-11 10:33   ` Stefan Wahren
2021-07-11 10:33     ` Stefan Wahren
2021-07-04 15:57 ` [PATCH v3 2/5] staging: vchiq: Move certain declarations to vchiq_arm.h Ojaswin Mujoo
2021-07-04 15:57   ` Ojaswin Mujoo
2021-07-11 10:34   ` Stefan Wahren
2021-07-11 10:34     ` Stefan Wahren
2021-07-04 15:58 ` [PATCH v3 3/5] staging: vchiq: Move vchiq char driver to its own file Ojaswin Mujoo
2021-07-04 15:58   ` Ojaswin Mujoo
2021-07-05  8:21   ` kernel test robot
2021-07-05  9:56     ` Dan Carpenter
2021-07-05  9:56     ` Dan Carpenter
2021-07-05  9:56     ` Dan Carpenter
2021-07-05 10:58     ` Ojaswin Mujoo [this message]
2021-07-05 10:58       ` Ojaswin Mujoo
2021-07-05 10:58       ` Ojaswin Mujoo
2021-07-05 11:19       ` Dan Carpenter
2021-07-05 11:19         ` Dan Carpenter
2021-07-05 11:19         ` Dan Carpenter
2021-07-05 11:19         ` Dan Carpenter
2021-07-05 11:24         ` Ojaswin Mujoo
2021-07-05 11:24           ` Ojaswin Mujoo
2021-07-05 11:24           ` Ojaswin Mujoo
2021-07-11 10:35   ` Stefan Wahren
2021-07-11 10:35     ` Stefan Wahren
2021-07-04 15:59 ` [PATCH v3 4/5] staging: vchiq: Make creation of vchiq cdev optional Ojaswin Mujoo
2021-07-04 15:59   ` Ojaswin Mujoo
2021-07-11 10:39   ` Stefan Wahren
2021-07-11 10:39     ` Stefan Wahren
2021-07-04 15:59 ` [PATCH v3 5/5] staging: vchiq: Combine vchiq platform code into single file Ojaswin Mujoo
2021-07-04 15:59   ` Ojaswin Mujoo
2021-07-04 18:07   ` kernel test robot
2021-07-04 18:07     ` kernel test robot
2021-07-04 18:07     ` kernel test robot
2021-07-11 10:49   ` Stefan Wahren
2021-07-11 10:49     ` Stefan Wahren
2021-07-11 11:28     ` Ojaswin Mujoo
2021-07-11 11:28       ` Ojaswin Mujoo
2021-07-21  8:22       ` Greg KH
2021-07-21  8:22         ` Greg KH
2021-07-21 16:28         ` Ojaswin Mujoo
2021-07-21 16:28           ` Ojaswin Mujoo
2021-07-11 10:29 ` [PATCH v3 0/5] vchiq: Patch to separate platform and cdev code Stefan Wahren
2021-07-11 10:29   ` Stefan Wahren

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210705105804.GA41070@ojas \
    --to=ojaswin98@gmail.com \
    --cc=arnd@arndb.de \
    --cc=bcm-kernel-feedback-list@broadcom.com \
    --cc=dan.carpenter@oracle.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=kbuild-all@lists.01.org \
    --cc=kbuild@lists.01.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-staging@lists.linux.dev \
    --cc=lkp@intel.com \
    --cc=nsaenz@kernel.org \
    --cc=phil@raspberrypi.com \
    --cc=stefan.wahren@i2se.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.