Re: BPF vs objtool again

2020-04-29 Thread Josh Poimboeuf
On Wed, Apr 29, 2020 at 04:41:59PM -0700, Alexei Starovoitov wrote: > On Wed, Apr 29, 2020 at 04:51:59PM -0500, Josh Poimboeuf wrote: > > On Thu, Jul 18, 2019 at 12:14:08PM -0700, tip-bot for Josh Poimboeuf wrote: > > > Commit-ID: 3193c0836f203a91bef96d88c64cccf0be090d9c > > > Gitweb: > > >

[PATCH] tools/gpio: add bias flags to lsgpio

2020-04-29 Thread Kent Gibson
Add display of the bias flags. Signed-off-by: Kent Gibson --- tools/gpio/lsgpio.c | 12 1 file changed, 12 insertions(+) diff --git a/tools/gpio/lsgpio.c b/tools/gpio/lsgpio.c index e1430f504c13..8a71ad36f83b 100644 --- a/tools/gpio/lsgpio.c +++ b/tools/gpio/lsgpio.c @@ -49,6

Re: [PATCH v3 16/34] iommu/vt-d: Convert to probe/release_device() call-backs

2020-04-29 Thread Lu Baolu
On 2020/4/29 21:36, Joerg Roedel wrote: From: Joerg Roedel Convert the Intel IOMMU driver to use the probe_device() and release_device() call-backs of iommu_ops, so that the iommu core code does the group and sysfs setup. Signed-off-by: Joerg Roedel Reviewed-by: Lu Baolu Best regards,

RE: [PATCH v2] hv_netvsc: Fix netvsc_start_xmit's return type

2020-04-29 Thread Michael Kelley
From: Nathan Chancellor Sent: Tuesday, April 28, 2020 10:55 AM > > Do note that netvsc_xmit still returns int because netvsc_xmit has a > potential return from netvsc_vf_xmit, which does not return netdev_tx_t > because of the call to dev_queue_xmit. > > I am not sure if that is an oversight

Re: [GIT PULL] Please pull proc and exec work for 5.7-rc1

2020-04-29 Thread Jann Horn
On Thu, Apr 30, 2020 at 1:22 AM Linus Torvalds wrote: > On Wed, Apr 29, 2020 at 3:38 PM Linus Torvalds > wrote: > > > > If you do it properly, with a helper function instead of repeating > > that fragile nasty thing, maybe it will look better to me. > > Side note: if it has a special helper

Re: WARNING in usbhid_raw_request/usb_submit_urb (3)

2020-04-29 Thread syzbot
Hello, syzbot has tested the proposed patch but the reproducer still triggered crash: WARNING in usbhid_raw_request/usb_submit_urb [ cut here ] usb 3-1: BOGUS urb xfer, pipe 2 != type 2 WARNING: CPU: 1 PID: 5096 at drivers/usb/core/urb.c:478 usb_submit_urb+0x1188/0x1460

Re: [PATCH v3 04/34] iommu/vt-d: Wire up iommu_ops->def_domain_type

2020-04-29 Thread Lu Baolu
On 2020/4/29 21:36, Joerg Roedel wrote: From: Joerg Roedel The Intel VT-d driver already has a matching function to determine the default domain type for a device. Wire it up in intel_iommu_ops. Signed-off-by: Joerg Roedel Reviewed-by: Lu Baolu Best regards, baolu ---

Re: [PATCH v1 1/1] fs/splice: add missing callback for inaccessible pages

2020-04-29 Thread Dave Hansen
On 4/29/20 3:53 PM, Claudio Imbrenda wrote: >> Actually, that's the problem. You've gone through all these careful >> checks and made the page inaccessible. *After* that process, how do >> you keep the page from being hit by an I/O device before it's made >> accessible again? My patch just

Re: [PATCH 02/10] efi: Add a helper function to split 64-bit values

2020-04-29 Thread kbuild test robot
Hi Arvind, Thank you for the patch! Perhaps something to improve: [auto build test WARNING on efi/next] [also build test WARNING on next-20200429] [cannot apply to v5.7-rc3] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system. BTW, we also suggest

Re: [PATCH] btrfs: fix gcc-4.8 build warning

2020-04-29 Thread David Sterba
On Wed, Apr 29, 2020 at 03:27:32PM +0200, Arnd Bergmann wrote: > Some older compilers like gcc-4.8 warn about mismatched curly > braces in a initializer: > > fs/btrfs/backref.c: In function 'is_shared_data_backref': > fs/btrfs/backref.c:394:9: error: missing braces around > initializer

Re: BPF vs objtool again

2020-04-29 Thread Alexei Starovoitov
On Wed, Apr 29, 2020 at 04:51:59PM -0500, Josh Poimboeuf wrote: > On Thu, Jul 18, 2019 at 12:14:08PM -0700, tip-bot for Josh Poimboeuf wrote: > > Commit-ID: 3193c0836f203a91bef96d88c64cccf0be090d9c > > Gitweb: > > https://git.kernel.org/tip/3193c0836f203a91bef96d88c64cccf0be090d9c > >

Re: WARNING in usbhid_raw_request/usb_submit_urb (3)

2020-04-29 Thread Alan Stern
On Wed, 29 Apr 2020, syzbot wrote: > Hello, > > syzbot has tested the proposed patch and the reproducer did not trigger crash: > > Reported-and-tested-by: syzbot+db339689b2101f6f6...@syzkaller.appspotmail.com Good. Here's an improved version of the patch. Alan Stern #syz test:

Re: Remaining randconfig objtool warnings, linux-next-20200428

2020-04-29 Thread Josh Poimboeuf
On Wed, Apr 29, 2020 at 06:11:15PM -0500, Josh Poimboeuf wrote: > > We can probably move those SYS_NI() instances to kernel/sys_ni.c, > > which does not include the header, but it's still a bit ugly. I'll try > > that tomorrow > > unless you come up with a better suggestion first. > > Oh I guess

Re: [PATCH] remoteproc: Fix wrong rvring index computation

2020-04-29 Thread Doug Anderson
Hi, On Fri, 4 Oct 2019 Clement Leger wrote: > > Index of rvring is computed using pointer arithmetic. However, since > rvring->rvdev->vring is the base of the vring array, computation > of rvring idx should be reversed. It previously lead to writing at negative > indices in the resource table.

[PATCH v2 1/2] docs: sysctl/kernel: document ftrace entries

2020-04-29 Thread Stephen Kitt
Based on the ftrace documentation, the tp_printk boot parameter documentation, and the implementation in kernel/trace/trace.c. Signed-off-by: Stephen Kitt --- Changes since v2: - spelling and grammar fixes in ftrace_dump_on_oops ("outputing it" -> "outputting them") - "and::" in a single

Re: [GIT PULL] Please pull proc and exec work for 5.7-rc1

2020-04-29 Thread Linus Torvalds
On Wed, Apr 29, 2020 at 3:38 PM Linus Torvalds wrote: > > If you do it properly, with a helper function instead of repeating > that fragile nasty thing, maybe it will look better to me. Side note: if it has a special helper function for the "get lock, repeat if it was invalid", you can do a

Re: [PATCH 2/2] platform/chrome: typec: Register Type C switches

2020-04-29 Thread Enric Balletbo i Serra
Hi Prashant, On 30/4/20 1:02, Prashant Malani wrote: > Hi Enric, > > Thanks for your review. Kindly see inline: > > On Wed, Apr 29, 2020 at 3:22 PM Enric Balletbo i Serra > wrote: >> >> Hi Prashant, >> >> Thank you for your patch. >> >> On 23/4/20 0:22, Prashant Malani wrote: >>> Register

Re: [RFC PATCH 0/3] newidle_balance() latency mitigation

2020-04-29 Thread Valentin Schneider
On 28/04/20 06:02, Scott Wood wrote: > These patches mitigate latency caused by newidle_balance() on large > systems, by enabling interrupts when the lock is dropped, and exiting > early at various points if an RT task is runnable on the current CPU. > > When applied to an RT kernel on a 72-core

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

2020-04-29 Thread Evan Green
On Thu, Mar 5, 2020 at 8:28 PM Alex Elder wrote: > > This series presents the driver for the Qualcomm IP Accelerator (IPA). > > This is version 2 of this updated series. It includes the following > small changes since the previous version: > - Now based on net-next instead of v5.6-rc > -

[PATCH v12 3/4] perf pmu: add perf_pmu__find_by_type helper

2020-04-29 Thread Ian Rogers
From: Stephane Eranian This is used by libpfm4 during event parsing to locate the pmu for an event. Signed-off-by: Stephane Eranian Reviewed-by: Ian Rogers --- tools/perf/util/pmu.c | 11 +++ tools/perf/util/pmu.h | 1 + 2 files changed, 12 insertions(+) diff --git

[PATCH v12 0/4] perf tools: add support for libpfm4

2020-04-29 Thread Ian Rogers
This patch links perf with the libpfm4 library if it is available and LIBPFM4 is passed to the build. The libpfm4 library contains hardware event tables for all processors supported by perf_events. It is a helper library that helps convert from a symbolic event name to the event encoding required

Re: [PATCH] bpf: fix unused variable warning

2020-04-29 Thread Daniel Borkmann
On 4/29/20 3:21 PM, Arnd Bergmann wrote: Hiding the only using of bpf_link_type_strs[] in an #ifdef causes an unused-variable warning: kernel/bpf/syscall.c:2280:20: error: 'bpf_link_type_strs' defined but not used [-Werror=unused-variable] 2280 | static const char *bpf_link_type_strs[] = {

[PATCH v12 4/4] perf tools: add support for libpfm4

2020-04-29 Thread Ian Rogers
From: Stephane Eranian This patch links perf with the libpfm4 library if it is available and LIBPFM4 is passed to the build. The libpfm4 library contains hardware event tables for all processors supported by perf_events. It is a helper library that helps convert from a symbolic event name to the

[PATCH v12 2/4] tools feature: add support for detecting libpfm4

2020-04-29 Thread Ian Rogers
From: Stephane Eranian libpfm4 provides an alternate command line encoding of perf events. Signed-off-by: Stephane Eranian Reviewed-by: Ian Rogers --- tools/build/Makefile.feature | 3 ++- tools/build/feature/Makefile | 6 +- tools/build/feature/test-libpfm4.c | 9 +

[PATCH v12 1/4] perf doc: pass ASCIIDOC_EXTRA as an argument

2020-04-29 Thread Ian Rogers
commit e9cfa47e687d ("perf doc: allow ASCIIDOC_EXTRA to be an argument") allowed ASCIIDOC_EXTRA to be passed as an option to the Documentation Makefile. This change passes ASCIIDOC_EXTRA, set by detected features or command line options, prior to doing a Documentation build. This is necessary to

Re: Remaining randconfig objtool warnings, linux-next-20200428

2020-04-29 Thread Josh Poimboeuf
On Thu, Apr 30, 2020 at 12:46:57AM +0200, Arnd Bergmann wrote: > On Wed, Apr 29, 2020 at 8:55 PM Josh Poimboeuf wrote: > > > > On Tue, Apr 28, 2020 at 11:10:44AM -0500, Josh Poimboeuf wrote: > > > > ==> build/x86/0xE0F2ACFF_defconfig/log <== > > > > kernel/time/posix-stubs.o: warning: objtool: >

Re: [PATCH v2 0/5] Fix ELF / FDPIC ELF core dumping, and use mmap_sem properly in there

2020-04-29 Thread Linus Torvalds
On Wed, Apr 29, 2020 at 2:57 PM Russell King - ARM Linux admin wrote: > > I've never had any reason to use FDPIC, and I don't have any binaries > that would use it. Nicolas Pitre added ARM support, so I guess he > would be the one to talk to about it. (Added Nicolas.) While we're at it, is

Re: [PATCH v3 1/2] remoteproc: Add remoteproc character device interface

2020-04-29 Thread Mathieu Poirier
On Tue, Apr 21, 2020 at 11:10:17AM -0700, Rishabh Bhatnagar wrote: > Add the character device interface into remoteproc framework. > This interface can be used in order to boot/shutdown remote > subsystems and provides a basic ioctl based interface to implement > supplementary functionality. An

Re: Re: [RESEND PATCH v5 2/5] arm64/crash_core: Export TCR_EL1.T1SZ in vmcoreinfo

2020-04-29 Thread Scott Branden
Hi Bhupesh, On 2020-02-23 10:25 p.m., Bhupesh Sharma wrote: Hi Amit, On Fri, Feb 21, 2020 at 2:36 PM Amit Kachhap wrote: Hi Bhupesh, On 1/13/20 5:44 PM, Bhupesh Sharma wrote: Hi James, On 01/11/2020 12:30 AM, Dave Anderson wrote: - Original Message - Hi Bhupesh, On 25/12/2019

Re: [PATCH 8/9] perf intel-pt: Update documentation about itrace G and L options

2020-04-29 Thread Andi Kleen
> +One caveat with the G and L options is that they work poorly with "Large > PEBS". > +Large PEBS means PEBS records will be accumulated by hardware and the written > +into the event buffer in one go. That reduces interrupts, but can give very > +late timestamps. Because the Intel PT trace is

Re: [PATCH 2/2] platform/chrome: typec: Register Type C switches

2020-04-29 Thread Prashant Malani
Hi Enric, Thanks for your review. Kindly see inline: On Wed, Apr 29, 2020 at 3:22 PM Enric Balletbo i Serra wrote: > > Hi Prashant, > > Thank you for your patch. > > On 23/4/20 0:22, Prashant Malani wrote: > > Register Type C mux and switch handles, when provided via firmware > > bindings.

[PATCH v4 9/9] w1_therm: adding bulk read support to trigger multiple conversion on the bus

2020-04-29 Thread Akira Shimahara
Patch for enhacement of w1_therm module. Adding bulk read support. Sending a 'trigger' command in the dedicated sysfs entry of bus master device send a conversion command for all the slaves on the bus. The sysfs entry is added as soon as at least one device supporting this feature is detected on

Re: [PATCH v10 01/26] Documentation/x86: Add CET description

2020-04-29 Thread Yu-cheng Yu
On Wed, 2020-04-29 at 15:53 -0700, Dave Hansen wrote: > On 4/29/20 3:07 PM, Yu-cheng Yu wrote: > > +Note: > > + There is no CET-enabling arch_prctl function. By design, CET is enabled > > + automatically if the binary and the system can support it. > > I think Andy and I danced around this

Re: [regression?] Re: [PATCH v6 06/12] mm/gup: track FOLL_PIN pages

2020-04-29 Thread Jason Gunthorpe
On Wed, Apr 29, 2020 at 01:56:33PM -0600, Alex Williamson wrote: > On Tue, 28 Apr 2020 21:29:03 -0300 > Jason Gunthorpe wrote: > > > On Tue, Apr 28, 2020 at 02:12:23PM -0600, Alex Williamson wrote: > > > > > > > Maybe I was just getting lucky before this commit. For a > > > > > VM_PFNMAP,

[PATCH v4 8/9] w1_therm: adding alarm sysfs entry to set device internal alarms values

2020-04-29 Thread Akira Shimahara
Adding device alarms settings by a dedicated sysfs entry alarms (RW): read or write TH and TL in the device RAM. Checking devices in alarm state could be performed using the master search command. As alarms temperature level are store in a 8 bit register on the device and are signed values, a

[PATCH v4 6/9] w1_therm: adding eeprom sysfs entry

2020-04-29 Thread Akira Shimahara
Adding eeprom sysfs entry (WO) to trigger either device EEPROM save (by writing 'save' in the sysfs) either device EEPROM restore (by writing 'restore' in the sysfs). All the RAM of the device will be save/restore, whatever its size : resolution config register and alarms level will be

Re: Remaining randconfig objtool warnings, linux-next-20200428

2020-04-29 Thread Josh Poimboeuf
On Thu, Apr 30, 2020 at 12:46:57AM +0200, Arnd Bergmann wrote: > On Wed, Apr 29, 2020 at 8:55 PM Josh Poimboeuf wrote: > > > > On Tue, Apr 28, 2020 at 11:10:44AM -0500, Josh Poimboeuf wrote: > > > > ==> build/x86/0xE0F2ACFF_defconfig/log <== > > > > kernel/time/posix-stubs.o: warning: objtool: >

[PATCH v4 7/9] w1_therm: optimizing temperature reading timings

2020-04-29 Thread Akira Shimahara
Optimizing temperature reading by reducing waiting conversion time according to device resolution settings, as per device specification. This is device dependent as not all the devices supports resolution setting, so it has been added in device family structures. The process to read the

[PATCH v4 5/9] w1_therm: adding resolution sysfs entry

2020-04-29 Thread Akira Shimahara
Adding resolution sysfs entry (RW) to get or set the device resolution Write values are managed as follow: * `9..12`: resolution to set in bit * Anything else: do nothing Read values are : * `9..12`: device resolution in bit * `-xx`: xx is kernel error when reading

Re: [PATCH net-next v2 0/7] net: bcmgenet: add support for Wake on Filter

2020-04-29 Thread Doug Berger
On 4/29/20 3:07 PM, Doug Berger wrote: > On 4/29/20 1:01 PM, Doug Berger wrote: >> Changes in v2: >> Corrected Signed-off-by for commit 3/7. >> >> This commit set adds support for waking from 'standby' using a >> Rx Network Flow Classification filter specified with ethtool. >> >> The first

[PATCH v4 4/9] w1_therm: adding ext_power sysfs entry

2020-04-29 Thread Akira Shimahara
Adding ext_power sysfs entry (RO). Return the power status of the device: - 0: device parasite powered - 1: device externally powered - xx: xx is kernel error The power status of each device is check when the device is discover by the bus master, in w1_therm_add_slave(struct w1_slave *). The

[PATCH v4 3/9] w1_therm: adding sysfs-driver-w1_therm documentation

2020-04-29 Thread Akira Shimahara
Adding a sysfs-driver-w1_therm documentation file in Documentation/ABI/testing. It describe the onlys sysfs entry of w1_therm module, based on Documentation/w1/slaves/w1_therm.rst Signed-off-by: Akira Shimahara --- Documentation/ABI/testing/sysfs-driver-w1_therm | 17 + 1 file

[PATCH v4 2/9] w1_therm: fix reset_select_slave at beginning of search process

2020-04-29 Thread Akira Shimahara
Fix reset_select_slave issue during devices discovery by the master on bus. The w1_reset_select_slave() from w1_io.c, which was previously used, assume that if the slave count is 1 there is only one slave attached on the bus. This is not always true. For example when discovering devices, when the

[PATCH v4 1/9] w1_therm: creating w1_therm.h

2020-04-29 Thread Akira Shimahara
Creating w1_therm.h header to organize code. Organize the w1_therm.c file to gather hardware functions, device specific functions, interface functions and sysfs functions. Signed-off-by: Akira Shimahara --- drivers/w1/slaves/w1_therm.c | 302 +++

[PATCH 0/2] Lock warning cleanup

2020-04-29 Thread Jules Irenge
This patchset proposes a solution to functions that regiter context imbalance warnin, we add annotations to fix the warnings. Jules Irenge (2): cxgb4: Add missing annotation for service_ofldq() spi: atmel: Add missing annotation for atmel_spi_next_xfer_dma_submit()

[PATCH 2/2] spi: atmel: Add missing annotation for atmel_spi_next_xfer_dma_submit()

2020-04-29 Thread Jules Irenge
Sparse reports a warning at atmel_spi_next_xfer_dma_submit() warning: context imbalance in atmel_spi_next_xfer_dma_submit() - unexpected unlock The root cause is the missing annotation at atmel_spi_next_xfer_dma_submit() Add the missing __must_hold(>lock) annotation

[PATCH 1/2] cxgb4: Add missing annotation for service_ofldq()

2020-04-29 Thread Jules Irenge
Sparse reports a warning at service_ofldq() warning: context imbalance in service_ofldq() - unexpected unlock The root cause is the missing annotation at service_ofldq() Add the missing __must_hold(>sendq.lock) annotation Signed-off-by: Jules Irenge ---

[linux-next PATCH 1/2] mm: khugepaged: add exceed_max_ptes_* helpers

2020-04-29 Thread Yang Shi
The max_ptes_{swap|none|shared} are defined to tune the behavior of khugepaged. The are checked at a couple of places with open coding. Replace the opencoding to exceed_pax_ptes_{swap|none_shared} helpers to improve the readability. Cc: Kirill A. Shutemov Cc: Hugh Dickins Cc: Andrea Arcangeli

[linux-next PATCH 2/2] mm: khugepaged: don't have to put being freed page back to lru

2020-04-29 Thread Yang Shi
When khugepaged successfully isolated and copied data from base page to collapsed THP, the base page is about to be freed. So putting the page back to lru sounds not that productive since the page might be isolated by vmscan but it can't be reclaimed by vmscan since it can't be unmapped by

Re: [PATCH v1 1/1] fs/splice: add missing callback for inaccessible pages

2020-04-29 Thread Claudio Imbrenda
On Wed, 29 Apr 2020 10:55:52 -0700 Dave Hansen wrote: > On 4/29/20 10:31 AM, Christian Borntraeger wrote: > > On 29.04.20 18:07, Dave Hansen wrote: > >> On 4/28/20 3:50 PM, Claudio Imbrenda wrote: > >>> If a page is inaccesible and it is used for things like sendfile, > >>> then the content

Re: [PATCH v10 01/26] Documentation/x86: Add CET description

2020-04-29 Thread Dave Hansen
On 4/29/20 3:07 PM, Yu-cheng Yu wrote: > +Note: > + There is no CET-enabling arch_prctl function. By design, CET is enabled > + automatically if the binary and the system can support it. I think Andy and I danced around this last time. Let me try to say it more explicitly. I want CET kernel

Re: Remaining randconfig objtool warnings, linux-next-20200428

2020-04-29 Thread Arnd Bergmann
On Wed, Apr 29, 2020 at 8:55 PM Josh Poimboeuf wrote: > > On Tue, Apr 28, 2020 at 11:10:44AM -0500, Josh Poimboeuf wrote: > > > ==> build/x86/0xE0F2ACFF_defconfig/log <== > > > kernel/time/posix-stubs.o: warning: objtool: > > > __x64_sys_timer_create()+0x23: sibling call from callable

Re: [PATCH] arm64: kvm: fix gcc-10 shift warning

2020-04-29 Thread Stephen Rothwell
Hi all, On Wed, 29 Apr 2020 20:56:20 +0200 Arnd Bergmann wrote: > > gcc-10 warns that the 32-bit zero cannot be shifted more than > 32 bits to the right: > > arch/arm64/kvm/../../../virt/kvm/arm/mmu.c: In function 'clear_hyp_p4d_entry': > arch/arm64/include/asm/pgtable.h:630:35: error: right

Re: [PATCH hmm 5/5] mm/hmm: remove the customizable pfn format from hmm_range_fault

2020-04-29 Thread Jason Gunthorpe
On Wed, Apr 22, 2020 at 01:52:32PM -0400, Felix Kuehling wrote: > [+Philip Yang] > > Am 2020-04-21 um 8:21 p.m. schrieb Jason Gunthorpe: > > From: Jason Gunthorpe > > > > Presumably the intent here was that hmm_range_fault() could put the data > > into some HW specific format and thus avoid some

Re: [GIT PULL] Please pull proc and exec work for 5.7-rc1

2020-04-29 Thread Linus Torvalds
On Wed, Apr 29, 2020 at 12:23 PM Bernd Edlinger wrote: > > By the way, all other attempts to fix it look much more dangerous > than my initially proposed patch, you know the one you hated, but > it does work and does not look overly complicated either. I don't think it works. The whole "take

Re: [PATCH 1/2] dt-bindings: power: Add the BQ27561 fuel gauge bindings

2020-04-29 Thread Sebastian Reichel
Hi, On Fri, Apr 17, 2020 at 12:22:26PM -0500, Dan Murphy wrote: > Introduce the Texas Instrument BQ27561 and BQ27750 fuel gauge device > tree bindings. > > Cc: Rob Herring > Signed-off-by: Dan Murphy > --- I think its best to just add them to bq27xxx.txt. Conversion to YAML would still be

Re: [PATCH 2/2] platform/chrome: typec: Register Type C switches

2020-04-29 Thread Enric Balletbo i Serra
Hi Prashant, Following my previous comments ... On 23/4/20 0:22, Prashant Malani wrote: > Register Type C mux and switch handles, when provided via firmware > bindings. These will allow the cros-ec-typec driver, and also alternate > mode drivers to configure connected Muxes correctly, according

[PATCH] mm/slub: fix stack overruns with SLUB_STATS

2020-04-29 Thread Qian Cai
There is no need to copy SLUB_STATS items from root memcg cache to new memcg cache copies. Doing so could result in stack overruns because the store function only accepts 0 to clear the stat and returns an error for everything else while the show method would print out the whole stat. Then, the

Re: [PATCH v12 4/8] iommu/vt-d: Add bind guest PASID support

2020-04-29 Thread Jacob Pan
On Wed, 29 Apr 2020 16:12:01 +0200 Auger Eric wrote: > >> in last review Eric raised the open about what about binding the > >> same PASID to the same pdev multiple times. We discussed that > >> should be disallowed. Here can you check whether aux_domain is > >> enabled on pdev to restrict

Re: [PATCH 2/2] platform/chrome: typec: Register Type C switches

2020-04-29 Thread Enric Balletbo i Serra
Hi Prashant, Thank you for your patch. On 23/4/20 0:22, Prashant Malani wrote: > Register Type C mux and switch handles, when provided via firmware > bindings. These will allow the cros-ec-typec driver, and also alternate > mode drivers to configure connected Muxes correctly, according to PD >

Re: [PATCH 03/10] efi/x86: Use pr_efi_err for error messages

2020-04-29 Thread Arvind Sankar
On Wed, Apr 29, 2020 at 11:55:04PM +0200, Ard Biesheuvel wrote: > On Wed, 29 Apr 2020 at 23:53, Joe Perches wrote: > > > > On Wed, 2020-04-29 at 17:43 -0400, Arvind Sankar wrote: > > > On Wed, Apr 29, 2020 at 08:49:21PM +0200, Ard Biesheuvel wrote: > > > > On Wed, 29 Apr 2020 at 20:47, Joe

Re: [PATCH v3 03/16] mfd: mfd-core: match device tree node against reg property

2020-04-29 Thread Michael Walle
Hi Lee, Am 2020-04-23 19:45, schrieb Michael Walle: There might be multiple children with the device tree compatible, for example if a MFD has multiple instances of the same function. In this case only the first is matched and the other children get a wrong of_node reference. Add a new option

Re: [PATCH v3 3/4] iommu/vt-d: Add page request draining support

2020-04-29 Thread Jacob Pan
On Wed, 29 Apr 2020 14:00:05 +0800 Lu Baolu wrote: > Hi Jacob, > > On 2020/4/29 11:36, Jacob Pan wrote: > > On Wed, 22 Apr 2020 16:06:10 +0800 > > Lu Baolu wrote: > > > >> When a PASID is stopped or terminated, there can be pending PRQs > >> (requests that haven't received responses) in

Re: [PATCH 1/2] dt-bindings: chrome: Add cros-ec-typec mux props

2020-04-29 Thread Enric Balletbo i Serra
Hi Prashant, Thank you for the patch. On 23/4/20 0:22, Prashant Malani wrote: > Add properties for mode, orientation and USB data role switches for > Type C connectors. When available, these will allow the Type C connector > class port driver to configure the various switches according to USB PD

[PATCH v10 02/26] x86/cpufeatures: Add CET CPU feature flags for Control-flow Enforcement Technology (CET)

2020-04-29 Thread Yu-cheng Yu
Add CPU feature flags for Control-flow Enforcement Technology (CET). CPUID.(EAX=7,ECX=0):ECX[bit 7] Shadow stack CPUID.(EAX=7,ECX=0):EDX[bit 20] Indirect Branch Tracking Signed-off-by: Yu-cheng Yu Reviewed-by: Borislav Petkov Reviewed-by: Kees Cook --- arch/x86/include/asm/cpufeatures.h | 2

[PATCH v10 07/26] x86/mm: Remove _PAGE_DIRTY_HW from kernel RO pages

2020-04-29 Thread Yu-cheng Yu
Kernel read-only PTEs are setup as _PAGE_DIRTY_HW. Since these become shadow stack PTEs, remove the dirty bit. Signed-off-by: Yu-cheng Yu Cc: "H. Peter Anvin" Cc: Kees Cook Cc: Thomas Gleixner Cc: Dave Hansen Cc: Andy Lutomirski Cc: Ingo Molnar Cc: Borislav Petkov Cc: Peter Zijlstra ---

[PATCH v10 05/26] x86/cet/shstk: Add Kconfig option for user-mode Shadow Stack

2020-04-29 Thread Yu-cheng Yu
Shadow Stack provides protection against function return address corruption. It is active when the processor supports it, the kernel has CONFIG_X86_INTEL_SHADOW_STACK_USER, and the application is built for the feature. This is only implemented for the 64-bit kernel. When it is enabled, legacy

[PATCH v10 09/26] drm/i915/gvt: Change _PAGE_DIRTY to _PAGE_DIRTY_BITS

2020-04-29 Thread Yu-cheng Yu
After the introduction of _PAGE_COW, a modified page's PTE can have either _PAGE_DIRTY_HW or _PAGE_COW. Change _PAGE_DIRTY to _PAGE_DIRTY_BITS. Signed-off-by: Yu-cheng Yu Reviewed-by: Kees Cook Cc: David Airlie Cc: Joonas Lahtinen Cc: Jani Nikula Cc: Daniel Vetter Cc: Rodrigo Vivi Cc:

[PATCH v10 04/26] x86/cet: Add control-protection fault handler

2020-04-29 Thread Yu-cheng Yu
A control-protection fault is triggered when a control-flow transfer attempt violates Shadow Stack or Indirect Branch Tracking constraints. For example, the return address for a RET instruction differs from the copy on the Shadow Stack; or an indirect JMP instruction, without the NOTRACK prefix,

[PATCH v10 10/26] x86/mm: Update pte_modify for _PAGE_COW

2020-04-29 Thread Yu-cheng Yu
Pte_modify() changes a PTE to 'newprot'. It doesn't use the pte_*() helpers that a previous patch fixed up, so we need a new site. Introduce fixup_dirty_pte() to set the dirty bits based on _PAGE_RW, and apply the same changes to pmd_modify(). Signed-off-by: Yu-cheng Yu --- v10: - Change

[PATCH v10 08/26] x86/mm: Introduce _PAGE_COW

2020-04-29 Thread Yu-cheng Yu
There is essentially no room left in the x86 hardware PTEs on some OSes (not Linux). That left the hardware architects looking for a way to represent a new memory type (shadow stack) within the existing bits. They chose to repurpose a lightly-used state: Write=0,Dirty=1. The reason it's lightly

[PATCH v10 06/26] x86/mm: Change _PAGE_DIRTY to _PAGE_DIRTY_HW

2020-04-29 Thread Yu-cheng Yu
Before introducing _PAGE_COW for non-hardware memory management purposes in the next patch, rename _PAGE_DIRTY to _PAGE_DIRTY_HW and _PAGE_BIT_DIRTY to _PAGE_BIT_DIRTY_HW to make meanings more clear. There are no functional changes from this patch. Signed-off-by: Yu-cheng Yu Reviewed-by: Kees

[PATCH v10 18/26] mm: Update can_follow_write_pte() for shadow stack

2020-04-29 Thread Yu-cheng Yu
Can_follow_write_pte() ensures a read-only page is COWed by checking the FOLL_COW flag, and uses pte_dirty() to validate the flag is still valid. Like a writable data page, a shadow stack page is writable, and becomes read-only during copy-on-write, but it is always dirty. Thus, in the

[PATCH v10 15/26] mm: Fixup places that call pte_mkwrite() directly

2020-04-29 Thread Yu-cheng Yu
A shadow stack page is made writable by pte_mkwrite_shstk(), which sets _PAGE_DIRTY_HW. There are a few places that call pte_mkwrite() directly and miss the maybe_mkwrite() fixup in the previous patch. Fix them with maybe_mkwrite(): - do_anonymous_page() and migrate_vma_insert_page() check

[PATCH v10 23/26] ELF: Introduce arch_setup_elf_property()

2020-04-29 Thread Yu-cheng Yu
An ELF file's .note.gnu.property indicates architecture features of the file. These features are extracted earlier and stored in the struct 'arch_elf_state'. Introduce arch_setup_elf_property() to setup and enable these features. The first use-case of this function is shadow stack.

[PATCH v10 22/26] ELF: Add ELF program property parsing support

2020-04-29 Thread Yu-cheng Yu
From: Dave Martin ELF program properties will be needed for detecting whether to enable optional architecture or ABI features for a new ELF process. For now, there are no generic properties that we care about, so do nothing unless CONFIG_ARCH_USE_GNU_PROPERTY=y. Otherwise, the presence of

[PATCH v10 21/26] ELF: UAPI and Kconfig additions for ELF program properties

2020-04-29 Thread Yu-cheng Yu
Introduce basic ELF definitions relating to the NT_GNU_PROPERTY_TYPE_0 note. Signed-off-by: Yu-cheng Yu Reviewed-by: Kees Cook --- v10: - Merge GNU_PROPERTY_X86_FEATURE_1_* from a separate patch. fs/Kconfig.binfmt| 3 +++ include/linux/elf.h | 8 include/uapi/linux/elf.h

[PATCH v10 25/26] x86/cet/shstk: Handle thread shadow stack

2020-04-29 Thread Yu-cheng Yu
The kernel allocates (and frees on thread exit) a new shadow stack for a pthread child. It is possible for the kernel to complete the clone syscall and set the child's shadow stack pointer to NULL and let the child thread allocate a shadow stack for itself. There are two issues in

[PATCH v10 24/26] x86/cet/shstk: ELF header parsing for shadow stack

2020-04-29 Thread Yu-cheng Yu
Check an ELF file's .note.gnu.property, and setup shadow stack if the application supports it. Signed-off-by: Yu-cheng Yu --- v9: - Change cpu_feature_enabled() to static_cpu_has(). arch/x86/Kconfig | 2 ++ arch/x86/include/asm/elf.h | 13 +

[PATCH v10 16/26] mm: Add guard pages around a shadow stack.

2020-04-29 Thread Yu-cheng Yu
INCSSP(Q/D) increments shadow stack pointer and 'pops and discards' the first and the last elements in the range, effectively touches those memory areas. The maximum moving distance by INCSSPQ is 255 * 8 = 2040 bytes and 255 * 4 = 1020 bytes by INCSSPD. Both ranges are far from PAGE_SIZE. Thus,

[PATCH v10 17/26] mm/mmap: Add shadow stack pages to memory accounting

2020-04-29 Thread Yu-cheng Yu
Account shadow stack pages to stack memory. Signed-off-by: Yu-cheng Yu --- v10: - Use arch_shadow_stack_mapping() to make meaning clear. v8: - Change shadow stake pages from data_vm to stack_vm. arch/x86/mm/pgtable.c | 7 +++ include/asm-generic/pgtable.h | 11 +++

[PATCH v10 20/26] x86/cet/shstk: Handle signals for shadow stack

2020-04-29 Thread Yu-cheng Yu
To deliver a signal, create a shadow stack restore token and put a restore token and the signal restorer address on the shadow stack. For sigreturn, verify the token and restore the shadow stack pointer. Introduce WRUSS, which is a kernel-mode instruction but writes directly to user shadow

[PATCH v10 19/26] x86/cet/shstk: User-mode shadow stack support

2020-04-29 Thread Yu-cheng Yu
This patch adds basic shadow stack enabling/disabling routines. A task's shadow stack is allocated from memory with VM_SHSTK flag and has a fixed size of min(RLIMIT_STACK, 4GB). Signed-off-by: Yu-cheng Yu --- v10: - Change no_cet_shstk to no_user_shstk. - Limit shadow stack size to 4 GB, and

[PATCH v2] usb: raw-gadget: fix gadget endpoint selection

2020-04-29 Thread Andrey Konovalov
Currently automatic gadget endpoint selection based on required features doesn't work. Raw Gadget tries iterating over the list of available endpoints and finding one that has the right direction and transfer type. Unfortunately selecting arbitrary gadget endpoints (even if they satisfy feature

Re: [PATCH v4 0/3] media: rcar-vin: Enable MEDIA_BUS_FMT_SRGGB8_1X8 format

2020-04-29 Thread Lad, Prabhakar
Hi Niklas, On Wed, Apr 15, 2020 at 11:19 AM Lad Prabhakar wrote: > > Hi, > > This patch series adds support for MEDIA_BUS_FMT_SRGGB8_1X8 format for vin > > Cheers, > --Prabhakar > > Changed for v4: > * patch 1/3 is new patch which adds a check for conversion from input to > output. > * patch

[PATCH v10 14/26] x86/mm: Update maybe_mkwrite() for shadow stack

2020-04-29 Thread Yu-cheng Yu
Shadow stack memory is writable, but its VMA has VM_SHSTK instead of VM_WRITE. Update maybe_mkwrite() to include the shadow stack. Signed-off-by: Yu-cheng Yu --- arch/x86/Kconfig | 4 arch/x86/mm/pgtable.c | 18 ++ include/asm-generic/pgtable.h | 24

[PATCH v10 12/26] mm: Introduce VM_SHSTK for shadow stack memory

2020-04-29 Thread Yu-cheng Yu
A Shadow Stack PTE must be read-only and have _PAGE_DIRTY set. However, read-only and Dirty PTEs also exist for copy-on-write (COW) pages. These two cases are handled differently for page faults. Introduce VM_SHSTK to track shadow stack VMAs. Signed-off-by: Yu-cheng Yu Reviewed-by: Kees Cook

[PATCH v10 00/26] Control-flow Enforcement: Shadow Stack

2020-04-29 Thread Yu-cheng Yu
Control-flow Enforcement (CET) is a new Intel processor feature that blocks return/jump-oriented programming attacks. Details can be found in "Intel 64 and IA-32 Architectures Software Developer's Manual" [1]. This series depends on the XSAVES supervisor state series that was split out and

[PATCH v10 03/26] x86/fpu/xstate: Introduce CET MSR XSAVES supervisor states

2020-04-29 Thread Yu-cheng Yu
Control-flow Enforcement Technology (CET) adds five MSRs. Introduce them and their XSAVES supervisor states: MSR_IA32_U_CET (user-mode CET settings), MSR_IA32_PL3_SSP (user-mode Shadow Stack pointer), MSR_IA32_PL0_SSP (kernel-mode Shadow Stack pointer), MSR_IA32_PL1_SSP

[PATCH v10 13/26] x86/mm: Shadow Stack page fault error checking

2020-04-29 Thread Yu-cheng Yu
Shadow stack accesses are those that are performed by the CPU where it expects to encounter a shadow stack mapping. These accesses are performed implicitly by CALL/RET at the site of the shadow stack pointer. These accesses are made explicitly by shadow stack management instructions like WRUSSQ.

[PATCH v10 01/26] Documentation/x86: Add CET description

2020-04-29 Thread Yu-cheng Yu
Explain no_user_shstk/no_user_ibt kernel parameters, and introduce a new document on Control-flow Enforcement Technology (CET). Signed-off-by: Yu-cheng Yu Reviewed-by: Kees Cook --- v10: - Change no_cet_shstk and no_cet_ibt to no_user_shstk and no_user_ibt. - Remove the opcode section, as it is

[PATCH v10 26/26] x86/cet/shstk: Add arch_prctl functions for shadow stack

2020-04-29 Thread Yu-cheng Yu
arch_prctl(ARCH_X86_CET_STATUS, u64 *args) Get CET feature status. The parameter 'args' is a pointer to a user buffer. The kernel returns the following information: *args = shadow stack/IBT status *(args + 1) = shadow stack base address *(args + 2) = shadow stack size

[PATCH v10 11/26] x86/mm: Update ptep_set_wrprotect() and pmdp_set_wrprotect() for transition from _PAGE_DIRTY_HW to _PAGE_COW

2020-04-29 Thread Yu-cheng Yu
When shadow stack is introduced, [R/O + _PAGE_DIRTY_HW] PTE is reserved for shadow stack. Copy-on-write PTEs have [R/O + _PAGE_COW]. When a PTE goes from [R/W + _PAGE_DIRTY_HW] to [R/O + _PAGE_COW], it could become a transient shadow stack PTE in two cases: The first case is that some

Re: [PATCH net-next v2 0/7] net: bcmgenet: add support for Wake on Filter

2020-04-29 Thread Doug Berger
On 4/29/20 1:01 PM, Doug Berger wrote: > Changes in v2: > Corrected Signed-off-by for commit 3/7. > > This commit set adds support for waking from 'standby' using a > Rx Network Flow Classification filter specified with ethtool. > > The first two commits are bug fixes that should be

linux-next: Fixes tag needs some work in the hid tree

2020-04-29 Thread Stephen Rothwell
Hi all, In commit dcce8ef8f70a ("HID: wacom: Report 2nd-gen Intuos Pro S center button status over BT") Fixes tag Fixes: cd47de45b855 ("HID: wacom: Add 2nd gen Intuos Pro Small support") has these problem(s): - Target SHA1 does not exist Maybe you meant Fixes: 912c6aa67ad4 ("HID:

Re: [PATCH v2] mm/swapfile.c: simplify the scan loop in scan_swap_map_slots()

2020-04-29 Thread Wei Yang
On Wed, Apr 29, 2020 at 08:52:44AM +0800, Huang, Ying wrote: >Wei Yang writes: > >> On Mon, Apr 27, 2020 at 08:55:33AM +0800, Huang, Ying wrote: >>>Wei Yang writes: >>> On Sun, Apr 26, 2020 at 09:07:11AM +0800, Huang, Ying wrote: >Wei Yang writes: > >> On Fri, Apr 24, 2020 at

Re: [PATCH 2/2] power: supply: Introduce the BQ27561 Fuel gauge driver

2020-04-29 Thread Sebastian Reichel
Hi, On Fri, Apr 17, 2020 at 12:22:27PM -0500, Dan Murphy wrote: > Introduce the BQ27561 Fuel gauge driver from Texas Instruments. The > driver also supports the BQ27750 as it has the same register map and > bit mask. Why a separate driver instead of adding support to bq27xxx? The register map

Re: [PATCH 04/18] ARM: debug-ll: Add support for r8a7742

2020-04-29 Thread Lad, Prabhakar
Hi, Thank you for the review. On Wed, Apr 29, 2020 at 11:00 PM Russell King - ARM Linux admin wrote: > > On Wed, Apr 29, 2020 at 10:56:41PM +0100, Lad Prabhakar wrote: > > @@ -1701,6 +1709,7 @@ config DEBUG_UART_PHYS > > default 0xe6e6 if DEBUG_RCAR_GEN2_SCIF0 > > default

[RFC PATCH v11 0/9] Add Tegra driver for video capture

2020-04-29 Thread Sowjanya Komatineni
This series adds Tegra210 VI and CSI driver for built-in test pattern generator (TPG) capture. Tegra210 supports max 6 channels on VI and 6 ports on CSI where each CSI port is one-to-one mapped to VI channel for video capture. This series has TPG support only where it creates hard media links

Re: BPF vs objtool again

2020-04-29 Thread Arvind Sankar
On Wed, Apr 29, 2020 at 04:51:59PM -0500, Josh Poimboeuf wrote: > On Thu, Jul 18, 2019 at 12:14:08PM -0700, tip-bot for Josh Poimboeuf wrote: > > Commit-ID: 3193c0836f203a91bef96d88c64cccf0be090d9c > > Gitweb: > > https://git.kernel.org/tip/3193c0836f203a91bef96d88c64cccf0be090d9c > >

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