> From: netdev-ow...@vger.kernel.org On
> Behalf Of Kai-Heng Feng
> Sent: Thursday, May 7, 2020 7:21 AM
> To: Kirsher, Jeffrey T
> Cc: Kai-Heng Feng ; David S. Miller
> ; Neftin, Sasha ; Dima
> Ruinskiy ; Avargil, Raanan
> ; moderated list:INTEL ETHERNET DRIVERS wired-...@lists.osuosl.org>; open
This series contains updates to igc and e1000.
Andre cleans up code that was left over from the igb driver that handled
MAC address filters based on the source address, which is not currently
supported. Simplifies the MAC address filtering code and prepare the
igc driver for future source address
From: Sasha Neftin
Header redirection missed packet counter not applicable for i225 device.
This patch comes to clean up this register.
Signed-off-by: Sasha Neftin
Tested-by: Aaron Brown
Signed-off-by: Jeff Kirsher
---
drivers/net/ethernet/intel/igc/igc_regs.h | 1 -
1 file changed, 1 deleti
From: Sasha Neftin
Per queue good transmitted packet counter not applicable for i225 device.
This patch comes to clean up this register.
Signed-off-by: Sasha Neftin
Tested-by: Aaron Brown
Signed-off-by: Jeff Kirsher
---
drivers/net/ethernet/intel/igc/igc_regs.h | 3 ---
1 file changed, 3 del
From: Andre Guedes
This patch re-writes the second half of igc_ethtool_get_nfc_entry() to
follow the 'return early' pattern seen in other parts of the driver and
removes some duplicate comments.
Signed-off-by: Andre Guedes
Tested-by: Aaron Brown
Signed-off-by: Jeff Kirsher
---
drivers/net/et
From: Andre Guedes
The 'cookie' field is not used anywhere in the code so this patch
removes it from struct igc_nfc_filter.
Signed-off-by: Andre Guedes
Tested-by: Aaron Brown
Signed-off-by: Jeff Kirsher
---
drivers/net/ethernet/intel/igc/igc.h | 1 -
1 file changed, 1 deletion(-)
diff --git
From: Alexander Duyck
We are seeing a deadlock in e1000 down when NAPI is being disabled. Looking
over the kernel function trace of the system it appears that the interface
is being closed and then a reset is hitting which deadlocks the interface
as the NAPI interface is already disabled.
To pre
From: Andre Guedes
This patch does a trivial change in igc_ethtool_get_rxnfc() and
igc_ethtool_set_rxnfc() to simplify their logic.
Signed-off-by: Andre Guedes
Tested-by: Aaron Brown
Signed-off-by: Jeff Kirsher
---
drivers/net/ethernet/intel/igc/igc_ethtool.c | 33 ++--
1 fil
> From: netdev-ow...@vger.kernel.org On
> Behalf Of Jason Yan
> Sent: Thursday, May 7, 2020 4:09 AM
> To: Kirsher, Jeffrey T ; da...@davemloft.net;
> yanai...@huawei.com; intel-wired-...@lists.osuosl.org;
> netdev@vger.kernel.org; linux-ker...@vger.kernel.org
> Subject: [PATCH net-next] igb: make
From: Andre Guedes
Every time we access the 'etype' and 'vlan_tci' fields from struct
igc_nfc_filter to enable or disable filters in hardware we have to
convert them from big endian to host order so it makes more sense to
simply have these fields in host order.
The byte order conversion should t
From: Sasha Neftin
Part of circuit breaker registers is obsolete
and not applicable for i225 device.
This patch comes to clean up these registers.
Signed-off-by: Sasha Neftin
Tested-by: Aaron Brown
Signed-off-by: Jeff Kirsher
---
drivers/net/ethernet/intel/igc/igc_mac.c | 4
drivers/ne
From: Andre Guedes
The local function igc_max_channels() is a pointless wrapper around
igc_get_max_rss_queues(). This patch removes it and updates the callers
accordingly. It also does some cleanup on igc_get_max_rss_queues().
Signed-off-by: Andre Guedes
Tested-by: Aaron Brown
Signed-off-by: J
From: Andre Guedes
In igc_adapter we keep a sort of shadow copy of RAL and RAH registers.
There is not much benefit in keeping it, at the cost of maintainability,
since adding/removing MAC address filters is not hot path, and we
already keep filters information in adapter->nfc_filter_list for cle
From: Andre Guedes
This patch adds support for Network Flow Classification (NFC) rules
based on source MAC address. Note that the controller doesn't support
rules with both source and destination addresses set, so this special
case is checked in igc_add_ethtool_nfc_entry().
Signed-off-by: Andre
From: Andre Guedes
MAC address filters based on source address are not currently supported
by the IGC driver. Despite of that, the driver have some dangling code
to handle it, inherited from IGB driver. This patch removes that code to
prepare for a follow up patch that adds proper source MAC addr
From: Andre Guedes
This patch extends MAC address filter internal APIs igc_add_mac_filter()
and igc_del_mac_filter(), as well as local helpers, to support filters
based on source address.
A new parameters 'type' is added to the APIs to indicate if the filter
type is source or destination. In cas
From: Andre Guedes
The Network Flow Classification (NFC) support code from IGC driver uses
terms such as 'rule', 'filter', 'entry', 'input' interchangeably when
referring to NFC rules, making it harder to follow the code. This patch
renames IGC's internal APIs, structs, and variables so we stick
From: Andre Guedes
This patch adds the prefix 'igc_ethtool_' to all functions defined in
igc_ethtool.c so they align with the name convention already followed by
other parts of the driver (e.g. igc_tsn, igc_ptp). Also, this avoids
some name clashing with functions added to igc_main.c by upcoming
From: 'Marcelo Ricardo Leitner'
> Sent: 21 May 2020 01:17
> On Wed, May 20, 2020 at 03:08:13PM +, David Laight wrote:
> ...
> > Only SCTP_SOCKOPT_CONNECTX3 contains an indirect pointer.
> > It is also the only getsockopt() that wants to return a buffer
> > and an error code. It is also definite
I've posted a new version of this with a fixed description for patch 1.
David
Christoph Hellwig wrote:
> Add a helper to directly set the RXRPC_MIN_SECURITY_LEVEL sockopt from
> kernel space without going through a fake uaccess.
>
> Thanks to David Howells for the documentation updates.
>
> Signed-off-by: Christoph Hellwig
Acked-by: David Howells
> From: netdev-ow...@vger.kernel.org On
> Behalf Of Punit Agrawal
> Sent: Thursday, May 14, 2020 9:31 PM
> To: Kirsher, Jeffrey T
> Cc: daniel.sangor...@toshiba.co.jp; Punit Agrawal
> ; Alexander Duyck
> ; David S. Miller ;
> intel-wired-...@lists.osuosl.org; netdev@vger.kernel.org; linux-
> ker.
From: Christoph Hellwig
> Sent: 20 May 2020 20:55
>
> this series removes the kernel_setsockopt and kernel_getsockopt
> functions, and instead switches their users to small functions that
> implement setting (or in one case getting) a sockopt directly using
> a normal kernel function call with typ
On 20/05/2020 16:09, Horatiu Vultur wrote:
> It is not allow to have the same net bridge port part of multiple MRP
> rings. Therefore add a check if the port is used already in a different
> MRP. In that case return failure.
>
> Fixes: 9a9f26e8f7ea ("bridge: mrp: Connect MRP API with the switchdev
On 20/05/2020 16:09, Horatiu Vultur wrote:
> When a MRP instance is deleted, then restore the port according to the
> bridge state. If the bridge is up then the ports will be in forwarding
> state otherwise will be in disabled state.
>
> Fixes: 9a9f26e8f7ea ("bridge: mrp: Connect MRP API with the
On Wed, May 20, 2020 at 08:39:13PM -0300, Marcelo Ricardo Leitner wrote:
> On Wed, May 20, 2020 at 04:23:55PM -0700, David Miller wrote:
> > From: Marcelo Ricardo Leitner
> > Date: Wed, 20 May 2020 20:10:01 -0300
> >
> > > The duplication with sctp_setsockopt_nodelay() is quite silly/bad.
> > > A
When attaching a flow dissector program to a network namespace with
bpf(BPF_PROG_ATTACH, ...) we grab a reference to bpf_prog.
If netns gets destroyed while a flow dissector is still attached, and there
are no other references to the prog, we leak the reference and the program
remains loaded.
Lea
On Wed, 20 May 2020 10:40:00 -0700
s...@google.com wrote:
> > +static void __net_exit flow_dissector_pernet_pre_exit(struct net *net)
> > +{
> > + struct bpf_prog *attached;
> > +
> > + /* We don't lock the update-side because there are no
> > +* references left to this netns when we get c
On Wed, May 20, 2020 at 08:00:25PM -0300, Marcelo Ricardo Leitner wrote:
> > + if (err)
> > + return err;
> > +
> > + lock_sock(sk);
> > + err = sctp_do_bind(sk, (union sctp_addr *)addr, af->sockaddr_len);
> > + if (!err)
> > + err = sctp_send_asconf_add_ip(sk, addr, 1);
On 20/05/2020 07:33, Roopa Prabhu wrote:
> From: Roopa Prabhu
>
> Todays vxlan mac fdb entries can point to multiple remote
> ips (rdsts) with the sole purpose of replicating
> broadcast-multicast and unknown unicast packets to those remote ips.
>
> E-VPN multihoming [1,2,3] requires bridged vxl
Jakub
On 5/21/2020 1:28 AM, Jakub Kicinski wrote:
On Wed, 20 May 2020 22:39:11 +0530 Vinay Kumar Yadav wrote:
On 5/20/2020 12:46 AM, David Miller wrote:
From: Vinay Kumar Yadav
Date: Tue, 19 May 2020 13:13:27 +0530
+ spin_lock_bh(&ctx->encrypt_compl_lock);
+ pe
From: Christoph Hellwig
> Sent: 21 May 2020 09:35
> On Wed, May 20, 2020 at 08:39:13PM -0300, Marcelo Ricardo Leitner wrote:
> > On Wed, May 20, 2020 at 04:23:55PM -0700, David Miller wrote:
> > > From: Marcelo Ricardo Leitner
> > > Date: Wed, 20 May 2020 20:10:01 -0300
> > >
> > > > The duplicati
On Thu, May 21, 2020 at 09:06:19AM +, David Laight wrote:
> > > The comment still applies, though. (re the duplication)
> >
> > Where do you see duplication?
>
> The whole thing just doesn't scale.
>
> As soon as you get to the slightly more complex requests
> like SCTP_INITMSG (which should
On Thu, May 21, 2020 at 08:01:33AM +, David Laight wrote:
> How much does this increase the kernel code by?
44 files changed, 660 insertions(+), 843 deletions(-)
> You are also replicating a lot of code making it more
> difficult to maintain.
No, I specifically don't.
> I don't think the
Hi Jakub,
> > In the first generation of our hardware (A1), a whole traffic class is
> > consumed for PTP handling in FW (FW uses it to send the ptp data and
> > to send back timestamps).
> > Since this conflicts with QoS (user is unable to use the reserved
> > TC2), we suggest using module param
On Thu, May 21, 2020 at 09:24:25AM +0800, kbuild test robot wrote:
> All errors (new ones prefixed by >>, old ones prefixed by <<):
>
> In file included from include/linux/build_bug.h:5,
> from include/linux/bitfield.h:10,
> from drivers/net/ethernet/netronome/nfp/flower/match.c:4:
> drivers/net/e
Upon adapter hotplug, cxgb4 registers ULD devices for all the ULDs that
are already loaded, ensuring that ULD's can enumerate the hotplugged
adapter without reloading the ULD.
Signed-off-by: Potnuri Bharat Teja
---
drivers/net/ethernet/chelsio/cxgb4/cxgb4.h| 8 +
.../net/ethernet/chelsio/c
From: 'Christoph Hellwig'
> Sent: 21 May 2020 10:12
...
> > I worried about whether getsockopt() should read the entire
> > user buffer first. SCTP needs the some of it often (including a
> > sockaddr_storage in one case), TCP needs it once.
> > However the cost of reading a few words is small, and
On Wed, May 20, 2020 at 03:42:02PM -0700, Ian Rogers wrote:
SNIP
> >
> > hum, I think that's also concern if you are multiplexing 2 groups and one
> > metric getting events from both groups that were not meassured together
> >
> > it makes sense to me put all the merged events into single weak gr
From: GuoJia Liao
This patch adds support for 'QoS' in port based VLAN configuration.
Signed-off-by: GuoJia Liao
Signed-off-by: Huazhong Tan
---
.../ethernet/hisilicon/hns3/hns3pf/hclge_main.c| 32 --
.../ethernet/hisilicon/hns3/hns3pf/hclge_main.h| 4 +--
.../net
From: GuoJia Liao
There is a scenario which needs vNICs enable the VLAN filter
in access port, while disable the VLAN filter in trunk port.
Access port and trunk port can switch according to the user's
configuration.
This patch adds a new VLAN mode called dynamic mode for it.
So there are two VL
This patchset adds two new VLAN feature.
[patch 1] adds a new dynamic VLAN mode.
[patch 2] adds support for 'QoS' field to PVID.
Change log:
V1->V2: modifies [patch 1]'s commit log, suggested by Jakub Kicinski.
GuoJia Liao (2):
net: hns3: adds support for dynamic VLAN mode
net: hns3: add sup
On Wed, May 20, 2020 at 11:20:04AM -0700, Ian Rogers wrote:
SNIP
> There are 5 out of 12 metric groups where no events are shared, such
> as Power, however, disabling grouping of events always reduces the
> number of events.
>
> The result for Memory_BW needs explanation:
>
> Metric group: Memo
From: Ido Schimmel
Fix two bugs observed while analyzing regression failures.
Patch #1 fixes a bug where sometimes the drop counter of a packet trap
policer would not increase.
Patch #2 adds a missing initialization of a variable in a related
selftest.
Ido Schimmel (2):
netdevsim: Ensure pol
From: Ido Schimmel
The variable is used by log_test() to check if the test case completely
successfully or not. In case it is not initialized at the start of a
test case, it is possible for the test case to fail despite not
encountering any errors.
Example:
```
...
TEST: Trap group statistics
From: Ido Schimmel
In case the policer drop counter is retrieved when the jiffies value is
a multiple of 64, the counter will not be incremented.
This randomly breaks a selftest [1] the reads the counter twice and
checks that it was incremented:
```
TEST: Trap policer
From: Amit Cohen
Starting from iputils s20190709 (used in Fedora 31), arping does not
support timeout being specified as a decimal:
$ arping -c 1 -I swp1 -b 192.0.2.66 -q -w 0.1
arping: invalid argument: '0.1'
Previously, such timeouts were rounded to an integer.
Fix this by specifying the tim
From: Jiri Pirko
In case of reload fail, the mlxsw_sp->ports contains a pointer to a
freed memory (either by reload_down() or reload_up() error path).
Fix this by initializing the pointer to NULL and checking it before
dereferencing in split/unsplit/type_set callpaths.
Fixes: 24cc68ad6c46 ("mlxs
From: Ido Schimmel
Patch #1 from Jiri fixes a use-after-free discovered while fuzzing mlxsw
/ devlink with syzkaller.
Patch #2 from Amit works around a limitation in new versions of arping,
which is used in several selftests.
Amit Cohen (1):
selftests: mlxsw: qos_mc_aware: Specify arping time
The ipq806x_gmac_probe() function enables the PTP clock but not the
appropriate interface clocks. This means that if the bootloader hasn't
done so attempting to bring up the interface will fail with an error
like:
[ 59.028131] ipq806x-gmac-dwmac 3760.ethernet: Failed to reset the dma
[ 59.
During initialization of SD8997 wifi chip kernel prints warnings:
mwifiex_sdio mmc0:0001:1: Unknown api_id: 3
mwifiex_sdio mmc0:0001:1: Unknown api_id: 4
This patch adds support for parsing all api ids provided by SD8997
firmware.
Signed-off-by: Pali Rohár
---
drivers/net/wireless/marvell/
Hi David, et all,
On 5/13/20 8:27 AM, Murali Karicheri wrote:
Hello netdev experts,
On 5/6/20 12:30 PM, Murali Karicheri wrote:
This RFC series add support for Parallel Redundancy Protocol (PRP)
as defined in IEC-62439-3 in the kernel networking subsystem. PRP
Uses a Redundancy Control Trailer
SD8997 firmware sends TLV_TYPE_MAX_CONN with struct hw_spec_max_conn to
inform kernel about maximum number of p2p connections and stations in AP
mode.
During initialization of SD8997 wifi chip kernel prints warning:
mwifiex_sdio mmc0:0001:1: Unknown GET_HW_SPEC TLV type: 0x217
This patch adds
There is another safe way to get the file structure without
holding the files->file_lock. That is rcu lock, and this way
has better performance. So use the rcu lock instead of the
files->file_lock.
Signed-off-by: Muchun Song
---
fs/proc/fd.c | 31 ---
kernel/b
ck-Entries/20200521-052254
base: https://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git
4f65e2f483b6f764c15094d14dd53dda048a4048
config: i386-allyesconfig (attached as .config)
compiler: gcc-7 (Ubuntu 7.5.0-6ubuntu2) 7.5.0
reproduce:
# apt-get install sparse
# sparse versi
This option makes possible to programatically bind sockets to netdevices.
With the help of this option sockets of VRF unaware applications
could be distributed between multiple VRFs with eBPF sock_ops program.
This let the applications benefit from the multiple possible routes.
Signed-off-by: Fere
> Andrew, patch#1 in the series will parse the property to get register offset
> and bit.
> Patch#2 describes the property format as below:
><&gpr req_gpr req_bit>.
> gpr is the phandle to general purpose register node.
> req_gpr is the gpr register offset for ENET stop req
On 5/17/20 9:30 PM, David Miller wrote:
> From: Andrew Lunn
> Date: Sun, 17 May 2020 21:16:35 +0200
>
>>> Nevertheless I was going to repeat the performance measurements on a
>>> recent kernel but haven't gotten around to that yet because the
>>> measurements need to be performed with CONFIG_PREE
On Thu, May 21, 2020 at 10:34:42AM +0200, Christoph Hellwig wrote:
> On Wed, May 20, 2020 at 08:39:13PM -0300, Marcelo Ricardo Leitner wrote:
> > On Wed, May 20, 2020 at 04:23:55PM -0700, David Miller wrote:
> > > From: Marcelo Ricardo Leitner
> > > Date: Wed, 20 May 2020 20:10:01 -0300
> > >
> >
On Thu, May 21, 2020 at 10:42:24AM +0200, Christoph Hellwig wrote:
> On Wed, May 20, 2020 at 08:00:25PM -0300, Marcelo Ricardo Leitner wrote:
> > > + if (err)
> > > + return err;
> > > +
> > > + lock_sock(sk);
> > > + err = sctp_do_bind(sk, (union sctp_addr *)addr, af->sockaddr_len);
> > >
On Thu, May 21, 2020 at 10:33:48AM -0300, Marcelo Ricardo Leitner wrote:
> With the patch there are now two ways of enabling nodelay.
There is exactly one way to do for user applications, and one way
for kernel drivers. (actually they could just set the field directly,
which no one does for sctp,
On Wed, May 20, 2020 at 07:10:06PM +0200, Roelof Berg wrote:
Hi Roelof
Here is how i would do this. I don't like this MII bus snooping. It is
a microchip propriety's thing, which is not well understood. It adds
no value over just doing what every other MAC driver does in the
link_change callback,
On Wed, May 20, 2020 at 11:23:18AM -0700, syzbot wrote:
> Hello,
>
> syzbot found the following crash on:
>
> HEAD commit:dda18a5c selftests/bpf: Convert bpf_iter_test_kern{3, 4}.c..
> git tree: bpf-next
I can figure out what this is from reading Next/Trees b
On Wed, May 20, 2020 at 12:03:59AM -0700, Jeff Kirsher wrote:
> This patch set adds a unified Intel Ethernet Protocol Driver for RDMA that
> supports a new network device E810 (iWARP and RoCEv2 capable) and the
> existing X722 iWARP device. The driver architecture provides the extensibility
> for f
Previous patch:
"net: mvneta: speed down the PHY, if WoL used, to save energy"
was causing a NULL pointer dereference when ethernet switches are
connected to mvneta, because they aren't handled directly as PHYs.
Fix it by restricting the mentioned patch for the PHY detected cases.
Reported-by:
Add these generic helpers that may be useful to use from sk_msg programs.
The helpers do not depend on ctx so we can simply add them here,
BPF_FUNC_perf_event_output
BPF_FUNC_get_current_uid_gid
BPF_FUNC_get_current_pid_tgid
BPF_FUNC_get_current_comm
BPF_FUNC_get_current_cgroup_id
BPF_FUNC_g
This series adds helpers for sk_msg program type and based on feedback
from v1 adds *_task_* helpers and probe_* helpers to all networking
programs with perfmon_capable() capabilities.
The list of helpers breaks down as follows,
Networking with perfmon_capable() guard (patch2):
BPF_FUNC_get_cur
Often it is useful when applying policy to know something about the
task. If the administrator has CAP_SYS_ADMIN rights then they can
use kprobe + networking hook and link the two programs together to
accomplish this. However, this is a bit clunky and also means we have
to call both the network pro
Add helpers to use local socket storage.
Signed-off-by: John Fastabend
Acked-by: Yonghong Song
---
include/uapi/linux/bpf.h |2 ++
net/core/filter.c | 15 +++
tools/include/uapi/linux/bpf.h |2 ++
3 files changed, 19 insertions(+)
diff --git a/include/u
The test itself is not particularly useful but it encodes a common
pattern we have.
Namely do a sk storage lookup then depending on data here decide if
we need to do more work or alternatively allow packet to PASS. Then
if we need to do more work consult task_struct for more information
about the
On Thu, May 21, 2020 at 07:32:14AM +, David Laight wrote:
> From: 'Marcelo Ricardo Leitner'
> > Sent: 21 May 2020 01:17
> > On Wed, May 20, 2020 at 03:08:13PM +, David Laight wrote:
> > ...
> > > Only SCTP_SOCKOPT_CONNECTX3 contains an indirect pointer.
> > > It is also the only getsockopt(
Lets test using probe* in SCHED_CLS network programs as well just
to be sure these keep working. Its cheap to add the extra test
and provides a second context to test outside of sk_msg after
we generalized probe* helpers to all networking types.
Signed-off-by: John Fastabend
---
.../testing/self
Hi Edward, Cong,
On Mon 18 May 2020 at 18:37, Edward Cree wrote:
> On 15/05/2020 12:40, Vlad Buslov wrote:
>> In order to
>> significantly improve filter dump rate this patch sets implement new
>> mode of TC filter dump operation named "terse dump" mode. In this mode
>> only parameters necessary
Hi Greg, Jason,
On 5/20/2020 12:32 PM, Jeff Kirsher wrote:
> From: Dave Ertman
>
> +static const
> +struct virtbus_dev_id *virtbus_match_id(const struct virtbus_dev_id *id,
> + struct virtbus_device *vdev)
> +{
> + while (id->name[0]) {
> + if
On Thu, May 21, 2020 at 04:28:05PM +0200, Dmitry Vyukov wrote:
> What do you want to script? Note syzbot is not promising a specific
> stable API wrt these plain text emails. These are flattened into text
> format for human consumption and sent over unreliable media.
I just want to pipe the email
On Thu, May 21, 2020 at 04:28:05PM +0200, 'Dmitry Vyukov' via syzkaller-bugs
wrote:
> On Thu, May 21, 2020 at 4:08 PM Dan Carpenter
> wrote:
> >
> > On Wed, May 20, 2020 at 11:23:18AM -0700, syzbot wrote:
> > > Hello,
> > >
> > > syzbot found the following crash on:
> > >
> > > HEAD commit:d
> drivers/net/ethernet/marvell/mvneta.c | 7 ---
> 1 file changed, 4 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/net/ethernet/marvell/mvneta.c
> b/drivers/net/ethernet/marvell/mvneta.c
> index 41d2a0eac..f9170bc93 100644
> --- a/drivers/net/ethernet/marvell/mvneta.c
> +++ b/driver
On Thu, May 21, 2020 at 08:38:35PM +0800, Muchun Song wrote:
> There is another safe way to get the file structure without
> holding the files->file_lock. That is rcu lock, and this way
> has better performance. So use the rcu lock instead of the
> files->file_lock.
What makes you think this is sa
Add proper kerneldoc comments for probe_kernel_read_strict and
probe_kernel_read strncpy_from_unsafe_strict and explain the different
versus the non-strict version.
Signed-off-by: Christoph Hellwig
---
mm/maccess.c | 61
1 file changed, 43 ins
This matches the naming of strncpy_from_user_nofault, and also makes it
more clear what the function is supposed to do.
Signed-off-by: Christoph Hellwig
---
arch/x86/mm/maccess.c| 2 +-
include/linux/uaccess.h | 4 ++--
kernel/trace/bpf_trace.c | 4 ++--
mm/maccess.c | 6 +++---
Many of the maccess routines have a copy of the kerneldoc comment
in the header. Remove it as it is not useful and will get out of
sync sooner or later.
Signed-off-by: Christoph Hellwig
---
include/linux/uaccess.h | 38 --
1 file changed, 38 deletions(-)
dif
This file now also contains several helpers for accessing user memory.
Signed-off-by: Christoph Hellwig
---
mm/maccess.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/mm/maccess.c b/mm/maccess.c
index 747581ac50dc9..65880ba2ca376 100644
--- a/mm/maccess.c
+++ b/mm/maccess.c
Hi all,
this series start cleaning up the safe kernel and user memory probing
helpers in mm/maccess.c, and then allows architectures to implement
the kernel probing without overriding the address space limit and
temporarily allowing access to user memory. It then switches x86
over to this new mec
Instead of using the dangerous probe_kernel_read and strncpy_from_unsafe
helpers, rework the compat probes to check if an address is a kernel or
userspace one, and then use the low-level kernel or user probe helper
shared by the proper kernel and user probe helpers. This slightly
changes behavior
Instead of using the dangerous probe_kernel_read and strncpy_from_unsafe
helpers, rework probes to try a user probe based on the address if the
architecture has a common address space for kernel and userspace.
Signed-off-by: Christoph Hellwig
---
kernel/trace/trace_kprobe.c | 72
User the proper helper for kernel or userspace addresses based on
TASK_SIZE instead of the dangerous strncpy_from_unsafe function.
Signed-off-by: Christoph Hellwig
---
kernel/trace/bpf_trace.c | 7 +--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/kernel/trace/bpf_trace.c b/k
Split out a helper to do the fault free access to the string pointer
to get it out of a crazy indentation level.
Signed-off-by: Christoph Hellwig
---
kernel/trace/bpf_trace.c | 42 +++-
1 file changed, 24 insertions(+), 18 deletions(-)
diff --git a/kernel/tra
Allow the callers to distinguish a real unmapped address vs a range
that can't be probed.
Suggested-by: Masami Hiramatsu
Signed-off-by: Christoph Hellwig
Reviewed-by: Masami Hiramatsu
---
mm/maccess.c | 16 +---
1 file changed, 9 insertions(+), 7 deletions(-)
diff --git a/mm/macce
Better describe what these functions do.
Suggested-by: Linus Torvalds
Signed-off-by: Christoph Hellwig
---
arch/powerpc/kernel/process.c | 3 ++-
arch/powerpc/kvm/book3s_64_mmu_radix.c | 4 ++--
arch/powerpc/mm/fault.c| 2 +-
arch/powerpc/oprofile/backtrace.c |
Provide alternative versions of probe_kernel_read, probe_kernel_write
and strncpy_from_kernel_unsafe that don't need set_fs magic, but instead
use arch hooks that are modelled after unsafe_{get,put}_user to access
kernel memory in an exception safe way.
Signed-off-by: Christoph Hellwig
---
mm/ma
Move kernel access vs user access routines together to ease upcoming
ifdefs.
Signed-off-by: Christoph Hellwig
---
mm/maccess.c | 110 +--
1 file changed, 55 insertions(+), 55 deletions(-)
diff --git a/mm/maccess.c b/mm/maccess.c
index 81a85c1e7116
Provide arch_kernel_read and arch_kernel_write routines to implement the
maccess routines without messing with set_fs and without stac/clac that
opens up access to user space.
Signed-off-by: Christoph Hellwig
---
arch/x86/include/asm/uaccess.h | 16
1 file changed, 16 insertions
Except for historical confusion in the kprobes/uprobes and bpf tracers,
which has been fixed now, there is no good reason to ever allow user
memory accesses from probe_kernel_read. Switch probe_kernel_read to only
read from kernel memory.
Signed-off-by: Christoph Hellwig
---
arch/parisc/lib/mem
Better describe what these functions do.
Suggested-by: Linus Torvalds
Signed-off-by: Christoph Hellwig
---
arch/arm/kernel/ftrace.c | 3 +-
arch/arm/kernel/kgdb.c | 2 +-
arch/arm64/kernel/insn.c | 4 +--
arch/csky/kernel/ftrace.c | 5 +--
arch/ia64/
Better describe what this helper does, and match the naming of
copy_from_kernel_nofault.
Signed-off-by: Christoph Hellwig
---
arch/arm/kernel/traps.c | 2 +-
arch/arm/mm/alignment.c | 4 ++--
arch/arm64/kernel/traps.c | 2 +-
arch/ia64/include/asm/sections.h
All users are gone now.
Signed-off-by: Christoph Hellwig
---
include/linux/uaccess.h | 1 -
mm/maccess.c| 39 +--
2 files changed, 1 insertion(+), 39 deletions(-)
diff --git a/include/linux/uaccess.h b/include/linux/uaccess.h
index 65a37ae3b8871.
Currently architectures have to override every routine that probes
kernel memory, which includes a pure read and strcpy, both in strict
and not strict variants. Just provide a single arch hooks instead to
make sure all architectures cover all the cases.
Signed-off-by: Christoph Hellwig
---
arch
Each of the helpers has just two callers, which also different in
dealing with kernel or userspace pointers. Just open code the logic
in the callers.
Signed-off-by: Christoph Hellwig
---
mm/maccess.c | 63
1 file changed, 29 insertions(+), 34
This matches the naming of strnlen_user, and also makes it more clear
what the function is supposed to do.
Signed-off-by: Christoph Hellwig
---
include/linux/uaccess.h | 2 +-
kernel/trace/trace_kprobe.c | 2 +-
mm/maccess.c| 4 ++--
3 files changed, 4 insertions(+), 4 deleti
This matches the naming of strncpy_from_user, and also makes it more
clear what the function is supposed to do.
Signed-off-by: Christoph Hellwig
---
include/linux/uaccess.h | 4 ++--
kernel/trace/bpf_trace.c| 4 ++--
kernel/trace/trace_kprobe.c | 2 +-
mm/maccess.c| 4 ++-
1 - 100 of 407 matches
Mail list logo