From patchwork Wed Dec 7 12:19:07 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Amit Pundir X-Patchwork-Id: 87076 Delivered-To: patch@linaro.org Received: by 10.140.20.101 with SMTP id 92csp283995qgi; Wed, 7 Dec 2016 04:19:29 -0800 (PST) X-Received: by 10.98.21.148 with SMTP id 142mr67616390pfv.38.1481113169836; Wed, 07 Dec 2016 04:19:29 -0800 (PST) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id e132si23913777pfg.66.2016.12.07.04.19.27; Wed, 07 Dec 2016 04:19:29 -0800 (PST) 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=@linaro.org; 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=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752420AbcLGMTY (ORCPT + 25 others); Wed, 7 Dec 2016 07:19:24 -0500 Received: from mail-pg0-f51.google.com ([74.125.83.51]:36222 "EHLO mail-pg0-f51.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751764AbcLGMTX (ORCPT ); Wed, 7 Dec 2016 07:19:23 -0500 Received: by mail-pg0-f51.google.com with SMTP id f188so161097710pgc.3 for ; Wed, 07 Dec 2016 04:19:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id; bh=EiejCs7uSHGCWLqhcj2rwaD0/FWov8xnqrKUPeEFn1Y=; b=ipXqF9rrzkDNt/16bc+QFqwrX+VBaPJdMJd4yXTO1hLXP6oDuzaAM0kehpuc3YQgCE N05m7HN9/BFHBB3nJYezc0KSczaIpr9Yz5g4OjO/n2JG5oqNQ3LlJa1yIklmjxC04peU HPB4eNjhtzL4lpA7aXS6zVM+bBg+WgnWOuxCk= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=EiejCs7uSHGCWLqhcj2rwaD0/FWov8xnqrKUPeEFn1Y=; b=IHsVeoVMlPbLPJM+9zsKGLvtGHEwb8UGhi5iFhNjus2htfambLUQhSkTRSAYPsWJ86 P9CIM+OiB8BvSugJom0I3d2U5HkEnQGrtB2zZInszIs6tduEqxer+EdR/6Q0xSF6zryF AuTeWEbtmEDdpVHPjSGaONpF+nSN7JLYUjI6bH4uyQ2nZVK+3g4R3WD9Zo8IDUttuiaM jM/H8BAgc7PBiYqCIA1oFvrHGA1AQ/leGp5LhFMv+2EfuP2JQHbgRB8whD44RzHmItDB YKIzeUn0sW49IionLMRpe6539Ggh+8raOQBhXFLMxWXUhU6oDe/m7cX0ueCLy4yDzxv5 SZyA== X-Gm-Message-State: AKaTC00owKN52wSi/sq1lWUHsn1NT/6VKCu/kSehLkM5KVoUlI3o4N9u5Z2HN/ptLgEhIZjA X-Received: by 10.84.216.25 with SMTP id m25mr147155627pli.117.1481113153589; Wed, 07 Dec 2016 04:19:13 -0800 (PST) Received: from localhost.localdomain ([106.51.132.212]) by smtp.gmail.com with ESMTPSA id t25sm42567087pgo.9.2016.12.07.04.19.10 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 07 Dec 2016 04:19:12 -0800 (PST) From: Amit Pundir To: Andrew Morton Cc: Rob Herring , John Stultz , Android Kernel Team , lkml , Daniel Micay Subject: [PATCH 1/2] config: android-recommended: disable aio support Date: Wed, 7 Dec 2016 17:49:07 +0530 Message-Id: <1481113148-29204-1-git-send-email-amit.pundir@linaro.org> X-Mailer: git-send-email 2.7.4 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Daniel Micay The aio interface adds substantial attack surface for a feature that's not being exposed by Android at all. It's unlikely that anyone is using the kernel feature directly either. This feature is rarely used even on servers. The glibc POSIX aio calls really use thread pools. The lack of widespread usage also means this is relatively poorly audited/tested. The kernel's aio rarely provides performance benefits over using a thread pool and is quite incomplete in terms of system call coverage along with having edge cases where blocking can occur. Part of the performance issue is the fact that it only supports direct io, not buffered io. The existing API is considered fundamentally flawed and it's unlikely it will be expanded, but rather replaced: https://marc.info/?l=linux-aio&m=145255815216051&w=2 Since ext4 encryption means no direct io support, kernel aio isn't even going to work properly on Android devices using file-based encryption. Reviewed-at: https://android-review.googlesource.com/#/c/292158/ Signed-off-by: Daniel Micay Signed-off-by: Amit Pundir --- kernel/configs/android-recommended.config | 1 + 1 file changed, 1 insertion(+) -- 2.7.4 diff --git a/kernel/configs/android-recommended.config b/kernel/configs/android-recommended.config index 297756b..4719871 100644 --- a/kernel/configs/android-recommended.config +++ b/kernel/configs/android-recommended.config @@ -1,4 +1,5 @@ # KEEP ALPHABETICALLY SORTED +# CONFIG_AIO is not set # CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set # CONFIG_INPUT_MOUSE is not set # CONFIG_LEGACY_PTYS is not set