vc_screen: extract vcs_write_buf
[linux-2.6-microblaze.git] / drivers / tty / vt / vc_screen.c
1 // SPDX-License-Identifier: GPL-2.0
2 /*
3  * Provide access to virtual console memory.
4  * /dev/vcs: the screen as it is being viewed right now (possibly scrolled)
5  * /dev/vcsN: the screen of /dev/ttyN (1 <= N <= 63)
6  *            [minor: N]
7  *
8  * /dev/vcsaN: idem, but including attributes, and prefixed with
9  *      the 4 bytes lines,columns,x,y (as screendump used to give).
10  *      Attribute/character pair is in native endianity.
11  *            [minor: N+128]
12  *
13  * /dev/vcsuN: similar to /dev/vcsaN but using 4-byte unicode values
14  *      instead of 1-byte screen glyph values.
15  *            [minor: N+64]
16  *
17  * /dev/vcsuaN: same idea as /dev/vcsaN for unicode (not yet implemented).
18  *
19  * This replaces screendump and part of selection, so that the system
20  * administrator can control access using file system permissions.
21  *
22  * aeb@cwi.nl - efter Friedas begravelse - 950211
23  *
24  * machek@k332.feld.cvut.cz - modified not to send characters to wrong console
25  *       - fixed some fatal off-by-one bugs (0-- no longer == -1 -> looping and looping and looping...)
26  *       - making it shorter - scr_readw are macros which expand in PRETTY long code
27  */
28
29 #include <linux/kernel.h>
30 #include <linux/major.h>
31 #include <linux/errno.h>
32 #include <linux/export.h>
33 #include <linux/tty.h>
34 #include <linux/interrupt.h>
35 #include <linux/mm.h>
36 #include <linux/init.h>
37 #include <linux/vt_kern.h>
38 #include <linux/selection.h>
39 #include <linux/kbd_kern.h>
40 #include <linux/console.h>
41 #include <linux/device.h>
42 #include <linux/sched.h>
43 #include <linux/fs.h>
44 #include <linux/poll.h>
45 #include <linux/signal.h>
46 #include <linux/slab.h>
47 #include <linux/notifier.h>
48
49 #include <linux/uaccess.h>
50 #include <asm/byteorder.h>
51 #include <asm/unaligned.h>
52
53 #undef attr
54 #undef org
55 #undef addr
56 #define HEADER_SIZE     4
57
58 #define CON_BUF_SIZE (CONFIG_BASE_SMALL ? 256 : PAGE_SIZE)
59
60 /*
61  * Our minor space:
62  *
63  *   0 ... 63   glyph mode without attributes
64  *  64 ... 127  unicode mode without attributes
65  * 128 ... 191  glyph mode with attributes
66  * 192 ... 255  unused (reserved for unicode with attributes)
67  *
68  * This relies on MAX_NR_CONSOLES being  <= 63, meaning 63 actual consoles
69  * with minors 0, 64, 128 and 192 being proxies for the foreground console.
70  */
71 #if MAX_NR_CONSOLES > 63
72 #warning "/dev/vcs* devices may not accommodate more than 63 consoles"
73 #endif
74
75 #define console(inode)          (iminor(inode) & 63)
76 #define use_unicode(inode)      (iminor(inode) & 64)
77 #define use_attributes(inode)   (iminor(inode) & 128)
78
79
80 struct vcs_poll_data {
81         struct notifier_block notifier;
82         unsigned int cons_num;
83         int event;
84         wait_queue_head_t waitq;
85         struct fasync_struct *fasync;
86 };
87
88 static int
89 vcs_notifier(struct notifier_block *nb, unsigned long code, void *_param)
90 {
91         struct vt_notifier_param *param = _param;
92         struct vc_data *vc = param->vc;
93         struct vcs_poll_data *poll =
94                 container_of(nb, struct vcs_poll_data, notifier);
95         int currcons = poll->cons_num;
96         int fa_band;
97
98         switch (code) {
99         case VT_UPDATE:
100                 fa_band = POLL_PRI;
101                 break;
102         case VT_DEALLOCATE:
103                 fa_band = POLL_HUP;
104                 break;
105         default:
106                 return NOTIFY_DONE;
107         }
108
109         if (currcons == 0)
110                 currcons = fg_console;
111         else
112                 currcons--;
113         if (currcons != vc->vc_num)
114                 return NOTIFY_DONE;
115
116         poll->event = code;
117         wake_up_interruptible(&poll->waitq);
118         kill_fasync(&poll->fasync, SIGIO, fa_band);
119         return NOTIFY_OK;
120 }
121
122 static void
123 vcs_poll_data_free(struct vcs_poll_data *poll)
124 {
125         unregister_vt_notifier(&poll->notifier);
126         kfree(poll);
127 }
128
129 static struct vcs_poll_data *
130 vcs_poll_data_get(struct file *file)
131 {
132         struct vcs_poll_data *poll = file->private_data, *kill = NULL;
133
134         if (poll)
135                 return poll;
136
137         poll = kzalloc(sizeof(*poll), GFP_KERNEL);
138         if (!poll)
139                 return NULL;
140         poll->cons_num = console(file_inode(file));
141         init_waitqueue_head(&poll->waitq);
142         poll->notifier.notifier_call = vcs_notifier;
143         /*
144          * In order not to lose any update event, we must pretend one might
145          * have occurred before we have a chance to register our notifier.
146          * This is also how user space has come to detect which kernels
147          * support POLLPRI on /dev/vcs* devices i.e. using poll() with
148          * POLLPRI and a zero timeout.
149          */
150         poll->event = VT_UPDATE;
151
152         if (register_vt_notifier(&poll->notifier) != 0) {
153                 kfree(poll);
154                 return NULL;
155         }
156
157         /*
158          * This code may be called either through ->poll() or ->fasync().
159          * If we have two threads using the same file descriptor, they could
160          * both enter this function, both notice that the structure hasn't
161          * been allocated yet and go ahead allocating it in parallel, but
162          * only one of them must survive and be shared otherwise we'd leak
163          * memory with a dangling notifier callback.
164          */
165         spin_lock(&file->f_lock);
166         if (!file->private_data) {
167                 file->private_data = poll;
168         } else {
169                 /* someone else raced ahead of us */
170                 kill = poll;
171                 poll = file->private_data;
172         }
173         spin_unlock(&file->f_lock);
174         if (kill)
175                 vcs_poll_data_free(kill);
176
177         return poll;
178 }
179
180 /**
181  * vcs_vc -- return VC for @inode
182  * @inode: inode for which to return a VC
183  * @viewed: returns whether this console is currently foreground (viewed)
184  *
185  * Must be called with console_lock.
186  */
187 static struct vc_data *vcs_vc(struct inode *inode, bool *viewed)
188 {
189         unsigned int currcons = console(inode);
190
191         WARN_CONSOLE_UNLOCKED();
192
193         if (currcons == 0) {
194                 currcons = fg_console;
195                 if (viewed)
196                         *viewed = true;
197         } else {
198                 currcons--;
199                 if (viewed)
200                         *viewed = false;
201         }
202         return vc_cons[currcons].d;
203 }
204
205 /**
206  * vcs_size -- return size for a VC in @vc
207  * @vc: which VC
208  * @attr: does it use attributes?
209  * @unicode: is it unicode?
210  *
211  * Must be called with console_lock.
212  */
213 static int vcs_size(const struct vc_data *vc, bool attr, bool unicode)
214 {
215         int size;
216
217         WARN_CONSOLE_UNLOCKED();
218
219         size = vc->vc_rows * vc->vc_cols;
220
221         if (attr) {
222                 if (unicode)
223                         return -EOPNOTSUPP;
224
225                 size = 2 * size + HEADER_SIZE;
226         } else if (unicode)
227                 size *= 4;
228
229         return size;
230 }
231
232 static loff_t vcs_lseek(struct file *file, loff_t offset, int orig)
233 {
234         struct inode *inode = file_inode(file);
235         struct vc_data *vc;
236         int size;
237
238         console_lock();
239         vc = vcs_vc(inode, NULL);
240         if (!vc) {
241                 console_unlock();
242                 return -ENXIO;
243         }
244
245         size = vcs_size(vc, use_attributes(inode), use_unicode(inode));
246         console_unlock();
247         if (size < 0)
248                 return size;
249         return fixed_size_llseek(file, offset, orig, size);
250 }
251
252
253 static ssize_t
254 vcs_read(struct file *file, char __user *buf, size_t count, loff_t *ppos)
255 {
256         struct inode *inode = file_inode(file);
257         struct vc_data *vc;
258         struct vcs_poll_data *poll;
259         long pos, read;
260         int attr, uni_mode, row, col, maxcol;
261         unsigned short *org = NULL;
262         ssize_t ret;
263         char *con_buf;
264         bool viewed;
265
266         con_buf = (char *) __get_free_page(GFP_KERNEL);
267         if (!con_buf)
268                 return -ENOMEM;
269
270         pos = *ppos;
271
272         /* Select the proper current console and verify
273          * sanity of the situation under the console lock.
274          */
275         console_lock();
276
277         uni_mode = use_unicode(inode);
278         attr = use_attributes(inode);
279         ret = -ENXIO;
280         vc = vcs_vc(inode, &viewed);
281         if (!vc)
282                 goto unlock_out;
283
284         ret = -EINVAL;
285         if (pos < 0)
286                 goto unlock_out;
287         /* we enforce 32-bit alignment for pos and count in unicode mode */
288         if (uni_mode && (pos | count) & 3)
289                 goto unlock_out;
290
291         poll = file->private_data;
292         if (count && poll)
293                 poll->event = 0;
294         read = 0;
295         ret = 0;
296         while (count) {
297                 char *con_buf0, *con_buf_start;
298                 long this_round, size;
299                 ssize_t orig_count;
300                 long p = pos;
301
302                 /* Check whether we are above size each round,
303                  * as copy_to_user at the end of this loop
304                  * could sleep.
305                  */
306                 size = vcs_size(vc, attr, uni_mode);
307                 if (size < 0) {
308                         if (read)
309                                 break;
310                         ret = size;
311                         goto unlock_out;
312                 }
313                 if (pos >= size)
314                         break;
315                 if (count > size - pos)
316                         count = size - pos;
317
318                 this_round = count;
319                 if (this_round > CON_BUF_SIZE)
320                         this_round = CON_BUF_SIZE;
321
322                 /* Perform the whole read into the local con_buf.
323                  * Then we can drop the console spinlock and safely
324                  * attempt to move it to userspace.
325                  */
326
327                 con_buf_start = con_buf0 = con_buf;
328                 orig_count = this_round;
329                 maxcol = vc->vc_cols;
330                 if (uni_mode) {
331                         unsigned int nr;
332
333                         ret = vc_uniscr_check(vc);
334                         if (ret)
335                                 break;
336                         p /= 4;
337                         row = p / vc->vc_cols;
338                         col = p % maxcol;
339                         nr = maxcol - col;
340                         do {
341                                 if (nr > this_round/4)
342                                         nr = this_round/4;
343                                 vc_uniscr_copy_line(vc, con_buf0, viewed,
344                                                     row, col, nr);
345                                 con_buf0 += nr * 4;
346                                 this_round -= nr * 4;
347                                 row++;
348                                 col = 0;
349                                 nr = maxcol;
350                         } while (this_round);
351                 } else if (!attr) {
352                         org = screen_pos(vc, p, viewed);
353                         col = p % maxcol;
354                         p += maxcol - col;
355                         while (this_round-- > 0) {
356                                 *con_buf0++ = (vcs_scr_readw(vc, org++) & 0xff);
357                                 if (++col == maxcol) {
358                                         org = screen_pos(vc, p, viewed);
359                                         col = 0;
360                                         p += maxcol;
361                                 }
362                         }
363                 } else {
364                         if (p < HEADER_SIZE) {
365                                 size_t tmp_count;
366
367                                 /* clamp header values if they don't fit */
368                                 con_buf0[0] = min(vc->vc_rows, 0xFFu);
369                                 con_buf0[1] = min(vc->vc_cols, 0xFFu);
370                                 getconsxy(vc, con_buf0 + 2);
371
372                                 con_buf_start += p;
373                                 this_round += p;
374                                 if (this_round > CON_BUF_SIZE) {
375                                         this_round = CON_BUF_SIZE;
376                                         orig_count = this_round - p;
377                                 }
378
379                                 tmp_count = HEADER_SIZE;
380                                 if (tmp_count > this_round)
381                                         tmp_count = this_round;
382
383                                 /* Advance state pointers and move on. */
384                                 this_round -= tmp_count;
385                                 p = HEADER_SIZE;
386                                 con_buf0 = con_buf + HEADER_SIZE;
387                                 /* If this_round >= 0, then p is even... */
388                         } else if (p & 1) {
389                                 /* Skip first byte for output if start address is odd
390                                  * Update region sizes up/down depending on free
391                                  * space in buffer.
392                                  */
393                                 con_buf_start++;
394                                 if (this_round < CON_BUF_SIZE)
395                                         this_round++;
396                                 else
397                                         orig_count--;
398                         }
399                         if (this_round > 0) {
400                                 unsigned short *tmp_buf = (unsigned short *)con_buf0;
401
402                                 p -= HEADER_SIZE;
403                                 p /= 2;
404                                 col = p % maxcol;
405
406                                 org = screen_pos(vc, p, viewed);
407                                 p += maxcol - col;
408
409                                 /* Buffer has even length, so we can always copy
410                                  * character + attribute. We do not copy last byte
411                                  * to userspace if this_round is odd.
412                                  */
413                                 this_round = (this_round + 1) >> 1;
414
415                                 while (this_round) {
416                                         *tmp_buf++ = vcs_scr_readw(vc, org++);
417                                         this_round --;
418                                         if (++col == maxcol) {
419                                                 org = screen_pos(vc, p, viewed);
420                                                 col = 0;
421                                                 p += maxcol;
422                                         }
423                                 }
424                         }
425                 }
426
427                 /* Finally, release the console semaphore while we push
428                  * all the data to userspace from our temporary buffer.
429                  *
430                  * AKPM: Even though it's a semaphore, we should drop it because
431                  * the pagefault handling code may want to call printk().
432                  */
433
434                 console_unlock();
435                 ret = copy_to_user(buf, con_buf_start, orig_count);
436                 console_lock();
437
438                 if (ret) {
439                         read += (orig_count - ret);
440                         ret = -EFAULT;
441                         break;
442                 }
443                 buf += orig_count;
444                 pos += orig_count;
445                 read += orig_count;
446                 count -= orig_count;
447         }
448         *ppos += read;
449         if (read)
450                 ret = read;
451 unlock_out:
452         console_unlock();
453         free_page((unsigned long) con_buf);
454         return ret;
455 }
456
457 static u16 *vcs_write_buf_noattr(struct vc_data *vc, const char *con_buf,
458                 unsigned int pos, unsigned int count, bool viewed, u16 **org0)
459 {
460         u16 *org;
461         unsigned int col, maxcol = vc->vc_cols;
462
463         *org0 = org = screen_pos(vc, pos, viewed);
464         col = pos % maxcol;
465         pos += maxcol - col;
466
467         while (count > 0) {
468                 unsigned char c = *con_buf++;
469
470                 count--;
471                 vcs_scr_writew(vc,
472                                (vcs_scr_readw(vc, org) & 0xff00) | c, org);
473                 org++;
474                 if (++col == maxcol) {
475                         org = screen_pos(vc, pos, viewed);
476                         col = 0;
477                         pos += maxcol;
478                 }
479         }
480
481         return org;
482 }
483
484 static u16 *vcs_write_buf(struct vc_data *vc, const char *con_buf,
485                 unsigned int pos, unsigned int count, bool viewed, u16 **org0)
486 {
487         u16 *org;
488         unsigned int col, maxcol = vc->vc_cols;
489         unsigned char c;
490
491         /* header */
492         if (pos < HEADER_SIZE) {
493                 char header[HEADER_SIZE];
494
495                 getconsxy(vc, header + 2);
496                 while (pos < HEADER_SIZE && count > 0) {
497                         count--;
498                         header[pos++] = *con_buf++;
499                 }
500                 if (!viewed)
501                         putconsxy(vc, header + 2);
502         }
503
504         if (!count)
505                 return NULL;
506
507         pos -= HEADER_SIZE;
508         col = (pos/2) % maxcol;
509
510         *org0 = org = screen_pos(vc, pos/2, viewed);
511
512         /* odd pos -- the first single character */
513         if (pos & 1) {
514                 count--;
515                 c = *con_buf++;
516 #ifdef __BIG_ENDIAN
517                 vcs_scr_writew(vc, c |
518                      (vcs_scr_readw(vc, org) & 0xff00), org);
519 #else
520                 vcs_scr_writew(vc, (c << 8) |
521                      (vcs_scr_readw(vc, org) & 0xff), org);
522 #endif
523                 org++;
524                 pos++;
525                 if (++col == maxcol) {
526                         org = screen_pos(vc, pos/2, viewed);
527                         col = 0;
528                 }
529         }
530
531         pos /= 2;
532         pos += maxcol - col;
533
534         /* even pos -- handle attr+character pairs */
535         while (count > 1) {
536                 unsigned short w;
537
538                 w = get_unaligned(((unsigned short *)con_buf));
539                 vcs_scr_writew(vc, w, org++);
540                 con_buf += 2;
541                 count -= 2;
542                 if (++col == maxcol) {
543                         org = screen_pos(vc, pos, viewed);
544                         col = 0;
545                         pos += maxcol;
546                 }
547         }
548
549         if (!count)
550                 return org;
551
552         /* odd pos -- the remaining character */
553         c = *con_buf++;
554 #ifdef __BIG_ENDIAN
555         vcs_scr_writew(vc, (vcs_scr_readw(vc, org) & 0xff) | (c << 8), org);
556 #else
557         vcs_scr_writew(vc, (vcs_scr_readw(vc, org) & 0xff00) | c, org);
558 #endif
559
560         return org;
561 }
562
563 static ssize_t
564 vcs_write(struct file *file, const char __user *buf, size_t count, loff_t *ppos)
565 {
566         struct inode *inode = file_inode(file);
567         struct vc_data *vc;
568         char *con_buf;
569         u16 *org0, *org;
570         unsigned int written;
571         int size;
572         ssize_t ret;
573         loff_t pos;
574         bool viewed, attr;
575
576         if (use_unicode(inode))
577                 return -EOPNOTSUPP;
578
579         con_buf = (char *) __get_free_page(GFP_KERNEL);
580         if (!con_buf)
581                 return -ENOMEM;
582
583         pos = *ppos;
584
585         /* Select the proper current console and verify
586          * sanity of the situation under the console lock.
587          */
588         console_lock();
589
590         attr = use_attributes(inode);
591         ret = -ENXIO;
592         vc = vcs_vc(inode, &viewed);
593         if (!vc)
594                 goto unlock_out;
595
596         size = vcs_size(vc, attr, false);
597         if (size < 0) {
598                 ret = size;
599                 goto unlock_out;
600         }
601         ret = -EINVAL;
602         if (pos < 0 || pos > size)
603                 goto unlock_out;
604         if (count > size - pos)
605                 count = size - pos;
606         written = 0;
607         while (count) {
608                 unsigned int this_round = count;
609
610                 if (this_round > CON_BUF_SIZE)
611                         this_round = CON_BUF_SIZE;
612
613                 /* Temporarily drop the console lock so that we can read
614                  * in the write data from userspace safely.
615                  */
616                 console_unlock();
617                 ret = copy_from_user(con_buf, buf, this_round);
618                 console_lock();
619
620                 if (ret) {
621                         this_round -= ret;
622                         if (!this_round) {
623                                 /* Abort loop if no data were copied. Otherwise
624                                  * fail with -EFAULT.
625                                  */
626                                 if (written)
627                                         break;
628                                 ret = -EFAULT;
629                                 goto unlock_out;
630                         }
631                 }
632
633                 /* The vcs_size might have changed while we slept to grab
634                  * the user buffer, so recheck.
635                  * Return data written up to now on failure.
636                  */
637                 size = vcs_size(vc, attr, false);
638                 if (size < 0) {
639                         if (written)
640                                 break;
641                         ret = size;
642                         goto unlock_out;
643                 }
644                 if (pos >= size)
645                         break;
646                 if (this_round > size - pos)
647                         this_round = size - pos;
648
649                 /* OK, now actually push the write to the console
650                  * under the lock using the local kernel buffer.
651                  */
652
653                 if (attr)
654                         org = vcs_write_buf(vc, con_buf, pos, this_round,
655                                         viewed, &org0);
656                 else
657                         org = vcs_write_buf_noattr(vc, con_buf, pos, this_round,
658                                         viewed, &org0);
659
660                 count -= this_round;
661                 written += this_round;
662                 buf += this_round;
663                 pos += this_round;
664                 if (org)
665                         update_region(vc, (unsigned long)(org0), org - org0);
666         }
667         *ppos += written;
668         ret = written;
669         if (written)
670                 vcs_scr_updated(vc);
671
672 unlock_out:
673         console_unlock();
674         free_page((unsigned long) con_buf);
675         return ret;
676 }
677
678 static __poll_t
679 vcs_poll(struct file *file, poll_table *wait)
680 {
681         struct vcs_poll_data *poll = vcs_poll_data_get(file);
682         __poll_t ret = DEFAULT_POLLMASK|EPOLLERR;
683
684         if (poll) {
685                 poll_wait(file, &poll->waitq, wait);
686                 switch (poll->event) {
687                 case VT_UPDATE:
688                         ret = DEFAULT_POLLMASK|EPOLLPRI;
689                         break;
690                 case VT_DEALLOCATE:
691                         ret = DEFAULT_POLLMASK|EPOLLHUP|EPOLLERR;
692                         break;
693                 case 0:
694                         ret = DEFAULT_POLLMASK;
695                         break;
696                 }
697         }
698         return ret;
699 }
700
701 static int
702 vcs_fasync(int fd, struct file *file, int on)
703 {
704         struct vcs_poll_data *poll = file->private_data;
705
706         if (!poll) {
707                 /* don't allocate anything if all we want is disable fasync */
708                 if (!on)
709                         return 0;
710                 poll = vcs_poll_data_get(file);
711                 if (!poll)
712                         return -ENOMEM;
713         }
714
715         return fasync_helper(fd, file, on, &poll->fasync);
716 }
717
718 static int
719 vcs_open(struct inode *inode, struct file *filp)
720 {
721         unsigned int currcons = console(inode);
722         bool attr = use_attributes(inode);
723         bool uni_mode = use_unicode(inode);
724         int ret = 0;
725
726         /* we currently don't support attributes in unicode mode */
727         if (attr && uni_mode)
728                 return -EOPNOTSUPP;
729
730         console_lock();
731         if(currcons && !vc_cons_allocated(currcons-1))
732                 ret = -ENXIO;
733         console_unlock();
734         return ret;
735 }
736
737 static int vcs_release(struct inode *inode, struct file *file)
738 {
739         struct vcs_poll_data *poll = file->private_data;
740
741         if (poll)
742                 vcs_poll_data_free(poll);
743         return 0;
744 }
745
746 static const struct file_operations vcs_fops = {
747         .llseek         = vcs_lseek,
748         .read           = vcs_read,
749         .write          = vcs_write,
750         .poll           = vcs_poll,
751         .fasync         = vcs_fasync,
752         .open           = vcs_open,
753         .release        = vcs_release,
754 };
755
756 static struct class *vc_class;
757
758 void vcs_make_sysfs(int index)
759 {
760         device_create(vc_class, NULL, MKDEV(VCS_MAJOR, index + 1), NULL,
761                       "vcs%u", index + 1);
762         device_create(vc_class, NULL, MKDEV(VCS_MAJOR, index + 65), NULL,
763                       "vcsu%u", index + 1);
764         device_create(vc_class, NULL, MKDEV(VCS_MAJOR, index + 129), NULL,
765                       "vcsa%u", index + 1);
766 }
767
768 void vcs_remove_sysfs(int index)
769 {
770         device_destroy(vc_class, MKDEV(VCS_MAJOR, index + 1));
771         device_destroy(vc_class, MKDEV(VCS_MAJOR, index + 65));
772         device_destroy(vc_class, MKDEV(VCS_MAJOR, index + 129));
773 }
774
775 int __init vcs_init(void)
776 {
777         unsigned int i;
778
779         if (register_chrdev(VCS_MAJOR, "vcs", &vcs_fops))
780                 panic("unable to get major %d for vcs device", VCS_MAJOR);
781         vc_class = class_create(THIS_MODULE, "vc");
782
783         device_create(vc_class, NULL, MKDEV(VCS_MAJOR, 0), NULL, "vcs");
784         device_create(vc_class, NULL, MKDEV(VCS_MAJOR, 64), NULL, "vcsu");
785         device_create(vc_class, NULL, MKDEV(VCS_MAJOR, 128), NULL, "vcsa");
786         for (i = 0; i < MIN_NR_CONSOLES; i++)
787                 vcs_make_sysfs(i);
788         return 0;
789 }