Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754548AbbFJUUs (ORCPT ); Wed, 10 Jun 2015 16:20:48 -0400 Received: from mail-vn0-f43.google.com ([209.85.216.43]:40473 "EHLO mail-vn0-f43.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752062AbbFJUUl (ORCPT ); Wed, 10 Jun 2015 16:20:41 -0400 MIME-Version: 1.0 In-Reply-To: <55789AFE.80408@redhat.com> References: <1433955570-15957-1-git-send-email-dvlasenk@redhat.com> <55789AFE.80408@redhat.com> Date: Wed, 10 Jun 2015 13:20:40 -0700 X-Google-Sender-Auth: yojyby50tWRBek3KhRxEUiADxME Message-ID: Subject: Re: [PATCH] x86/asm/entry/32, selftests: Add test_syscall_vdso test From: Kees Cook To: Denys Vlasenko Cc: "CC: Ingo Molnar , Linus Torvalds , Steven Rostedt , Borislav Petkov , H. Peter Anvin" Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1156 Lines: 30 On Wed, Jun 10, 2015 at 1:15 PM, Denys Vlasenko wrote: > On 06/10/2015 10:00 PM, Kees Cook wrote: >>> + printf("[SKIP]\tAT_SYSINFO not supplied, can't test\n"); >>> + exit(0); /* this is not a test failure */ >> >> Why is that not a test failure? It would mean it didn't actually test >> anything, which seems like a failure to me. > > Are you objecting to comment wording, or to exiting with 0? > > I exit with 0 because no bug was detected. It seemed like a test failure to me: you're failing open ("couldn't configure test, I guess everything is okay") instead of failing closed ("couldn't configure test, something is terribly wrong"). If you can't locate how to make a syscall, then the test should fail, IMO, since it was not possible to perform the test, so you don't know if flags are being correctly handled across syscalls. -Kees -- Kees Cook Chrome OS Security -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/