Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp7026400ybi; Thu, 13 Jun 2019 08:20:53 -0700 (PDT) X-Google-Smtp-Source: APXvYqwvAONkIuJ+kg4soEJFgTA/5BQRwn9CeDiO0aFA+2UA9C7Sqno59c6yvUqHs0MfKhN8saZZ X-Received: by 2002:a63:fc5b:: with SMTP id r27mr31887403pgk.219.1560439252988; Thu, 13 Jun 2019 08:20:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1560439252; cv=none; d=google.com; s=arc-20160816; b=wDe011eXw9D+x9xcIzshcX7OdPYCk9gabwPFvlX4Zxy9K9roJYkzePqYK0GYFn6vbw Yfi6P69N3Ky8RQIl57tRZ5PzgFOd7YqeNvgvEfjdcH6JtQxbyLaynhJWKH8qCpGzxTkc jJvq6PyYoy/BWaBA76T754/8h4O7JG0aampAq+M+LfONnPJdT0qEOOFgh+idckfdjcTh Sxz3zfKqGlfHwKE9NPFVAdZI4Cnxp3nSuKoUuBtOOmBO75FZrEAm6xKbgT9xboZcL9rb JQbKgQbBXBTVIYmY+mdBuh4SZfu52gehDqtUX7tey29CYcb4TECPbCDKgTvtgcbmwqst B0nA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=c4JaIYgXBMbRJcuOmI53AtHtAH/wFo1Lowg4JHM/fXs=; b=e/DqycfJNOIhyF42UIGVZVLcn1dH4DKxgnyLWK1WA9JEwOzg73k3IrdUC1FXfQCluM rMywz5DpIZ2noIjGZQQ7BAYEqxUPJICO8cjcUQIMGGBGqsZceZldomb+yUyToBqprFZ8 ocBFJDt04uOxBOFaFiBCUEmcjYbC13b2Ij22T2OuVWZQriVi1v1p4L8A8ZLcgYDZ01qg UK8JPx1dxknjuNsaEhFgiSqvleM5DMwzFJEbSUIP36FVMJ3fozIEVWRFAHevi3ePPK5S K5gezw7Ixo1KBM0e4r8apzayloQQNWvpiKaLHcq0xuVYUzNEh8dwHQDs6is1DIr8eiwu NzGg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=b72rTZ+B; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id a33si3446658plc.283.2019.06.13.08.20.38; Thu, 13 Jun 2019 08:20:52 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=b72rTZ+B; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388641AbfFMPTd (ORCPT + 99 others); Thu, 13 Jun 2019 11:19:33 -0400 Received: from mail-oi1-f195.google.com ([209.85.167.195]:42289 "EHLO mail-oi1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732137AbfFMNAV (ORCPT ); Thu, 13 Jun 2019 09:00:21 -0400 Received: by mail-oi1-f195.google.com with SMTP id s184so14328543oie.9 for ; Thu, 13 Jun 2019 06:00:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=c4JaIYgXBMbRJcuOmI53AtHtAH/wFo1Lowg4JHM/fXs=; b=b72rTZ+ByJZfRwZjRQ5UaaywEAtE+APZpo6ZQg4rsdQSOBLoV3A3yIkOU2jB2Szjia tjqp1ER7aHfo3hLOqXgxS8Vu2Vx7YyTfA8ZdUVrsIsFwvJ1cI0qflb/aR5tidqMCsGDx tC9r8SZ5PNmrzI9x4K2H+lP3aoptnx4ZLx88AnvZwW9kDyFLcqrIeB06ed6/zaWneNJR 1tGUmluE2353UZVoeMJqcvg+DlaTQhw+G5AAfuyXg+3Hb6e3uL0BtGjuKVpzrYea8LrG eeTa/kxTlbZ9rxW0UOmvuVfo9DM74MV01U7Qh5CGbTLLSJDjyz6QQX2CyFhEjoc8/9eK sJvg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=c4JaIYgXBMbRJcuOmI53AtHtAH/wFo1Lowg4JHM/fXs=; b=NPsSBUiWtqM1kTOc4n9YQU1HRuQviPatmbFLiyOw09JL8hrfecXGq5GAEz888HevoC J4jkZjQmq/8hpi3JYG8FYsuAoXA5v66EBwVhudE9kyrjn9/jHmURk8KAu2drIpkPLv2o PUliRJnA2ijPn1pERBx66QjBzFOLTCLZdUEEN/RPT86aHTXfZvs5QERi1KRWbZQmHaIO MdRZqcecc4NszNGwp/2EzbtwS7lyXIGcMoafK2FRifH5xDbrRR1AQge0F6DyGiD5rdiu CqphvMlJcftWn/93HWPwGFaL5wL0Qnw9m2Zkx8yuY0BvxH/ut5zP+fp9iQ1u0TmwrJRL lnIg== X-Gm-Message-State: APjAAAWcs9AnNyRZkXeTeieqgvU0WHeMOuyH2JRbXGXVgDEKsHNakUD1 Ca7KNWTdYjO1H1KJ6NwxAYQsx+JUABDd4NxXleZiRw== X-Received: by 2002:aca:e044:: with SMTP id x65mr2874683oig.70.1560430820644; Thu, 13 Jun 2019 06:00:20 -0700 (PDT) MIME-Version: 1.0 References: <20190613123028.179447-1-elver@google.com> <20190613123028.179447-2-elver@google.com> <6cc5e12d-1492-d9b7-3ea7-6381407439d7@virtuozzo.com> In-Reply-To: <6cc5e12d-1492-d9b7-3ea7-6381407439d7@virtuozzo.com> From: Marco Elver Date: Thu, 13 Jun 2019 15:00:09 +0200 Message-ID: Subject: Re: [PATCH v4 1/3] lib/test_kasan: Add bitops tests To: Andrey Ryabinin Cc: Peter Zijlstra , Dmitry Vyukov , Alexander Potapenko , Andrey Konovalov , Mark Rutland , "H. Peter Anvin" , Jonathan Corbet , Thomas Gleixner , Ingo Molnar , Borislav Petkov , "the arch/x86 maintainers" , Arnd Bergmann , Josh Poimboeuf , "open list:DOCUMENTATION" , LKML , linux-arch , kasan-dev Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 13 Jun 2019 at 14:49, Andrey Ryabinin wrote: > > > > On 6/13/19 3:30 PM, Marco Elver wrote: > > This adds bitops tests to the test_kasan module. In a follow-up patch, > > support for bitops instrumentation will be added. > > > > Signed-off-by: Marco Elver > > Acked-by: Mark Rutland > > --- > > Reviewed-by: Andrey Ryabinin > > > > > > +static noinline void __init kasan_bitops(void) > > +{ > > + /* > > + * Allocate 1 more byte, which causes kzalloc to round up to 16-bytes; > > + * this way we do not actually corrupt other memory, in case > > + * instrumentation is not working as intended. > > This sound like working instrumentation somehow save us from corrupting memory. In fact it doesn't, > it only reports corruption. Thanks, I removed the confusing wording. Sent v5. > > + */ > > + long *bits = kzalloc(sizeof(*bits) + 1, GFP_KERNEL); > > + if (!bits) > > + return; > > + > > -- > You received this message because you are subscribed to the Google Groups "kasan-dev" group. > To unsubscribe from this group and stop receiving emails from it, send an email to kasan-dev+unsubscribe@googlegroups.com. > To post to this group, send email to kasan-dev@googlegroups.com. > To view this discussion on the web visit https://groups.google.com/d/msgid/kasan-dev/6cc5e12d-1492-d9b7-3ea7-6381407439d7%40virtuozzo.com. > For more options, visit https://groups.google.com/d/optout.