Re: [PATCH] trace: Fix some typos in comment

2020-10-12 Thread Steven Rostedt
On Sat, 10 Oct 2020 22:09:24 +0800 Qiujun Huang wrote: > s/wihin/within/ > s/retrieven/retrieved/ > s/suppport/support/ > s/wil/will/ > s/accidently/accidentally/ > s/if the if the/if the/ > > Signed-off-by: Qiujun Huang Thanks, I queued this up. -- Steve

Re: [linux-safety] [PATCH] usb: host: ehci-sched: add comment about find_tt() not returning error

2020-10-12 Thread Lukas Bulwahn
On Mon, 12 Oct 2020, Alan Stern wrote: > On Mon, Oct 12, 2020 at 04:11:38PM +0200, Lukas Bulwahn wrote: > > > > > > On Sun, 11 Oct 2020, Sudip Mukherjee wrote: > > > > > Add a comment explaining why find_tt() will not return error even though > > > find_tt() is checking for NULL and other er

Re: [PATCH] x86/x86_64_defconfig: Enable the serial console

2020-10-12 Thread Guillaume Tucker
On 12/10/2020 15:40, Willy Tarreau wrote: > On Mon, Oct 12, 2020 at 04:32:12PM +0200, Borislav Petkov wrote: >> On Mon, Oct 12, 2020 at 11:22:10AM +0100, Guillaume Tucker wrote: >>> However, it was found while adding some x86 Chromebooks[1] to >>> KernelCI that x86_64_defconfig lacked some basic th

Re: [PATCH 1/1] tracing/boot: Add ftrace.instance.*.alloc_snapshot option

2020-10-12 Thread Steven Rostedt
On Sun, 11 Oct 2020 00:28:09 +0900 Masami Hiramatsu wrote: > Add ftrace.instance.*.alloc_snapshot option. > > This option has been described in Documentation/trace/boottime-trace.rst > but not implemented yet. > > ftrace.[instance.INSTANCE.]alloc_snapshot >Allocate snapshot buffer. > > The

Re: [PATCH 0/5] tracing: Synthetic event dynamic string fixes

2020-10-12 Thread Steven Rostedt
On Fri, 9 Oct 2020 10:17:06 -0500 Tom Zanussi wrote: > These patches provide fixes for the problems observed by Masami in the > new synthetic event dynamic string patchset. > > The first patch (tracing: Don't show dynamic string internals in > synthetic event description) removes the __data_loc

Re: [PATCH 15/18] dt-bindings: usb: meson-g12a-usb: Discard FL-adj property

2020-10-12 Thread Serge Semin
On Mon, Oct 12, 2020 at 05:01:43PM +0200, Neil Armstrong wrote: > Hi, > > On 12/10/2020 16:22, Serge Semin wrote: > > On Mon, Oct 12, 2020 at 09:54:25AM +0200, Neil Armstrong wrote: > >> Hi, > >> > >> On 11/10/2020 00:41, Serge Semin wrote: > >>> An empty snps,quirk-frame-length-adjustment won't c

Re: [PATCH] kthread: Add kthread_work tracepoints

2020-10-12 Thread Rob Clark
On Mon, Oct 12, 2020 at 6:59 AM Steven Rostedt wrote: > > On Sat, 10 Oct 2020 11:03:22 -0700 > Rob Clark wrote: > > > /** > > + * sched_kthread_work_execute_start - called immediately before the work > > callback > > + * @work:pointer to struct kthread_work > > + * > > + * Allows to track kt

Re: [PATCH] net: ethernet: ixgbe: don't propagate -ENODEV from ixgbe_mii_bus_init()

2020-10-12 Thread Jakub Kicinski
On Mon, 12 Oct 2020 14:20:16 +0200 Bartosz Golaszewski wrote: > On Mon, Sep 28, 2020 at 9:17 AM Bartosz Golaszewski wrote: > > > > From: Bartosz Golaszewski > > > > It's a valid use-case for ixgbe_mii_bus_init() to return -ENODEV - we > > still want to finalize the registration of the ixgbe devic

Re: [linux-safety] [PATCH] usb: host: ehci-sched: add comment about find_tt() not returning error

2020-10-12 Thread Greg Kroah-Hartman
On Mon, Oct 12, 2020 at 05:10:21PM +0200, Lukas Bulwahn wrote: > And for the static analysis finding, we need to find a way to ignore this > finding without simply ignoring all findings or new findings that just > look very similar to the original finding, but which are valid. Then I suggest you

[PATCH] checkpatch: improve EXECUTE_PERMISSIONS tests

2020-10-12 Thread Ujjwal Kumar
1. Use group capture regexp for file mode test to improve code readability. 2. The 'scripts/' directory test on filenames can be excluded as it has become obsolete because there are many source files that are not scripts in this directory and its subdirectories. 3. Replace unnecessary

Re: [ANNOUNCE] libtraceevent.git

2020-10-12 Thread Steven Rostedt
On Mon, 12 Oct 2020 12:12:08 +0200 Jiri Olsa wrote: > On Wed, Oct 07, 2020 at 01:07:50PM -0400, Steven Rostedt wrote: > > I split out tools/lib/traceevent from the kernel tree using "git subtree", > > which recreates all the commits of a directory and makes that directory a > > stand alone. I the

[GIT PULL] EFI changes for v5.10

2020-10-12 Thread Ingo Molnar
Linus, Please pull the latest efi/core git tree from: git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git efi-core-2020-10-12 # HEAD: 4d0a4388ccdd9482fef6b26f879d0f6099143f80 Merge branch 'efi/urgent' into efi/core, to pick up fixes EFI changes for v5.10: - Preliminary RISC-V ena

Re: [PATCH] mm: Make allocator take care of memoryless numa node

2020-10-12 Thread Christopher Lameter
On Mon, 12 Oct 2020, Xianting Tian wrote: > In architecture like powerpc, we can have cpus without any local memory > attached to it. In such cases the node does not have real memory. > > In many places of current kernel code, it doesn't judge whether the node is > memoryless numa node before call

Re: [v4 PATCH 0/2] fix scrolling of panel with small hfp or hbp

2020-10-12 Thread Chun-Kuang Hu
Hi, Jitao: Jitao Shi 於 2020年10月10日 週六 下午3:09寫道: > > Changes since v3: > - Revert v2, for v2 will cause some bridge ic no output. the cause >the video linetime doesn't match display mode from get mode. > - Make sure the horizontal_frontporch_byte and horizontal_backporch_byte >are > 0.

Re: [RFC PATCH] checkpatch: add shebang check to EXECUTE_PERMISSIONS

2020-10-12 Thread Joe Perches
On Mon, 2020-10-12 at 16:16 +0200, Lukas Bulwahn wrote: > On Mon, 12 Oct 2020, Ujjwal Kumar wrote: > > On 12/10/20 11:47 am, Joe Perches wrote: > > > On Mon, 2020-10-12 at 11:19 +0530, Ujjwal Kumar wrote: > > > > checkpatch.pl checks for invalid EXECUTE_PERMISSIONS on source > > > > files. The scri

Re: [linux-safety] [PATCH] usb: host: ehci-sched: add comment about find_tt() not returning error

2020-10-12 Thread Sudip Mukherjee
Hi Lukas, On Mon, Oct 12, 2020 at 3:11 PM Lukas Bulwahn wrote: > > > > On Sun, 11 Oct 2020, Sudip Mukherjee wrote: > > > Add a comment explaining why find_tt() will not return error even though > > find_tt() is checking for NULL and other errors. > > > > Signed-off-by: Sudip Mukherjee > > I get

Re: [PATCH v2 2/5] of/address: Introduce of_dma_lower_bus_limit()

2020-10-12 Thread Rob Herring
On Sat, Oct 10, 2020 at 10:12 AM Nicolas Saenz Julienne wrote: > > The function provides the CPU physical address addressable by the most > constrained bus in the system. It might be useful in order to > dynamically set up memory zones during boot. > > Signed-off-by: Nicolas Saenz Julienne > ---

[PATCH v3] kcov, usb: specify contexts for remote coverage sections

2020-10-12 Thread Andrey Konovalov
Currently there's a KCOV remote coverage collection section in __usb_hcd_giveback_urb(). Initially that section was added based on the assumption that usb_hcd_giveback_urb() can only be called in interrupt context as indicated by a comment before it. This is what happens when syzkaller is fuzzing t

[PATCH v2 2/2] dt-bindings: extcon: add binding for TUSB320

2020-10-12 Thread Michael Auchter
Add a device tree binding for the TI TUSB320. Signed-off-by: Michael Auchter --- Changes since v1: - use tusb320 instead of extcon in the unit name .../bindings/extcon/extcon-usbc-tusb320.yaml | 41 +++ 1 file changed, 41 insertions(+) create mode 100644 Documentation/devicet

Re: [PATCH] perf c2c: Update usage for showing memory events

2020-10-12 Thread Ian Rogers
On Mon, Oct 12, 2020 at 2:13 AM Jiri Olsa wrote: > > On Sun, Oct 11, 2020 at 08:10:22PM +0800, Leo Yan wrote: > > Since commit b027cc6fdf1b ("perf c2c: Fix 'perf c2c record -e list' to > > show the default events used"), "perf c2c" tool can show the memory > > events properly, it's no reason to st

Re: [PATCHv3] selftests: rtnetlink: load fou module for kci_test_encap_fou() test

2020-10-12 Thread Jakub Kicinski
On Mon, 12 Oct 2020 13:56:15 +0800 Po-Hsu Lin wrote: > Is there any update on this patch? You received feedback. Don't remove modules after tests, something else could be using them.

Re: [PATCH 15/18] dt-bindings: usb: meson-g12a-usb: Discard FL-adj property

2020-10-12 Thread Neil Armstrong
On 12/10/2020 17:13, Serge Semin wrote: > On Mon, Oct 12, 2020 at 05:01:43PM +0200, Neil Armstrong wrote: >> Hi, >> >> On 12/10/2020 16:22, Serge Semin wrote: >>> On Mon, Oct 12, 2020 at 09:54:25AM +0200, Neil Armstrong wrote: Hi, On 11/10/2020 00:41, Serge Semin wrote: > An empt

Re: [PATCH 08/13] m68k: m68328: use legacy_timer_tick()

2020-10-12 Thread Arnd Bergmann
On Mon, Oct 12, 2020 at 3:15 PM Geert Uytterhoeven wrote: > > Given this feature is SoC-specific, not platform-specific, perhaps > it makes sense to move the selects to the M68{,EZ,VZ}328 symbols? > > Regardless: > Reviewed-by: Geert Uytterhoeven Ok, folded in the change blow, using one less lin

Re: [PATCH] drm/panel: rm68200: fix mode to 50fps

2020-10-12 Thread Philippe CORNU
On 9/25/20 4:16 PM, Yannick Fertre wrote: > Compute new timings to get a framerate of 50fps with a pixel clock > @54Mhz. > > Signed-off-by: Yannick Fertre > --- > drivers/gpu/drm/panel/panel-raydium-rm68200.c | 12 ++-- > 1 file changed, 6 insertions(+), 6 deletions(-) > > diff --gi

KINDEST MESSAGE.

2020-10-12 Thread Tofil Bama
Dear, My name is Mr Tofil Bama, I am the Bill and Exchange assistant Manager in Bank of Africa Ouagadougou Burkina Faso. In my department I discovered an abandoned sum of eighteen million three hundred thousand United State of American dollars (18.3MILLION USA DOLLARS) in an account that belongs t

Re: [ANNOUNCE] libtraceevent.git

2020-10-12 Thread Sudip Mukherjee
On Mon, Oct 12, 2020 at 4:19 PM Steven Rostedt wrote: > > On Mon, 12 Oct 2020 12:12:08 +0200 > Jiri Olsa wrote: > > > On Wed, Oct 07, 2020 at 01:07:50PM -0400, Steven Rostedt wrote: > > > I split out tools/lib/traceevent from the kernel tree using "git subtree", > > > which recreates all the comm

re: RDMA/rxe: Fix skb lifetime in rxe_rcv_mcast_pkt()

2020-10-12 Thread Colin Ian King
Hi, Static analysis with Coverity has detected a potential issue with the following commit: commit e7ec96fc7932f48a6d6cdd05bf82004a1a04285b Author: Bob Pearson Date: Thu Oct 8 15:36:52 2020 -0500 RDMA/rxe: Fix skb lifetime in rxe_rcv_mcast_pkt() The analysis is as follows: 16. Condit

Re: [PATCH RFC 2/2] kbuild: use interpreters to invoke scripts

2020-10-12 Thread Masahiro Yamada
On Sun, Oct 4, 2020 at 12:21 AM Ujjwal Kumar wrote: > > We cannot rely on execute bits to be set on files in the repository. > The build script should use the explicit interpreter when invoking any > script from the repository. > > Link: > https://lore.kernel.org/lkml/20200830174409.c24c3f67addcc

Re: [PATCH v2 1/4] dt-bindings: usb: convert usb-device.txt to YAML schema

2020-10-12 Thread Rob Herring
On Sat, 10 Oct 2020 16:43:11 +0800, Chunfeng Yun wrote: > Convert usb-device.txt to YAML schema usb-device.yaml > > Signed-off-by: Chunfeng Yun > --- > v2: new patch suggested by Rob > --- > .../devicetree/bindings/usb/usb-device.txt| 102 -- > .../devicetree/bindings/usb/usb-dev

Re: linux-next: Tree for Oct 12 (drivers/staging/media/atomisp/)

2020-10-12 Thread Randy Dunlap
On 10/12/20 2:59 AM, Stephen Rothwell wrote: > Hi all, > > Changes since 20201009: > on x86_64: In file included from ../drivers/staging/media/atomisp//pci/ia_css_control.h:25:0, from ../drivers/staging/media/atomisp//pci/ia_css.h:28, from ../drivers/staging

Re: [PATCH 4/5] tracing: Add synthetic event error logging

2020-10-12 Thread Tom Zanussi
Hi Masami, On Sat, 2020-10-10 at 23:57 +0900, Masami Hiramatsu wrote: > On Fri, 9 Oct 2020 10:17:10 -0500 > Tom Zanussi wrote: > > > Add support for synthetic event error logging, which entails adding > > a > > logging function for it, a way to save the synthetic event command, > > and a set of

[GIT PULL] core/build changes for v5.10: Add orphan section checking for x86, ARM and ARM64

2020-10-12 Thread Ingo Molnar
Linus, Please pull the latest core/build git tree from: git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git core-build-2020-10-12 # HEAD: 6e0bf0e0e55000742a53c5f3b58f8669e0091a11 x86/boot/compressed: Warn on orphan section placement Orphan link sections were a long-standing source

Re: [PATCH] x86/boot/64: Initialize 5-level paging variables earlier

2020-10-12 Thread Arvind Sankar
On Mon, Oct 12, 2020 at 05:08:30PM +0300, Kirill A. Shutemov wrote: > On Sat, Oct 10, 2020 at 03:26:24PM -0400, Arvind Sankar wrote: > > On Sat, Oct 10, 2020 at 03:11:10PM -0400, Arvind Sankar wrote: > > > Commit > > > ca0e22d4f011 ("x86/boot/compressed/64: Always switch to own page table") > > >

Re: [PATCH v2 1/3] objtool: check: Fully validate the stack frame

2020-10-12 Thread Josh Poimboeuf
On Mon, Oct 12, 2020 at 11:21:49AM +0100, Julien Thierry wrote: > On 9/29/20 8:18 PM, Josh Poimboeuf wrote: > > "Stack frame" has more than one meaning now, I suppose. i.e. it could > > also include the callee-saved registers and any other stack space > > allocated by the function. > > > > Would

Re: [PATCH] ARM: dts: sun8i: h2+: Enable optional SPI flash on Orange Pi Zero board

2020-10-12 Thread Maxime Ripard
On Thu, Oct 08, 2020 at 07:40:44PM +0200, Michal Suchánek wrote: > On Thu, Oct 08, 2020 at 07:14:54PM +0200, Maxime Ripard wrote: > > On Thu, Oct 08, 2020 at 06:02:19PM +0200, Michal Suchánek wrote: > > > On Thu, Oct 08, 2020 at 05:13:15PM +0200, Maxime Ripard wrote: > > > > Hi, > > > > > > > > On

Re: [PATCH v7 2/2] PCI: dwc: Fix MSI page leakage in suspend/resume

2020-10-12 Thread Vidya Sagar
On 10/12/2020 5:07 PM, Robin Murphy wrote: External email: Use caution opening links or attachments On 2020-10-09 08:55, Jisheng Zhang wrote: Currently, dw_pcie_msi_init() allocates and maps page for msi, then program the PCIE_MSI_ADDR_LO and PCIE_MSI_ADDR_HI. The Root Complex may lose powe

Re: [PATCH v3 0/2] nvmem: skip nodes with compatibles other than "nvmem-cell"

2020-10-12 Thread Ahmad Fatoum
Hello Rob, Hello Srini, On 5/12/20 4:18 PM, Rob Herring wrote: > On Tue, Apr 28, 2020 at 01:18:25PM +0200, Ahmad Fatoum wrote: >> The nvmem cell binding applies to all objects which match "^.*@[0-9a-f]+$", >> without taking a compatible into account. This precludes extension of e.g. >> eeprom node

Re: [PATCH 1/5] tracing: Don't show dynamic string internals in synthetic event description

2020-10-12 Thread Tom Zanussi
Hi Masami, On Sun, 2020-10-11 at 00:03 +0900, Masami Hiramatsu wrote: > Hi Tom, > > On Fri, 9 Oct 2020 10:17:07 -0500 > Tom Zanussi wrote: > > > For synthetic event dynamic fields, the type contains "__data_loc", > > which is basically an internal part of the type which is only meant > > to >

Re: [PATCH] kthread: Add kthread_work tracepoints

2020-10-12 Thread Steven Rostedt
On Mon, 12 Oct 2020 08:14:50 -0700 Rob Clark wrote: > > DEFINE_EVENT(sched_kthread_work_execute_template, > > sched_kthread_work_execute_start, > > TP_PROTO(struct kthread_work *work), > > TP_ARGS(work)); > > > > DEFINE_EVENT(sched_kthread_work_execute_template, > > sched_kthrea

Re: [PATCH 0/5] tracing: Synthetic event dynamic string fixes

2020-10-12 Thread Tom Zanussi
Hi Steve, On Mon, 2020-10-12 at 11:13 -0400, Steven Rostedt wrote: > On Fri, 9 Oct 2020 10:17:06 -0500 > Tom Zanussi wrote: > > > These patches provide fixes for the problems observed by Masami in > > the > > new synthetic event dynamic string patchset. > > > > The first patch (tracing: Don't

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

2020-10-12 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

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

2020-10-12 Thread Yu-cheng Yu
Control-flow Enforcement (CET) is a new Intel processor feature that blocks return/jump-oriented programming attacks. Details are in "Intel 64 and IA-32 Architectures Software Developer's Manual" [1]. CET can protect applications and the kernel. This series enables only application-level protect

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

2020-10-12 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 (Privilege

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

2020-10-12 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 processors

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

2020-10-12 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 u

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

2020-10-12 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 --- .../admin-guide/kernel-parameters.txt | 6 + Documentation/x86/index.rst | 1 + Doc

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

2020-10-12 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/linux/mm.h | 2 ++ include/linux/pg

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

2020-10-12 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

Re: [PATCH 02/18] dt-bindings: usb: usb-hcd: Add "wireless" maximum-speed property value

2020-10-12 Thread Greg Kroah-Hartman
On Sun, Oct 11, 2020 at 08:53:33PM +0300, Serge Semin wrote: > On Sun, Oct 11, 2020 at 04:42:36PM +0200, Greg Kroah-Hartman wrote: > > On Sun, Oct 11, 2020 at 01:41:05AM +0300, Serge Semin wrote: > > > It appears that the "maximum-speed" property can also accept the > > > "wireless" value. Add it t

[PATCH v14 21/26] x86/cet/shstk: Handle signals for shadow stack

2020-10-12 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 stack.

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

2020-10-12 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 VM_WR

[PATCH v14 22/26] binfmt_elf: Define GNU_PROPERTY_X86_FEATURE_1_AND properties

2020-10-12 Thread Yu-cheng Yu
An ELF file's .note.gnu.property indicates architecture features of the file.. Introduce feature definitions for Shadow Stack and Indirect Branch Tracking. Signed-off-by: Yu-cheng Yu --- include/uapi/linux/elf.h | 9 + 1 file changed, 9 insertions(+) diff --git a/include/uapi/linux/elf.

[PATCH v14 26/26] mm: Introduce PROT_SHSTK for shadow stack

2020-10-12 Thread Yu-cheng Yu
There are three possible options to create a shadow stack allocation API: an arch_prctl, a new syscall, or adding PROT_SHSTK to mmap()/mprotect(). Each has its advantages and compromises. An arch_prctl() is the least intrusive. However, the existing x86 arch_prctl() takes only two parameters. Mu

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

2020-10-12 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 can_follow

[PATCH v14 24/26] x86/cet/shstk: Handle thread shadow stack

2020-10-12 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 thi

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

2020-10-12 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 Co

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

2020-10-12 Thread Yu-cheng Yu
An ELF file's .note.gnu.property indicates arch features supported by the file. These features are extracted by arch_parse_elf_property() and stored in 'arch_elf_state'. Introduce arch_setup_elf_property() for enabling such features. The first use-case of this function is shadow stack. ARM64 is

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

2020-10-12 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 --- arch/x86/include/as

Re: [tip: objtool/core] x86/insn: Support big endian cross-compiles

2020-10-12 Thread Josh Poimboeuf
On Mon, Oct 12, 2020 at 09:12:36AM +0900, Masami Hiramatsu wrote: > On Sat, 10 Oct 2020 12:44:15 -0500 > Josh Poimboeuf wrote: > > > On Fri, Oct 09, 2020 at 10:49:21PM +0200, Borislav Petkov wrote: > > > On Fri, Oct 09, 2020 at 10:38:22PM +0200, Peter Zijlstra wrote: > > > > On Wed, Oct 07, 2020

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

2020-10-12 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, p

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

2020-10-12 Thread Yu-cheng Yu
Account shadow stack pages to stack memory. Signed-off-by: Yu-cheng Yu --- arch/x86/mm/pgtable.c | 7 +++ include/linux/pgtable.h | 11 +++ mm/mmap.c | 5 + 3 files changed, 23 insertions(+) diff --git a/arch/x86/mm/pgtable.c b/arch/x86/mm/pgtable.c index a9666

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

2020-10-12 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: Christoph Hellwig Cc: Andy Lutomirski Cc: Ingo Molnar Cc: Borislav Petkov C

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

2020-10-12 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 ar

[PATCH v14 19/26] mm: Re-introduce vm_flags to do_mmap()

2020-10-12 Thread Yu-cheng Yu
There was no more caller passing vm_flags to do_mmap(), and vm_flags was removed from the function's input by: commit 45e55300f114 ("mm: remove unnecessary wrapper function do_mmap_pgoff()"). There is a new user now. Shadow stack allocation passes VM_SHSTK to do_mmap(). Re-introduce vm_fla

[PATCH v14 20/26] x86/cet/shstk: User-mode shadow stack support

2020-10-12 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 --- arch/x86/include/asm/cet.h| 28 arch/x86/include/asm/disable

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

2020-10-12 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 v14 09/26] drm/i915/gvt: Change _PAGE_DIRTY to _PAGE_DIRTY_BITS

2020-10-12 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: Zhen

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

2020-10-12 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, ar

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

2020-10-12 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_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 non-shado

Re: [PATCH 0/3] f_accessory upstream

2020-10-12 Thread Felipe Balbi
Hi, rickyniu writes: > Below commit is to add log and send uevent: > 0003-ANDROID-usb-f_accessory-send-uevent-for-51-52-reques.patch if you're sending something new... > Benoit Goby (1): > ANDROID: usb: gadget: f_accessory: Add Android Accessory function > > Vijayavardhan Vennapusa (1): >

[PATCH v2] powerpc/mm: Add mask of always present MMU features

2020-10-12 Thread Christophe Leroy
On the same principle as commit 773edeadf672 ("powerpc/mm: Add mask of possible MMU features"), add mask for MMU features that are always there in order to optimise out dead branches. Signed-off-by: Christophe Leroy --- v2: Features must be anded with MMU_FTRS_POSSIBLE instead of ~0, otherwise

Re: [PATCH v2 07/22] drm/msm: Do rpm get sooner in the submit path

2020-10-12 Thread Rob Clark
On Mon, Oct 12, 2020 at 7:35 AM Daniel Vetter wrote: > > On Sun, Oct 11, 2020 at 07:09:34PM -0700, Rob Clark wrote: > > From: Rob Clark > > > > Unfortunately, due to an dev_pm_opp locking interaction with > > mm->mmap_sem, we need to do pm get before aquiring obj locks, > > otherwise we can have

Re: [PATCH] arm64: dts: allwinner: pinetab: Drop unnecessary address/size-cells information

2020-10-12 Thread Maxime Ripard
On Sun, Oct 11, 2020 at 11:15:14PM +0200, Clément Péron wrote: > make dtbs_check warm about unknown address/size-cells property in the > pinetab device-tree. > > This is because these information are not necessary. > > Drop them. > > Signed-off-by: Clément Péron Queued as a fix for 5.10 Thank

[PATCH v14 3/7] x86/cet/ibt: Handle signals for Indirect Branch Tracking

2020-10-12 Thread Yu-cheng Yu
An indirect CALL/JMP moves the indirect branch tracking (IBT) state machine to WAIT_ENDBR status until the instruction reaches an ENDBR opcode. If the CALL/JMP does not reach an ENDBR opcode, the processor raises a control- protection fault. WAIT_ENDBR status can be read from MSR_IA32_U_CET. WAI

[PATCH v14 4/7] x86/cet/ibt: ELF header parsing for Indirect Branch Tracking

2020-10-12 Thread Yu-cheng Yu
Update arch_setup_elf_property() for Indirect Branch Tracking. Signed-off-by: Yu-cheng Yu --- arch/x86/Kconfig | 2 ++ arch/x86/kernel/process_64.c | 8 2 files changed, 10 insertions(+) diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig index 15c7f2606c9d..cc9876f85e91 10064

[PATCH v14 6/7] x86/vdso/32: Add ENDBR32 to __kernel_vsyscall entry point

2020-10-12 Thread Yu-cheng Yu
From: "H.J. Lu" Add ENDBR32 to __kernel_vsyscall entry point. Signed-off-by: H.J. Lu Signed-off-by: Yu-cheng Yu Acked-by: Andy Lutomirski --- arch/x86/entry/vdso/vdso32/system_call.S | 3 +++ 1 file changed, 3 insertions(+) diff --git a/arch/x86/entry/vdso/vdso32/system_call.S b/arch/x86/e

[PATCH v14 0/7] Control-flow Enforcement: Indirect Branch Tracking

2020-10-12 Thread Yu-cheng Yu
Control-flow Enforcement (CET) is a new Intel processor feature that blocks return/jump-oriented programming attacks. Details are in "Intel 64 and IA-32 Architectures Software Developer's Manual" [1]. This is the second part of CET and enables Indirect Branch Tracking (IBT). It is built on top of

[PATCH v14 7/7] x86/vdso: Insert endbr32/endbr64 to vDSO

2020-10-12 Thread Yu-cheng Yu
From: "H.J. Lu" When Indirect Branch Tracking (IBT) is enabled, vDSO functions may be called indirectly, and must have ENDBR32 or ENDBR64 as the first instruction. The compiler must support -fcf-protection=branch so that it can be used to compile vDSO. Signed-off-by: H.J. Lu Signed-off-by: Yu-

[PATCH v14 2/7] x86/cet/ibt: User-mode Indirect Branch Tracking support

2020-10-12 Thread Yu-cheng Yu
Introduce user-mode Indirect Branch Tracking (IBT) support. Update setup routines to include IBT. Signed-off-by: Yu-cheng Yu --- arch/x86/include/asm/cet.h| 3 ++ arch/x86/include/asm/disabled-features.h | 8 - arch/x86/kernel/cet.c | 33 ++

[PATCH v14 5/7] x86/cet/ibt: Update arch_prctl functions for Indirect Branch Tracking

2020-10-12 Thread Yu-cheng Yu
From: "H.J. Lu" Update ARCH_X86_CET_STATUS and ARCH_X86_CET_DISABLE for Indirect Branch Tracking. Signed-off-by: H.J. Lu Signed-off-by: Yu-cheng Yu --- arch/x86/kernel/cet_prctl.c | 8 +++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/arch/x86/kernel/cet_prctl.c b/arch/x86

[PATCH v14 1/7] x86/cet/ibt: Add Kconfig option for user-mode Indirect Branch Tracking

2020-10-12 Thread Yu-cheng Yu
Introduce Kconfig option X86_BRANCH_TRACKING_USER. Indirect Branch Tracking (IBT) provides protection against CALL-/JMP- oriented programming attacks. It is active when the kernel has this feature enabled, and the processor and the application support it. When this feature is enabled, legacy non-

RE: [PATCH v2 1/1] i2c: ocores: fix polling mode workaround on FU540-C000 SoC

2020-10-12 Thread Sagar Kadam
> -Original Message- > From: Andreas Schwab > Sent: Friday, October 9, 2020 11:55 PM > To: Sagar Kadam > Cc: linux-kernel@vger.kernel.org; linux-ri...@lists.infradead.org; linux- > i...@vger.kernel.org; pe...@korsgaard.com; and...@lunn.ch; Paul > Walmsley ( Sifive) ; pal...@dabbelt.com;

[PATCH v2] dt-bindings: cpufreq: cpufreq-qcom-hw: Convert to YAML bindings

2020-10-12 Thread Manivannan Sadhasivam
Convert Qualcomm cpufreq devicetree binding to YAML. Signed-off-by: Manivannan Sadhasivam --- Changes in v2: * Removed qcom,freq-domain property which doesn't belong to this binding .../bindings/cpufreq/cpufreq-qcom-hw.txt | 172 --- .../bindings/cpufreq/cpufreq-qcom-hw.yaml

Re: [PATCH v2 2/2] [RFC] CPUFreq: Add support for cpu-perf-dependencies

2020-10-12 Thread Sudeep Holla
On Fri, Oct 09, 2020 at 11:09:21AM +0530, Viresh Kumar wrote: > On 08-10-20, 17:00, Nicola Mazzucato wrote: > > On 10/8/20 4:03 PM, Ionela Voinescu wrote: > > > Hi Viresh, > > > > > > On Thursday 08 Oct 2020 at 16:32:41 (+0530), Viresh Kumar wrote: > > >> On 07-10-20, 13:58, Nicola Mazzucato wrote

Re: [PATCH v2 2/2] [RFC] CPUFreq: Add support for cpu-perf-dependencies

2020-10-12 Thread Sudeep Holla
On Fri, Oct 09, 2020 at 09:01:41AM -0500, Rob Herring wrote: > On Fri, Oct 09, 2020 at 12:10:03PM +0100, Nicola Mazzucato wrote: > > Hi Viresh, I'm glad it helped. > > > > Please find below my reply. > > > > On 10/9/20 6:39 AM, Viresh Kumar wrote: > > > On 08-10-20, 17:00, Nicola Mazzucato wrote: >

[GIT PULL] Static calls for v5.10

2020-10-12 Thread Ingo Molnar
Linus, Please pull the latest core/static_call git tree from: git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git core-static_call-2020-10-12 # HEAD: 69e0ad37c9f32d5aa1beb02aab4ec0cd055be013 static_call: Fix return type of static_call_init This tree introduces static_call(), which

Re: [PATCH 1/3] ANDROID: usb: gadget: f_accessory: Add Android Accessory function

2020-10-12 Thread Felipe Balbi
Hi, rickyniu writes: > From: Benoit Goby missing Signed-off-by for author > USB accessory mode allows users to connect USB host hardware > specifically designed for Android-powered devices. The accessories > must adhere to the Android accessory protocol outlined in the > http://accessories.an

Re: [linux-safety] [PATCH] usb: host: ehci-sched: add comment about find_tt() not returning error

2020-10-12 Thread Alan Stern
On Mon, Oct 12, 2020 at 05:10:21PM +0200, Lukas Bulwahn wrote: > > > On Mon, 12 Oct 2020, Alan Stern wrote: > > Real code contains so many assumptions, especially if you include ones > > which are obvious to everybody, that such a tool seems impractical. > > > > I fear that problem applies to a

Re: [PATCH v2 2/4] dt-bindings: usb: add properties for hard wired devices

2020-10-12 Thread Rob Herring
On Sat, Oct 10, 2020 at 04:43:12PM +0800, Chunfeng Yun wrote: > Add some optional properties which are needed for hard wired devices > > Signed-off-by: Chunfeng Yun > --- > v2 changes suggested by Rob: >1. modify pattern to support any USB class >2. refer to usb-device.yaml instead of usb

Re: [PATCH v1 02/15] perf report: output trace file name in raw trace dump

2020-10-12 Thread Andi Kleen
On Mon, Oct 12, 2020 at 11:54:24AM +0300, Alexey Budankov wrote: > @@ -180,7 +183,8 @@ static int ordered_events__deliver_event(struct > ordered_events *oe, > ordered_events); > > return perf_session__deliver_event(session, event->event, >

Re: [PATCH v2 2/2] [RFC] CPUFreq: Add support for cpu-perf-dependencies

2020-10-12 Thread Sudeep Holla
On Mon, Oct 12, 2020 at 11:22:57AM +0100, Lukasz Luba wrote: [...] > > True, the SCMI clock does not support discovery of clock tree: > (from 4.6.1 Clock management protocol background) > 'The protocol does not cover discovery of the clock tree, which must be > described through firmware tables i

Re: [PATCH 0/4] powercap/dtpm: Add the DTPM framework

2020-10-12 Thread Daniel Lezcano
On 12/10/2020 13:46, Hans de Goede wrote: > Hi Daniel, > > On 10/12/20 12:30 PM, Daniel Lezcano wrote: >> >> Hi Hans, >> >> On 07/10/2020 12:43, Hans de Goede wrote: >>> Hi, >>> >>> On 10/6/20 2:20 PM, Daniel Lezcano wrote: The density of components greatly increased the last decade bringing

Re: [PATCH v1 03/15] perf data: open data directory in read access mode

2020-10-12 Thread Andi Kleen
On Mon, Oct 12, 2020 at 11:55:07AM +0300, Alexey Budankov wrote: > > Open files located at data directory in case of read access mode. Need some rationale. Is this a bug fix? Did the case not matter before? > > Signed-off-by: Alexey Budankov > --- > tools/perf/util/data.c | 4 > 1 file c

Re: [External] Re: [PATCH] mm: memcontrol: localize mem_cgroup_sockets_enabled() check

2020-10-12 Thread Muchun Song
On Mon, Oct 12, 2020 at 9:59 PM Johannes Weiner wrote: > > On Sat, Oct 10, 2020 at 06:45:21PM +0800, Muchun Song wrote: > > Move the mem_cgroup_sockets_enabled() checks into memcg socket charge > > or uncharge functions, so the users don't have to explicitly check that > > condition. > > > > This

Re: [PATCH v1 05/15] perf session: introduce decompressor into trace reader object

2020-10-12 Thread Andi Kleen
On Mon, Oct 12, 2020 at 11:57:00AM +0300, Alexey Budankov wrote: > diff --git a/tools/perf/util/session.h b/tools/perf/util/session.h > index abdb8518a81f..4fc9ccdf7970 100644 > --- a/tools/perf/util/session.h > +++ b/tools/perf/util/session.h > @@ -42,6 +42,7 @@ struct reader { > u64

Re: [PATCH v2 2/2] [RFC] CPUFreq: Add support for cpu-perf-dependencies

2020-10-12 Thread Sudeep Holla
On Thu, Oct 08, 2020 at 05:57:23PM +0200, Rafael J. Wysocki wrote: > On Thu, Oct 8, 2020 at 5:03 PM Ionela Voinescu > wrote: [...] > > >The PSD domains (ACPI) and the new DT binding will tell > >which CPUs are actually in the same clock domain for whomever is > >interested, despite

Re: [PATCH 5/5] x86/kvm: Add KVM_FEATURE_MSI_EXT_DEST_ID

2020-10-12 Thread David Woodhouse
On Mon, 2020-10-12 at 11:33 +0200, Thomas Gleixner wrote: > On Sun, Oct 11 2020 at 22:15, David Woodhouse wrote: > > On 11 October 2020 18:12:08 BST, Thomas Gleixner wrote: > > > On Sat, Oct 10 2020 at 12:58, David Woodhouse wrote: > > > > On 10 October 2020 12:44:10 BST, Thomas Gleixner > > > >

Re: [PATCH] qla2xxx: Return EBUSY on fcport deletion

2020-10-12 Thread Arun Easi
On Mon, 12 Oct 2020, 2:11am, Daniel Wagner wrote: > When the fcport is about to be deleted we should return EBUSY instead > of ENODEV. Only for EBUSY the request will be requeued in a multipath > setup. > > Also in case we have a valid qpair but the firmware has not yet > started return EBUSY to

Re: [PATCH v3] kcov, usb: specify contexts for remote coverage sections

2020-10-12 Thread Marco Elver
On Mon, 12 Oct 2020 at 17:25, Andrey Konovalov wrote: > > Currently there's a KCOV remote coverage collection section in > __usb_hcd_giveback_urb(). Initially that section was added based on the > assumption that usb_hcd_giveback_urb() can only be called in interrupt > context as indicated by a co

Re: [PATCH v1 06/15] perf session: load data directory into tool process memory

2020-10-12 Thread Andi Kleen
On Mon, Oct 12, 2020 at 11:58:58AM +0300, Alexey Budankov wrote: > > Read trace files located at data directory into tool process memory. > Basic analysis support of data directories is provided for report > mode. Raw dump (-D) and aggregated reports are available for data > directories, still wit

<    6   7   8   9   10   11   12   13   14   15   >