[PATCH] sysctl: Handle error writing UINT_MAX to u32 fields

2016-08-17 Thread Subash Abhinov Kasiviswanathan
detect overflows when converting to int") Cc: Heinrich Schuchardt <xypron.g...@gmx.de> Cc: Andrew Morton <a...@linux-foundation.org> Cc: Kees Cook <keesc...@chromium.org> Cc: "David S. Miller" <da...@davemloft.net> Cc: Ingo Molnar <mi...@redhat.com> Sign

Re: net/ipv4: use-after-free in ipv4_mtu

2017-04-05 Thread Subash Abhinov Kasiviswanathan
Interesting. I might had too many beers tonight, but ... refcount was removed in 2860583fe840 many months later -static void rt_init_metrics(struct rtable *rt, struct fib_info *fi) -{ - if (fi->fib_metrics != (u32 *) dst_default_metrics) { - rt->fi = fi; -

Re: [lkp-robot] [drivers] ceed73a2cf: drivers/net/ethernet/qualcomm/rmnet/rmnet_config.c:#suspicious_rcu_dereference_check()usage

2017-09-20 Thread Subash Abhinov Kasiviswanathan
On 2017-09-19 19:55, kernel test robot wrote: FYI, we noticed the following commit: commit: ceed73a2cf4aff2921802aa3d21d45280677547d ("drivers: net: ethernet: qualcomm: rmnet: Initial implementation") https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git master in testcase: boot on

Re: [PATCH][net-next] net: qualcomm: rmnet: remove unused variable priv

2017-08-31 Thread Subash Abhinov Kasiviswanathan
- struct rmnet_priv *priv; - - priv = netdev_priv(rmnet_dev); netdev_dbg(rmnet_dev, "Setting up device %s\n", rmnet_dev->name); rmnet_dev->netdev_ops = _vnd_ops; Thanks for fixing this. Acked-by: Subash Abhinov Kasiviswanathan <subas...@codeaurora.org>

Re: [PATCH][net-next] net: qualcomm: rmnet: remove unused variable priv

2017-08-31 Thread Subash Abhinov Kasiviswanathan
; netdev_dbg(rmnet_dev, "Setting up device %s\n", rmnet_dev->name); rmnet_dev->netdev_ops = _vnd_ops; Thanks for fixing this. Acked-by: Subash Abhinov Kasiviswanathan

Re: [lkp-robot] [drivers] ceed73a2cf: drivers/net/ethernet/qualcomm/rmnet/rmnet_config.c:#suspicious_rcu_dereference_check()usage

2017-09-20 Thread Subash Abhinov Kasiviswanathan
On 2017-09-19 19:55, kernel test robot wrote: FYI, we noticed the following commit: commit: ceed73a2cf4aff2921802aa3d21d45280677547d ("drivers: net: ethernet: qualcomm: rmnet: Initial implementation") https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git master in testcase: boot on

Re: [PATCH v2 00/17] net: introduce Qualcomm IPA driver

2019-05-31 Thread Subash Abhinov Kasiviswanathan
On 2019-05-31 17:33, Bjorn Andersson wrote: On Fri 31 May 13:47 PDT 2019, Alex Elder wrote: On 5/31/19 2:19 PM, Arnd Bergmann wrote: > On Fri, May 31, 2019 at 6:36 PM Alex Elder wrote: >> On 5/31/19 9:58 AM, Dan Williams wrote: >>> On Thu, 2019-05-30 at 22:53 -0500, Alex Elder wrote: >>> >>>

Re: [PATCH 1/8] net: qualcomm: rmnet: fix struct rmnet_map_header

2019-05-20 Thread Subash Abhinov Kasiviswanathan
On 2019-05-20 07:53, Alex Elder wrote: The C bit-fields in the first byte of the rmnet_map_header structure are defined in the wrong order. The first byte should be formatted this way: +--- reserved_bit | +- cd_bit | |

Re: [PATCH 1/8] net: qualcomm: rmnet: fix struct rmnet_map_header

2019-05-20 Thread Subash Abhinov Kasiviswanathan
If the above illustration is supposed to be in network byte order, then it is wrong. The documentation has the definition for the MAP packet. Network *bit* order is irrelevant to the host. Host memory is byte addressable only, and bit 0 is the low-order bit. Packet format - Bit

Re: [PATCH v2 00/17] net: introduce Qualcomm IPA driver

2019-06-03 Thread Subash Abhinov Kasiviswanathan
I can't (or won't) comment right now on whether IPA needs its own netdev for rmnet to use. The IPA endpoints used for the modem network interfaces are enabled when the netdev is opened and disabled when closed. Outside of that, TX and RX are pretty much immediately passed through to the layer

Re: [PATCH v2 00/17] net: introduce Qualcomm IPA driver

2019-06-11 Thread Subash Abhinov Kasiviswanathan
The general plan (and I believe Daniele Palmas was working on it) was to eventually make qmi_wwan use rmnet rather than its internal sysfs- based implementation. qmi_wwan and ipa are at essentially the same level and both could utilize rmnet on top. *That's* what I'd like to see. I don't want to

Re: [PATCH v2 00/17] net: introduce Qualcomm IPA driver

2019-06-18 Thread Subash Abhinov Kasiviswanathan
On 2019-06-18 14:55, Arnd Bergmann wrote: On Tue, Jun 18, 2019 at 10:36 PM Johannes Berg wrote: On Tue, 2019-06-18 at 21:59 +0200, Arnd Bergmann wrote: > > From my understanding, the ioctl interface would create the lower > netdev after talking to the firmware, and then user space would use >

Re: [PATCH v2 00/17] net: introduce Qualcomm IPA driver

2019-06-19 Thread Subash Abhinov Kasiviswanathan
There is a n:1 relationship between rmnet and IPA. rmnet does the de-muxing to multiple netdevs based on the mux id in the MAP header for RX packets and vice versa. Oh, so you mean that even though IPA supports multiple channels and multiple netdev instances for a physical device, all the rmnet

Re: [PATCH 02/18] soc: qcom: create "include/soc/qcom/rmnet.h"

2019-05-15 Thread Subash Abhinov Kasiviswanathan
+#ifndef _SOC_QCOM_RMNET_H_ +#define _SOC_QCOM_RMNET_H_ + +#include + +/* Header structure that precedes packets in ETH_P_MAP protocol */ +struct rmnet_map_header { + u8 pad_len : 6; + u8 reserved_bit: 1; + u8 cd_bit : 1; + u8 mux_id;

Re: [PATCH 02/18] soc: qcom: create "include/soc/qcom/rmnet.h"

2019-05-17 Thread Subash Abhinov Kasiviswanathan
On 2019-05-17 11:27, Alex Elder wrote: On 5/15/19 8:09 PM, Subash Abhinov Kasiviswanathan wrote: . . . Hi Alex Could we instead have the rmnet header definition in include/linux/if_rmnet.h I have no objection to that, but I don't actually know what the criteria are for putting a file

Re: net/ipv4: use-after-free in ipv4_mtu

2017-04-05 Thread Subash Abhinov Kasiviswanathan
Interesting. I might had too many beers tonight, but ... refcount was removed in 2860583fe840 many months later -static void rt_init_metrics(struct rtable *rt, struct fib_info *fi) -{ - if (fi->fib_metrics != (u32 *) dst_default_metrics) { - rt->fi = fi; -

[PATCH] sysctl: Handle error writing UINT_MAX to u32 fields

2016-08-17 Thread Subash Abhinov Kasiviswanathan
detect overflows when converting to int") Cc: Heinrich Schuchardt Cc: Andrew Morton Cc: Kees Cook Cc: "David S. Miller" Cc: Ingo Molnar Signed-off-by: Subash Abhinov Kasiviswanathan --- include/linux/sysctl.h | 2 ++ kernel/sysctl.c| 42 +++