Re: Linux 5.12-rc5

2021-03-29 Thread Guenter Roeck
On 3/29/21 11:05 AM, Linus Torvalds wrote:
> On Sun, Mar 28, 2021 at 7:07 PM Guenter Roeck  wrote:
>>
>> This is not really a new problem. I enabled devicetree unit tests
>> in the openrisc kernel and was rewarded with a crash.
>> https://lore.kernel.org/lkml/20210327224116.69309-1-li...@roeck-us.net/
>> has all the glorious details.
> 
> Hmm.
> 
> I'm not sure I love that patch.
> 

Me not either. I did point out that it doesn't fix the problem, only
the impact. Fixing the dt unittest code would have been easy enough,
but I wasn't sure how to properly address the problem in the dt overlay
code, and I was concerned that other code might be affected as well,
so I gave up trying and settled on error handling.

Looks like Frank is going to provide a proper fix, so we should be covered.

Thanks,
Guenter


Re: Linux 5.12-rc5

2021-03-29 Thread Frank Rowand
On 3/29/21 1:41 PM, Rob Herring wrote:
> n Mon, Mar 29, 2021 at 1:05 PM Linus Torvalds
>  wrote:
>>
>> On Sun, Mar 28, 2021 at 7:07 PM Guenter Roeck  wrote:
>>>
>>> This is not really a new problem. I enabled devicetree unit tests
>>> in the openrisc kernel and was rewarded with a crash.
>>> https://lore.kernel.org/lkml/20210327224116.69309-1-li...@roeck-us.net/
>>> has all the glorious details.
>>
>> Hmm.
>>
>> I'm not sure I love that patch.
>>
>> I don't think the patch is _wrong_ per se, but if that "require 8 byte
>> alignment" is a problem, then this seems to be papering over the issue
>> rather than fixing it.
>>
>> So your patch protects from a NULL pointer dereference, but the
>> underlying issue seems to be a regression, and the fix sounds like the
>> kernel shouldn't be so strict about alignment requirements.
> 
> In the interest of the DT unittests not panicking and halting boot, I
> think we should handle NULL pointer.

Agreed.

> 
>> I guess we could make ARCH_SLAB_MINALIGN be at least 8 (perhaps only
>> if the allocations is >= 8) but honestly, I don't think libfdt merits
>> making such a big change. Small allocations are actually not uncommon
>> in the kernel, and on 32-bit architectures I think 4-byte allocations
>> are normal.
>>
>> So I'd be inclined to just remove the new
>>
>> /* The device tree must be at an 8-byte aligned address */
>> if ((uintptr_t)fdt & 7)
>> return -FDT_ERR_ALIGNMENT;
>>
>> check in scripts/dtc/libfdt/fdt.c which I assume is the source of the
>> problem. Rob?
> 
> That is the source, but I'd rather not remove it as we try to avoid
> any modifications from upstream. And we've found a couple of cases of
> not following documented alignment requirements.

Agreed to not remove.  We can be properly aligned without changing
kmemdup().

> 
>> Your patch to then avoid the NULL pointer dereference seems to be then
>> an additional safety, but not fixing the actual regression.
> 
> I think the right fix is not using kmemdup which copies the unittest dtb.A

This is not the only place a kmemdup() is used by overlays.

I'll create a patch this week to fix all of the kmemdup() locations and add
the null pointer check.

-Frank

> 
> Rob
> 



Re: Linux 5.12-rc5

2021-03-29 Thread Rob Herring
n Mon, Mar 29, 2021 at 1:05 PM Linus Torvalds
 wrote:
>
> On Sun, Mar 28, 2021 at 7:07 PM Guenter Roeck  wrote:
> >
> > This is not really a new problem. I enabled devicetree unit tests
> > in the openrisc kernel and was rewarded with a crash.
> > https://lore.kernel.org/lkml/20210327224116.69309-1-li...@roeck-us.net/
> > has all the glorious details.
>
> Hmm.
>
> I'm not sure I love that patch.
>
> I don't think the patch is _wrong_ per se, but if that "require 8 byte
> alignment" is a problem, then this seems to be papering over the issue
> rather than fixing it.
>
> So your patch protects from a NULL pointer dereference, but the
> underlying issue seems to be a regression, and the fix sounds like the
> kernel shouldn't be so strict about alignment requirements.

In the interest of the DT unittests not panicking and halting boot, I
think we should handle NULL pointer.

> I guess we could make ARCH_SLAB_MINALIGN be at least 8 (perhaps only
> if the allocations is >= 8) but honestly, I don't think libfdt merits
> making such a big change. Small allocations are actually not uncommon
> in the kernel, and on 32-bit architectures I think 4-byte allocations
> are normal.
>
> So I'd be inclined to just remove the new
>
> /* The device tree must be at an 8-byte aligned address */
> if ((uintptr_t)fdt & 7)
> return -FDT_ERR_ALIGNMENT;
>
> check in scripts/dtc/libfdt/fdt.c which I assume is the source of the
> problem. Rob?

That is the source, but I'd rather not remove it as we try to avoid
any modifications from upstream. And we've found a couple of cases of
not following documented alignment requirements.

> Your patch to then avoid the NULL pointer dereference seems to be then
> an additional safety, but not fixing the actual regression.

I think the right fix is not using kmemdup which copies the unittest dtb.

Rob


Re: Linux 5.12-rc5

2021-03-29 Thread Linus Torvalds
On Sun, Mar 28, 2021 at 7:07 PM Guenter Roeck  wrote:
>
> This is not really a new problem. I enabled devicetree unit tests
> in the openrisc kernel and was rewarded with a crash.
> https://lore.kernel.org/lkml/20210327224116.69309-1-li...@roeck-us.net/
> has all the glorious details.

Hmm.

I'm not sure I love that patch.

I don't think the patch is _wrong_ per se, but if that "require 8 byte
alignment" is a problem, then this seems to be papering over the issue
rather than fixing it.

So your patch protects from a NULL pointer dereference, but the
underlying issue seems to be a regression, and the fix sounds like the
kernel shouldn't be so strict about alignment requirements.

I guess we could make ARCH_SLAB_MINALIGN be at least 8 (perhaps only
if the allocations is >= 8) but honestly, I don't think libfdt merits
making such a big change. Small allocations are actually not uncommon
in the kernel, and on 32-bit architectures I think 4-byte allocations
are normal.

So I'd be inclined to just remove the new

/* The device tree must be at an 8-byte aligned address */
if ((uintptr_t)fdt & 7)
return -FDT_ERR_ALIGNMENT;

check in scripts/dtc/libfdt/fdt.c which I assume is the source of the
problem. Rob?

Your patch to then avoid the NULL pointer dereference seems to be then
an additional safety, but not fixing the actual regression.

  Linus


Re: Linux 5.12-rc5

2021-03-28 Thread Guenter Roeck
On Sun, Mar 28, 2021 at 04:05:54PM -0700, Linus Torvalds wrote:
> So if rc4 was perhaps a bit smaller than average, it looks like rc5 is
> a bigger than average.  We're not breaking any records, but it
> certainly isn't tiny, and the rc's aren't shrinking.
> 
> I'm not overly worried yet, but let's just say that the trend had
> better not continue, or I'll start feeling like we will need to make
> this one of those releases that need an rc8.
> 
> Most of the changes are drivers (gpu and networking stand out, but
> there's various other smaller driver updates elsewhere too) with core
> networking (including bpf) fixes being another noticeable subsystem.
> 
> Other than that, there's a smattering of noise all over: minor arch
> fixes, some filesystem fixes (btrfs, cifs, squashfs), selinux, perf
> tools, documentation.
> 
> io_uring continues to have noise in it, this time mainly due to some
> signal handling fixes. That removed a fair amount of problematic
> special casing, but the timing certainly isn't great.
> 
> So again, nothing really scary, just rather more than I would have
> liked to have in an rc5.
> 
> Shortlog appended for people who want to delve into the details,
> 

Build results:
total: 151 pass: 151 fail: 0
Qemu test results:
total: 458 pass: 457 fail: 1
Failed tests:
openrisc:or1ksim_defconfig

This is not really a new problem. I enabled devicetree unit tests
in the openrisc kernel and was rewarded with a crash.
https://lore.kernel.org/lkml/20210327224116.69309-1-li...@roeck-us.net/
has all the glorious details.

Guenter


Linux 5.12-rc5

2021-03-28 Thread Linus Torvalds
ECORD_MMAP* records

Ido Schimmel (2):
  drop_monitor: Perform cleanup upon probe registration failure
  psample: Fix user API breakage

Ilya Lipnitskiy (1):
  net: dsa: mt7530: setup core clock even in TRGMII mode

Imre Deak (4):
  drm/i915/ilk-glk: Fix link training on links with LTTPRs
  drm/i915: Disable LTTPR support when the DPCD rev < 1.4
  drm/i915: Disable LTTPR support when the LTTPR rev < 1.4
  drm/i915: Fix the GT fence revocation runtime PM logic

Ira Weiny (1):
  mm/highmem: fix CONFIG_DEBUG_KMAP_LOCAL_FORCE_MAP

Isaku Yamahata (1):
  x86/mem_encrypt: Correct physical address calculation in
__set_clr_pte_enc()

Jackie Liu (1):
  perf top: Fix BPF support related crash with
perf_event_paranoid=3 + kptr_restrict

Jakub Kicinski (1):
  ipv6: weaken the v4mapped source check

Jani Nikula (1):
  drm/i915/dsc: fix DSS CTL register usage for ICL DSI transcoders

Jarod Wilson (1):
  wireless/nl80211: fix wdev_id may be used uninitialized

Jean-Philippe Brucker (2):
  libbpf: Fix BTF dump of pointer-to-array-of-struct
  selftests/bpf: Add selftest for pointer-to-array-of-struct BTF dump

Jens Axboe (9):
  io_uring: don't use {test,clear}_tsk_thread_flag() for current
  io-wq: fix race around pending work on teardown
  kernel: don't call do_exit() for PF_IO_WORKER threads
  io_uring: handle signals for IO threads like a normal thread
  kernel: stop masking signals in create_io_thread()
  Revert "signal: don't allow sending any signals to PF_IO_WORKER threads"
  Revert "kernel: treat PF_IO_WORKER like PF_KTHREAD for ptrace/signals"
  Revert "kernel: freezer should treat PF_IO_WORKER like
PF_KTHREAD for freezing"
  Revert "signal: don't allow STOP on PF_IO_WORKER threads"

JeongHyeon Lee (1):
  dm verity: fix DM_VERITY_OPTS_MAX value

Jesper Dangaard Brouer (2):
  bpf: BPF-helper for MTU checking add length input
  selftests/bpf: Tests using bpf_check_mtu BPF-helper input mtu_len param

Jesse Brandeburg (1):
  igb: check timestamp validity

Jia-Ju Bai (2):
  scsi: qedi: Fix error return code of qedi_alloc_global_queues()
  scsi: mpt3sas: Fix error return code of mpt3sas_base_attach()

Jimmy Assarsson (2):
  can: kvaser_pciefd: Always disable bus load reporting
  can: kvaser_usb: Add support for USBcan Pro 4xHS

Jin Yao (1):
  perf pmu: Validate raw event with sysfs exported format bits

Jiri Bohac (1):
  net: check all name nodes in __dev_alloc_name

Jiri Olsa (2):
  perf daemon: Force waipid for all session on SIGCHLD delivery
  perf daemon: Return from kill functions

Johan Hovold (1):
  net: cdc-phonet: fix data-interface release on probe failure

Johannes Berg (3):
  mac80211: fix rate mask reset
  mac80211: minstrel_ht: remove unused variable 'mg'
  nl80211: fix locking for wireless device netns change

Johannes Thumshirn (2):
  btrfs: zoned: remove outdated WARN_ON in direct IO
  block: support zone append bvecs

Jonathan Marek (1):
  drm/msm: fix a6xx_gmu_clear_oob

Jonathan Neuschäfer (1):
  MAINTAINERS: Combine "QLOGIC QLGE 10Gb ETHERNET DRIVER" sections into one

Jordan Crouse (1):
  drm/msm: a6xx: Make sure the SQE microcode is safe

Josef Bacik (3):
  btrfs: do not initialize dev stats if we have no dev_root
  btrfs: initialize device::fs_info always
  btrfs: do not initialize dev replace for bad dev root

Kalyan Thota (1):
  drm/msm/disp/dpu1: icc path needs to be set before dpu runtime resume

Karthikeyan Kathirvel (1):
  mac80211: choose first enabled channel for monitor

Kenneth Feng (1):
  drm/amd/pm: workaround for audio noise issue

Kieran Bingham (1):
  drm: rcar-du: Use drmm_encoder_alloc() to manage encoder

Konrad Dybcio (1):
  drm/msm/adreno: a5xx_power: Don't apply A540 lm_setup to other GPUs

Kumar Kartikeya Dwivedi (1):
  libbpf: Use SOCK_CLOEXEC when opening the netlink socket

Lang Cheng (1):
  RDMA/hns: Fix bug during CMDQ initialization

Leo Yan (1):
  perf test: Change to use bash for daemon test

Li RongQing (1):
  igb: avoid premature Rx buffer reuse

Lijun Pan (1):
  ibmvnic: update MAINTAINERS

Linus Torvalds (1):
  Linux 5.12-rc5

Louis Peens (3):
  nfp: flower: fix unsupported pre_tunnel flows
  nfp: flower: add ipv6 bit to pre_tunnel control message
  nfp: flower: fix pre_tun mask id allocation

Ludovic Senecaux (1):
  netfilter: conntrack: Fix gre tunneling over ipv6

Lukas Bulwahn (1):
  MAINTAINERS: rectify BROADCOM PMB (POWER MANAGEMENT BUS) DRIVER

Lukasz Luba (1):
  PM: EM: postpone creating the debugfs dir till fs_initcall

Lv Yunlong (1):
  net/qlcnic: Fix a use after free in qlcnic_83xx_get_minidump_template

Lyude Paul (1):
  drm/nouveau/kms/nve4-nv108: Limit cursors to 128x128

Maciej Fija

Re: [GIT PULL] KUnit fixes update for Linux 5.12-rc5

2021-03-23 Thread pr-tracker-bot
The pull request you sent on Tue, 23 Mar 2021 11:10:16 -0600:

> git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest 
> tags/linux-kselftest-kunit-fixes-5.12-rc5.1

has been merged into torvalds/linux.git:
https://git.kernel.org/torvalds/c/7acac4b3196caee5e21fb5ea53f8bc124e6a16fc

Thank you!

-- 
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/prtracker.html


[GIT PULL] KUnit fixes update for Linux 5.12-rc5

2021-03-23 Thread Shuah Khan

Hi Linus,

Please pull the following KUnit fixes update for Linux 5.12-rc5.

This KUnit update for Linux 5.12-rc5 consists of two fixes to kunit
tool from David Gow.

diff is attached.

thanks,
-- Shuah



The following changes since commit a38fd8748464831584a19438cbb3082b5a2dab15:

  Linux 5.12-rc2 (2021-03-05 17:33:41 -0800)

are available in the Git repository at:

  git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest 
tags/linux-kselftest-kunit-fixes-5.12-rc5.1


for you to fetch changes up to 7fd53f41f771d250eb08db08650940f017e37c26:

  kunit: tool: Disable PAGE_POISONING under --alltests (2021-03-11 
14:37:37 -0700)



linux-kselftest-kunit-fixes-5.12-rc5.1

This KUnit update for Linux 5.12-rc5 consists of two fixes to kunit
tool from David Gow.


David Gow (2):
  kunit: tool: Fix a python tuple typing error
  kunit: tool: Disable PAGE_POISONING under --alltests

 tools/testing/kunit/configs/broken_on_uml.config | 2 ++
 tools/testing/kunit/kunit_config.py  | 2 +-
 2 files changed, 3 insertions(+), 1 deletion(-)



diff --git a/tools/testing/kunit/configs/broken_on_uml.config b/tools/testing/kunit/configs/broken_on_uml.config
index a7f0603d33f6..690870043ac0 100644
--- a/tools/testing/kunit/configs/broken_on_uml.config
+++ b/tools/testing/kunit/configs/broken_on_uml.config
@@ -40,3 +40,5 @@
 # CONFIG_RESET_BRCMSTB_RESCAL is not set
 # CONFIG_RESET_INTEL_GW is not set
 # CONFIG_ADI_AXI_ADC is not set
+# CONFIG_DEBUG_PAGEALLOC is not set
+# CONFIG_PAGE_POISONING is not set
diff --git a/tools/testing/kunit/kunit_config.py b/tools/testing/kunit/kunit_config.py
index 0b550cbd667d..1e2683dcc0e7 100644
--- a/tools/testing/kunit/kunit_config.py
+++ b/tools/testing/kunit/kunit_config.py
@@ -13,7 +13,7 @@ from typing import List, Set
 CONFIG_IS_NOT_SET_PATTERN = r'^# CONFIG_(\w+) is not set$'
 CONFIG_PATTERN = r'^CONFIG_(\w+)=(\S+|".*")$'
 
-KconfigEntryBase = collections.namedtuple('KconfigEntry', ['name', 'value'])
+KconfigEntryBase = collections.namedtuple('KconfigEntryBase', ['name', 'value'])
 
 class KconfigEntry(KconfigEntryBase):