Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp853304ybi; Tue, 16 Jul 2019 06:13:49 -0700 (PDT) X-Google-Smtp-Source: APXvYqxfiltexzyY6LGyG1BOYZl4drulI7YR6Pq9JG+i1xQX0EP2npi/6D8UFkAuQZtb0hxnOEUj X-Received: by 2002:a17:902:9a82:: with SMTP id w2mr35059439plp.291.1563282829730; Tue, 16 Jul 2019 06:13:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1563282829; cv=none; d=google.com; s=arc-20160816; b=z621vj3J5QLkuApuSS0hFB9bvY96KgFPRYIAKvGK/CBaUUsOVfXHOb5y65D7QQIvuP XiybDlWiag/fSv4GNsQ5RMVIwqw1NQ0AfZYBT8ZCo/j/ghHkG26YvFI2GeGh4n0Yq7qP LbVTm2r4LaZNeR2152R/1++rFtIrPDybtj4ouZO+8qH2KtKvRyPZG1q7gOvmHyp8ALn7 lSt/fbOjpIYao64NV9dOoSOZLInLzf1AhSIYhUPQxC2eb1WVuXGxqBfJaSDEFml6paEk +JgQONqUFU5h5znQ8x4U7HrcRB+CGmUu+zbWezzGoUwahMNDtsFftKztbjEv/6MIndbd L/bg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:in-reply-to :content-disposition:mime-version:references:subject:cc:to:from:date; bh=Y6Cv9ze5I2N2qtmfvE5WPTWeq7s8ANiDKq2wzME7rBc=; b=WzzT7+Pk8i/g6Om3oRJcxSoFqjy5ZCeD7GcnXlB49bfnXqFNvUtvbXddXj/aNX0Yua AJWQSFcUZQPHX9evRmBeUZBZV+mZMVYIdK83lN2dUSh2YWoPXZzzv1DyC4utjGBFckZX 4AHHLsm7jy4MIyqAC9a50DcBM4ZNX4VlS61agQ9ioLjDV+8ncshna8uosRj7WbDsY5lh d2b57G/7Ymb5IlLKpK6frpbqVu01u0KnAw7svheQTN2+htEBYRjvDWD9Ei4OidysIDcl ueGT/v9Oj3A7Z1MuiZoFlgQT5xzlKlQf1ux9Z3vu9Yx7AOKHbBiloOxqqPS7JguJppgH Hr0A== 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 f8si20063355pfn.43.2019.07.16.06.13.31; Tue, 16 Jul 2019 06:13:49 -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 S1732906AbfGPNLu (ORCPT + 99 others); Tue, 16 Jul 2019 09:11:50 -0400 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:26250 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726997AbfGPNLt (ORCPT ); Tue, 16 Jul 2019 09:11:49 -0400 Received: from pps.filterd (m0098420.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.0.27/8.16.0.27) with SMTP id x6GCwEip012006 for ; Tue, 16 Jul 2019 09:11:48 -0400 Received: from e06smtp04.uk.ibm.com (e06smtp04.uk.ibm.com [195.75.94.100]) by mx0b-001b2d01.pphosted.com with ESMTP id 2tset09esm-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Tue, 16 Jul 2019 09:11:47 -0400 Received: from localhost by e06smtp04.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Tue, 16 Jul 2019 14:11:45 +0100 Received: from b06cxnps3075.portsmouth.uk.ibm.com (9.149.109.195) 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) Tue, 16 Jul 2019 14:11:42 +0100 Received: from d06av26.portsmouth.uk.ibm.com (d06av26.portsmouth.uk.ibm.com [9.149.105.62]) by b06cxnps3075.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id x6GDBeDN42336360 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 16 Jul 2019 13:11:40 GMT Received: from d06av26.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 8704CAE045; Tue, 16 Jul 2019 13:11:40 +0000 (GMT) Received: from d06av26.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 33210AE055; Tue, 16 Jul 2019 13:11:40 +0000 (GMT) Received: from localhost (unknown [9.152.212.110]) by d06av26.portsmouth.uk.ibm.com (Postfix) with ESMTPS; Tue, 16 Jul 2019 13:11:40 +0000 (GMT) Date: Tue, 16 Jul 2019 15:11:38 +0200 From: Vasily Gorbik To: Petr Tesarik Cc: Heiko Carstens , Christian Borntraeger , Thomas Gleixner , Philipp Rudo , Greg Kroah-Hartman , Laura Abbott , Masahiro Yamada , "linux-kernel@vger.kernel.org" , "linux-s390@vger.kernel.org" , Raymund Will Subject: Re: [PATCH] s390: enable detection of kernel version from bzImage References: <20190716123006.2d426ec8@ezekiel.suse.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20190716123006.2d426ec8@ezekiel.suse.cz> X-TM-AS-GCONF: 00 x-cbid: 19071613-0016-0000-0000-0000029304B3 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 19071613-0017-0000-0000-000032F0D5A3 Message-Id: X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:,, definitions=2019-07-16_03:,, signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=1 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=869 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1810050000 definitions=main-1907160161 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Jul 16, 2019 at 10:30:14AM +0000, Petr Tesarik wrote: > On Tue, 16 Jul 2019 00:12:19 +0200 > Vasily Gorbik wrote: > > > Extend "parmarea" to include an offset of the version string, which is > > stored as 8-byte big endian value. > > > > To retrieve version string from bzImage reliably, one should check the > > presence of "S390EP" ascii string at 0x10008 (available since v3.2), > > then read the version string offset from 0x10428 (which has been 0 > > since v3.2 up to now). The string is null terminated. > > > > Could be retrieved with the following "file" command magic (requires > > file v5.34): > > 8 string \x02\x00\x00\x18\x60\x00\x00\x50\x02\x00\x00\x68\x60\x00\x00\x50\x40\x40\x40\x40\x40\x40\x40\x40 Linux S390 > > >0x10008 string S390EP > > >>0x10428 bequad >0 > > >>>(0x10428.Q) string >\0 \b, version %s > > > > Signed-off-by: Vasily Gorbik > > This looks great! Much cleaner than the original approach. > > Thank you, > Petr T Then I'll add Reported-by: Petr Tesarik Suggested-by: Petr Tesarik if you don't mind and try to queue that for 5.3.