Re: [PATCH] lsm: Resolve compiling 'security.c' error

2024-01-17 Thread Paul Moore
On Tue, Jan 16, 2024 at 8:46 PM Lu Yao wrote: > > The following error log is displayed during the current compilation > > 'security/security.c:810:2: error: ‘memcpy’ offset 32 is > > out of the bounds [0, 0] [-Werror=array-bounds]' > > GCC version is '10.3.0 (Ubuntu 10.3.0-1ubuntu1~18.04~1)' >

Re: [PATCH v2] mm: align larger anonymous mappings on THP boundaries

2024-01-17 Thread Kees Cook
On Tue, Jan 16, 2024 at 02:30:36PM -0800, Suren Baghdasaryan wrote: > On Tue, Jan 16, 2024 at 2:25 PM Yang Shi wrote: > > > > On Tue, Jan 16, 2024 at 1:58 PM Suren Baghdasaryan > > wrote: > > > > > > On Tue, Jan 16, 2024 at 12:56 PM Yang Shi wrote: > > > > > > > > On Tue, Jan 16, 2024 at 11:16 

[PATCH] pstore/ram: Return directly after a failed kasprintf() call in ramoops_init_prz()

2024-01-17 Thread Markus Elfring
From: Markus Elfring Date: Wed, 17 Jan 2024 21:09:22 +0100 The result from a call of the function “kasprintf” was passed to a subsequent function call without checking for a null pointer before (according to a memory allocation failure). This issue was detected by using the Coccinelle software.

Re: [PATCH] lsm: Resolve compiling 'security.c' error

2024-01-17 Thread Kees Cook
On Wed, Jan 17, 2024 at 09:32:33AM -0500, Paul Moore wrote: > On Tue, Jan 16, 2024 at 8:46 PM Lu Yao wrote: > > > > The following error log is displayed during the current compilation > > > 'security/security.c:810:2: error: ‘memcpy’ offset 32 is > > > out of the bounds [0, 0] [-Werror=array-b

Re: [PATCH] lsm: Resolve compiling 'security.c' error

2024-01-17 Thread Paul Moore
On Wed, Jan 17, 2024 at 3:51 PM Kees Cook wrote: > On Wed, Jan 17, 2024 at 09:32:33AM -0500, Paul Moore wrote: > > On Tue, Jan 16, 2024 at 8:46 PM Lu Yao wrote: > > > > > > The following error log is displayed during the current compilation > > > > 'security/security.c:810:2: error: ‘memcpy’ of

Re: [PATCH v2] mm: align larger anonymous mappings on THP boundaries

2024-01-17 Thread Yang Shi
On Wed, Jan 17, 2024 at 9:40 AM Kees Cook wrote: > > On Tue, Jan 16, 2024 at 02:30:36PM -0800, Suren Baghdasaryan wrote: > > On Tue, Jan 16, 2024 at 2:25 PM Yang Shi wrote: > > > > > > On Tue, Jan 16, 2024 at 1:58 PM Suren Baghdasaryan > > > wrote: > > > > > > > > On Tue, Jan 16, 2024 at 12:56 

Re: [PATCH v2] mm: align larger anonymous mappings on THP boundaries

2024-01-17 Thread Suren Baghdasaryan
On Wed, Jan 17, 2024 at 3:32 PM Yang Shi wrote: > > On Wed, Jan 17, 2024 at 9:40 AM Kees Cook wrote: > > > > On Tue, Jan 16, 2024 at 02:30:36PM -0800, Suren Baghdasaryan wrote: > > > On Tue, Jan 16, 2024 at 2:25 PM Yang Shi wrote: > > > > > > > > On Tue, Jan 16, 2024 at 1:58 PM Suren Baghdasarya

Re: [PATCH v2] mm: align larger anonymous mappings on THP boundaries

2024-01-17 Thread Yang Shi
On Wed, Jan 17, 2024 at 4:02 PM Suren Baghdasaryan wrote: > > On Wed, Jan 17, 2024 at 3:32 PM Yang Shi wrote: > > > > On Wed, Jan 17, 2024 at 9:40 AM Kees Cook wrote: > > > > > > On Tue, Jan 16, 2024 at 02:30:36PM -0800, Suren Baghdasaryan wrote: > > > > On Tue, Jan 16, 2024 at 2:25 PM Yang Shi

Re: [PATCH v2] mm: align larger anonymous mappings on THP boundaries

2024-01-17 Thread Suren Baghdasaryan
On Wed, Jan 17, 2024 at 4:13 PM Yang Shi wrote: > > On Wed, Jan 17, 2024 at 4:02 PM Suren Baghdasaryan wrote: > > > > On Wed, Jan 17, 2024 at 3:32 PM Yang Shi wrote: > > > > > > On Wed, Jan 17, 2024 at 9:40 AM Kees Cook wrote: > > > > > > > > On Tue, Jan 16, 2024 at 02:30:36PM -0800, Suren Bagh

Re: [PATCH v2] mm: align larger anonymous mappings on THP boundaries

2024-01-17 Thread Suren Baghdasaryan
On Wed, Jan 17, 2024 at 4:29 PM Suren Baghdasaryan wrote: > > On Wed, Jan 17, 2024 at 4:13 PM Yang Shi wrote: > > > > On Wed, Jan 17, 2024 at 4:02 PM Suren Baghdasaryan > > wrote: > > > > > > On Wed, Jan 17, 2024 at 3:32 PM Yang Shi wrote: > > > > > > > > On Wed, Jan 17, 2024 at 9:40 AM Kees C

Re: [PATCH] pstore/ram: Return directly after a failed kasprintf() call in ramoops_init_prz()

2024-01-17 Thread Kunwu Chan
Hi Markus, Thanks for your patch. On 2024/1/18 04:24, Markus Elfring wrote: From: Markus Elfring Date: Wed, 17 Jan 2024 21:09:22 +0100 The result from a call of the function “kasprintf” was passed to a subsequent function call without checking for a null pointer before (according to a memory a

Re: [PATCH v2] mm: align larger anonymous mappings on THP boundaries

2024-01-17 Thread Suren Baghdasaryan
On Wed, Jan 17, 2024 at 5:34 PM Suren Baghdasaryan wrote: > > On Wed, Jan 17, 2024 at 4:29 PM Suren Baghdasaryan wrote: > > > > On Wed, Jan 17, 2024 at 4:13 PM Yang Shi wrote: > > > > > > On Wed, Jan 17, 2024 at 4:02 PM Suren Baghdasaryan > > > wrote: > > > > > > > > On Wed, Jan 17, 2024 at 3:

Re: [PATCH] pstore/ram: Return directly after a failed kasprintf() call in ramoops_init_prz()

2024-01-17 Thread Dan Carpenter
On Wed, Jan 17, 2024 at 09:24:12PM +0100, Markus Elfring wrote: > From: Markus Elfring > Date: Wed, 17 Jan 2024 21:09:22 +0100 > > The result from a call of the function “kasprintf” was passed to > a subsequent function call without checking for a null pointer before > (according to a memory allo