Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp2323343yba; Fri, 10 May 2019 09:35:04 -0700 (PDT) X-Google-Smtp-Source: APXvYqykmOf0F/6Erdh/3M1Vl6dHFb07vW2TDHh2oi6aPz9R3S3dqpjAr/4SiuEWLNs5/7MjshJD X-Received: by 2002:aa7:86c3:: with SMTP id h3mr15160314pfo.169.1557506104194; Fri, 10 May 2019 09:35:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1557506104; cv=none; d=google.com; s=arc-20160816; b=xPeHAIymjJ2laB2UCCwPAYJu2SmTFYyxRzKbgTV8Piiaih6A0Q6Kg1CrRCsNffcPUw 4C++BqA1jX9DbNnv/KsKlqHO0GlpFeqGSruY+qj7fePmlxxOVIuvMH0PUV5xaweJKT6y fnK+0tz0Ygwe+6szt7jgTfXrVG0T9cvRzbLlZazZkARLUCQgmsyZQiON1BIvfYqRjKio fV0sjCoGmhBa0+owkgI40y09mFHob+md3srLyKas+XK6g5BwQWlYhTicbzsBouKbR9Ud AaR9GsD6/7D0Uus5Y66z8VlzMqVaP/ukX70bo79Zwb28OUWkBj7/xnJlSZkxDgD51MXC OD4Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:content-transfer-encoding :mime-version:references:in-reply-to:subject:cc:to:from:date; bh=VWj+igmBR0WTOkXbMB/PW3Flnqc3B+qUxdhXluKQANk=; b=SnRv8Nd8xHkTQlgBno8vgWpMeWVsNfPchiPMAYfUVmxfpOHrTIGSLrwNpoA3fjWKOZ ILUQ1EiVk/GBXpGVyMTliSKADNomDtFHxpMj/hwkym6t53hxqrM+sjc2NOLnoZRa0oJW mCVh2s9o3he/5kt93swkpU8DhZ/1EJI3TiIMhUh5AVsUFqZ/TIz8tgDe3zVcApu/L0wT j4od/zKVqE+RFQI0tVAmYwVtwzJOal4pv0VRL1/8nkYh6uLRRDSjF7+xQyexuxn39vCi keEVTrryguJSePdwnWUfTluJEeeN0HMC0gx1Z22YxQKlHHwlgJy208wVGdcsYMrZ4nqI JZKw== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=ibm.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id n1si8531598pld.61.2019.05.10.09.34.47; Fri, 10 May 2019 09:35:04 -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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=ibm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727735AbfEJQdO (ORCPT + 99 others); Fri, 10 May 2019 12:33:14 -0400 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:35978 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727697AbfEJQdM (ORCPT ); Fri, 10 May 2019 12:33:12 -0400 Received: from pps.filterd (m0098393.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.27/8.16.0.27) with SMTP id x4AGMUNk068320 for ; Fri, 10 May 2019 12:33:11 -0400 Received: from e06smtp04.uk.ibm.com (e06smtp04.uk.ibm.com [195.75.94.100]) by mx0a-001b2d01.pphosted.com with ESMTP id 2sdb9xmc7p-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Fri, 10 May 2019 12:33:10 -0400 Received: from localhost by e06smtp04.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Fri, 10 May 2019 17:33:08 +0100 Received: from b06cxnps4075.portsmouth.uk.ibm.com (9.149.109.197) by e06smtp04.uk.ibm.com (192.168.101.134) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; (version=TLSv1/SSLv3 cipher=AES256-GCM-SHA384 bits=256/256) Fri, 10 May 2019 17:33:02 +0100 Received: from d06av24.portsmouth.uk.ibm.com (mk.ibm.com [9.149.105.60]) by b06cxnps4075.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id x4AGX1jq47186160 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 10 May 2019 16:33:01 GMT Received: from d06av24.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 00ED642052; Fri, 10 May 2019 16:33:01 +0000 (GMT) Received: from d06av24.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 63DF54203F; Fri, 10 May 2019 16:33:00 +0000 (GMT) Received: from mschwideX1 (unknown [9.145.32.174]) by d06av24.portsmouth.uk.ibm.com (Postfix) with ESMTP; Fri, 10 May 2019 16:33:00 +0000 (GMT) Date: Fri, 10 May 2019 18:32:58 +0200 From: Martin Schwidefsky To: Steven Rostedt Cc: Petr Mladek , Linus Torvalds , Andy Shevchenko , Rasmus Villemoes , "Tobin C . Harding" , Michal Hocko , Sergey Senozhatsky , Sergey Senozhatsky , linux-kernel@vger.kernel.org, Michael Ellerman , linuxppc-dev@lists.ozlabs.org, Russell Currey , Christophe Leroy , Stephen Rothwell , Heiko Carstens , linux-arch@vger.kernel.org, linux-s390@vger.kernel.org Subject: Re: [PATCH] vsprintf: Do not break early boot with probing addresses In-Reply-To: <20190510122401.21a598f6@gandalf.local.home> References: <20190510081635.GA4533@jagdpanzerIV> <20190510084213.22149-1-pmladek@suse.com> <20190510122401.21a598f6@gandalf.local.home> X-Mailer: Claws Mail 3.13.2 (GTK+ 2.24.30; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-TM-AS-GCONF: 00 x-cbid: 19051016-0016-0000-0000-0000027A67E3 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 19051016-0017-0000-0000-000032D72460 Message-Id: <20190510183258.1f6c4153@mschwideX1> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:,, definitions=2019-05-09_02:,, signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=870 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1810050000 definitions=main-1905100111 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 10 May 2019 12:24:01 -0400 Steven Rostedt wrote: > On Fri, 10 May 2019 10:42:13 +0200 > Petr Mladek wrote: > > > static const char *check_pointer_msg(const void *ptr) > > { > > - char byte; > > - > > if (!ptr) > > return "(null)"; > > > > - if (probe_kernel_address(ptr, byte)) > > + if ((unsigned long)ptr < PAGE_SIZE || IS_ERR_VALUE(ptr)) > > return "(efault)"; > > > > > < PAGE_SIZE ? > > do you mean: < TASK_SIZE ? The check with < TASK_SIZE would break on s390. The 'ptr' is in the kernel address space, *not* in the user address space. Remember s390 has two separate address spaces for kernel/user the check < TASK_SIZE only makes sense with a __user pointer. -- blue skies, Martin. "Reality continues to ruin my life." - Calvin.