[PATCH v2] arm64: hibernate: Fix level3 translation fault in swsusp_save()

2024-02-26 Thread Yaxiong Tian
From: Yaxiong Tian On ARM64 machines using UEFI, if can_set_direct_map() return false by setting some CONFIGS in kernel build,such as NO CONFIG_DEBUG_PAGEALLOC_ENABLE_DEFAULT、NO CONFIG_RODATA_FULL_DEFAULT_ENABLED. swsusp_save() will fail due to can't finding the map table under the nomap

Re: [PATCH] PM: hibernate: Fix level3 translation fault in swsusp_save()

2024-02-26 Thread Yaxiong Tian
在 2024/2/26 17:14, Mike Rapoport 写道: On Mon, Feb 26, 2024 at 09:37:06AM +0100, David Hildenbrand wrote: On 26.02.24 04:42, Yaxiong Tian wrote: From: Yaxiong Tian On ARM64 machines using UEFI, if the linear map is not set (can_set_direct_map() return false), swsusp_save() will fail due to

Re: [PATCH] arm64: dts: qcom: msm8953-lenovo-kuntao: Add initial device tree

2024-02-26 Thread Krzysztof Kozlowski
On 27/02/2024 05:33, Raihan Ahamed wrote: > I have checked again with latest dtschema before sending version 3 it > doesn't give anything related to gpu and iommu At least the second warning looks real, but the error was already there - in the DTSI. Best regards, Krzysztof

Re: [PATCH v3 2/2] arm64: dts: qcom: msm8953-lenovo-kuntao: Add initial device tree

2024-02-26 Thread Krzysztof Kozlowski
On 26/02/2024 20:54, Raihan Ahamed wrote: > Lenovo P2 is a handset using the MSM8953 SoC released in 2016 > > Add a device tree with initial support for: > > - GPIO keys > - SDHCI (internal and external storage) > - USB Device Mode > - WCNSS (WiFi/BT) > - Regulators > > Acked-by: Rob Herring >

Re: [PATCH] arm64: dts: qcom: msm8953-lenovo-kuntao: Add initial device tree

2024-02-26 Thread Raihan Ahamed
I have checked with latest dtschema before sending version 3, it does not give anything related to gpu and iommu. On Mon, Feb 26, 2024 at 10:24 PM Rob Herring wrote: > > > On Mon, 26 Feb 2024 11:25:56 +0530, Raihan Ahamed wrote: > > Lenovo P2 is a handset using the MSM8953 SoC released in 2016 >

Re: [PATCH v3 2/2] arm64: dts: qcom: msm8953-lenovo-kuntao: Add initial device tree

2024-02-26 Thread Raihan Ahamed
Sorry, I misunderstood the fact. Is it necessary to change the tags only by sending another version? On Tue, Feb 27, 2024 at 9:25 AM Rob Herring wrote: > > On Mon, Feb 26, 2024 at 1:56 PM Raihan Ahamed > wrote: > > > > Lenovo P2 is a handset using the MSM8953 SoC released in 2016 > > > > Add a

Re: [PATCH v3 2/2] arm64: dts: qcom: msm8953-lenovo-kuntao: Add initial device tree

2024-02-26 Thread Rob Herring
On Mon, Feb 26, 2024 at 1:56 PM Raihan Ahamed wrote: > > Lenovo P2 is a handset using the MSM8953 SoC released in 2016 > > Add a device tree with initial support for: > > - GPIO keys > - SDHCI (internal and external storage) > - USB Device Mode > - WCNSS (WiFi/BT) > - Regulators > > Acked-by: Rob

Re: [PATCH v2] scsi: libfc: replace deprecated strncpy with memcpy

2024-02-26 Thread Martin K. Petersen
Justin, > strncpy() is deprecated [1] and as such we should use different apis to > copy string data. Applied to 6.9/scsi-staging, thanks! -- Martin K. Petersen Oracle Linux Engineering

Re: [PATCH v2] scsi: lpfc: replace deprecated strncpy with strscpy

2024-02-26 Thread Martin K. Petersen
Justin, > strncpy() is deprecated for use on NUL-terminated destination strings > [1] and as such we should prefer more robust and less ambiguous string > interfaces. Applied to 6.9/scsi-staging, thanks! -- Martin K. Petersen Oracle Linux Engineering

Re: [PATCH] thermal: core: Move initial num_trips assignment before memcpy()

2024-02-26 Thread Kees Cook
On Mon, Feb 26, 2024 at 05:54:58PM -0700, Nathan Chancellor wrote: > When booting a CONFIG_FORTIFY_SOURCE=y kernel compiled with a toolchain > that supports __counted_by() (such as clang-18 and newer), there is a > panic on boot: > > [2.913770] memcpy: detected buffer overflow: 72 byte

[PATCH] thermal: core: Move initial num_trips assignment before memcpy()

2024-02-26 Thread Nathan Chancellor
9ff860e79e91db44cb59bd63 change-id: 20240226-thermal-fix-fortify-panic-num_trips-5f94094fb963 Best regards, -- Nathan Chancellor

Re: [PATCH v2] scsi: lpfc: replace deprecated strncpy with strscpy

2024-02-26 Thread Kees Cook
On Mon, Feb 26, 2024 at 11:53:44PM +, Justin Stitt wrote: > strncpy() is deprecated for use on NUL-terminated destination strings > [1] and as such we should prefer more robust and less ambiguous string > interfaces. > > We expect ae->value_string to be NUL-terminated because there's a >

Re: [PATCH] proc: allow restricting /proc/pid/mem writes

2024-02-26 Thread Kees Cook
On Mon, Feb 26, 2024 at 02:37:29PM -0800, Doug Anderson wrote: > Hi, > > On Mon, Feb 26, 2024 at 2:33 PM Adrian Ratiu > wrote: > > > > > > [...] > > > > +config SECURITY_PROC_MEM_RESTRICT_WRITES > > > > > > Instead of a build-time CONFIG, I'd prefer a boot-time config (or a > > > sysctl, but

[PATCH v2] scsi: lpfc: replace deprecated strncpy with strscpy

2024-02-26 Thread Justin Stitt
strncpy() is deprecated for use on NUL-terminated destination strings [1] and as such we should prefer more robust and less ambiguous string interfaces. We expect ae->value_string to be NUL-terminated because there's a comment that says as much; these attr strings are also used with other string

Re: [PATCH] proc: allow restricting /proc/pid/mem writes

2024-02-26 Thread Doug Anderson
Hi, On Mon, Feb 26, 2024 at 2:33 PM Adrian Ratiu wrote: > > > > [...] > > > +config SECURITY_PROC_MEM_RESTRICT_WRITES > > > > Instead of a build-time CONFIG, I'd prefer a boot-time config (or a > > sysctl, but that's be harder given the perms). That this is selectable > > by distro users, etc,

Re: [PATCH] proc: allow restricting /proc/pid/mem writes

2024-02-26 Thread Adrian Ratiu
Hello On Monday, February 26, 2024 21:24 EET, Kees Cook wrote: > [sorry for the duplicate, fixing Jann's email address] > > On Mon, Feb 26, 2024 at 09:10:54AM -0800, Doug Anderson wrote: > > Hi, > > > > On Wed, Feb 21, 2024 at 1:06 PM Adrian Ratiu > > wrote: > > > > > > Prior to v2.6.39

Re: [PATCH] proc: allow restricting /proc/pid/mem writes

2024-02-26 Thread Mike Frysinger
(lemme try this again as plain text) On Mon, Feb 26, 2024 at 2:24 PM Kees Cook wrote: > On Mon, Feb 26, 2024 at 09:10:54AM -0800, Doug Anderson wrote: > > On Wed, Feb 21, 2024 at 1:06 PM Adrian Ratiu > > wrote: > > + if (ptracer_capable(current, mm->user_ns) && > > It really looks like

[PATCH v3 2/2] arm64: dts: qcom: msm8953-lenovo-kuntao: Add initial device tree

2024-02-26 Thread Raihan Ahamed
Lenovo P2 is a handset using the MSM8953 SoC released in 2016 Add a device tree with initial support for: - GPIO keys - SDHCI (internal and external storage) - USB Device Mode - WCNSS (WiFi/BT) - Regulators Acked-by: Rob Herring Acked-by: Krzysztof Kozlowski Signed-off-by: Raihan Ahamed ---

[PATCH v3 1/2] dt-bindings: arm: qcom: Add Lenovo P2

2024-02-26 Thread Raihan Ahamed
Document the compatible for the MSM8953-based Lenovo P2 smartphone released in 2016. Acked-by: Krzysztof Kozlowski Signed-off-by: Raihan Ahamed --- Documentation/devicetree/bindings/arm/qcom.yaml | 1 + 1 file changed, 1 insertion(+) diff --git

Re: [PATCH] proc: allow restricting /proc/pid/mem writes

2024-02-26 Thread Kees Cook
[sorry for the duplicate, fixing Jann's email address] On Mon, Feb 26, 2024 at 09:10:54AM -0800, Doug Anderson wrote: > Hi, > > On Wed, Feb 21, 2024 at 1:06 PM Adrian Ratiu > wrote: > > > > Prior to v2.6.39 write access to /proc//mem was restricted, > > after which it got allowed in commit

Re: [PATCH] proc: allow restricting /proc/pid/mem writes

2024-02-26 Thread Kees Cook
On Mon, Feb 26, 2024 at 09:10:54AM -0800, Doug Anderson wrote: > Hi, > > On Wed, Feb 21, 2024 at 1:06 PM Adrian Ratiu > wrote: > > > > Prior to v2.6.39 write access to /proc//mem was restricted, > > after which it got allowed in commit 198214a7ee50 ("proc: enable > > writing to /proc/pid/mem").

Re: [PATCH v2 1/2] dt-bindings: arm: qcom: Add Lenovo P2

2024-02-26 Thread Krzysztof Kozlowski
On 26/02/2024 10:41, Raihan Ahamed wrote: > Document the compatible for the MSM8953-based Lenovo P2 > > smartphone released in 2016 It seems you split one sentence over multiple lines. Please join them and finish with full stop. Also, this appeared in some odd place. Do not attach (thread) your

Re: [PATCH] landlock: Warn once if a Landlock action is requested while disabled

2024-02-26 Thread Mickaël Salaün
On Mon, Feb 19, 2024 at 01:07:48PM -0800, Kees Cook wrote: > On Mon, Feb 19, 2024 at 08:18:04PM +0100, Mickaël Salaün wrote: > > Because sandboxing can be used as an opportunistic security measure, > > user space may not log unsupported features. Let the system > > administrator know if an

Re: [PATCH] landlock: Warn once if a Landlock action is requested while disabled

2024-02-26 Thread Mickaël Salaün
On Wed, Feb 21, 2024 at 10:35:50PM +0100, Günther Noack wrote: > Hello! > > I think this is a good idea. > Some minor implementation remarks below. > > On Mon, Feb 19, 2024 at 08:18:04PM +0100, Mickaël Salaün wrote: > > Because sandboxing can be used as an opportunistic security measure, > >

Re: [PATCH v2 1/2] dt-bindings: arm: qcom: Add Lenovo P2

2024-02-26 Thread Rob Herring
On Mon, 26 Feb 2024 15:11:03 +0530, Raihan Ahamed wrote: > Document the compatible for the MSM8953-based Lenovo P2 > > smartphone released in 2016 > > Signed-off-by: Raihan Ahamed > --- > Documentation/devicetree/bindings/arm/qcom.yaml | 1 + > 1 file changed, 1 insertion(+) > My bot

Re: [PATCH] arm64: dts: qcom: msm8953-lenovo-kuntao: Add initial device tree

2024-02-26 Thread Rob Herring
On Mon, 26 Feb 2024 11:25:56 +0530, Raihan Ahamed wrote: > Lenovo P2 is a handset using the MSM8953 SoC released in 2016 > > Add a device tree for with initial support for: > > - GPIO keys > - SDHCI (internal and external storage) > - USB Device Mode > - WCNSS (WiFi/BT) > - Regulators > >

Re: [PATCH v2] mtd: rawnand: Prefer struct_size over open coded arithmetic

2024-02-26 Thread Miquel Raynal
On Sun, 2024-02-11 at 09:16:33 UTC, Erick Archer wrote: > This is an effort to get rid of all multiplications from allocation > functions in order to prevent integer overflows [1]. > > As the "chip" variable is a pointer to "struct mtk_nfc_nand_chip" and > this structure ends in a flexible array:

Re: [PATCH 1/2] x86: Increase brk randomness entropy on x86_64

2024-02-26 Thread Jiri Kosina
On Fri, 16 Feb 2024, Kees Cook wrote: > In commit c1d171a00294 ("x86: randomize brk"), arch_randomize_brk() was > defined to use a 32MB range (13 bits of entropy), but was never increased > when moving to 64-bit. The default arch_randomize_brk() uses 32MB for > 32-bit tasks, and 1GB (18 bits of

[PATCH v2 2/2] arm64: dts: qcom: msm8953-lenovo-kuntao: Add initial device tree

2024-02-26 Thread Raihan Ahamed
Lenovo P2 is a handset using the MSM8953 SoC released in 2016 Add a device tree with initial support for: - GPIO keys - SDHCI (internal and external storage) - USB Device Mode - WCNSS (WiFi/BT) - Regulators Signed-off-by: Raihan Ahamed --- arch/arm64/boot/dts/qcom/Makefile | 1 +

[PATCH v2 1/2] dt-bindings: arm: qcom: Add Lenovo P2

2024-02-26 Thread Raihan Ahamed
Document the compatible for the MSM8953-based Lenovo P2 smartphone released in 2016 Signed-off-by: Raihan Ahamed --- Documentation/devicetree/bindings/arm/qcom.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/Documentation/devicetree/bindings/arm/qcom.yaml

Re: [PATCH] PM: hibernate: Fix level3 translation fault in swsusp_save()

2024-02-26 Thread Mike Rapoport
On Mon, Feb 26, 2024 at 09:37:06AM +0100, David Hildenbrand wrote: > On 26.02.24 04:42, Yaxiong Tian wrote: > > From: Yaxiong Tian > > > > On ARM64 machines using UEFI, if the linear map is not set > > (can_set_direct_map() > > return false), swsusp_save() will fail due to can't finding the map

Re: [PATCH] PM: hibernate: Fix level3 translation fault in swsusp_save()

2024-02-26 Thread David Hildenbrand
On 26.02.24 04:42, Yaxiong Tian wrote: From: Yaxiong Tian On ARM64 machines using UEFI, if the linear map is not set (can_set_direct_map() return false), swsusp_save() will fail due to can't finding the map table under the nomap memory.such as: [ 48.532162] Unable to handle kernel paging