Typically the assert is expected to not fail.
Signed-off-by: Igor Stoppa
Acked-by: Doug Ledford
Cc: Faisal Latif
Cc: Chien Tung
Cc: Roland Dreier
Cc: Faisal Latif
Cc: Jason Gunthorpe
Cc: linux-r...@vger.kernel.org
CC: linux-kernel@vger.kernel.org
---
drivers/infiniband/hw/nes/nes.h | 2
Typically the assert is expected to not fail.
Signed-off-by: Igor Stoppa
Acked-by: Doug Ledford
Cc: Faisal Latif
Cc: Chien Tung
Cc: Roland Dreier
Cc: Faisal Latif
Cc: Jason Gunthorpe
Cc: linux-r...@vger.kernel.org
CC: linux-kernel@vger.kernel.org
---
drivers/infiniband/hw/nes/nes.h | 2
WARN_ON() already contains an unlikely(), so it's not necessary to wrap it
into another.
Signed-off-by: Igor Stoppa
Cc: "Rafael J. Wysocki"
Cc: Srivatsa S. Bhat
---
drivers/cpufreq/cpufreq.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/cpufreq/c
WARN_ON() already contains an unlikely(), so it's not necessary to wrap it
into another.
Signed-off-by: Igor Stoppa
Cc: "Rafael J. Wysocki"
Cc: Srivatsa S. Bhat
---
drivers/cpufreq/cpufreq.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/cpufreq/c
WARN_ON() already contains an unlikely(), so it's not necessary to
wrap it into another.
Signed-off-by: Igor Stoppa
Cc: Arseny Solokha
Cc: Benjamin Herrenschmidt
Cc: Paul Mackerras
Cc: Michael Ellerman
---
arch/powerpc/mm/tlb_nohash.c | 2 +-
arch/powerpc/sysdev/xive/common.c | 2 +-
2
BUG_ON() already contains an unlikely(), there is no need for another one.
Signed-off-by: Igor Stoppa
Cc: "Martin K. Petersen"
Cc: "James E.J. Bottomley"
---
drivers/scsi/scsi_lib.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/scsi/scsi_
WARN_ON() already contains an unlikely(), so it's not necessary to
wrap it into another.
Signed-off-by: Igor Stoppa
Cc: Joe Thornber
Cc: Alasdair Kergon
---
drivers/md/dm-cache-policy-smq.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/md/dm-cache-policy-smq.c b
WARN_ON() already contains an unlikely(), so it's not necessary to
wrap it into another.
Signed-off-by: Igor Stoppa
Cc: Arseny Solokha
Cc: Benjamin Herrenschmidt
Cc: Paul Mackerras
Cc: Michael Ellerman
---
arch/powerpc/mm/tlb_nohash.c | 2 +-
arch/powerpc/sysdev/xive/common.c | 2 +-
2
BUG_ON() already contains an unlikely(), there is no need for another one.
Signed-off-by: Igor Stoppa
Cc: "Martin K. Petersen"
Cc: "James E.J. Bottomley"
---
drivers/scsi/scsi_lib.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/scsi/scsi_
WARN_ON() already contains an unlikely(), so it's not necessary to
wrap it into another.
Signed-off-by: Igor Stoppa
Cc: Joe Thornber
Cc: Alasdair Kergon
---
drivers/md/dm-cache-policy-smq.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/md/dm-cache-policy-smq.c b
Both WARN_ON() and WARN_ONCE() already contain an unlikely(), so it's not
necessary to wrap it into another.
Signed-off-by: Igor Stoppa
Cc: Madalin Bucur
---
drivers/net/ethernet/freescale/dpaa/dpaa_eth.c | 8 +++-
1 file changed, 3 insertions(+), 5 deletions(-)
diff --git a/drivers/net
WARN_ON() already contains an unlikely(), so it's not necessary to
wrap it into another.
Signed-off-by: Igor Stoppa
Cc: Bart Van Assche
---
drivers/infiniband/ulp/srpt/ib_srpt.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/infiniband/ulp/srpt/ib_srpt.c
b/drivers
Both WARN_ON() and WARN_ONCE() already contain an unlikely(), so it's not
necessary to wrap it into another.
Signed-off-by: Igor Stoppa
Cc: Madalin Bucur
---
drivers/net/ethernet/freescale/dpaa/dpaa_eth.c | 8 +++-
1 file changed, 3 insertions(+), 5 deletions(-)
diff --git a/drivers/net
WARN_ON() already contains an unlikely(), so it's not necessary to
wrap it into another.
Signed-off-by: Igor Stoppa
Cc: Bart Van Assche
---
drivers/infiniband/ulp/srpt/ib_srpt.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/infiniband/ulp/srpt/ib_srpt.c
b/drivers
WARN_ON() already contains an unlikely(), so it's not necessary to
wrap it into another.
Signed-off-by: Igor Stoppa
Cc: Alexander Viro
---
fs/open.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/open.c b/fs/open.c
index 0285ce7dbd51..19a9e4b378d3 100644
--- a/fs/open.c
WARN_ON() already contains an unlikely(), so it's not necessary to
wrap it into another.
Signed-off-by: Igor Stoppa
Cc: Alexander Viro
---
fs/open.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/open.c b/fs/open.c
index 0285ce7dbd51..19a9e4b378d3 100644
--- a/fs/open.c
WARN_ON_ONCE() already contains an unlikely(), and the logical or of two of
them is still unlikely(), so it's not necessary to wrap them into another.
Signed-off-by: Igor Stoppa
Cc: Christian Lamparter
Cc: Kalle Valo
---
drivers/net/wireless/ath/carl9170/tx.c | 4 ++--
1 file changed, 2
WARN_ON_ONCE() already contains an unlikely(), and the logical or of two of
them is still unlikely(), so it's not necessary to wrap them into another.
Signed-off-by: Igor Stoppa
Cc: Christian Lamparter
Cc: Kalle Valo
---
drivers/net/wireless/ath/carl9170/tx.c | 4 ++--
1 file changed, 2
WARN_ON() already contains an unlikely(), so it's not necessary to
wrap it into another.
Signed-off-by: Igor Stoppa
Cc: zijun_hu
Cc: Tejun Heo
Cc: Christoph Lameter
Cc: Dennis Zhou
---
mm/percpu.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/mm/percpu.c b/mm/percpu.c
Typically the assert is expected to not fail.
Signed-off-by: Igor Stoppa
Cc: Chien Tung
Cc: Roland Dreier
Cc: Faisal Latif
Cc: Doug Ledford
Cc: Jason Gunthorpe
---
drivers/infiniband/hw/nes/nes.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/infiniband/hw/nes
Add a hint to the compiler that probably it won't be necessary to BUG()
Signed-off-by: Igor Stoppa
Cc: David Daney
Cc: Ralf Baechle
Cc: Paul Burton
Cc: James Hogan
---
arch/mips/include/asm/bug.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/mips/include/asm/bug.h
The assert() condition is likely to be true.
Signed-off-by: Igor Stoppa
Cc: huangdaode
Cc: Yisen Zhuang
Cc: Salil Mehta
---
drivers/net/ethernet/hisilicon/hns/hnae.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/hisilicon/hns/hnae.h
b/drivers/net
WARN_ON_ONCE() already contains an unlikely(), so it's not necessary to
wrap it into another.
Signed-off-by: Igor Stoppa
Cc: Kalle Valo
Cc: Michal Kazior
---
drivers/net/wireless/ath/ath10k/htt_rx.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/net/wireless
WARN_ON() already contains an unlikely(), so it's not necessary to wrap it
into another.
Signed-off-by: Igor Stoppa
Cc: Rob Clark
Cc: David Airlie
Cc: Archit Taneja
Cc: Stephane Viau
---
drivers/gpu/drm/msm/disp/mdp5/mdp5_ctl.c | 4 ++--
drivers/gpu/drm/msm/disp/mdp_format.c| 2 +-
2
WARN_ON() already contains an unlikely(), so it's not necessary to
wrap it into another.
Signed-off-by: Igor Stoppa
Cc: Andrew Jeffery
Cc: Linus Walleij
---
drivers/pinctrl/aspeed/pinctrl-aspeed.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/pinctrl/aspeed
Add a hint to the compiler.
If BUG_ON() is used instead of BUG(), it means that probably the
preferred outcome is to not BUG().
Signed-off-by: Igor Stoppa
Cc: Arnd Bergmann
---
include/asm-generic/bug.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/include/asm-generic
BUG_ON() is unlikely() to BUG()
Signed-off-by: Igor Stoppa
Cc: Dmitry Safonov
Cc: Shuah Khan
---
tools/testing/selftests/vm/map_populate.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/testing/selftests/vm/map_populate.c
b/tools/testing/selftests/vm/map_populate.c
WARN_ON() already contains an unlikely(), so it's not necessary to
wrap it into another.
Signed-off-by: Igor Stoppa
Cc: zijun_hu
Cc: Tejun Heo
Cc: Christoph Lameter
Cc: Dennis Zhou
---
mm/percpu.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/mm/percpu.c b/mm/percpu.c
Typically the assert is expected to not fail.
Signed-off-by: Igor Stoppa
Cc: Chien Tung
Cc: Roland Dreier
Cc: Faisal Latif
Cc: Doug Ledford
Cc: Jason Gunthorpe
---
drivers/infiniband/hw/nes/nes.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/infiniband/hw/nes
Add a hint to the compiler that probably it won't be necessary to BUG()
Signed-off-by: Igor Stoppa
Cc: David Daney
Cc: Ralf Baechle
Cc: Paul Burton
Cc: James Hogan
---
arch/mips/include/asm/bug.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/mips/include/asm/bug.h
The assert() condition is likely to be true.
Signed-off-by: Igor Stoppa
Cc: huangdaode
Cc: Yisen Zhuang
Cc: Salil Mehta
---
drivers/net/ethernet/hisilicon/hns/hnae.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/hisilicon/hns/hnae.h
b/drivers/net
WARN_ON_ONCE() already contains an unlikely(), so it's not necessary to
wrap it into another.
Signed-off-by: Igor Stoppa
Cc: Kalle Valo
Cc: Michal Kazior
---
drivers/net/wireless/ath/ath10k/htt_rx.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/net/wireless
WARN_ON() already contains an unlikely(), so it's not necessary to wrap it
into another.
Signed-off-by: Igor Stoppa
Cc: Rob Clark
Cc: David Airlie
Cc: Archit Taneja
Cc: Stephane Viau
---
drivers/gpu/drm/msm/disp/mdp5/mdp5_ctl.c | 4 ++--
drivers/gpu/drm/msm/disp/mdp_format.c| 2 +-
2
WARN_ON() already contains an unlikely(), so it's not necessary to
wrap it into another.
Signed-off-by: Igor Stoppa
Cc: Andrew Jeffery
Cc: Linus Walleij
---
drivers/pinctrl/aspeed/pinctrl-aspeed.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/pinctrl/aspeed
Add a hint to the compiler.
If BUG_ON() is used instead of BUG(), it means that probably the
preferred outcome is to not BUG().
Signed-off-by: Igor Stoppa
Cc: Arnd Bergmann
---
include/asm-generic/bug.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/include/asm-generic
BUG_ON() is unlikely() to BUG()
Signed-off-by: Igor Stoppa
Cc: Dmitry Safonov
Cc: Shuah Khan
---
tools/testing/selftests/vm/map_populate.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/testing/selftests/vm/map_populate.c
b/tools/testing/selftests/vm/map_populate.c
WARN_ON() already contains an unlikely(), so it's not necessary to
wrap it into another.
Signed-off-by: Igor Stoppa
Cc: Aaro Koskinen
Cc: Greg Kroah-Hartman
---
drivers/staging/octeon-usb/octeon-hcd.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/staging/octeon
WARN_ON() already contains an unlikely(), so it's not necessary to
wrap it into another.
Signed-off-by: Igor Stoppa
Cc: Aaro Koskinen
Cc: Greg Kroah-Hartman
---
drivers/staging/octeon-usb/octeon-hcd.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/staging/octeon
WARN_ON() already contains an unlikely(), so it's not necessary to
wrap it into another.
Signed-off-by: Igor Stoppa
Cc: Inaky Perez-Gonzalez
---
drivers/net/wimax/i2400m/tx.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/net/wimax/i2400m/tx.c b/drivers/net/wimax
WARN_ON() already contains an unlikely(), so it's not necessary to
wrap it into another.
Signed-off-by: Igor Stoppa
Cc: Mike Snitzer
Cc: Alasdair Kergon
---
drivers/md/dm.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/md/dm.c b/drivers/md/dm.c
index 20f7e4ef5342
WARN_ON() already contains an unlikely(), so it's not necessary to wrap it
into another.
Signed-off-by: Igor Stoppa
Cc: Kees Cook
---
kernel/seccomp.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/kernel/seccomp.c b/kernel/seccomp.c
index fd023ac24e10..5a2a9af4663e
The condition to test is unlikely() to be true. Add the hint.
Signed-off-by: Igor Stoppa
Cc: "Michael S. Tsirkin"
---
tools/virtio/linux/kernel.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/virtio/linux/kernel.h b/tools/virtio/linux/kernel.h
index fb
WARN_ON() already contains an unlikely(), so it's not necessary to
wrap it into another.
Signed-off-by: Igor Stoppa
Cc: Larry Finger
Cc: Kalle Valo
---
drivers/net/wireless/broadcom/b43/dma.c | 2 +-
drivers/net/wireless/broadcom/b43legacy/dma.c | 2 +-
2 files changed, 2 insertions
WARN_ON() already contains an unlikely(), so it's not necessary to
wrap it into another.
Signed-off-by: Igor Stoppa
Cc: Inaky Perez-Gonzalez
---
drivers/net/wimax/i2400m/tx.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/net/wimax/i2400m/tx.c b/drivers/net/wimax
WARN_ON() already contains an unlikely(), so it's not necessary to
wrap it into another.
Signed-off-by: Igor Stoppa
Cc: Mike Snitzer
Cc: Alasdair Kergon
---
drivers/md/dm.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/md/dm.c b/drivers/md/dm.c
index 20f7e4ef5342
WARN_ON() already contains an unlikely(), so it's not necessary to wrap it
into another.
Signed-off-by: Igor Stoppa
Cc: Kees Cook
---
kernel/seccomp.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/kernel/seccomp.c b/kernel/seccomp.c
index fd023ac24e10..5a2a9af4663e
The condition to test is unlikely() to be true. Add the hint.
Signed-off-by: Igor Stoppa
Cc: "Michael S. Tsirkin"
---
tools/virtio/linux/kernel.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/virtio/linux/kernel.h b/tools/virtio/linux/kernel.h
index fb
WARN_ON() already contains an unlikely(), so it's not necessary to
wrap it into another.
Signed-off-by: Igor Stoppa
Cc: Larry Finger
Cc: Kalle Valo
---
drivers/net/wireless/broadcom/b43/dma.c | 2 +-
drivers/net/wireless/broadcom/b43legacy/dma.c | 2 +-
2 files changed, 2 insertions
On 12/05/18 18:41, Joe Perches wrote:
I personally like more the former, not to mention that it uses also one
line less, but it seems less common in the sources.
The coding style references do not seem to say anything explicit about
which style to prefer.
thank you, I could provide a patch to
On 12/05/18 18:41, Joe Perches wrote:
I personally like more the former, not to mention that it uses also one
line less, but it seems less common in the sources.
The coding style references do not seem to say anything explicit about
which style to prefer.
thank you, I could provide a patch to
Hi,
I have been wondering if it's ok to break a long (function declaration)
line in the following way:
static __always_inline
struct foo_bar *__get_foo_bar(type1 parm1, type2 parm2, type3 parm3)
instead of:
static __always_inline struct foo_bar *__get_foo_bar(type1 parm1,
Hi,
I have been wondering if it's ok to break a long (function declaration)
line in the following way:
static __always_inline
struct foo_bar *__get_foo_bar(type1 parm1, type2 parm2, type3 parm3)
instead of:
static __always_inline struct foo_bar *__get_foo_bar(type1 parm1,
On 04/05/18 01:55, Dave Hansen wrote:
On 05/03/2018 02:52 PM, Igor Stoppa wrote:
At the end of the summit, we agreed that I would go through the physmap.
Do you mean the kernel linear map?
Apparently I did mean it. It was confusing, because I couldn't find a
single place stating
On 04/05/18 01:55, Dave Hansen wrote:
On 05/03/2018 02:52 PM, Igor Stoppa wrote:
At the end of the summit, we agreed that I would go through the physmap.
Do you mean the kernel linear map?
Apparently I did mean it. It was confusing, because I couldn't find a
single place stating
On 24/04/18 15:50, Matthew Wilcox wrote:
On Mon, Apr 23, 2018 at 04:54:56PM +0400, Igor Stoppa wrote:
While the vanilla version of pmalloc provides support for permanently
transitioning between writable and read-only of a memory pool, this
patch seeks to support a separate class of data
On 24/04/18 15:50, Matthew Wilcox wrote:
On Mon, Apr 23, 2018 at 04:54:56PM +0400, Igor Stoppa wrote:
While the vanilla version of pmalloc provides support for permanently
transitioning between writable and read-only of a memory pool, this
patch seeks to support a separate class of data
On 03/05/18 01:50, Andrew Morton wrote:
On Wed, 2 May 2018 05:05:19 +0400 Igor Stoppa <igor.sto...@gmail.com> wrote:
This patchset was created as part of an older version of pmalloc, however
it has value per-se, as it hardens the memory management for the generic
allocator ge
On 03/05/18 01:50, Andrew Morton wrote:
On Wed, 2 May 2018 05:05:19 +0400 Igor Stoppa wrote:
This patchset was created as part of an older version of pmalloc, however
it has value per-se, as it hardens the memory management for the generic
allocator genalloc.
Genalloc does not currently
Add SPDX license to genalloc.rst, then a label, to allow cross-referencing.
Signed-off-by: Igor Stoppa <igor.sto...@huawei.com>
---
Documentation/core-api/genalloc.rst | 4
1 file changed, 4 insertions(+)
diff --git a/Documentation/core-api/genalloc.rst
b/Documentation/co
Add SPDX license to genalloc.rst, then a label, to allow cross-referencing.
Signed-off-by: Igor Stoppa
---
Documentation/core-api/genalloc.rst | 4
1 file changed, 4 insertions(+)
diff --git a/Documentation/core-api/genalloc.rst
b/Documentation/core-api/genalloc.rst
index 6b38a39fab24
Signed-off-by: Igor Stoppa <igor.sto...@huawei.com>
---
include/linux/genalloc.h | 112 +++
lib/genalloc.c | 742 ++-
2 files changed, 599 insertions(+), 255 deletions(-)
diff --git a/include/linux/genalloc.h b/include/linux/genalloc.h
Signed-off-by: Igor Stoppa
---
include/linux/genalloc.h | 112 +++
lib/genalloc.c | 742 ++-
2 files changed, 599 insertions(+), 255 deletions(-)
diff --git a/include/linux/genalloc.h b/include/linux/genalloc.h
index 872f930f1b06..ff72295
troubleshooting a crash, it is recommended
to compile the tests into the monolithic kernel.
Signed-off-by: Igor Stoppa <igor.sto...@huawei.com>
---
lib/Kconfig.debug | 23 +++
lib/Makefile| 1 +
lib/test_genalloc.c | 419
3 files c
troubleshooting a crash, it is recommended
to compile the tests into the monolithic kernel.
Signed-off-by: Igor Stoppa
---
lib/Kconfig.debug | 23 +++
lib/Makefile| 1 +
lib/test_genalloc.c | 419
3 files changed, 443 insertions(+)
create
enwall.com/lists/kernel-hardening/2018/04/29/1]
* make the tester code a kernel module
* turn selftest BUG() error exit paths into WARN()
* add analysis of impact on current users of genalloc
Igor Stoppa (3):
genalloc: track beginning of allocations
Add label and license to genalloc.rst
enwall.com/lists/kernel-hardening/2018/04/29/1]
* make the tester code a kernel module
* turn selftest BUG() error exit paths into WARN()
* add analysis of impact on current users of genalloc
Igor Stoppa (3):
genalloc: track beginning of allocations
Add label and license to genalloc.rst
On 01/05/18 03:15, Andrew Morton wrote:
On Fri, 27 Apr 2018 03:42:41 +0400 Igor Stoppa <igor.sto...@gmail.com> wrote:
These two patches were written in preparation for the creation of
protectable memory, however their use is not limited to pmalloc and can
improve the use of vir
On 01/05/18 03:15, Andrew Morton wrote:
On Fri, 27 Apr 2018 03:42:41 +0400 Igor Stoppa wrote:
These two patches were written in preparation for the creation of
protectable memory, however their use is not limited to pmalloc and can
improve the use of virtually contiguous memory.
The first
On 29/04/18 07:36, Randy Dunlap wrote:
On 04/28/2018 07:45 PM, Igor Stoppa wrote:
[...]
+ test_genalloc();
Is there a stub for test_genalloc() when its config option is not enabled?
I don't see it.
I failed to add to the patch include/linux/test_genalloc.h :-/
That's where the stub
On 29/04/18 07:36, Randy Dunlap wrote:
On 04/28/2018 07:45 PM, Igor Stoppa wrote:
[...]
+ test_genalloc();
Is there a stub for test_genalloc() when its config option is not enabled?
I don't see it.
I failed to add to the patch include/linux/test_genalloc.h :-/
That's where the stub
oops, sorry, I forgot the references :-(
On 29/04/18 20:39, Igor Stoppa wrote:
On 29/04/18 07:09, Matthew Wilcox wrote:
On Sun, Apr 29, 2018 at 06:45:39AM +0400, Igor Stoppa wrote:
This patchset was created as part of an older version of pmalloc,
however
it has value per-se, as it hardens
oops, sorry, I forgot the references :-(
On 29/04/18 20:39, Igor Stoppa wrote:
On 29/04/18 07:09, Matthew Wilcox wrote:
On Sun, Apr 29, 2018 at 06:45:39AM +0400, Igor Stoppa wrote:
This patchset was created as part of an older version of pmalloc,
however
it has value per-se, as it hardens
On 29/04/18 07:09, Matthew Wilcox wrote:
On Sun, Apr 29, 2018 at 06:45:39AM +0400, Igor Stoppa wrote:
This patchset was created as part of an older version of pmalloc, however
it has value per-se, as it hardens the memory management for the generic
allocator genalloc.
Genalloc does
On 29/04/18 07:09, Matthew Wilcox wrote:
On Sun, Apr 29, 2018 at 06:45:39AM +0400, Igor Stoppa wrote:
This patchset was created as part of an older version of pmalloc, however
it has value per-se, as it hardens the memory management for the generic
allocator genalloc.
Genalloc does
it as module.
Signed-off-by: Igor Stoppa <igor.sto...@huawei.com>
---
init/main.c | 2 +
lib/Kconfig | 15 ++
lib/Makefile| 1 +
lib/test_genalloc.c | 410
4 files changed, 428 insertions(+)
create mode 1006
it as module.
Signed-off-by: Igor Stoppa
---
init/main.c | 2 +
lib/Kconfig | 15 ++
lib/Makefile| 1 +
lib/test_genalloc.c | 410
4 files changed, 428 insertions(+)
create mode 100644 lib/test_genalloc.c
diff --git
Add SPDX license to genalloc.rst, then a label, to allow cross-referencing.
Signed-off-by: Igor Stoppa <igor.sto...@huawei.com>
---
Documentation/core-api/genalloc.rst | 4
1 file changed, 4 insertions(+)
diff --git a/Documentation/core-api/genalloc.rst
b/Documentation/co
that the patch works correctly.
Eventually, the extra parameter (and the corresponding verification)
could be dropped, in favor of a simplified API.
Signed-off-by: Igor Stoppa <igor.sto...@huawei.com>
---
include/linux/genalloc.h | 112 +++
lib/genalloc.c
the callers of the free function with the internal tracking.
Later on, the "size" parameter can be dropped, and each caller can be
adjusted accordingly.
Signed-off-by: Igor Stoppa <igor.sto...@huawei.com>
Igor Stoppa (3):
genalloc: track beginning of allocations
Add l
Add SPDX license to genalloc.rst, then a label, to allow cross-referencing.
Signed-off-by: Igor Stoppa
---
Documentation/core-api/genalloc.rst | 4
1 file changed, 4 insertions(+)
diff --git a/Documentation/core-api/genalloc.rst
b/Documentation/core-api/genalloc.rst
index 6b38a39fab24
that the patch works correctly.
Eventually, the extra parameter (and the corresponding verification)
could be dropped, in favor of a simplified API.
Signed-off-by: Igor Stoppa
---
include/linux/genalloc.h | 112 +++
lib/genalloc.c | 742 ++-
2
the callers of the free function with the internal tracking.
Later on, the "size" parameter can be dropped, and each caller can be
adjusted accordingly.
Signed-off-by: Igor Stoppa
Igor Stoppa (3):
genalloc: track beginning of allocations
Add label and license to genalloc.rst
arent area.
This will avoid more expensive searches, later on.
Signed-off-by: Igor Stoppa <igor.sto...@huawei.com>
Reviewed-by: Jay Freyensee <why2jjj.li...@gmail.com>
Reviewed-by: Matthew Wilcox <mawil...@microsoft.com>
---
include/linux/mm_types.h | 1 +
mm/vmalloc.c
arent area.
This will avoid more expensive searches, later on.
Signed-off-by: Igor Stoppa
Reviewed-by: Jay Freyensee
Reviewed-by: Matthew Wilcox
---
include/linux/mm_types.h | 1 +
mm/vmalloc.c | 2 ++
2 files changed, 3 insertions(+)
diff --git a/include/linux/mm_types.h b/inc
tilization outside of the purging phase.
Since the purging happens after the vmap_area is dismissed, its use is
mutually exclusive with any use performed while the area is allocated.
Signed-off-by: Igor Stoppa <igor.sto...@huawei.com>
---
include/linux/vmalloc.h | 2 +-
mm/vmalloc.c
tilization outside of the purging phase.
Since the purging happens after the vmap_area is dismissed, its use is
mutually exclusive with any use performed while the area is allocated.
Signed-off-by: Igor Stoppa
---
include/linux/vmalloc.h | 2 +-
mm/vmalloc.c| 6 +++---
2 files changed, 4
/Igor-security/linux/tree/preparations-for-mm
Igor Stoppa (2):
struct page: add field for vm_struct
vmalloc: rename llist field in vmap_area
include/linux/mm_types.h | 1 +
include/linux/vmalloc.h | 2 +-
mm/vmalloc.c | 8 +---
3 files changed, 7 insertions(+), 4 deletions
/Igor-security/linux/tree/preparations-for-mm
Igor Stoppa (2):
struct page: add field for vm_struct
vmalloc: rename llist field in vmap_area
include/linux/mm_types.h | 1 +
include/linux/vmalloc.h | 2 +-
mm/vmalloc.c | 8 +---
3 files changed, 7 insertions(+), 4 deletions
On 24/04/18 18:44, Matthew Wilcox wrote:
On Tue, Apr 24, 2018 at 02:32:36PM +0200, lazytyped wrote:
On 4/24/18 1:50 PM, Matthew Wilcox wrote:
struct modifiable_data {
struct immutable_data *d;
...
};
Then allocate a new pool, change d and destroy the old pool.
With the
On 24/04/18 18:44, Matthew Wilcox wrote:
On Tue, Apr 24, 2018 at 02:32:36PM +0200, lazytyped wrote:
On 4/24/18 1:50 PM, Matthew Wilcox wrote:
struct modifiable_data {
struct immutable_data *d;
...
};
Then allocate a new pool, change d and destroy the old pool.
With the
On 24/04/18 16:33, Igor Stoppa wrote:
On 24/04/18 15:50, Matthew Wilcox wrote:
On Mon, Apr 23, 2018 at 04:54:56PM +0400, Igor Stoppa wrote:
While the vanilla version of pmalloc provides support for permanently
transitioning between writable and read-only of a memory pool, this
patch seeks
On 24/04/18 16:33, Igor Stoppa wrote:
On 24/04/18 15:50, Matthew Wilcox wrote:
On Mon, Apr 23, 2018 at 04:54:56PM +0400, Igor Stoppa wrote:
While the vanilla version of pmalloc provides support for permanently
transitioning between writable and read-only of a memory pool, this
patch seeks
On 24/04/18 19:03, lazytyped wrote:
On 4/24/18 4:44 PM, Matthew Wilcox wrote:
On Tue, Apr 24, 2018 at 02:32:36PM +0200, lazytyped wrote:
On 4/24/18 1:50 PM, Matthew Wilcox wrote:
struct modifiable_data {
struct immutable_data *d;
...
};
Then allocate a new pool, change d
On 24/04/18 19:03, lazytyped wrote:
On 4/24/18 4:44 PM, Matthew Wilcox wrote:
On Tue, Apr 24, 2018 at 02:32:36PM +0200, lazytyped wrote:
On 4/24/18 1:50 PM, Matthew Wilcox wrote:
struct modifiable_data {
struct immutable_data *d;
...
};
Then allocate a new pool, change d
On 24/04/18 16:49, Stephen Smalley wrote:
On 04/23/2018 08:54 AM, Igor Stoppa wrote:
[...]
The patch is probably in need of rework, to make it fit better with the
new SELinux internal data structures, however it shows how to deny an
easy target to the attacker.
I know this is just
On 24/04/18 16:49, Stephen Smalley wrote:
On 04/23/2018 08:54 AM, Igor Stoppa wrote:
[...]
The patch is probably in need of rework, to make it fit better with the
new SELinux internal data structures, however it shows how to deny an
easy target to the attacker.
I know this is just
On 24/04/18 16:32, lazytyped wrote:
On 4/24/18 1:50 PM, Matthew Wilcox wrote:
struct modifiable_data {
struct immutable_data *d;
...
};
Then allocate a new pool, change d and destroy the old pool.
With the above, you have just shifted the target of the arbitrary write
On 24/04/18 16:32, lazytyped wrote:
On 4/24/18 1:50 PM, Matthew Wilcox wrote:
struct modifiable_data {
struct immutable_data *d;
...
};
Then allocate a new pool, change d and destroy the old pool.
With the above, you have just shifted the target of the arbitrary write
On 24/04/18 15:50, Matthew Wilcox wrote:
On Mon, Apr 23, 2018 at 04:54:56PM +0400, Igor Stoppa wrote:
While the vanilla version of pmalloc provides support for permanently
transitioning between writable and read-only of a memory pool, this
patch seeks to support a separate class of data
On 24/04/18 15:50, Matthew Wilcox wrote:
On Mon, Apr 23, 2018 at 04:54:56PM +0400, Igor Stoppa wrote:
While the vanilla version of pmalloc provides support for permanently
transitioning between writable and read-only of a memory pool, this
patch seeks to support a separate class of data
201 - 300 of 850 matches
Mail list logo