[net-next,v1,5/5] selftests: add selftest for the SRv6 End.DT4 behavior

2020-11-03 Thread Andrea Mayer
this selftest is designed for evaluating the new SRv6 End.DT4 behavior used, in this example, for implementing IPv4 L3 VPN use cases. Signed-off-by: Andrea Mayer --- .../selftests/net/srv6_end_dt4_l3vpn_test.sh | 494 ++ 1 file changed, 494 insertions(+) create mode 100755

[net-next,v1,0/5] seg6: add support for SRv6 End.DT4 behavior

2020-11-03 Thread Andrea Mayer
. Comments, suggestions and improvements are very welcome! Thanks, Andrea Mayer v1 improve comments; add new patch 2/5 titled: seg6: improve management of behavior attributes seg6: add support for the SRv6 End.DT4 behavior - remove the inline keyword in the definition of fib6_config_get_net

[net-next,v1,2/5] seg6: improve management of behavior attributes

2020-11-03 Thread Andrea Mayer
information needed to handle a given attribute are contained in only one place; 4) it facilitates the integration with new features introduced in further patches. Signed-off-by: Andrea Mayer --- net/ipv6/seg6_local.c | 103 ++ 1 file changed, 93

[net-next,v1,4/5] seg6: add support for the SRv6 End.DT4 behavior

2020-11-03 Thread Andrea Mayer
-srv6 [3] https://patchwork.ozlabs.org/patch/799837/ Signed-off-by: Andrea Mayer --- net/ipv6/seg6_local.c | 205 ++ 1 file changed, 205 insertions(+) diff --git a/net/ipv6/seg6_local.c b/net/ipv6/seg6_local.c index 4b0f155d641d..a41074acd43e 100644 --- a/net

[PATCH] leds: trigger: fix potential deadlock with libata

2020-11-02 Thread Andrea Righi
ock_irqsave(&host->lock); Fix by using read_lock_irqsave/irqrestore() in led_trigger_event(), so that no interrupt can happen in between, preventing the deadlock condition. Link: https://lore.kernel.org/lkml/20201101092614.GB3989@xps-13-7390/ Fixes: eb25cb9956cc ("leds: convert IDE tri

Re: lockdep: possible irq lock inversion dependency detected (trig->leddev_list_lock)

2020-11-02 Thread Andrea Righi
led_trigger_blink_oneshot() and CPU 2 is blocked by CPU 0 > > > because of an arbitrary writer on &trig->leddev_list_lock. > > > > > > So I don't think it's false positive, but I might miss something > > > obvious, because I don't know what the code here actually does ;-) > > > > With the CPU2 part it all makes sense now and lockdep was right. :) > > > > At this point I think we could just schedule a separate work to do the > > led trigger and avoid calling it with host->lock held and that should > > prevent the deadlock. I'll send a patch to do that. > > Let's... not do that, unless we have no choice. > > Would it help if leddev_list_lock used _irqsave() locking? Using read_lock_irqsave/irqrestore() in led_trigger_event() would be enough to prevent the deadlock. If it's an acceptable solution I can send a patch (already tested it and lockdep doesn't complain :)). Thanks, -Andrea

Re: lockdep: possible irq lock inversion dependency detected (trig->leddev_list_lock)

2020-11-01 Thread Andrea Righi
l lockdep warning was correct, so there is still a potential deadlock condition between trig->leddev_list_lock and host->lock. And I think this can be prevented simply by scheduling the led triggering part in a separate work from ata_hsm_qs_complete(), so that led_trigger_event() won't be called with host->lock held. I'll send a patch soon to do that. -Andrea

Re: lockdep: possible irq lock inversion dependency detected (trig->leddev_list_lock)

2020-11-01 Thread Andrea Righi
On Sat, Oct 31, 2020 at 06:17:40PM +0800, Boqun Feng wrote: > Hi Andrea, > > On Sun, Nov 01, 2020 at 10:26:14AM +0100, Andrea Righi wrote: > > I'm getting the following lockdep splat (see below). > > > > Apparently this warning starts to be reported after

lockdep: possible irq lock inversion dependency detected (trig->leddev_list_lock)

2020-11-01 Thread Andrea Righi
e). Can you help me to understand if this assumption is correct or if I'm missing something? Thanks, -Andrea Lockdep trace: [1.087260] WARNING: possible irq lock inversion dependency detected [1.087267] 5.10.0-rc1+ #18 Not tainted [1.088829] softirqs last enabled at (

[PATCH] ext4: properly check for dirty state in ext4_inode_datasync_dirty()

2020-10-24 Thread Andrea Righi
: https://lore.kernel.org/lkml/20201024131333.GA32124@xps-13-7390 Fixes: aa75f4d3daae ("ext4: main fast-commit commit path") Signed-off-by: Andrea Righi --- fs/ext4/inode.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fs/ext4/inode.c b/fs/ext4/inode.c index 03c2253

Re: swap file broken with ext4 fast-commit

2020-10-24 Thread Andrea Righi
On Sat, Oct 24, 2020 at 03:13:37PM +0200, Andrea Righi wrote: > I'm getting the following error if I try to create and activate a swap > file defined on an ext4 filesystem: > > [ 34.406479] swapon: file is not committed > > The swap file is created in the root filesy

swap file broken with ext4 fast-commit

2020-10-24 Thread Andrea Righi
th") Simple test case to reproduce the problem: # fallocate -l 8G /swapfile # chmod 0600 /swapfile # mkswap /swapfile # swapon /swapfile Maybe we're missing to mark the inode as clean somewhere, even if the transation is committed to the journal? Thanks, -Andrea

Re: [PATCH v4 0/2] Control over userfaultfd kernel-fault handling

2020-10-23 Thread Andrea Arcangeli
27;ll be able to tell if the slub/page randomizaton (or any other generic enough robustness feature) is already effective against an enlarged race window of kernel initiated userfaults and at the same time it provides the main benefit of avoiding divergence in the behavior of the userfaultfd syscall if invoked within the Android userland. Thanks, Andrea

Re: [PATCH v5 2/2] Add user-mode only option to unprivileged_userfaultfd sysctl knob

2020-10-23 Thread Andrea Arcangeli
ctl set to zero. So without this commit, any Linux binary using userfaultfd to manage its memory would behave differently if run within the Android userland. == Reviewed-by: Andrea Arcangeli BTW, this is still a minor nitpick, but a printk_once of the 1/2 could be added before the return -EP

Re: [PATCH v5 1/2] Add UFFD_USER_MODE_ONLY

2020-10-23 Thread Andrea Arcangeli
that these processes > will exploit userfaultfd's ability to delay kernel page faults to open > timing windows for future exploits. > > Signed-off-by: Daniel Colascione > Signed-off-by: Lokesh Gidra Reviewed-by: Andrea Arcangeli

[RFC,net-next, 4/4] selftests: add selftest for the SRv6 End.DT4 behavior

2020-10-21 Thread Andrea Mayer
this selftest is designed for evaluating the new SRv6 End.DT4 behavior used, in this example, for implementing IPv4 L3 VPN use cases. Signed-off-by: Andrea Mayer --- .../selftests/net/srv6_end_dt4_l3vpn_test.sh | 490 ++ 1 file changed, 490 insertions(+) create mode 100755

[RFC,net-next, 3/4] seg6: add support for the SRv6 End.DT4 behavior

2020-10-21 Thread Andrea Mayer
-srv6 [3] https://patchwork.ozlabs.org/patch/799837/ Signed-off-by: Andrea Mayer --- net/ipv6/seg6_local.c | 204 ++ 1 file changed, 204 insertions(+) diff --git a/net/ipv6/seg6_local.c b/net/ipv6/seg6_local.c index f70687e1b8a9..d47b76581dfa 100644 --- a/net

[RFC,net-next, 1/4] vrf: push mac header for tunneled packets when sniffer is attached

2020-10-21 Thread Andrea Mayer
is not set. In this case, the mac address of the VRF is copied in both the destination and the source address of the ethernet header. The protocol type is set either to IPv4 or IPv6, depending on which L3 packet is received. Signed-off-by: Andrea Mayer --- drivers/net/vrf.c | 78

[RFC,net-next, 2/4] seg6: add callbacks for customizing the creation/destruction of a behavior

2020-10-21 Thread Andrea Mayer
during its initialization phase and after all the attributes have been successfully parsed; - destroy_state(...): used for calling the custom destructor of the behavior before it is completely destroyed. Signed-off-by: Andrea Mayer --- net/ipv6/seg6_local.c | 57

[RFC,net-next, 0/4] seg6: add support for SRv6 End.DT4 behavior

2020-10-21 Thread Andrea Mayer
adds support for the SRv6 End.DT4 behavior; - Patch 4/4 adds the selftest for SRv6 End.DT4. I would like to thank David Ahern for his support during the development of this patch set. Comments, suggestions and improvements are very welcome! Thanks, Andrea Mayer [1] https://tools.ietf.org/html

Re: [PATCH v4 0/2] Control over userfaultfd kernel-fault handling

2020-10-07 Thread Andrea Arcangeli
the pipe mutex logic more complex the deviation would remain. Your patchset adds much less risk of breakage than adding a timeout to kernel initiated userfaults and it resolves all concerns as well as a timeout. We'll also make better use of the "0" value this way. So while I'm not certain this is the best for the long term, this looks the sweet spot for the short term to resolve many issues at once. Thanks! Andrea

Re: [PATCH RFC v2] Opportunistic memory reclaim

2020-10-05 Thread Andrea Righi
On Mon, Oct 05, 2020 at 03:46:12PM +0100, Chris Down wrote: > Andrea Righi writes: > > senpai is focused at estimating the ideal memory requirements without > > affecting performance. And this covers the use case about reducing > > memory footprint. > > > > In my

Re: [PATCH RFC v2] Opportunistic memory reclaim

2020-10-05 Thread Andrea Righi
On Mon, Oct 05, 2020 at 12:25:55PM +0100, Chris Down wrote: > Andrea Righi writes: > > This feature has been successfully used to improve hibernation time of > > cloud computing instances. > > > > Certain cloud providers allow to run "spot instances": low

Re: [PATCH RFC v2] Opportunistic memory reclaim

2020-10-05 Thread Andrea Righi
aware of that patch and yes, it's definitely similar. I'll follow up on that. -Andrea

[PATCH RFC v2 2/2] mm: memcontrol: introduce opportunistic memory reclaim

2020-10-05 Thread Andrea Righi
is writing to memory.swap.reclaim (i.e., to set a timeout for the whole memory reclaim run). Signed-off-by: Andrea Righi --- Documentation/admin-guide/cgroup-v2.rst | 18 include/linux/memcontrol.h | 4 ++ mm/memcontrol.c | 59 ++

[PATCH RFC v2] Opportunistic memory reclaim

2020-10-05 Thread Andrea Righi
ease functionality (to re-load swapped out pages, since it ended being not very useful) - added the possibility to show the number of memory reclaimed in the last attempt (per-memcg) ---- Andrea Righi (2): mm: memcontrol: make

[PATCH RFC v2 1/2] mm: memcontrol: make shrink_all_memory() memcg aware

2020-10-05 Thread Andrea Righi
: Andrea Righi --- include/linux/swap.h | 9 - mm/vmscan.c | 6 +++--- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/include/linux/swap.h b/include/linux/swap.h index 661046994db4..1490b09a6e6c 100644 --- a/include/linux/swap.h +++ b/include/linux/swap.h @@ -368,7

Re: [PATCH v1 0/6] seccomp: Implement constant action bitmaps

2020-09-24 Thread Andrea Arcangeli
ing and helping YiFei Zhu to improve his BPF emulator, you posted the same technique that looks remarkably similar without giving YiFei Zhu any attribution and you instead attribute the whole idea to Jann Horn: https://lkml.kernel.org/r/20200923232923.3142503-5-keesc...@chromium.org Thanks, Andrea

Re: [RFC PATCH 2/2] PM: hibernate: introduce opportunistic memory reclaim

2020-09-21 Thread Andrea Righi
much the same time. But the advantage of opportunistic reclaim is that we can "prepare" a system for hibernation using some idle time, so when we really need to hibernate a low priority instance, because a high priority instance requires to run, hibernation can be significantly faster. What do you think about it? Do you see a better way to achieve this goal? Thanks, -Andrea [1] https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/spot-interruptions.html

[PATCH v3] hv_netvsc: Add validation for untrusted Hyper-V values

2020-09-16 Thread Andrea Parri (Microsoft)
subvert an existing validation via integer overflow. Ensure that outgoing packets do not have any leftover guest memory that has not been zeroed out. Signed-off-by: Andres Beltran Co-developed-by: Andrea Parri (Microsoft) Signed-off-by: Andrea Parri (Microsoft) Cc: "David S. Miller"

Re: [PATCH v7 1/3] Drivers: hv: vmbus: Add vmbus_requestor data structure for VMBus hardening

2020-09-15 Thread Andrea Parri
On Mon, Sep 14, 2020 at 05:29:11PM +, Michael Kelley wrote: > From: Andrea Parri Sent: Tuesday, September 8, 2020 > 12:54 AM > > > > > > @@ -300,6 +303,22 @@ int hv_ringbuffer_write(struct vmbus_c

Re: [PATCH v2] hv_netvsc: Add validation for untrusted Hyper-V values

2020-09-11 Thread Andrea Parri
lt; sizeof(struct nvsp_message_header) + sizeof(struct > nvsp_message_init_complete)) { Thanks for pointing this out; fixing for v3... Andrea

[PATCH v2] hv_netvsc: Add validation for untrusted Hyper-V values

2020-09-10 Thread Andrea Parri (Microsoft)
subvert an existing validation via integer overflow. Ensure that outgoing packets do not have any leftover guest memory that has not been zeroed out. Signed-off-by: Andres Beltran Co-developed-by: Andrea Parri (Microsoft) Signed-off-by: Andrea Parri (Microsoft) Cc: "David S. Miller"

[PATCH] Drivers: hv: vmbus: Copy packets sent by Hyper-V out of the ring buffer

2020-09-10 Thread Andrea Parri (Microsoft)
validating its length and offset fields in hv_pkt_iter_first(). In this way, the packet can no longer be modified by the host. Signed-off-by: Andres Beltran Co-developed-by: Andrea Parri (Microsoft) Signed-off-by: Andrea Parri (Microsoft) Cc: "David S. Miller" Cc: Jakub Kicinski Cc:

[PATCH v3] hv_utils: Add validation for untrusted Hyper-V values

2020-09-10 Thread Andrea Parri (Microsoft)
icversion_data array in vmbus_prep_negotiate_resp(). Signed-off-by: Andres Beltran Co-developed-by: Andrea Parri (Microsoft) Signed-off-by: Andrea Parri (Microsoft) --- Changes in v3: - Add size check for icframe_vercnt and icmsg_vercnt (Saruhan) Changes in v2: - Use ratelimited form of kernel logging

[V4,1/1] Input/misc: add support for Advantech software defined button

2020-09-10 Thread Andrea Ho
DRIVER +M: Andrea Ho +S: Maintained +F: drivers/input/misc/adv_swbutton.c + ADXL34X THREE-AXIS DIGITAL ACCELEROMETER DRIVER (ADXL345/ADXL346) M: Michael Hennerich S: Supported diff --git a/drivers/input/misc/Kconfig b/drivers/input/misc/Kconfig index 362e8a01980c..f88d1490ae40 10

Re: [PATCH v7 1/3] Drivers: hv: vmbus: Add vmbus_requestor data structure for VMBus hardening

2020-09-08 Thread Andrea Parri
utring_info); > > > > @@ -319,8 +338,13 @@ int hv_ringbuffer_write(struct vmbus_channel *channel, > > > > hv_signal_on_write(old_write, channel); > > > > - if (channel->rescind) > > + if (channel->rescind) { > > + if (rqst_id != VMBUS_NO_RQSTOR) { > > Of course, with my proposed change, the above test would also have to be for > the value of the flags field, which actually makes the code a bit more > consistent. Yes, indeed. Thank you for the review and the suggestion. Andrea

[PATCH v7 3/3] hv_netvsc: Use vmbus_requestor to generate transaction IDs for VMBus hardening

2020-09-07 Thread Andrea Parri (Microsoft)
integers generated by vmbus_requestor as requests (transaction) IDs. Signed-off-by: Andres Beltran Co-developed-by: Andrea Parri (Microsoft) Signed-off-by: Andrea Parri (Microsoft) Cc: "David S. Miller" Cc: Jakub Kicinski Cc: net...@vger.kernel.org --- Changes in v7:

[PATCH v7 2/3] scsi: storvsc: Use vmbus_requestor to generate transaction IDs for VMBus hardening

2020-09-07 Thread Andrea Parri (Microsoft)
integers generated by vmbus_requestor as requests (transaction) IDs. Signed-off-by: Andres Beltran Co-developed-by: Andrea Parri (Microsoft) Signed-off-by: Andrea Parri (Microsoft) Cc: "James E.J. Bottomley" Cc: "Martin K. Petersen" Cc: linux-s...@vger.kernel.o

[PATCH v7 1/3] Drivers: hv: vmbus: Add vmbus_requestor data structure for VMBus hardening

2020-09-07 Thread Andrea Parri (Microsoft)
bad request ID that is then treated as the address of a guest data structure with no validation. Instead, encapsulate these memory addresses and provide small integers as request IDs. Signed-off-by: Andres Beltran Co-developed-by: Andrea Parri (Microsoft) Signed-off-by: Andrea Parri (Microsoft

[PATCH v7 0/3] Drivers: hv: vmbus: vmbus_requestor data structure for VMBus hardening

2020-09-07 Thread Andrea Parri (Microsoft)
hv_ringbuffer_write() to address a race with the request completion path pointed out by Juan. Andrea Cc: James E.J. Bottomley Cc: Martin K. Petersen Cc: "David S. Miller" Cc: Jakub Kicinski Cc: linux-s...@vger.kernel.org Cc: net...@vger.kernel.org Andres Beltran (3): Drivers: hv:

Re: [PATCH 2/2] Add a new sysctl knob: unprivileged_userfaultfd_user_mode_only

2020-09-03 Thread Andrea Arcangeli
t looks less risky than an arbitrary timeout which could kill the VM: if the above is forgotten the postcopy live migration won't even start and it'll be unnoticeable to the guest). The main concern really are future apps that may want to use uffd for kernel initiated faults won't be a

Re: [PATCH] hv_netvsc: Add validation for untrusted Hyper-V values

2020-08-14 Thread Andrea Parri
quot;, using (what I understand are) the corresponding structures/sizeofs... > > Testing on both new and older hosts are recommended, in case I didn't find > out all issues > like this one. Sure, will do. Thanks, Andrea

Re: INFO: task hung in pipe_read (2)

2020-08-10 Thread Andrea Arcangeli
gainst your proposal, but if we increase the complexity like above then I'd find it more attractive if it was for some other benefit unrelated to userfaultfd, or swapin from NFS or network attached storage for that matter, and I don't see a big enough benefit to justify it. Thanks! Andrea P

Re: INFO: task hung in pipe_read (2)

2020-08-06 Thread Andrea Arcangeli
a TEST PATCH ONLY. I think we'll actually have to do something > like this, but I think the final version might need to allow a couple > of retries, rather than just give up after just one second. > > But for testing your case, this patch might be enough to at least show > that &

Re: crypto: aegis128: error: incompatible types when initializing type 'unsigned char' using type 'uint8x16_t'

2020-07-30 Thread Andrea Righi
On Thu, Jul 30, 2020 at 10:11:52AM -0500, Justin Forbes wrote: > On Mon, Jul 27, 2020 at 8:05 AM Andrea Righi > wrote: > > > > I'm experiencing this build error on arm64 after updating to gcc 10: > > > > crypto/aegis128-neon-inner.c: In function 'crypto_

crypto: aegis128: error: incompatible types when initializing type 'unsigned char' using type 'uint8x16_t'

2020-07-27 Thread Andrea Righi
#x27; 151 | k ^ vld1q_u8(const0), | ^ crypto/aegis128-neon-inner.c:152:3: error: incompatible types when initializing type 'unsigned char' using type 'uint8x16_t' 152 | k ^ vld1q_u8(const1), | ^ Anybody knows if there's a fix for this already? Otherwise I'll take a look at it. Thanks, -Andrea

[PATCH v2] xen-netfront: fix potential deadlock in xennet_remove()

2020-07-24 Thread Andrea Righi
re to check also for state == "Closed" in step 4 to prevent the deadlock. Also add a 5 sec timeout any time we wait for the bus state to change, to avoid getting stuck forever in wait_event(). Signed-off-by: Andrea Righi --- Changes in v2: - remove all dev_dbg() calls (as suggested by

Re: [PATCH] xen-netfront: fix potential deadlock in xennet_remove()

2020-07-23 Thread Andrea Righi
On Thu, Jul 23, 2020 at 02:57:22PM -0700, David Miller wrote: > From: Andrea Righi > Date: Wed, 22 Jul 2020 08:52:11 +0200 > > > +static int xennet_remove(struct xenbus_device *dev) > > +{ > > + struct netfront_info *info = dev_get_drvdata(&dev->dev); >

Re: [PATCH] mm: swap: do not wait for lock_page() in unuse_pte_range()

2020-07-22 Thread Andrea Righi
On Wed, Jul 22, 2020 at 07:04:25PM +0100, Matthew Wilcox wrote: > On Wed, Jul 22, 2020 at 07:44:36PM +0200, Andrea Righi wrote: > > Waiting for lock_page() with mm->mmap_sem held in unuse_pte_range() can > > lead to stalls while running swapoff (i.e., not being able to ssh i

[PATCH] mm: swap: do not wait for lock_page() in unuse_pte_range()

2020-07-22 Thread Andrea Righi
ation. Under these conditions and without this patch applied the system can be stalled even for 15min, with this patch applied the system is always responsive. Signed-off-by: Andrea Righi --- mm/swapfile.c | 12 +++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a

[PATCH] xen-netfront: fix potential deadlock in xennet_remove()

2020-07-21 Thread Andrea Righi
re to check also for state == "Closed" in step 4 to prevent the deadlock. Also add a 5 sec timeout any time we wait for the bus state to change, to avoid getting stuck forever in wait_event() and add a debug message to help tracking down potential similar issues. Signed-off-by: An

Re: [RFC PATCH v2 1/5] mm: make HPAGE_PxD_{SHIFT,MASK,SIZE} always available

2020-07-10 Thread Andrea Arcangeli
rtainly agree hpage_nr_pages would better be renamed to something more THP specific (either hpage_pmd_nr_pages or trans_huge_nr_pages or as you wish), but HPAGE_PMD_ don't look too confusing about the fact it's only for the THP case since the non-THP case won't necessarily care about PMDs. Thanks, Andrea

Re: [RFC PATCH v2 1/5] mm: make HPAGE_PxD_{SHIFT,MASK,SIZE} always available

2020-07-10 Thread Andrea Arcangeli
Hello Hugh and Mike, On Mon, Jul 06, 2020 at 10:07:34PM -0700, Hugh Dickins wrote: > Adding Andrea to Cc, he's the one who structured it that way, > and should be consulted. > > I'm ambivalent myself. Many's the time I've been irritated by the > BUILD_BUG() in

Re: [PATCH v4 0/3] Drivers: hv: vmbus: vmbus_requestor data structure for VMBus hardening

2020-07-02 Thread Andrea Parri
us > hardening Confirming previous results, Tested-by: Andrea Parri Andrea

Re: [PATCH v3 0/3] Drivers: hv: vmbus: vmbus_requestor data structure for VMBus hardening

2020-06-30 Thread Andrea Parri
espectively. > > Thanks. > Andres Beltran > > Tested-by: Andrea Parri Em, I don't expect the changes introduced since v1 to have any observable effects, but I really don't know: I should be able to complete my testing of this by tomorrow or so; for now, please just ignore thi

Re: [PATCH 0/3] Drivers: hv: vmbus: vmbus_requestor data structure

2020-06-26 Thread Andrea Parri
7;t introduce contention on the lock in multi-queue scenario. Have you > done any testing to confirm there is no severe performance regression? I did run some performance tests using our dev pipeline (storage and network workloads). I did not find regressions w.r.t. baseline. Andrea

Re: [PATCH 0/3] Drivers: hv: vmbus: vmbus_requestor data structure

2020-06-25 Thread Andrea Parri
hardening For the series, Tested-by: Andrea Parri Thanks, Andrea

Re: LKMM patches for next merge window

2020-06-24 Thread Andrea Parri
ot;. ;-/ Most importantly there appears to be some on-going discussion about it, cf. https://lkml.kernel.org/r/20200623072240.ga...@lst.de (could you please sort this out?) Andrea > > ac1a749 tools/memory-model: Add recent references > be1ce3e tools/memory-model: Fix "conflic

Re: [PATCH 2/2] Documentation/litmus-tests: Add note on herd7 7.56 in atomic litmus test

2020-06-23 Thread Andrea Parri
ader of the litmus test and its entry in README. > > CC: Boqun Feng > Reported-by: Andrea Parri > Signed-off-by: Akira Yokosawa Frankly, I was hoping that we could simply bump the herd7 version in tools/memory-model/README; I understand your point, but I admit that I haven&

Re: [PATCH 1/2] tools/memory-model/README: Mention herdtools7 7.56 in compatibility table

2020-06-23 Thread Andrea Parri
; compatibility table > > herdtools7 7.56 is going to be released in the week of 22 Jun 2020. > Mention the exact version in the compatibility table. > > Signed-off-by: Akira Yokosawa Acked-by: Andrea Parri Andrea > --- > tools/memory-model/README | 2 +- > 1 f

Re: kernel BUG at mm/huge_memory.c:2613!

2020-06-22 Thread Andrea Arcangeli
d is not intended to be used on newly allocated compound page. Maybe we should renamed it to split_trans_huge_page to make it more explicit, since it won't even work on hugetlbfs (compound) pages. Thanks, Andrea

[net-next,v1,1/5] l3mdev: add infrastructure for table to VRF mapping

2020-06-19 Thread Andrea Mayer
offer the lookup function (table to VRF device). Signed-off-by: Andrea Mayer --- include/net/l3mdev.h | 39 +++ net/l3mdev/l3mdev.c | 93 2 files changed, 132 insertions(+) diff --git a/include/net/l3mdev.h b/include/net/l3mdev.h

[net-next,v1,5/5] selftests: add selftest for the VRF strict mode

2020-06-19 Thread Andrea Mayer
The new strict mode functionality is tested in different configurations and on different network namespaces. Signed-off-by: Andrea Mayer --- .../selftests/net/vrf_strict_mode_test.sh | 390 ++ 1 file changed, 390 insertions(+) create mode 100755 tools/testing/selftests/net

[net-next,v1,0/5] Strict mode for VRF

2020-06-19 Thread Andrea Mayer
for routing packets. I would like to thank David Ahern for his constant and valuable support during the design and development phases of this patch set. Comments, suggestions and improvements are very welcome! Thanks, Andrea Mayer v1 l3mdev: add infrastructure for table to VRF mapping

[net-next,v1,3/5] vrf: add sysctl parameter for strict mode

2020-06-19 Thread Andrea Mayer
net.vrf.strict_mode=1, a check is performed to verify that all tables have at most one VRF associated, otherwise the switch is not allowed. The net.vrf.strict_mode parameter is per network namespace. Signed-off-by: Andrea Mayer --- drivers/net/vrf.c | 118 ++ 1 file

[net-next,v1,4/5] vrf: add l3mdev registration for table to VRF device lookup

2020-06-19 Thread Andrea Mayer
During the initialization phase of the VRF module, the callback for table to VRF device lookup is registered in l3mdev. Signed-off-by: Andrea Mayer --- drivers/net/vrf.c | 59 +++ 1 file changed, 55 insertions(+), 4 deletions(-) diff --git a/drivers

[net-next,v1,2/5] vrf: track associations between VRF devices and tables

2020-06-19 Thread Andrea Mayer
: Andrea Mayer --- drivers/net/vrf.c | 273 +- 1 file changed, 268 insertions(+), 5 deletions(-) diff --git a/drivers/net/vrf.c b/drivers/net/vrf.c index 43928a1c2f2a..098fdabaa4c5 100644 --- a/drivers/net/vrf.c +++ b/drivers/net/vrf.c @@ -21,6 +21,7

Re: [PATCH 7/8] scsi: storvsc: Introduce the per-storvsc_device spinlock

2020-06-19 Thread Andrea Parri
lease let me know if you prefer me to send you a new series with this patch (7/8) and the later/dependent hyperv patch (8/8). (1-6/8 of this series are hyperv-specific only and have been applied to the hyperv tree, so this would only 7-8/8 of this series out.) Thanks, Andrea

Re: kernel BUG at mm/huge_memory.c:2613!

2020-06-18 Thread Andrea Arcangeli
Hello, On Thu, Jun 18, 2020 at 06:14:49PM -0700, Roman Gushchin wrote: > I agree. The whole > > page = alloc_pages_node(nid, alloc_flags, order); > if (!page) > continue; > if (!order) > break; > if (!PageCompound(page)) { > split_

[PATCH 2/8] Drivers: hv: vmbus: Remove the numa_node field from the vmbus_channel struct

2020-06-17 Thread Andrea Parri (Microsoft)
The field is read only in numa_node_show() and it is already stored twice (after a call to cpu_to_node()) in target_cpu_store() and init_vp_index(); there is no need to "cache" its value in the channel data structure. Signed-off-by: Andrea Parri (Microsoft) --- drivers/hv/channel_

[PATCH 4/8] Drivers: hv: vmbus: Remove unnecessary channel->lock critical sections (sc_list readers)

2020-06-17 Thread Andrea Parri (Microsoft)
Additions/deletions to/from sc_list (as well as modifications of target_cpu(s)) are protected by channel_mutex, which hv_synic_cleanup() and vmbus_bus_suspend() own for the duration of the channel->lock critical section in question. Signed-off-by: Andrea Parri (Microsoft) --- drivers/hv/h

[PATCH 8/8] Drivers: hv: vmbus: Remove the lock field from the vmbus_channel struct

2020-06-17 Thread Andrea Parri (Microsoft)
The spinlock is (now) *not used to protect test-and-set accesses to attributes of the structure or sc_list operations. There is, AFAICT, a distinct lack of {WRITE,READ}_ONCE()s in the handling of channel->state, but the changes below do not seem to make things "worse". ;-) Signed-o

[PATCH 5/8] Drivers: hv: vmbus: Use channel_mutex in channel_vp_mapping_show()

2020-06-17 Thread Andrea Parri (Microsoft)
ck critical section with a channel_mutex critical section and extend the latter to include the loads of target_cpu; this same pattern is also used in hv_synic_cleanup(). Signed-off-by: Andrea Parri (Microsoft) --- drivers/hv/vmbus_drv.c | 7 +++ 1 file changed, 3 insertions(+), 4 deletions(-)

[PATCH 6/8] Drivers: hv: vmbus: Remove unnecessary channel->lock critical sections (sc_list updaters)

2020-06-17 Thread Andrea Parri (Microsoft)
None of the readers/updaters of sc_list rely on channel->lock for synchronization. Signed-off-by: Andrea Parri (Microsoft) --- drivers/hv/channel_mgmt.c | 25 ++--- 1 file changed, 6 insertions(+), 19 deletions(-) diff --git a/drivers/hv/channel_mgmt.c b/drivers

[PATCH 7/8] scsi: storvsc: Introduce the per-storvsc_device spinlock

2020-06-17 Thread Andrea Parri (Microsoft)
orvsc-specific) stor_chns[] array from the "generic" VMBus code and data structures, clarifying the scope of this synchronization mechanism. Signed-off-by: Andrea Parri (Microsoft) --- drivers/scsi/storvsc_drv.c | 16 +++- 1 file changed, 11 insertions(+), 5 deletions(-) diff

[PATCH 0/8] Drivers: hv: vmbus: Miscellaneous cleanups

2020-06-17 Thread Andrea Parri (Microsoft)
ous cleanups for channel->lock, which is actually *removed by the end of this series! ;-) I'm sure there is room for further "cleanups", ;-) but let me check if these (relatively small) changes make sense first... Thanks, Andrea Andrea Parri (Microsoft) (8): Drivers

[PATCH 3/8] Drivers: hv: vmbus: Replace cpumask_test_cpu(, cpu_online_mask) with cpu_online()

2020-06-17 Thread Andrea Parri (Microsoft)
A slight improvement in readability, and this does also remove one memory access when NR_CPUS == 1! ;-) Signed-off-by: Andrea Parri (Microsoft) --- drivers/hv/vmbus_drv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/hv/vmbus_drv.c b/drivers/hv/vmbus_drv.c index

[PATCH 1/8] Drivers: hv: vmbus: Remove the target_vp field from the vmbus_channel struct

2020-06-17 Thread Andrea Parri (Microsoft)
The field is read only in __vmbus_open() and it is already stored twice (after a call to hv_cpu_number_to_vp_number()) in target_cpu_store() and init_vp_index(); there is no need to "cache" its value in the channel data structure. Suggested-by: Michael Kelley Signed-off-by: An

Re: [RFC,net-next, 1/5] l3mdev: add infrastructure for table to VRF mapping

2020-06-14 Thread Andrea Mayer
On Sat, 13 Jun 2020 18:37:09 -0600 David Ahern wrote: > On 6/12/20 10:49 AM, Andrea Mayer wrote: > > @@ -37,6 +45,15 @@ struct l3mdev_ops { > > > > #ifdef CONFIG_NET_L3_MASTER_DEV > > > > +int l3mdev_table_lookup_register(enum l3mdev_type l3type, > >

Re: [RFC,net-next, 2/5] vrf: track associations between VRF devices and tables

2020-06-14 Thread Andrea Mayer
On Sat, 13 Jun 2020 18:34:25 -0600 David Ahern wrote: > On 6/13/20 4:53 PM, Andrea Mayer wrote: > > Hi Stephen, > > thanks for your questions. > > > > On Sat, 13 Jun 2020 12:28:59 -0700 > > Stephen Hemminger wrote: > > > >>> + > >>&

Re: [RFC,net-next, 2/5] vrf: track associations between VRF devices and tables

2020-06-13 Thread Andrea Mayer
hared_tables; > > Should this be unsigned? > Should it be a fixed size? Yes. I think an u32 would be reasonable for the shared_table. What do you think? Andrea

Re: [RFC,net-next, 3/5] vrf: add sysctl parameter for strict mode

2020-06-13 Thread Andrea Mayer
is patch set. Thank you, Andrea

Re: [RFC,net-next, 1/5] l3mdev: add infrastructure for table to VRF mapping

2020-06-13 Thread Andrea Mayer
I did not want to add more warnings! I will declare the l3mdev_lock static! I will be more careful while checking with W=1 and C=1 next time. Thanks, Andrea

Re: [RFC,net-next, 0/5] Strict mode for VRF

2020-06-13 Thread Andrea Mayer
On Fri, 12 Jun 2020 10:05:49 -0700 Dinesh G Dutt wrote: > Thanks for doing this Andrea. This is a very important patch. I'll let > the others comment on the specificity of the patch, but strict mode=1 > should be the default . > > Dinesh Hi Dinesh, thanks for your

[RFC,net-next, 2/5] vrf: track associations between VRF devices and tables

2020-06-12 Thread Andrea Mayer
: Andrea Mayer --- drivers/net/vrf.c | 272 +- 1 file changed, 267 insertions(+), 5 deletions(-) diff --git a/drivers/net/vrf.c b/drivers/net/vrf.c index 43928a1c2f2a..f772aac6a04c 100644 --- a/drivers/net/vrf.c +++ b/drivers/net/vrf.c @@ -21,6 +21,7

[RFC,net-next, 3/5] vrf: add sysctl parameter for strict mode

2020-06-12 Thread Andrea Mayer
net.vrf.strict_mode=1, a check is performed to verify that all tables have at most one VRF associated, otherwise the switch is not allowed. The net.vrf.strict_mode parameter is per network namespace. Signed-off-by: Andrea Mayer --- drivers/net/vrf.c | 119 ++ 1 file

[RFC,net-next, 0/5] Strict mode for VRF

2020-06-12 Thread Andrea Mayer
for routing packets. I would like to thank David Ahern for his constant and valuable support during the design and development phases of this patch set. Comments, suggestions and improvements are very welcome! Thanks, Andrea Mayer [1] https://lore.kernel.org/netdev/20200307205916.15646-1-sha..

[RFC,net-next, 5/5] selftests: add selftest for the VRF strict mode

2020-06-12 Thread Andrea Mayer
The new strict mode functionality is tested in different configurations and on different network namespaces. Signed-off-by: Andrea Mayer --- .../selftests/net/vrf_strict_mode_test.sh | 390 ++ 1 file changed, 390 insertions(+) create mode 100755 tools/testing/selftests/net

[RFC,net-next, 1/5] l3mdev: add infrastructure for table to VRF mapping

2020-06-12 Thread Andrea Mayer
offer the lookup function (table to VRF device). Signed-off-by: Andrea Mayer --- include/net/l3mdev.h | 37 + net/l3mdev/l3mdev.c | 95 2 files changed, 132 insertions(+) diff --git a/include/net/l3mdev.h b/include/net/l3mdev.h index

[RFC,net-next, 4/5] vrf: add l3mdev registration for table to VRF device lookup

2020-06-12 Thread Andrea Mayer
During the initialization phase of the VRF module, the callback for table to VRF device lookup is registered in l3mdev. Signed-off-by: Andrea Mayer --- drivers/net/vrf.c | 59 +++ 1 file changed, 55 insertions(+), 4 deletions(-) diff --git a/drivers

Re: [RFC PATCH 2/2] PM: hibernate: introduce opportunistic memory reclaim

2020-06-08 Thread Andrea Righi
On Mon, Jun 08, 2020 at 03:23:22PM -0700, Luigi Semenzato wrote: > Hi Andrea, > > 1. This mechanism is quite general. It is possible that, although > hibernation may be an important use, there will be other uses for it. > I suggest leaving the hibernation example and performance

Re: [RFC PATCH 0/2] VMBus channel interrupts re-balancing

2020-06-07 Thread Andrea Parri
, probably, at the cost of adding some #ifdeffery to this RFC). Thanks, Andrea

Re: [RFC PATCH 1/2] Drivers: hv: vmbus: Re-balance channel interrupts across CPUs at CPU hotplug

2020-06-06 Thread Andrea Parri
in cpu_online_mask set at the time this > is executed? reset_chn_counts() does a for_each_online_cpu() loop, and > we want to make sure the count for this CPU gets reset to zero. Yes, it does: We're here (in CPUHP_AP_ONLINE_DYN) near the end of the "CPU-online" process; IIUC, the bit in question is set earlier in this process/before the CPU reaches CPUHP_AP_ONLINE_IDLE. So, yeah, I think I would agree in saying that that: WARN_ON(!cpumask_test_cpu(cpu, cpu_online_mask)); (in vmbus_balance_vp_indexes_at_cpuhp()) is more about "paranoid" (for future changes/uses) than anything else. I'm keeping that for now. > > @@ -980,6 +980,9 @@ static void vmbus_device_release(struct device *device) > > mutex_lock(&vmbus_connection.channel_mutex); > > hv_process_channel_removal(channel); > > mutex_unlock(&vmbus_connection.channel_mutex); > > + > > + if (hv_is_perf_channel(channel)) > > + free_chn_counts(&hv_dev->chn_cnt); > > Again, can drop the 'if' statement. As mentioned above, either way works for me. Will drop it for the next version. Thanks, Andrea

[RFC PATCH 1/2] mm: swap: allow partial swapoff with try_to_unuse()

2020-06-01 Thread Andrea Righi
ot; pages are unused, if it is true simply ignore "pages_to_unuse" and wait until all the pages are unused. In any case the value of 0 in "pages_to_unuse" means "all pages". This is required by the PM / hibernation opportunistic memory reclaim feature. Signed-off-by:

[RFC PATCH 2/2] PM: hibernate: introduce opportunistic memory reclaim

2020-06-01 Thread Andrea Righi
e a better quality of service in the overall cloud infrastructure. == See also == [1] https://lwn.net/Articles/821158/ [2] https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/spot-interruptions.html Signed-off-by: Andrea Righi --- Documentation/ABI/testing/sysfs-power | 38 +++ include/

[RFC PATCH 0/2] PM: hibernate: opportunistic memory reclaim

2020-06-01 Thread Andrea Righi
e chunk of memory and remain mostly idle for the majority of the time, only using a minimum working set. This topic has been mentioned during the OSPM 2020 conference [2]. See [RFC PATCH 2/2] for details about the proposed solution. Feedbacks are welcome. Thanks, -Andrea [1] https://docs.aws.

Re: [RFC PATCH -rcu lkmm] tools/memory-model/README: Expand dependency of klitmus7

2020-05-31 Thread Andrea Parri
9412d3a58 > ("klitmus: Linux kernel v5.6.x compat") > > NOTE: [5] was ahead of herdtools7 7.53, which did not make an > official release. Code generated by klitmus7 without [5] can still be > built targeting Linux 4.20--5.5 if you don't care VLA warnings. > &g

[RFC PATCH 2/2] Drivers: hv: vmbus: Re-balance channel interrupts across CPUs at device hotplug

2020-05-26 Thread Andrea Parri (Microsoft)
o a delayed work, to give channels of such device more chances to be opened. As in vmbus_balance_vp_indexes_at_cpuhp(), the balancing is applied to "performance" channels only, and it relies on the (new) capability to re-assign a channel interrupt. Suggested-by: Nuno Das Neves Signed-o

[RFC PATCH 0/2] VMBus channel interrupts re-balancing

2020-05-26 Thread Andrea Parri (Microsoft)
sibility in such scheme (where devices/channels are mapped only "one at a time"/as they are offered, with the end result that globally the various interrupts are not always evenly spread across CPUs). Andrea Parri (Microsoft) (2): Drivers: hv: vmbus: Re-balance channel interrupts acro

<    1   2   3   4   5   6   7   8   9   10   >